All of lore.kernel.org
 help / color / mirror / Atom feed
From: Darren Hart <dvhart@linux.intel.com>
To: Yang Shi <yang.shi@windriver.com>
Cc: yocto@yoctoproject.org
Subject: Re: [PATCH 1/2] initrdscripts: fix init-live.sh and use unionfs
Date: Mon, 09 Apr 2012 09:35:59 -0700	[thread overview]
Message-ID: <4F830FEF.7020001@linux.intel.com> (raw)
In-Reply-To: <1332796758-9702-2-git-send-email-yang.shi@windriver.com>



On 03/26/2012 02:19 PM, Yang Shi wrote:
> [YOCTO #1487]
> 
> Use unionfs to mount rootfs and make root file system can be writen when using liveCD to boot up.
> Set UNION_FS variable depending on kenrel config, so that it can work with kernel which doesn't

s/kenrel/kernel/

> have unionfs feature.

This doesn't explain what the problem was. Someone reading this commit
message would not know WHY this change was needed.

The approach looks good though. Minor spelling issues below...

> 
> Signed-off-by: Yang Shi <yang.shi@windriver.com>
> ---
>  meta/recipes-core/initrdscripts/files/init-live.sh |   21 +++++++++++++++++--
>  .../initrdscripts/initramfs-live-boot_1.0.bb       |    9 +++++++-
>  2 files changed, 26 insertions(+), 4 deletions(-)
> 
> diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh
> index eb5ab5b..abaf16c 100644
> --- a/meta/recipes-core/initrdscripts/files/init-live.sh
> +++ b/meta/recipes-core/initrdscripts/files/init-live.sh
> @@ -7,6 +7,7 @@ ROOT_IMAGE="rootfs.img"
>  MOUNT="/bin/mount"
>  UMOUNT="/bin/umount"
>  ISOLINUX=""
> +UNIONFS="no"
>  
>  early_setup() {
>      mkdir /proc
> @@ -89,10 +90,24 @@ case $label in
>  	mkdir $ROOT_MOUNT
>  	mknod /dev/loop0 b 7 0 2>/dev/null
>  
> -	if ! $MOUNT -o rw,loop,noatime,nodiratime /media/$i/$ISOLINUX/$ROOT_IMAGE $ROOT_MOUNT ; then
> -	    fatal "Couldnt mount rootfs image"

s/Couldnt/Could not/

> +	
> +	if [ "$UNIONFS" = "yes" ]; then
> +	    mkdir /rootfs-tmp
> +
> +	    if ! $MOUNT -o rw,loop,noatime,nodiratime /media/$i/$ISOLINUX/$ROOT_IMAGE /rootfs-tmp ; then
> +		fatal "Couldnt mount rootfs image"

s/Couldnt/Could not/

> +	    else
> +		mkdir /cow
> +		mount -t tmpfs -o rw,noatime,mode=755 tmpfs /cow
> +		mount -t unionfs -o dirs=/cow:/rootfs-tmp=ro unionfs $ROOT_MOUNT
> +		boot_live_root
> +	    fi
>  	else
> -	    boot_live_root
> +	    if ! $MOUNT -o rw,loop,noatime,nodiratime /media/$i/$ISOLINUX/$ROOT_IMAGE $ROOT_MOUNT ; then
> +		fatal "Couldnt mount rootfs image"

s/Couldnt/Could not/

> +	    else
> +		boot_live_root
> +	    fi
>  	fi
>  	;;
>      install)
> diff --git a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
> index e85a0e1..f7f0c9d 100644
> --- a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
> +++ b/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
> @@ -2,10 +2,17 @@ DESCRIPTION = "A live image init script"
>  LICENSE = "MIT"
>  LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
>  RDEPENDS = "udev"
> +DEPENDS = "virtual/kernel"
>  SRC_URI = "file://init-live.sh"
>  
> -PR = "r7"
> +PR = "r8"
>  
> +do_compile() {
> +	if grep -q "CONFIG_UNION_FS=y" ${STAGING_KERNEL_DIR}/.config; then
> +		sed -i 's/UNIONFS="no"/UNIONFS="yes"/g' ${WORKDIR}/init-live.sh
> +	fi
> +}
> + 
>  do_install() {
>          install -m 0755 ${WORKDIR}/init-live.sh ${D}/init
>  }

-- 
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel


  reply	other threads:[~2012-04-09 16:36 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-26 21:19 [PATCH 0/2] Fix init-live.sh to use unionfs for live CD and remove questioned ISO image Yang Shi
2012-03-26 21:19 ` [PATCH 1/2] initrdscripts: fix init-live.sh and use unionfs Yang Shi
2012-04-09 16:35   ` Darren Hart [this message]
2012-04-09 18:33     ` Yang Shi
2012-03-26 21:19 ` [PATCH 2/2] sato: Remove questioned ISO image Yang Shi
2012-03-28 14:42   ` Bruce Ashfield
2012-04-09 16:31   ` Darren Hart
2012-04-09 18:34     ` Yang Shi
2012-04-09 19:49       ` Darren Hart
2012-04-09 20:48         ` Yang Shi
  -- strict thread matches above, loose matches on Subject: below --
2012-04-09 22:15 [V2 PATCH 0/2] Fix init-live.sh to use unionfs for live CD and remove " Yang Shi
2012-04-09 22:15 ` [PATCH 1/2] initrdscripts: fix init-live.sh and use unionfs Yang Shi
2012-04-10 18:41   ` Darren Hart

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=4F830FEF.7020001@linux.intel.com \
    --to=dvhart@linux.intel.com \
    --cc=yang.shi@windriver.com \
    --cc=yocto@yoctoproject.org \
    /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.