Merge "hikey: turn on printk.devkmsg for 4.9 kernel"
am: ad297b8a7d

Change-Id: I647accb83d20a6b0a555a230d3ce07e1d5a34814
diff --git a/bootloader/EFI/BOOT/grub.cfg b/bootloader/EFI/BOOT/grub.cfg
index d5b166d..096a147 100644
--- a/bootloader/EFI/BOOT/grub.cfg
+++ b/bootloader/EFI/BOOT/grub.cfg
@@ -3,35 +3,35 @@
 menuentry 'AOSP' {
     search.fs_label boot root
     set root=($root)
-    linux /kernel console=ttyFIQ0 androidboot.console=ttyFIQ0 androidboot.hardware=hikey firmware_class.path=/system/etc/firmware efi=noruntime
+    linux /kernel console=ttyFIQ0 androidboot.console=ttyFIQ0 androidboot.hardware=hikey firmware_class.path=/system/etc/firmware efi=noruntime printk.devkmsg=on
     initrd /ramdisk.img
     devicetree /hi6220-hikey.dtb
 }
 menuentry 'AOSP-DEBUG' {
     search.fs_label boot root
     set root=($root)
-    linux /kernel earlycon=pl011,0xf7113000 no_console_suspend=1 console=ttyFIQ0 androidboot.console=ttyFIQ0 sysrq_always_enabled androidboot.hardware=hikey firmware_class.path=/system/etc/firmware efi=noruntime
+    linux /kernel earlycon=pl011,0xf7113000 no_console_suspend=1 console=ttyFIQ0 androidboot.console=ttyFIQ0 sysrq_always_enabled androidboot.hardware=hikey firmware_class.path=/system/etc/firmware efi=noruntime printk.devkmsg=on
     initrd /ramdisk.img
     devicetree /hi6220-hikey.dtb
 }
 menuentry 'AOSP-CONSOLE' {
     search.fs_label boot root
     set root=($root)
-    linux /kernel console=ttyAMA3,115200 androidboot.console=ttyAMA3 fiq_debugger.disable=Y androidboot.hardware=hikey firmware_class.path=/system/etc/firmware efi=noruntime
+    linux /kernel console=ttyAMA3,115200 androidboot.console=ttyAMA3 fiq_debugger.disable=Y androidboot.hardware=hikey firmware_class.path=/system/etc/firmware efi=noruntime printk.devkmsg=on
     initrd /ramdisk.img
     devicetree /hi6220-hikey.dtb
 }
 menuentry 'AOSP@720P' {
     search.fs_label boot root
     set root=($root)
-    linux /kernel console=ttyFIQ0 androidboot.console=ttyFIQ0 androidboot.hardware=hikey firmware_class.path=/system/etc/firmware efi=noruntime video=HDMI-A-1:1280x720@60
+    linux /kernel console=ttyFIQ0 androidboot.console=ttyFIQ0 androidboot.hardware=hikey firmware_class.path=/system/etc/firmware efi=noruntime video=HDMI-A-1:1280x720@60 printk.devkmsg=on
     initrd /ramdisk.img
     devicetree /hi6220-hikey.dtb
 }
 menuentry 'AOSP@SVGA' {
     search.fs_label boot root
     set root=($root)
-    linux /kernel console=ttyFIQ0 androidboot.console=ttyFIQ0 androidboot.hardware=hikey firmware_class.path=/system/etc/firmware efi=noruntime video=HDMI-A-1:800x600@60
+    linux /kernel console=ttyFIQ0 androidboot.console=ttyFIQ0 androidboot.hardware=hikey firmware_class.path=/system/etc/firmware efi=noruntime video=HDMI-A-1:800x600@60 printk.devkmsg=on
     initrd /ramdisk.img
     devicetree /hi6220-hikey.dtb
 }
diff --git a/hikey/BoardConfig.mk b/hikey/BoardConfig.mk
index d10a51c..f452990 100644
--- a/hikey/BoardConfig.mk
+++ b/hikey/BoardConfig.mk
@@ -7,6 +7,10 @@
 BOARD_KERNEL_CMDLINE := console=ttyFIQ0 androidboot.console=ttyFIQ0 androidboot.hardware=hikey firmware_class.path=/system/etc/firmware efi=noruntime
 endif
 
+## printk.devkmsg only has meaning for kernel 4.9 and later
+## it would be ignored by kernel 4.1 and kernel 4.4
+BOARD_KERNEL_CMDLINE += printk.devkmsg=on
+
 BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1610612736
 ifeq ($(TARGET_USERDATAIMAGE_4GB), true)
 BOARD_USERDATAIMAGE_PARTITION_SIZE := 1595915776