summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBruce J Beare <bruce.j.beare@intel.com>2016-04-01 16:13:04 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-04-01 16:13:04 +0000
commitfe8520bf18ae2589ba965b4522567d6fe6b4b26d (patch)
tree94c98d1eebbc2cbf0ff15e8e6e4522b98bae3355
parent79516781eff9fdaa4265b12740a52a384c8b4a82 (diff)
parent374f9e629c07486c128da7b7e3fb30412e914b64 (diff)
downloadintel-fe8520bf18ae2589ba965b4522567d6fe6b4b26d.tar.gz
Merge "Enable multiple consoles"
-rw-r--r--peripheral/console/framebuffer/fbconsole.rc10
-rw-r--r--peripheral/console/framebuffer/peripheral.mk6
-rw-r--r--peripheral/console/serial/peripheral.mk8
-rw-r--r--peripheral/console/serial/sconsole.rc10
-rw-r--r--peripheral/console/serial/sepolicy/file_contexts2
5 files changed, 33 insertions, 3 deletions
diff --git a/peripheral/console/framebuffer/fbconsole.rc b/peripheral/console/framebuffer/fbconsole.rc
new file mode 100644
index 0000000..d4f10b9
--- /dev/null
+++ b/peripheral/console/framebuffer/fbconsole.rc
@@ -0,0 +1,10 @@
+service fbconsole /system/bin/sh
+ class core
+ console tty0
+ disabled
+ user shell
+ group shell log readproc
+ seclabel u:r:shell:s0
+
+on property:ro.debuggable=1
+ start fbconsole
diff --git a/peripheral/console/framebuffer/peripheral.mk b/peripheral/console/framebuffer/peripheral.mk
index 92e477b..67ea651 100644
--- a/peripheral/console/framebuffer/peripheral.mk
+++ b/peripheral/console/framebuffer/peripheral.mk
@@ -15,6 +15,8 @@
TARGET_KERNEL_CONFIGS += $(realpath hardware/bsp/intel/peripheral/console/framebuffer/fb.kconf)
+PRODUCT_COPY_FILES += \
+ hardware/bsp/intel/peripheral/console/framebuffer/fbconsole.rc:$(TARGET_COPY_OUT_INITRCD)/fbconsole.rc
+
# using frame buffer console
-BOARD_KERNEL_CMDLINE += console=tty0 androidboot.console=tty0
-BOARD_KERNEL_CMDLINE += vga=current i915.modeset=1 drm.vblankoffdelay=1 i915.fastboot=1
+BOARD_KERNEL_CMDLINE += androidboot.console=disabled console=tty0 vga=current i915.modeset=1 drm.vblankoffdelay=1 i915.fastboot=1
diff --git a/peripheral/console/serial/peripheral.mk b/peripheral/console/serial/peripheral.mk
index d45ec16..c8d4770 100644
--- a/peripheral/console/serial/peripheral.mk
+++ b/peripheral/console/serial/peripheral.mk
@@ -13,4 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-BOARD_KERNEL_CMDLINE += console=ttyS0,115200n8
+BOARD_SEPOLICY_DIRS += $(realpath hardware/bsp/intel/peripheral/console/serial/sepolicy)
+
+PRODUCT_COPY_FILES += \
+ hardware/bsp/intel/peripheral/console/serial/sconsole.rc:$(TARGET_COPY_OUT_INITRCD)/sconsole.rc
+
+# using serial console
+BOARD_KERNEL_CMDLINE += androidboot.console=disabled console=ttyS0,115200n8
diff --git a/peripheral/console/serial/sconsole.rc b/peripheral/console/serial/sconsole.rc
new file mode 100644
index 0000000..7a306d0
--- /dev/null
+++ b/peripheral/console/serial/sconsole.rc
@@ -0,0 +1,10 @@
+service sconsole /system/bin/sh
+ class core
+ console ttyS0
+ disabled
+ user shell
+ group shell log readproc
+ seclabel u:r:shell:s0
+
+on property:ro.debuggable=1
+ start sconsole
diff --git a/peripheral/console/serial/sepolicy/file_contexts b/peripheral/console/serial/sepolicy/file_contexts
new file mode 100644
index 0000000..e0c9478
--- /dev/null
+++ b/peripheral/console/serial/sepolicy/file_contexts
@@ -0,0 +1,2 @@
+# Serial console
+/dev/ttyS0 u:object_r:console_device:s0