summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorJingdong Lu <jingdong.lu@windriver.com>2011-08-24 15:36:22 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-08-24 15:02:23 -0700
commit4f4475f4989c0a3c2dc7ea8d1e9fba3986a37c84 (patch)
tree7dc831e2f16fa4bd59c537c07822fd760f308723 /meta/recipes-core
parent6ba3b6ba9b8587791e392bf3542403ab33ca9ad3 (diff)
downloadpoky-4f4475f4989c0a3c2dc7ea8d1e9fba3986a37c84.tar.gz
initrdscripts: fix init-live.sh for hddimg and livecd
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. (From OE-Core rev: 4e7221d23bf335cbb4e1e2ba703e4c0a04df7129) Signed-off-by: Jingdong Lu <jingdong.lu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/initrdscripts/files/init-live.sh17
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb2
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 1cd87e8d94..6a1deba0e2 100644
--- a/meta/recipes-core/initrdscripts/files/init-live.sh
+++ b/meta/recipes-core/initrdscripts/files/init-live.sh
@@ -1,9 +1,10 @@
1#!/bin/sh 1#!/bin/sh
2 2
3ROOT_MOUNT="/rootfs/" 3ROOT_MOUNT="/rootfs/"
4ROOT_IMAGE="isolinux/rootfs.img" 4ROOT_IMAGE="rootfs.img"
5MOUNT="/bin/mount" 5MOUNT="/bin/mount"
6UMOUNT="/bin/umount" 6UMOUNT="/bin/umount"
7ISOLINUX=""
7 8
8early_setup() { 9early_setup() {
9 mkdir /proc 10 mkdir /proc
@@ -58,8 +59,12 @@ while true
58do 59do
59 for i in `ls /media 2>/dev/null`; do 60 for i in `ls /media 2>/dev/null`; do
60 if [ -f /media/$i/$ROOT_IMAGE ] ; then 61 if [ -f /media/$i/$ROOT_IMAGE ] ; then
61 found="yes" 62 found="yes"
62 break 63 break
64 elif [ -f /media/$i/isolinux/$ROOT_IMAGE ]; then
65 found="yes"
66 ISOLINUX="isolinux"
67 break
63 fi 68 fi
64 done 69 done
65 if [ "$found" = "yes" ]; then 70 if [ "$found" = "yes" ]; then
@@ -73,15 +78,15 @@ case $label in
73 mkdir $ROOT_MOUNT 78 mkdir $ROOT_MOUNT
74 mknod /dev/loop0 b 7 0 79 mknod /dev/loop0 b 7 0
75 80
76 if ! $MOUNT -o rw,loop,noatime,nodiratime /media/$i/$ROOT_IMAGE $ROOT_MOUNT ; then 81 if ! $MOUNT -o rw,loop,noatime,nodiratime /media/$i/$ISOLINUX/$ROOT_IMAGE $ROOT_MOUNT ; then
77 fatal "Couldnt mount rootfs image" 82 fatal "Couldnt mount rootfs image"
78 else 83 else
79 boot_live_root 84 boot_live_root
80 fi 85 fi
81 ;; 86 ;;
82 install) 87 install)
83 if [ -f /media/$i/$ROOT_IMAGE ] ; then 88 if [ -f /media/$i/$ISOLINUX/$ROOT_IMAGE ] ; then
84 ./install.sh $i $ROOT_IMAGE $video_mode $vga_mode 89 ./install.sh $i/$ISOLINUX $ROOT_IMAGE $video_mode $vga_mode
85 else 90 else
86 fatal "Couldnt find install script" 91 fatal "Couldnt find install script"
87 fi 92 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 140fb1d1e8..6d354b77ca 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"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" 3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
4SRC_URI = "file://init-live.sh" 4SRC_URI = "file://init-live.sh"
5 5
6PR = "r4" 6PR = "r5"
7 7
8do_install() { 8do_install() {
9 install -m 0755 ${WORKDIR}/init-live.sh ${D}/init 9 install -m 0755 ${WORKDIR}/init-live.sh ${D}/init