hikey: turn on printk.devkmsg for 4.9 kernel

With 4.9 kernel, ratelimit is default for kernel messages,
so we would not see message printed from userspace like following:
    init: starting service 'surfaceflinger'...

The information like this is necessary for us to know the status of android boot
during development, so turn on printk.devkmsg from the boot parameters.

kernel documentation is here:
https://android.googlesource.com/kernel/hikey-linaro/+/android-hikey-linaro-4.9/Documentation/kernel-parameters.txt#3273

Test: manually with hikey

Change-Id: Ib0ec7a311129108a14478c707564309ae10b390d
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
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