diff options
author | Roy Li <rongqing.li@windriver.com> | 2014-06-06 16:26:26 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-06-06 10:21:20 +0100 |
commit | e5f6dc48930c8ff35df5cff3550ec2ee86641faf (patch) | |
tree | fc84f956a0d7efa82ab18bc69ec99be79bc6e4b1 | |
parent | 4fad24fef5552bd0e4a5ea0982573ba8e4523570 (diff) | |
download | openembedded-core-e5f6dc48930c8ff35df5cff3550ec2ee86641faf.tar.gz openembedded-core-e5f6dc48930c8ff35df5cff3550ec2ee86641faf.tar.bz2 openembedded-core-e5f6dc48930c8ff35df5cff3550ec2ee86641faf.zip |
grub-2.00: remove our 40_custom
We have this in recipes-bsp/grub/grub/40_custom:
[snip]
menuentry "Linux" {
set root=(hd0,1)
linux /vmlinuz root=__ROOTFS__ rw __CONSOLE__ __VIDEO_MODE__ __VGA_MODE__ quiet
}
[snip]
These lines are only for initrdscripts/files/init-install.sh, the side
effect is that it would make the target's grub-mkconfig doesn't work
well since the 40_custom will be installed to /etc/grub.d/40_custom, the
grub-mkconfig will run the 40_custom, and there will always be a
'menuentry "Linux"' menu in grub.cfg no matter it is valid or not, we
can do this in init-install.sh rather than grub to fix the problem,
which is also much simpler.
We have done the related work in init-install.sh, now we need remove our own
40_custom, and use grub's own 40_custom which is the right one.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-core/initrdscripts/files/init-install-testfs.sh | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install-testfs.sh b/meta/recipes-core/initrdscripts/files/init-install-testfs.sh index 26e1fb3dd2..116a6b7b58 100644 --- a/meta/recipes-core/initrdscripts/files/init-install-testfs.sh +++ b/meta/recipes-core/initrdscripts/files/init-install-testfs.sh @@ -167,18 +167,16 @@ umount /src_root # Handling of the target boot partition mount $bootfs /boot echo "Preparing boot partition..." -if [ -f /etc/grub.d/40_custom ] ; then +if [ -f /etc/grub.d/00_header ] ; then echo "Preparing custom grub2 menu..." GRUBCFG="/boot/grub/grub.cfg" mkdir -p $(dirname $GRUBCFG) - cp /etc/grub.d/40_custom $GRUBCFG - sed -i "s@__ROOTFS__@$rootfs $rootwait@g" $GRUBCFG - sed -i "s/__VIDEO_MODE__/$3/g" $GRUBCFG - sed -i "s/__VGA_MODE__/$4/g" $GRUBCFG - sed -i "s/__CONSOLE__/$5/g" $GRUBCFG - sed -i "/#/d" $GRUBCFG - sed -i "/exec tail/d" $GRUBCFG - + cat >$GRUBCFG <<_EOF +menuentry "Linux" { + set root=(hd0,1) + linux /vmlinuz root=$rootfs $rootwait rw $5 $3 $4 quiet +} +_EOF # Add the test label echo -ne "\nmenuentry 'test' {\nlinux /test-kernel root=$testfs rw $rootwait quiet\n}\n" >> $GRUBCFG |