* [PATCH 0/2] Image building related fixes
@ 2011-10-11 19:18 Otavio Salvador
2011-10-11 19:18 ` [PATCH 1/2] image-live.bbclass: allow override of initrd image Otavio Salvador
2011-10-11 19:18 ` [PATCH 2/2] initramfs-live-boot: make it more generic and easy to use Otavio Salvador
0 siblings, 2 replies; 3+ messages in thread
From: Otavio Salvador @ 2011-10-11 19:18 UTC (permalink / raw)
To: openembedded-core
The following changes since commit 4732222c46652951e66aae377631f4a361179d8f:
Fix sysprof for powerpc64 (2011-10-10 09:54:03 +0100)
are available in the git repository at:
git://github.com/OSSystems/oe-core master
https://github.com/OSSystems/oe-core/tree/HEAD
Otavio Salvador (2):
image-live.bbclass: allow override of initrd image
initramfs-live-boot: make it more generic and easy to use
meta/classes/image-live.bbclass | 5 ++-
meta/recipes-core/initrdscripts/files/init-live.sh | 32 ++++++++++++-------
.../initrdscripts/initramfs-live-boot_1.0.bb | 3 +-
3 files changed, 25 insertions(+), 15 deletions(-)
--
1.7.2.5
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] image-live.bbclass: allow override of initrd image
2011-10-11 19:18 [PATCH 0/2] Image building related fixes Otavio Salvador
@ 2011-10-11 19:18 ` Otavio Salvador
2011-10-11 19:18 ` [PATCH 2/2] initramfs-live-boot: make it more generic and easy to use Otavio Salvador
1 sibling, 0 replies; 3+ messages in thread
From: Otavio Salvador @ 2011-10-11 19:18 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
meta/classes/image-live.bbclass | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/meta/classes/image-live.bbclass b/meta/classes/image-live.bbclass
index 1d184a1..e85ac1e 100644
--- a/meta/classes/image-live.bbclass
+++ b/meta/classes/image-live.bbclass
@@ -1,13 +1,14 @@
AUTO_SYSLINUXCFG = "1"
-INITRD ?= "${DEPLOY_DIR_IMAGE}/core-image-minimal-initramfs-${MACHINE}.cpio.gz"
+INITRD_IMAGE ?= "core-image-minimal-initramfs"
+INITRD ?= "${DEPLOY_DIR_IMAGE}/${INITRD_IMAGE}-${MACHINE}.cpio.gz"
APPEND += "root=/dev/ram0 "
TIMEOUT = "10"
LABELS += "boot install"
ROOTFS ?= "${DEPLOY_DIR_IMAGE}/${IMAGE_BASENAME}-${MACHINE}.ext3"
-do_bootimg[depends] += "core-image-minimal-initramfs:do_rootfs"
+do_bootimg[depends] += "${INITRD_IMAGE}:do_rootfs"
do_bootimg[depends] += "${IMAGE_BASENAME}:do_rootfs"
inherit bootimg
--
1.7.2.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] initramfs-live-boot: make it more generic and easy to use
2011-10-11 19:18 [PATCH 0/2] Image building related fixes Otavio Salvador
2011-10-11 19:18 ` [PATCH 1/2] image-live.bbclass: allow override of initrd image Otavio Salvador
@ 2011-10-11 19:18 ` Otavio Salvador
1 sibling, 0 replies; 3+ messages in thread
From: Otavio Salvador @ 2011-10-11 19:18 UTC (permalink / raw)
To: openembedded-core
The script was making some assumptions that enforced many requirement
in the machine kernel configuration and usage, besides it were too
while booting.
Changes included:
* fix indentation;
* rdepends on udev;
* allow use of isofs as module;
* remove rootdelay param parsing as it was unused;
* don't verbosely kill udevd and mknod;
* mount devtmpfs into rootfs, if available, before swithing root;
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
---
meta/recipes-core/initrdscripts/files/init-live.sh | 32 ++++++++++++-------
.../initrdscripts/initramfs-live-boot_1.0.bb | 3 +-
2 files changed, 22 insertions(+), 13 deletions(-)
diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh
index c054863..eb5ab5b 100644
--- a/meta/recipes-core/initrdscripts/files/init-live.sh
+++ b/meta/recipes-core/initrdscripts/files/init-live.sh
@@ -13,6 +13,11 @@ early_setup() {
mkdir /sys
mount -t proc proc /proc
mount -t sysfs sysfs /sys
+
+ # support modular kernel
+ modprobe isofs 2> /dev/null
+
+ mkdir /run
udevd --daemon
udevadm trigger --action=add
}
@@ -25,21 +30,25 @@ read_args() {
root=*)
ROOT_DEVICE=$optarg ;;
rootfstype=*)
- ROOT_FSTYPE=$optarg ;;
- rootdelay=*)
- rootdelay=$optarg ;;
- LABEL=*)
- label=$optarg ;;
- video=*)
- video_mode=$arg ;;
- vga=*)
- vga_mode=$arg ;;
+ modprobe $optarg 2> /dev/null ;;
+ LABEL=*)
+ label=$optarg ;;
+ video=*)
+ video_mode=$arg ;;
+ vga=*)
+ vga_mode=$arg ;;
esac
done
}
boot_live_root() {
- killall udevd
+ killall udevd 2>/dev/null
+
+ # use devtmpfs if available
+ if grep -q devtmpfs /proc/filesystems; then
+ mount -t devtmpfs devtmpfs $ROOT_MOUNT/dev
+ fi
+
cd $ROOT_MOUNT
exec switch_root -c /dev/console $ROOT_MOUNT /sbin/init
}
@@ -78,7 +87,7 @@ done
case $label in
boot)
mkdir $ROOT_MOUNT
- mknod /dev/loop0 b 7 0
+ 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"
@@ -97,4 +106,3 @@ case $label in
fatal "Installation image failed"
;;
esac
-
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 b404f8c..e85a0e1 100644
--- a/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-live-boot_1.0.bb
@@ -1,9 +1,10 @@
DESCRIPTION = "A live image init script"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
+RDEPENDS = "udev"
SRC_URI = "file://init-live.sh"
-PR = "r6"
+PR = "r7"
do_install() {
install -m 0755 ${WORKDIR}/init-live.sh ${D}/init
--
1.7.2.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-10-11 19:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-11 19:18 [PATCH 0/2] Image building related fixes Otavio Salvador
2011-10-11 19:18 ` [PATCH 1/2] image-live.bbclass: allow override of initrd image Otavio Salvador
2011-10-11 19:18 ` [PATCH 2/2] initramfs-live-boot: make it more generic and easy to use Otavio Salvador
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.