* [PATCH 1/2] initramfs-live-install: avoid using grub.d/40_custom
@ 2014-05-20 2:49 rongqing.li
2014-05-20 2:49 ` [PATCH 2/2] grub-2.00: remove our 40_custom rongqing.li
2014-05-21 17:43 ` [PATCH 1/2] initramfs-live-install: avoid using grub.d/40_custom Darren Hart
0 siblings, 2 replies; 7+ messages in thread
From: rongqing.li @ 2014-05-20 2:49 UTC (permalink / raw)
To: openembedded-core
From: Robert Yang <liezhi.yang@windriver.com>
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.
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
meta/recipes-core/initrdscripts/files/init-install.sh | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh
index 8e433d5..0ede928 100644
--- a/meta/recipes-core/initrdscripts/files/init-install.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install.sh
@@ -168,17 +168,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
chmod 0444 $GRUBCFG
fi
grub-install /dev/${device}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/2] grub-2.00: remove our 40_custom
2014-05-20 2:49 [PATCH 1/2] initramfs-live-install: avoid using grub.d/40_custom rongqing.li
@ 2014-05-20 2:49 ` rongqing.li
2014-05-21 17:43 ` [PATCH 1/2] initramfs-live-install: avoid using grub.d/40_custom Darren Hart
1 sibling, 0 replies; 7+ messages in thread
From: rongqing.li @ 2014-05-20 2:49 UTC (permalink / raw)
To: openembedded-core
From: Roy Li <rongqing.li@windriver.com>
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>
---
meta/recipes-bsp/grub/grub/40_custom | 9 ---------
meta/recipes-bsp/grub/grub_2.00.bb | 2 --
2 files changed, 11 deletions(-)
delete mode 100755 meta/recipes-bsp/grub/grub/40_custom
diff --git a/meta/recipes-bsp/grub/grub/40_custom b/meta/recipes-bsp/grub/grub/40_custom
deleted file mode 100755
index f891b02..0000000
--- a/meta/recipes-bsp/grub/grub/40_custom
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-exec tail -n +3 $0
-# This file provides an easy way to add custom menu entries. Simply type the
-# menu entries you want to add after this comment. Be careful not to change
-# the 'exec tail' line above.
-menuentry "Linux" {
- set root=(hd0,1)
- linux /vmlinuz root=__ROOTFS__ rw __CONSOLE__ __VIDEO_MODE__ __VGA_MODE__ quiet
-}
diff --git a/meta/recipes-bsp/grub/grub_2.00.bb b/meta/recipes-bsp/grub/grub_2.00.bb
index 6075b20..ce2d680 100644
--- a/meta/recipes-bsp/grub/grub_2.00.bb
+++ b/meta/recipes-bsp/grub/grub_2.00.bb
@@ -20,7 +20,6 @@ SRC_URI = "ftp://ftp.gnu.org/gnu/grub/grub-${PV}.tar.gz \
file://grub-2.00-fpmath-sse-387-fix.patch \
file://remove-gets.patch \
file://check-if-liblzma-is-disabled.patch \
- file://40_custom \
file://fix-issue-with-flex-2.5.37.patch \
file://grub-2.00-add-oe-kernel.patch \
"
@@ -44,7 +43,6 @@ EXTRA_OECONF = "--with-platform=pc --disable-grub-mkfont --program-prefix="" \
do_install_append () {
install -d ${D}${sysconfdir}/grub.d
- install -m 0755 ${WORKDIR}/40_custom ${D}${sysconfdir}/grub.d/40_custom
}
INSANE_SKIP_${PN} = "arch"
--
1.7.10.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] initramfs-live-install: avoid using grub.d/40_custom
2014-05-20 2:49 [PATCH 1/2] initramfs-live-install: avoid using grub.d/40_custom rongqing.li
2014-05-20 2:49 ` [PATCH 2/2] grub-2.00: remove our 40_custom rongqing.li
@ 2014-05-21 17:43 ` Darren Hart
2014-05-22 2:07 ` Robert Yang
1 sibling, 1 reply; 7+ messages in thread
From: Darren Hart @ 2014-05-21 17:43 UTC (permalink / raw)
To: rongqing.li, openembedded-core
On 5/19/14, 19:49, rongqing.li@windriver.com wrote:
> From: Robert Yang <liezhi.yang@windriver.com>
Hi Robert,
Just to clarify - there is no Patch 2/2 right?
> 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.
>
> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
> ---
> meta/recipes-core/initrdscripts/files/init-install.sh | 15 +++++++--------
> 1 file changed, 7 insertions(+), 8 deletions(-)
>
> diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh
> index 8e433d5..0ede928 100644
> --- a/meta/recipes-core/initrdscripts/files/init-install.sh
> +++ b/meta/recipes-core/initrdscripts/files/init-install.sh
> @@ -168,17 +168,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
OK, seems like a reasonable incremental change. What becomes of the
40_custom file itself? Should that be removed from the grub recipe as well?
Does the BSP variable "APPEND" get incorporated here anywhere? It's
looking like it isn't - or maybe I'm missing it?
Thanks,
--
Darren Hart Open Source Technology Center
darren.hart@intel.com Intel Corporation
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] initramfs-live-install: avoid using grub.d/40_custom
2014-05-21 17:43 ` [PATCH 1/2] initramfs-live-install: avoid using grub.d/40_custom Darren Hart
@ 2014-05-22 2:07 ` Robert Yang
2014-05-22 4:02 ` Darren Hart
2014-05-23 17:47 ` Saul Wold
0 siblings, 2 replies; 7+ messages in thread
From: Robert Yang @ 2014-05-22 2:07 UTC (permalink / raw)
To: Darren Hart, rongqing.li, openembedded-core
On 05/22/2014 01:43 AM, Darren Hart wrote:
> On 5/19/14, 19:49, rongqing.li@windriver.com wrote:
>> From: Robert Yang <liezhi.yang@windriver.com>
>
> Hi Robert,
>
> Just to clarify - there is no Patch 2/2 right?
Hi Darren,
Thanks, there is [PATCH 2/2] grub-2.00: remove our 40_custom:
http://lists.openembedded.org/pipermail/openembedded-core/2014-May/092736.html
I'm a little busy recently, so Roy helped me forward porting this patch,
please see my comments below.
>
>> 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.
>>
>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
>> ---
>> meta/recipes-core/initrdscripts/files/init-install.sh | 15 +++++++--------
>> 1 file changed, 7 insertions(+), 8 deletions(-)
>>
>> diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh
>> b/meta/recipes-core/initrdscripts/files/init-install.sh
>> index 8e433d5..0ede928 100644
>> --- a/meta/recipes-core/initrdscripts/files/init-install.sh
>> +++ b/meta/recipes-core/initrdscripts/files/init-install.sh
>> @@ -168,17 +168,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
>
> OK, seems like a reasonable incremental change. What becomes of the 40_custom
> file itself? Should that be removed from the grub recipe as well?
I'm afraid that the grub's 40_custom should be kept as other distro does:
=== begin ===
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
=== end ===
The problem is that recipes-bsp/grub/grub/40_custom has added unneeded lines.
>
> Does the BSP variable "APPEND" get incorporated here anywhere? It's looking like
> it isn't - or maybe I'm missing it?
Sorry, what do you mean about this, please ?
// Robert
>
> Thanks,
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] initramfs-live-install: avoid using grub.d/40_custom
2014-05-22 2:07 ` Robert Yang
@ 2014-05-22 4:02 ` Darren Hart
2014-05-23 17:47 ` Saul Wold
1 sibling, 0 replies; 7+ messages in thread
From: Darren Hart @ 2014-05-22 4:02 UTC (permalink / raw)
To: Robert Yang, rongqing.li, openembedded-core
On 5/21/14, 19:07, Robert Yang wrote:
>
> On 05/22/2014 01:43 AM, Darren Hart wrote:
>> On 5/19/14, 19:49, rongqing.li@windriver.com wrote:
>>> From: Robert Yang <liezhi.yang@windriver.com>
>>
>> Hi Robert,
>>
>> Just to clarify - there is no Patch 2/2 right?
>
> Hi Darren,
>
> Thanks, there is [PATCH 2/2] grub-2.00: remove our 40_custom:
>
> http://lists.openembedded.org/pipermail/openembedded-core/2014-May/092736.html
>
>
> I'm a little busy recently, so Roy helped me forward porting this patch,
> please see my comments below.
>
>>
>>> 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.
>>>
>>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
>>> ---
>>> meta/recipes-core/initrdscripts/files/init-install.sh | 15
>>> +++++++--------
>>> 1 file changed, 7 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh
>>> b/meta/recipes-core/initrdscripts/files/init-install.sh
>>> index 8e433d5..0ede928 100644
>>> --- a/meta/recipes-core/initrdscripts/files/init-install.sh
>>> +++ b/meta/recipes-core/initrdscripts/files/init-install.sh
>>> @@ -168,17 +168,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
>>
>> OK, seems like a reasonable incremental change. What becomes of the
>> 40_custom
>> file itself? Should that be removed from the grub recipe as well?
>
> I'm afraid that the grub's 40_custom should be kept as other distro does:
>
> === begin ===
> #!/bin/sh
> exec tail -n +3 $0
> # This file provides an easy way to add custom menu entries. Simply
> type the
> # menu entries you want to add after this comment. Be careful not to
> change
> # the 'exec tail' line above.
> === end ===
>
> The problem is that recipes-bsp/grub/grub/40_custom has added unneeded
> lines.
Got it.
>
>>
>> Does the BSP variable "APPEND" get incorporated here anywhere? It's
>> looking like
>> it isn't - or maybe I'm missing it?
>
> Sorry, what do you mean about this, please ?
The APPEND variable is used to define any kernel command line parameters
a BSP may need to boot and function properly. We should ensure these
parameters are carried through to the installation media. I don't see
them getting transferred over anywhere. See APPEND in the reference
manual or any of many of the BSPs for examples of what goes in there.
--
Darren Hart Open Source Technology Center
darren.hart@intel.com Intel Corporation
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] initramfs-live-install: avoid using grub.d/40_custom
2014-05-22 2:07 ` Robert Yang
2014-05-22 4:02 ` Darren Hart
@ 2014-05-23 17:47 ` Saul Wold
2014-06-06 7:21 ` Rongqing Li
1 sibling, 1 reply; 7+ messages in thread
From: Saul Wold @ 2014-05-23 17:47 UTC (permalink / raw)
To: Robert Yang, Darren Hart, rongqing.li, openembedded-core
On 05/21/2014 07:07 PM, Robert Yang wrote:
>
> On 05/22/2014 01:43 AM, Darren Hart wrote:
>> On 5/19/14, 19:49, rongqing.li@windriver.com wrote:
>>> From: Robert Yang <liezhi.yang@windriver.com>
>>
>> Hi Robert,
>>
>> Just to clarify - there is no Patch 2/2 right?
>
> Hi Darren,
>
> Thanks, there is [PATCH 2/2] grub-2.00: remove our 40_custom:
>
> http://lists.openembedded.org/pipermail/openembedded-core/2014-May/092736.html
>
There is a small issue still, the 40_custom is still mentioned in both
grub_git.bb and initrdscripts/files/init-install-testfs.sh
Sau!
>
> I'm a little busy recently, so Roy helped me forward porting this patch,
> please see my comments below.
>
>>
>>> 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.
>>>
>>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
>>> ---
>>> meta/recipes-core/initrdscripts/files/init-install.sh | 15
>>> +++++++--------
>>> 1 file changed, 7 insertions(+), 8 deletions(-)
>>>
>>> diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh
>>> b/meta/recipes-core/initrdscripts/files/init-install.sh
>>> index 8e433d5..0ede928 100644
>>> --- a/meta/recipes-core/initrdscripts/files/init-install.sh
>>> +++ b/meta/recipes-core/initrdscripts/files/init-install.sh
>>> @@ -168,17 +168,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
>>
>> OK, seems like a reasonable incremental change. What becomes of the
>> 40_custom
>> file itself? Should that be removed from the grub recipe as well?
>
> I'm afraid that the grub's 40_custom should be kept as other distro does:
>
> === begin ===
> #!/bin/sh
> exec tail -n +3 $0
> # This file provides an easy way to add custom menu entries. Simply
> type the
> # menu entries you want to add after this comment. Be careful not to
> change
> # the 'exec tail' line above.
> === end ===
>
> The problem is that recipes-bsp/grub/grub/40_custom has added unneeded
> lines.
>
>>
>> Does the BSP variable "APPEND" get incorporated here anywhere? It's
>> looking like
>> it isn't - or maybe I'm missing it?
>
> Sorry, what do you mean about this, please ?
>
> // Robert
>
>>
>> Thanks,
>>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] initramfs-live-install: avoid using grub.d/40_custom
2014-05-23 17:47 ` Saul Wold
@ 2014-06-06 7:21 ` Rongqing Li
0 siblings, 0 replies; 7+ messages in thread
From: Rongqing Li @ 2014-06-06 7:21 UTC (permalink / raw)
To: Saul Wold, Robert Yang; +Cc: Darren Hart, openembedded-core
On 05/24/2014 01:47 AM, Saul Wold wrote:
> On 05/21/2014 07:07 PM, Robert Yang wrote:
>>
>> On 05/22/2014 01:43 AM, Darren Hart wrote:
>>> On 5/19/14, 19:49, rongqing.li@windriver.com wrote:
>>>> From: Robert Yang <liezhi.yang@windriver.com>
>>>
>>> Hi Robert,
>>>
>>> Just to clarify - there is no Patch 2/2 right?
>>
>> Hi Darren,
>>
>> Thanks, there is [PATCH 2/2] grub-2.00: remove our 40_custom:
>>
>> http://lists.openembedded.org/pipermail/openembedded-core/2014-May/092736.html
>>
>>
>
> There is a small issue still, the 40_custom is still mentioned in both
> grub_git.bb and initrdscripts/files/init-install-testfs.sh
>
> Sau!
Robert:
We need to remove them all?
-Roy
>
>>
>> I'm a little busy recently, so Roy helped me forward porting this patch,
>> please see my comments below.
>>
>>>
>>>> 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.
>>>>
>>>> Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
>>>> ---
>>>> meta/recipes-core/initrdscripts/files/init-install.sh | 15
>>>> +++++++--------
>>>> 1 file changed, 7 insertions(+), 8 deletions(-)
>>>>
>>>> diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh
>>>> b/meta/recipes-core/initrdscripts/files/init-install.sh
>>>> index 8e433d5..0ede928 100644
>>>> --- a/meta/recipes-core/initrdscripts/files/init-install.sh
>>>> +++ b/meta/recipes-core/initrdscripts/files/init-install.sh
>>>> @@ -168,17 +168,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
>>>
>>> OK, seems like a reasonable incremental change. What becomes of the
>>> 40_custom
>>> file itself? Should that be removed from the grub recipe as well?
>>
>> I'm afraid that the grub's 40_custom should be kept as other distro does:
>>
>> === begin ===
>> #!/bin/sh
>> exec tail -n +3 $0
>> # This file provides an easy way to add custom menu entries. Simply
>> type the
>> # menu entries you want to add after this comment. Be careful not to
>> change
>> # the 'exec tail' line above.
>> === end ===
>>
>> The problem is that recipes-bsp/grub/grub/40_custom has added unneeded
>> lines.
>>
>>>
>>> Does the BSP variable "APPEND" get incorporated here anywhere? It's
>>> looking like
>>> it isn't - or maybe I'm missing it?
>>
>> Sorry, what do you mean about this, please ?
>>
>> // Robert
>>
>>>
>>> Thanks,
>>>
>
>
--
Best Reagrds,
Roy | RongQing Li
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-06-06 7:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-20 2:49 [PATCH 1/2] initramfs-live-install: avoid using grub.d/40_custom rongqing.li
2014-05-20 2:49 ` [PATCH 2/2] grub-2.00: remove our 40_custom rongqing.li
2014-05-21 17:43 ` [PATCH 1/2] initramfs-live-install: avoid using grub.d/40_custom Darren Hart
2014-05-22 2:07 ` Robert Yang
2014-05-22 4:02 ` Darren Hart
2014-05-23 17:47 ` Saul Wold
2014-06-06 7:21 ` Rongqing Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox