All of lore.kernel.org
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@linux.intel.com>
To: rongqing.li@windriver.com, openembedded-core@lists.openembedded.org
Subject: Re: [PATCH 1/2] initramfs-live-install: avoid using grub.d/40_custom
Date: Wed, 21 May 2014 10:43:39 -0700	[thread overview]
Message-ID: <537CE5CB.8030402@linux.intel.com> (raw)
In-Reply-To: <1400554188-19458-1-git-send-email-rongqing.li@windriver.com>

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


  parent reply	other threads:[~2014-05-21 17:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2014-05-22  2:07   ` [PATCH 1/2] initramfs-live-install: avoid using grub.d/40_custom Robert Yang
2014-05-22  4:02     ` Darren Hart
2014-05-23 17:47     ` Saul Wold
2014-06-06  7:21       ` Rongqing Li

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=537CE5CB.8030402@linux.intel.com \
    --to=dvhart@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=rongqing.li@windriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.