summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initrdscripts
diff options
context:
space:
mode:
authorRoy Li <rongqing.li@windriver.com>2014-06-06 16:26:26 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-06-06 10:24:07 +0100
commitc2e63957d5abaa4bb10507da5ba16f01112d0bf5 (patch)
tree539ca780239ac4dc22630f5a3a3fad92c78f3275 /meta/recipes-core/initrdscripts
parentec53bfd18c4e5d92ec4baedd702248a303a15dfa (diff)
downloadpoky-c2e63957d5abaa4bb10507da5ba16f01112d0bf5.tar.gz
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. (From OE-Core rev: e5f6dc48930c8ff35df5cff3550ec2ee86641faf) 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>
Diffstat (limited to 'meta/recipes-core/initrdscripts')
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install-testfs.sh16
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
167# Handling of the target boot partition 167# Handling of the target boot partition
168mount $bootfs /boot 168mount $bootfs /boot
169echo "Preparing boot partition..." 169echo "Preparing boot partition..."
170if [ -f /etc/grub.d/40_custom ] ; then 170if [ -f /etc/grub.d/00_header ] ; then
171 echo "Preparing custom grub2 menu..." 171 echo "Preparing custom grub2 menu..."
172 GRUBCFG="/boot/grub/grub.cfg" 172 GRUBCFG="/boot/grub/grub.cfg"
173 mkdir -p $(dirname $GRUBCFG) 173 mkdir -p $(dirname $GRUBCFG)
174 cp /etc/grub.d/40_custom $GRUBCFG 174 cat >$GRUBCFG <<_EOF
175 sed -i "s@__ROOTFS__@$rootfs $rootwait@g" $GRUBCFG 175menuentry "Linux" {
176 sed -i "s/__VIDEO_MODE__/$3/g" $GRUBCFG 176 set root=(hd0,1)
177 sed -i "s/__VGA_MODE__/$4/g" $GRUBCFG 177 linux /vmlinuz root=$rootfs $rootwait rw $5 $3 $4 quiet
178 sed -i "s/__CONSOLE__/$5/g" $GRUBCFG 178}
179 sed -i "/#/d" $GRUBCFG 179_EOF
180 sed -i "/exec tail/d" $GRUBCFG
181
182 # Add the test label 180 # Add the test label
183 echo -ne "\nmenuentry 'test' {\nlinux /test-kernel root=$testfs rw $rootwait quiet\n}\n" >> $GRUBCFG 181 echo -ne "\nmenuentry 'test' {\nlinux /test-kernel root=$testfs rw $rootwait quiet\n}\n" >> $GRUBCFG
184 182