Add console kernel options
PATCH 1/1 Add console kernel options
Live image installer did not preserve BSP specified console= kernel parameter. This patch updates the init scripts that are responsible for grub.cfg creation so that options like console= are passed allong from installer to installed img
[YOCTO #2426]
Signed-off-by Radu Moisan <[email protected]>
--- meta/recipes-bsp/grub/grub-1.99/40_custom | 2 +- .../initrdscripts/files/init-install.sh | 1 + meta/recipes-core/initrdscripts/files/init-live.sh | 8 +++++++- 3 files changed, 9 insertions(+), 2 deletions(-)
meta/recipes-bsp/grub/grub-1.99/40_custom +1 -1
@@ -5,5 +5,5 @@ exec tail -n +3 $0 # the 'exec tail' line above. menuentry "Linux" { set root=(hd0,1) - linux /boot/vmlinuz root=__ROOTFS__ rw __VIDEO_MODE__ __VGA_MODE__ quiet + linux /boot/vmlinuz root=__ROOTFS__ rw __CONSOLE__ __VIDEO_MODE__ __VGA_MODE__ quiet }
meta/recipes-core/initrdscripts/files/init-install.sh +1 -0
@@ -156,6 +156,7 @@ if [ -f /ssd/etc/grub.d/40_custom ] ; then sed -i "s@__ROOTFS__@$rootfs $rootwait@g" /ssd/etc/grub.d/40_custom sed -i "s/__VIDEO_MODE__/$3/g" /ssd/etc/grub.d/40_custom sed -i "s/__VGA_MODE__/$4/g" /ssd/etc/grub.d/40_custom + sed -i "s/__CONSOLE__/$5/g" /ssd/etc/grub.d/40_custom mount $bootfs /bootmnt cp /ssd/etc/grub.d/40_custom /bootmnt/40_custom umount /bootmnt
meta/recipes-core/initrdscripts/files/init-live.sh +7 -1
@@ -38,6 +38,12 @@ read_args() { video_mode=$arg ;; vga=*) vga_mode=$arg ;; + console=*) + if [ -z "${console_params}" ]; then + console_params=$arg + else + console_params="$console_params $arg" + fi esac done }
@@ -112,7 +118,7 @@ case $label in ;; install) if [ -f /media/$i/$ISOLINUX/$ROOT_IMAGE ] ; then - ./install.sh $i/$ISOLINUX $ROOT_IMAGE $video_mode $vga_mode + ./install.sh $i/$ISOLINUX $ROOT_IMAGE $video_mode $vga_mode $console_params else fatal "Could not find install script" fi
Signature · 1 line
1.7.9.5
Saul Wold
AppliedQuoted 55 lines · Radu Moisan
Live image installer did not preserve BSP specified console= kernel parameter. This patch updates the init scripts that are responsible for grub.cfg creation so that options like console= are passed allong from installer to installed img
[YOCTO #2426]
Signed-off-by Radu Moisan <[email protected]>--- meta/recipes-bsp/grub/grub-1.99/40_custom | 2 +- .../initrdscripts/files/init-install.sh | 1 + meta/recipes-core/initrdscripts/files/init-live.sh | 8 +++++++- 3 files changed, 9 insertions(+), 2 deletions(-)meta/recipes-bsp/grub/grub-1.99/40_custom +1
-1@@ -5,5 +5,5 @@ exec tail -n +3 $0 # the 'exec tail' line above. menuentry "Linux" { set root=(hd0,1) - linux /boot/vmlinuz root=__ROOTFS__ rw __VIDEO_MODE__ __VGA_MODE__ quiet + linux /boot/vmlinuz root=__ROOTFS__ rw __CONSOLE__ __VIDEO_MODE__ __VGA_MODE__ quiet }meta/recipes-core/initrdscripts/files/init-install.sh +1
-0@@ -156,6 +156,7 @@ if [ -f /ssd/etc/grub.d/40_custom ] ; then sed -i "s@__ROOTFS__@$rootfs $rootwait@g" /ssd/etc/grub.d/40_custom sed -i "s/__VIDEO_MODE__/$3/g" /ssd/etc/grub.d/40_custom sed -i "s/__VGA_MODE__/$4/g" /ssd/etc/grub.d/40_custom + sed -i "s/__CONSOLE__/$5/g" /ssd/etc/grub.d/40_custom mount $bootfs /bootmnt cp /ssd/etc/grub.d/40_custom /bootmnt/40_custom umount /bootmntmeta/recipes-core/initrdscripts/files/init-live.sh +6
-0@@ -38,6 +38,12 @@ read_args() { video_mode=$arg ;; vga=*) vga_mode=$arg ;; + console=*) + if [ -z "${console_params}" ]; then + console_params=$arg + else + console_params="$console_params $arg" + fi esac done }
meta/recipes-core/initrdscripts/files/init-live.sh case $label in · line 124
Quoted 8 lines
meta/recipes-core/initrdscripts/files/init-live.sh +1
-1@@ -112,7 +118,7 @@ case $label in ;; install) if [ -f /media/$i/$ISOLINUX/$ROOT_IMAGE ] ; then - ./install.sh $i/$ISOLINUX $ROOT_IMAGE $video_mode $vga_mode + ./install.sh $i/$ISOLINUX $ROOT_IMAGE $video_mode $vga_mode $console_params else fatal "Could not find install script" fi
Merged into OE-Core
Thanks
Sau!