All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1]initrdscripts: fix init-live.sh for hddimg and livecd
@ 2011-08-24  8:25 Jingdong.Lu
  2011-08-24  8:25 ` [PATCH 1/1] initrdscripts: " Jingdong.Lu
  2011-08-24 23:10 ` [PATCH 0/1]initrdscripts: " Saul Wold
  0 siblings, 2 replies; 4+ messages in thread
From: Jingdong.Lu @ 2011-08-24  8:25 UTC (permalink / raw)
  To: Openembedded-core

From: Jingdong Lu <jingdong.lu@windriver.com>

Both hddimg and livecd use init-live.sh script to boot the rootfs.img.
But the paths of rootfs.img in hddimg and livecd are different. So we add
a variable "ISOLINUX" to provide a correct path. 

The following changes since commit edd8e1e8b974eb3f0f9f66c2207aadf43612350b:
  Scott Rifenbark (1):
        documentation/adt-manual/adt-command.xml: general edits.

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib jingdonglu/bug686-v2
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=jingdonglu/bug686-v2

Jingdong Lu (1):
  initrdscripts: fix init-live.sh for hddimg and livecd

 meta/recipes-core/initrdscripts/files/init-live.sh |   17 +++++++++++------
 .../initrdscripts/initramfs-live-boot_1.0.bb       |    2 +-
 2 files changed, 12 insertions(+), 7 deletions(-)




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/1] initrdscripts: fix init-live.sh for hddimg and livecd
  2011-08-24  8:25 [PATCH 0/1]initrdscripts: fix init-live.sh for hddimg and livecd Jingdong.Lu
@ 2011-08-24  8:25 ` Jingdong.Lu
  2011-08-24 15:43   ` Otavio Salvador
  2011-08-24 23:10 ` [PATCH 0/1]initrdscripts: " Saul Wold
  1 sibling, 1 reply; 4+ messages in thread
From: Jingdong.Lu @ 2011-08-24  8:25 UTC (permalink / raw)
  To: Openembedded-core

From: Jingdong Lu <jingdong.lu@windriver.com>

Both hddimg and livecd use init-live.sh script to boot the rootfs.img.
But the paths of rootfs.img in hddimg and livecd are different. So we add
a variable "ISOLINUX" to provide a correct path.

Signed-off-by: Jingdong Lu <jingdong.lu@windriver.com>
---
 meta/recipes-core/initrdscripts/files/init-live.sh |   17 +++++++++++------
 .../initrdscripts/initramfs-live-boot_1.0.bb       |    2 +-
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh
index 1cd87e8..6a1deba 100644
--- a/meta/recipes-core/initrdscripts/files/init-live.sh
+++ b/meta/recipes-core/initrdscripts/files/init-live.sh
@@ -1,9 +1,10 @@
 #!/bin/sh
 
 ROOT_MOUNT="/rootfs/"
-ROOT_IMAGE="isolinux/rootfs.img"
+ROOT_IMAGE="rootfs.img"
 MOUNT="/bin/mount"
 UMOUNT="/bin/umount"
+ISOLINUX=""
 
 early_setup() {
     mkdir /proc
@@ -58,8 +59,12 @@ while true
 do
   for i in `ls /media 2>/dev/null`; do
       if [ -f /media/$i/$ROOT_IMAGE ] ; then
-	  found="yes"
-	  break
+		found="yes"
+		break
+	  elif [ -f /media/$i/isolinux/$ROOT_IMAGE ]; then
+		found="yes"
+		ISOLINUX="isolinux"
+		break	
       fi
   done
   if [ "$found" = "yes" ]; then
@@ -73,15 +78,15 @@ case $label in
 	mkdir $ROOT_MOUNT
 	mknod /dev/loop0 b 7 0
 
-	if ! $MOUNT -o rw,loop,noatime,nodiratime /media/$i/$ROOT_IMAGE $ROOT_MOUNT ; then
+	if ! $MOUNT -o rw,loop,noatime,nodiratime /media/$i/$ISOLINUX/$ROOT_IMAGE $ROOT_MOUNT ; then
 	    fatal "Couldnt mount rootfs image"
 	else
 	    boot_live_root
 	fi
 	;;
     install)
-	if [ -f /media/$i/$ROOT_IMAGE ] ; then
-	    ./install.sh $i $ROOT_IMAGE $video_mode $vga_mode
+	if [ -f /media/$i/$ISOLINUX/$ROOT_IMAGE ] ; then
+	    ./install.sh $i/$ISOLINUX $ROOT_IMAGE $video_mode $vga_mode
 	else
 	    fatal "Couldnt find install script"
 	fi
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 140fb1d..6d354b7 100644
--- a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
@@ -3,7 +3,7 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
 SRC_URI = "file://init-live.sh"
 
-PR = "r4"
+PR = "r5"
 
 do_install() {
         install -m 0755 ${WORKDIR}/init-live.sh ${D}/init
-- 
1.7.0.4




^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/1] initrdscripts: fix init-live.sh for hddimg and livecd
  2011-08-24  8:25 ` [PATCH 1/1] initrdscripts: " Jingdong.Lu
@ 2011-08-24 15:43   ` Otavio Salvador
  0 siblings, 0 replies; 4+ messages in thread
From: Otavio Salvador @ 2011-08-24 15:43 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Wed, Aug 24, 2011 at 05:25,  <Jingdong.Lu@windriver.com> wrote:
> Both hddimg and livecd use init-live.sh script to boot the rootfs.img.
> But the paths of rootfs.img in hddimg and livecd are different. So we add
> a variable "ISOLINUX" to provide a correct path.

I do like the patch and I think the way it fixes it is the right one
except by the variable name that has been choose; I'd use 'BASEDIR'
since this reflects more the reasoning of it to exist.

-- 
Otavio Salvador                             O.S. Systems
E-mail: otavio@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 0/1]initrdscripts: fix init-live.sh for hddimg and livecd
  2011-08-24  8:25 [PATCH 0/1]initrdscripts: fix init-live.sh for hddimg and livecd Jingdong.Lu
  2011-08-24  8:25 ` [PATCH 1/1] initrdscripts: " Jingdong.Lu
@ 2011-08-24 23:10 ` Saul Wold
  1 sibling, 0 replies; 4+ messages in thread
From: Saul Wold @ 2011-08-24 23:10 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer; +Cc: Jingdong.Lu

On 08/24/2011 01:25 AM, Jingdong.Lu@windriver.com wrote:
> From: Jingdong Lu<jingdong.lu@windriver.com>
>
> Both hddimg and livecd use init-live.sh script to boot the rootfs.img.
> But the paths of rootfs.img in hddimg and livecd are different. So we add
> a variable "ISOLINUX" to provide a correct path.
>
> The following changes since commit edd8e1e8b974eb3f0f9f66c2207aadf43612350b:
>    Scott Rifenbark (1):
>          documentation/adt-manual/adt-command.xml: general edits.
>
> are available in the git repository at:
>
>    git://git.pokylinux.org/poky-contrib jingdonglu/bug686-v2
>    http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=jingdonglu/bug686-v2
>
> Jingdong Lu (1):
>    initrdscripts: fix init-live.sh for hddimg and livecd
>
>   meta/recipes-core/initrdscripts/files/init-live.sh |   17 +++++++++++------
>   .../initrdscripts/initramfs-live-boot_1.0.bb       |    2 +-
>   2 files changed, 12 insertions(+), 7 deletions(-)
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>

Merged into OE-Core

Thanks
	Sau!



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-24 23:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-24  8:25 [PATCH 0/1]initrdscripts: fix init-live.sh for hddimg and livecd Jingdong.Lu
2011-08-24  8:25 ` [PATCH 1/1] initrdscripts: " Jingdong.Lu
2011-08-24 15:43   ` Otavio Salvador
2011-08-24 23:10 ` [PATCH 0/1]initrdscripts: " Saul Wold

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.