From: Saul Wold <sgw@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [CONSOLIDATED PULL 6/6] initrdscripts: fix init-live.sh for hddimg and livecd
Date: Wed, 24 Aug 2011 08:50:31 -0700 [thread overview]
Message-ID: <4e7221d23bf335cbb4e1e2ba703e4c0a04df7129.1314200868.git.sgw@linux.intel.com> (raw)
In-Reply-To: <cover.1314200868.git.sgw@linux.intel.com>
In-Reply-To: <cover.1314200868.git.sgw@linux.intel.com>
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.6
next prev parent reply other threads:[~2011-08-24 15:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-24 15:50 [CONSOLIDATED PULL 0/6] Bugfixes for M4 Saul Wold
2011-08-24 15:50 ` [CONSOLIDATED PULL 1/6] libtasn1: update SRC_URI Saul Wold
2011-08-24 15:50 ` [CONSOLIDATED PULL 2/6] procps: Fix lib path to support multilib Saul Wold
2011-08-24 15:50 ` [CONSOLIDATED PULL 3/6] mips32: add mips32el tuning Saul Wold
2011-08-24 15:50 ` [CONSOLIDATED PULL 4/6] cronie: Updates to cronie Saul Wold
2011-08-24 15:50 ` [CONSOLIDATED PULL 5/6] libpam: Setting suid bit for unix_chkpwd Saul Wold
2011-08-24 15:50 ` Saul Wold [this message]
2011-08-24 18:17 ` [CONSOLIDATED PULL 0/6] Bugfixes for M4 Richard Purdie
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=4e7221d23bf335cbb4e1e2ba703e4c0a04df7129.1314200868.git.sgw@linux.intel.com \
--to=sgw@linux.intel.com \
--cc=openembedded-core@lists.openembedded.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox