From b8e0c83bc18cb1ca8740c44b25ff910ab16681f2 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Fri, 15 Feb 2008 01:01:02 +0000 Subject: initramfs-image-ipk: Package initramfs into package. * Go badass with recursive bitbake invocation idea expressed on ML. * It works! But don't try with BB_NUMBER_THREADS > 1 or at home. --- packages/initrdscripts/initramfs-image-ipk_1.0.bb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 packages/initrdscripts/initramfs-image-ipk_1.0.bb (limited to 'packages/initrdscripts') diff --git a/packages/initrdscripts/initramfs-image-ipk_1.0.bb b/packages/initrdscripts/initramfs-image-ipk_1.0.bb new file mode 100644 index 0000000000..8c79c24478 --- /dev/null +++ b/packages/initrdscripts/initramfs-image-ipk_1.0.bb @@ -0,0 +1,15 @@ +DESCRIPTION = "Boot initramfs as a package" +PR = "r1" + +do_compile() { + cd ${TOPDIR}; DISTRO=${USERDISTRO} MACHINE=${MACHINE} ANGSTROM_MODE=uclibc IMAGE_FSTYPES=cpio.gz DEPLOY_TO=${D}/boot/initramfs.bin bitbake initramfs-image +} + +do_install() { + install -d ${D}/boot/ + cd ${TOPDIR}; DISTRO=${USERDISTRO} MACHINE=${MACHINE} ANGSTROM_MODE=uclibc IMAGE_FSTYPES=cpio.gz DEPLOY_TO=${D}/boot/initramfs.bin bitbake initramfs-image -c deploy_to +} + +FILES_${PN} += "/boot/*" + +PACKAGE_ARCH = "${MACHINE_ARCH}" -- cgit v1.2.3 From 07e7c1fcd70ab0a124aaee53deacb49a9f388975 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Fri, 15 Feb 2008 15:43:42 +0000 Subject: kernel-initramfs: A recipe to build a kernel with linked in initramfs. * First builds ${KERNEL_INITRAMFS} in cpio.gz format, then stuffs it into kernel as specified by virtual/kernel, deploys to deploy dir, and packages kernel-image (the package would overrite previously built kernel-image package w/o initramfs, so caveat). * kernel-image packaing actually requires PKGPV/PKGPR support, to be RFCed. --- packages/initrdscripts/kernel-initramfs_1.0.bb | 48 ++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 packages/initrdscripts/kernel-initramfs_1.0.bb (limited to 'packages/initrdscripts') diff --git a/packages/initrdscripts/kernel-initramfs_1.0.bb b/packages/initrdscripts/kernel-initramfs_1.0.bb new file mode 100644 index 0000000000..be1c067ba2 --- /dev/null +++ b/packages/initrdscripts/kernel-initramfs_1.0.bb @@ -0,0 +1,48 @@ +DESCRIPTION = "A kernel with internal initramfs" +PR = "r1" + +#inherit kernel +KERNEL_IMAGETYPE ?= "zImage" + +# Name of initramfs recipe to build and put result into kernel +KERNEL_INITRAMFS ?= "initramfs-image" + +do_compile() { + cd ${TOPDIR}; DISTRO=${USERDISTRO} MACHINE=${MACHINE} ANGSTROM_MODE=uclibc IMAGE_FSTYPES=cpio.gz DEPLOY_TO=${WORKDIR}/initramfs.bin bitbake ${KERNEL_INITRAMFS} -c deploy_to + cd ${TOPDIR}; DISTRO=${USERDISTRO} MACHINE=${MACHINE} INITRAMFS_LOC=${WORKDIR}/initramfs.bin DEPLOY_TO=${WORKDIR}/\${KERNEL_IMAGE_BASE_NAME} bitbake virtual/kernel -c builtin_initramfs +} + +do_install() { + install -d ${D}/boot/ + install -m 644 ${WORKDIR}/${KERNEL_IMAGETYPE}* ${D}/boot/${KERNEL_IMAGETYPE}-${@get_pv(d)} +} + +def get_version(d): + import bb + import os + dest = bb.data.getVar("WORKDIR", d, 1) + try: + files = os.listdir(dest) + files = filter(lambda f:f.startswith("zImage-"), files) + ver = files[0][len("zImage-"):] + return ver + except: + return "dum-m-y" + +def get_pv(d): + ver = get_version(d) + verc = ver.split("-") + return verc[0] + "-" + verc[1] + +def get_pr(d): + ver = get_version(d) + verc = ver.split("-") + return verc[2] + +PACKAGES = "kernel-image" +FILES_kernel-image = "/boot/*" +PKG_kernel-image = "kernel-image-${@get_pv(d)}" +PKGPV_kernel-image = "${@get_pv(d)}" +PKGPR_kernel-image = "${@get_pr(d)}" + +PACKAGE_ARCH = "${MACHINE_ARCH}" -- cgit v1.2.3 From 82e725505a8924059c5c75ed32cf3101ef318c10 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 16 Feb 2008 00:17:13 +0000 Subject: initramfs-module-kexecboot: Initramfs module to kexec to kernel in rootfs. * Instead of switch_root'ing to it, which was the only working mode previously. So, now, if there's /boot/zImage in rootfs, it will be kexec'ed too. Otherwise, switch_root will happen. * Caveat: there should be initramfs for new (kexec'ed to) kernel too, too handle its loading of rootfs as selected by interactive bootloader. This can be very same kernel as for bootloader, with bundled initramfs-bootmenu-image (which has special check - if root is explicitly specified on command line, then skip interactive selection); or, as a kind of optimization, that could be initramfs-image (no interactive part). Finally, initramfs (any of there two or other) can be a standalone file in rootfs, /boot/initramfs.bin. --- packages/initrdscripts/files/87-kexecboot.sh | 17 +++++++++++++++++ .../initrdscripts/initramfs-module-kexecboot_1.0.bb | 12 ++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 packages/initrdscripts/files/87-kexecboot.sh create mode 100644 packages/initrdscripts/initramfs-module-kexecboot_1.0.bb (limited to 'packages/initrdscripts') diff --git a/packages/initrdscripts/files/87-kexecboot.sh b/packages/initrdscripts/files/87-kexecboot.sh new file mode 100644 index 0000000000..ab281577d4 --- /dev/null +++ b/packages/initrdscripts/files/87-kexecboot.sh @@ -0,0 +1,17 @@ +#!/bin/sh +# Allow kexecing to kernel in rootfs + +if [ -n "$BOOT_ROOT" -a -f "$BOOT_ROOT/boot/zImage" ]; then + echo "Kernel found in rootfs:" + ls -l "$BOOT_ROOT/boot/zImage" + initramfs="" + if [ -f "$BOOT_ROOT/boot/initramfs.bin" ]; then + echo "Initramfs found in rootfs:" + ls -l "$BOOT_ROOT/boot/initramfs.bin" + initramfs="--initrd=$BOOT_ROOT/boot/initramfs.bin" + fi + echo /usr/sbin/kexec -f "$BOOT_ROOT/boot/zImage" $initramfs --command-line="$CMDLINE" + sleep 10 + /usr/sbin/kexec -f "$BOOT_ROOT/boot/zImage" $initramfs --command-line="$CMDLINE" + sleep 10000 +fi diff --git a/packages/initrdscripts/initramfs-module-kexecboot_1.0.bb b/packages/initrdscripts/initramfs-module-kexecboot_1.0.bb new file mode 100644 index 0000000000..e8be2fd757 --- /dev/null +++ b/packages/initrdscripts/initramfs-module-kexecboot_1.0.bb @@ -0,0 +1,12 @@ +SRC_URI = "file://87-kexecboot.sh" +PR = "r0.2" +DESCRIPTION = "An initramfs module for kexecing kernel from rootfs." +RDEPENDS = "initramfs-uniboot kexec-static" + +do_install() { + install -d ${D}/initrd.d + install -m 0755 ${WORKDIR}/87-kexecboot.sh ${D}/initrd.d/ +} + +PACKAGE_ARCH = "all" +FILES_${PN} += " /initrd.d/* " -- cgit v1.2.3 From 122a4440127e4015df191e4204fd05e132cba3eb Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 16 Feb 2008 00:20:31 +0000 Subject: devimage 0.1: Up a usb0 on load, now that we're modular. --- packages/initrdscripts/devimage/devimage.sh | 5 +++++ packages/initrdscripts/devimage_0.1.bb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'packages/initrdscripts') diff --git a/packages/initrdscripts/devimage/devimage.sh b/packages/initrdscripts/devimage/devimage.sh index e85debf245..8a264ed33d 100644 --- a/packages/initrdscripts/devimage/devimage.sh +++ b/packages/initrdscripts/devimage/devimage.sh @@ -7,6 +7,11 @@ mount -t sysfs sysfs /sys mkdir -p /dev/pts mount -t devpts devpts /dev/pts +modprobe g_ether +ifconfig usb0 192.168.2.202 + +export PATH=$PATH:/usr/sbin + /usr/sbin/dropbear -E /bin/sh diff --git a/packages/initrdscripts/devimage_0.1.bb b/packages/initrdscripts/devimage_0.1.bb index 08949b9515..c671f38025 100644 --- a/packages/initrdscripts/devimage_0.1.bb +++ b/packages/initrdscripts/devimage_0.1.bb @@ -1,6 +1,6 @@ DESCRIPTION = "Set of files to initialize bare system suitable for kernel, etc. testing." SRC_URI = "file://devimage.sh file://passwd file://dropbear_rsa_host_key" -PR = "r2" +PR = "r3" do_install() { install -m 0755 ${WORKDIR}/devimage.sh ${D}/init -- cgit v1.2.3 From f53ea006bcf4e938ed1c569080472dd05dc84b4d Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sat, 16 Feb 2008 03:00:52 +0000 Subject: initramfs-module-bootmenu, initramfs-module-kexecboot: Fixes for kexecing. * Be sure to pass original command line contents to new kernel. * Add protection against infinite recursive kexecing. --- packages/initrdscripts/files/30-bootmenu.sh | 5 +++-- packages/initrdscripts/files/87-kexecboot.sh | 24 ++++++++++++---------- .../initrdscripts/initramfs-module-bootmenu_1.0.bb | 2 +- .../initramfs-module-kexecboot_1.0.bb | 2 +- 4 files changed, 18 insertions(+), 15 deletions(-) (limited to 'packages/initrdscripts') diff --git a/packages/initrdscripts/files/30-bootmenu.sh b/packages/initrdscripts/files/30-bootmenu.sh index 7bc1429b1b..d54a643807 100644 --- a/packages/initrdscripts/files/30-bootmenu.sh +++ b/packages/initrdscripts/files/30-bootmenu.sh @@ -145,12 +145,13 @@ path=`expr "$sel" : '[^/]*\([^ ]*\).*'` if [ "$dev" == "NFS" ]; then ROOT_DEVICE="/dev/nfs" - CMDLINE="$CMDLINE nfsroot=192.168.2.200:/srv/nfs/oe/image" + CMDLINE="$CMDLINE root=/dev/nfs nfsroot=192.168.2.200:/srv/nfs/oe/image" elif [ -n "$path" ]; then ROOT_DEVICE="/dev/loop" - CMDLINE="looproot=/dev/$dev:$path" + CMDLINE="$CMDLINE root=/dev/loop looproot=/dev/$dev:$path" else ROOT_DEVICE="/dev/$dev" + CMDLINE="$CMDLINE root=$ROOT_DEVICE" fi echo ROOT_DEVICE=$ROOT_DEVICE diff --git a/packages/initrdscripts/files/87-kexecboot.sh b/packages/initrdscripts/files/87-kexecboot.sh index ab281577d4..9232934f98 100644 --- a/packages/initrdscripts/files/87-kexecboot.sh +++ b/packages/initrdscripts/files/87-kexecboot.sh @@ -2,16 +2,18 @@ # Allow kexecing to kernel in rootfs if [ -n "$BOOT_ROOT" -a -f "$BOOT_ROOT/boot/zImage" ]; then - echo "Kernel found in rootfs:" - ls -l "$BOOT_ROOT/boot/zImage" - initramfs="" - if [ -f "$BOOT_ROOT/boot/initramfs.bin" ]; then - echo "Initramfs found in rootfs:" - ls -l "$BOOT_ROOT/boot/initramfs.bin" - initramfs="--initrd=$BOOT_ROOT/boot/initramfs.bin" + if ! expr "$CMDLINE" : '.*nokexec'; then + echo "Kernel found in rootfs:" + ls -l "$BOOT_ROOT/boot/zImage" + initramfs="" + if [ -f "$BOOT_ROOT/boot/initramfs.bin" ]; then + echo "Initramfs found in rootfs:" + ls -l "$BOOT_ROOT/boot/initramfs.bin" + initramfs="--initrd=$BOOT_ROOT/boot/initramfs.bin" + fi + echo /usr/sbin/kexec -f "$BOOT_ROOT/boot/zImage" $initramfs --command-line="$CMDLINE nokexec" + sleep 10 + /usr/sbin/kexec -f "$BOOT_ROOT/boot/zImage" $initramfs --command-line="$CMDLINE nokexec" + sleep 10000 fi - echo /usr/sbin/kexec -f "$BOOT_ROOT/boot/zImage" $initramfs --command-line="$CMDLINE" - sleep 10 - /usr/sbin/kexec -f "$BOOT_ROOT/boot/zImage" $initramfs --command-line="$CMDLINE" - sleep 10000 fi diff --git a/packages/initrdscripts/initramfs-module-bootmenu_1.0.bb b/packages/initrdscripts/initramfs-module-bootmenu_1.0.bb index e87ba69776..8b9a49f40b 100644 --- a/packages/initrdscripts/initramfs-module-bootmenu_1.0.bb +++ b/packages/initrdscripts/initramfs-module-bootmenu_1.0.bb @@ -1,5 +1,5 @@ SRC_URI = "file://30-bootmenu.sh" -PR = "r8" +PR = "r9" DESCRIPTION = "An initramfs module with UI for selection of boot device." RDEPENDS = "klibc-utils-fstype initramfs-uniboot initramfs-module-block initramfs-module-loop initramfs-module-nfs" # For VFAT mounting. diff --git a/packages/initrdscripts/initramfs-module-kexecboot_1.0.bb b/packages/initrdscripts/initramfs-module-kexecboot_1.0.bb index e8be2fd757..35100a94e6 100644 --- a/packages/initrdscripts/initramfs-module-kexecboot_1.0.bb +++ b/packages/initrdscripts/initramfs-module-kexecboot_1.0.bb @@ -1,5 +1,5 @@ SRC_URI = "file://87-kexecboot.sh" -PR = "r0.2" +PR = "r0.4" DESCRIPTION = "An initramfs module for kexecing kernel from rootfs." RDEPENDS = "initramfs-uniboot kexec-static" -- cgit v1.2.3 From c7c0ee0bb756ca79840a318378562d65a236bd4c Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 17 Feb 2008 02:49:20 +0000 Subject: devimage 0.1: Link init script to /sbin/init, so this can be booted as normal rootfs. * In addition to default initramfs booting. --- packages/initrdscripts/devimage_0.1.bb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'packages/initrdscripts') diff --git a/packages/initrdscripts/devimage_0.1.bb b/packages/initrdscripts/devimage_0.1.bb index c671f38025..0622dd0330 100644 --- a/packages/initrdscripts/devimage_0.1.bb +++ b/packages/initrdscripts/devimage_0.1.bb @@ -1,12 +1,14 @@ DESCRIPTION = "Set of files to initialize bare system suitable for kernel, etc. testing." SRC_URI = "file://devimage.sh file://passwd file://dropbear_rsa_host_key" -PR = "r3" +PR = "r4" do_install() { - install -m 0755 ${WORKDIR}/devimage.sh ${D}/init install -d ${D}/etc/dropbear + install -d ${D}/sbin + install -m 0755 ${WORKDIR}/devimage.sh ${D}/init install -m 0600 ${WORKDIR}/dropbear_rsa_host_key ${D}/etc/dropbear/ install -m 0644 ${WORKDIR}/passwd ${D}/etc/ + ln -s /init ${D}/sbin/init } -FILES_${PN} += " /init /etc/*" +FILES_${PN} += " /init /etc/* /sbin/*" -- cgit v1.2.3 From db5d22bd31a498aa24a74e2fec7faa3467fa42ad Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 17 Feb 2008 02:52:18 +0000 Subject: initramfs-uniboot: Modprobe mtdblock and factor out fatal(). --- packages/initrdscripts/files/init.sh | 10 ++++++---- packages/initrdscripts/initramfs-uniboot_1.0.bb | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'packages/initrdscripts') diff --git a/packages/initrdscripts/files/init.sh b/packages/initrdscripts/files/init.sh index f8d5de9173..08163fa040 100644 --- a/packages/initrdscripts/files/init.sh +++ b/packages/initrdscripts/files/init.sh @@ -8,6 +8,7 @@ early_setup() { mkdir /proc mount -t proc proc /proc mkdir /mnt + modprobe -q mtdblock } dev_setup() @@ -48,13 +49,13 @@ boot_root() { exec switch_root -c /dev/console $BOOT_ROOT /sbin/init } -boot_failed() { - echo "No valid root device was specified. Please add root=/dev/something to" - echo "the kernel command-line and try again." +fatal() { + echo $1 echo exec sh } + echo "Starting initramfs boot..." early_setup read_args @@ -68,4 +69,5 @@ dev_setup load_modules [ -n "$BOOT_ROOT" ] && boot_root -boot_failed + +fatal "No valid root device was specified. Please add root=/dev/something to the kernel command-line and try again." diff --git a/packages/initrdscripts/initramfs-uniboot_1.0.bb b/packages/initrdscripts/initramfs-uniboot_1.0.bb index 167ce71ffe..786afb972c 100644 --- a/packages/initrdscripts/initramfs-uniboot_1.0.bb +++ b/packages/initrdscripts/initramfs-uniboot_1.0.bb @@ -1,6 +1,7 @@ SRC_URI = "file://init.sh" -PR = "r2" +PR = "r3" DESCRIPTON = "A modular initramfs init script system." +RRECOMMENDS = "kernel-module-mtdblock" do_install() { install -m 0755 ${WORKDIR}/init.sh ${D}/init -- cgit v1.2.3 From d48df38d1f5109cfa951d407ff26dd84155c7ae8 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 17 Feb 2008 02:54:44 +0000 Subject: initramfs-module-block: Accept additional FSTYPE param, handle mount failure. * FSTYPE useful for FSes not automatically recognized by mount (e.g. jffs2). --- packages/initrdscripts/files/85-blockboot.sh | 6 +++++- packages/initrdscripts/initramfs-module-block_1.0.bb | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'packages/initrdscripts') diff --git a/packages/initrdscripts/files/85-blockboot.sh b/packages/initrdscripts/files/85-blockboot.sh index 567f7e29b3..fee9072d3a 100644 --- a/packages/initrdscripts/files/85-blockboot.sh +++ b/packages/initrdscripts/files/85-blockboot.sh @@ -3,6 +3,10 @@ if [ -e "$ROOT_DEVICE" ]; then echo "booting from: $ROOT_DEVICE" - mount "$ROOT_DEVICE" /mnt + type="" + if [ -n "$FSTYPE" ]; then + type="-t $FSTYPE" + fi + mount $type "$ROOT_DEVICE" /mnt || fatal "Unable to mount rootfs device" BOOT_ROOT=/mnt fi diff --git a/packages/initrdscripts/initramfs-module-block_1.0.bb b/packages/initrdscripts/initramfs-module-block_1.0.bb index 72812a2490..dcee113dd1 100644 --- a/packages/initrdscripts/initramfs-module-block_1.0.bb +++ b/packages/initrdscripts/initramfs-module-block_1.0.bb @@ -1,5 +1,5 @@ SRC_URI = "file://85-blockboot.sh" -PR = "r1" +PR = "r2" RDEPENDS = "initramfs-uniboot" DESCRIPTION = "An initramfs module for booting off normal block devices." -- cgit v1.2.3 From 71a0ef43a6bf3c9eabc5ca4b9bd62229e574015d Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 17 Feb 2008 02:56:43 +0000 Subject: * initramfs-module-bootmenu: Add support for jffs2 booting and "drop to shell" option. --- packages/initrdscripts/files/10-initfs.sh | 1 + packages/initrdscripts/files/30-bootmenu.sh | 10 +++++++++- packages/initrdscripts/initramfs-module-bootmenu_1.0.bb | 2 +- packages/initrdscripts/initramfs-module-initfs_1.0.bb | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) (limited to 'packages/initrdscripts') diff --git a/packages/initrdscripts/files/10-initfs.sh b/packages/initrdscripts/files/10-initfs.sh index bad649e5c2..c2a843eb12 100644 --- a/packages/initrdscripts/files/10-initfs.sh +++ b/packages/initrdscripts/files/10-initfs.sh @@ -3,3 +3,4 @@ modprobe -q vfat >/dev/null 2>&1 modprobe -q ext2 >/dev/null 2>&1 modprobe -q ext3 >/dev/null 2>&1 +modprobe -q jffs2 >/dev/null 2>&1 diff --git a/packages/initrdscripts/files/30-bootmenu.sh b/packages/initrdscripts/files/30-bootmenu.sh index d54a643807..a45b55a353 100644 --- a/packages/initrdscripts/files/30-bootmenu.sh +++ b/packages/initrdscripts/files/30-bootmenu.sh @@ -95,6 +95,7 @@ while read maj min nblk dev; do done < /proc/partitions add_menu_item "NFS (nfsroot=192.168.2.200:/srv/nfs/oe/image)" +add_menu_item "Shell" total=`echo -e $list | wc -l` num=0 @@ -142,8 +143,11 @@ echo Selected: $sel dev=`expr "$sel" : '\([^ /]*\)'` path=`expr "$sel" : '[^/]*\([^ ]*\).*'` +fstype=`expr "$sel" : '[^ ]* *\(.*\)'` -if [ "$dev" == "NFS" ]; then +if [ "$dev" == "Shell" ]; then + exec /bin/sh +elif [ "$dev" == "NFS" ]; then ROOT_DEVICE="/dev/nfs" CMDLINE="$CMDLINE root=/dev/nfs nfsroot=192.168.2.200:/srv/nfs/oe/image" elif [ -n "$path" ]; then @@ -151,6 +155,10 @@ elif [ -n "$path" ]; then CMDLINE="$CMDLINE root=/dev/loop looproot=/dev/$dev:$path" else ROOT_DEVICE="/dev/$dev" + # jffs2 is not recognized by mount automagically + if [ "$fstype" == "(jffs2)" ]; then + FSTYPE="jffs2" + fi CMDLINE="$CMDLINE root=$ROOT_DEVICE" fi diff --git a/packages/initrdscripts/initramfs-module-bootmenu_1.0.bb b/packages/initrdscripts/initramfs-module-bootmenu_1.0.bb index 8b9a49f40b..6f3c6ec565 100644 --- a/packages/initrdscripts/initramfs-module-bootmenu_1.0.bb +++ b/packages/initrdscripts/initramfs-module-bootmenu_1.0.bb @@ -1,5 +1,5 @@ SRC_URI = "file://30-bootmenu.sh" -PR = "r9" +PR = "r10" DESCRIPTION = "An initramfs module with UI for selection of boot device." RDEPENDS = "klibc-utils-fstype initramfs-uniboot initramfs-module-block initramfs-module-loop initramfs-module-nfs" # For VFAT mounting. diff --git a/packages/initrdscripts/initramfs-module-initfs_1.0.bb b/packages/initrdscripts/initramfs-module-initfs_1.0.bb index 64bba4a304..2c2ec07bf5 100644 --- a/packages/initrdscripts/initramfs-module-initfs_1.0.bb +++ b/packages/initrdscripts/initramfs-module-initfs_1.0.bb @@ -1,5 +1,5 @@ SRC_URI = "file://10-initfs.sh" -PR = "r2" +PR = "r4" DESCRIPTION = "An initramfs module for initializing filesystems." RDEPENDS = "initramfs-uniboot" RRECOMMENDS = "kernel-module-vfat kernel-module-ext2" -- cgit v1.2.3 From d1d941876523b687b4153a5f79e0b4f6c2d7fe5e Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 17 Feb 2008 03:09:06 +0000 Subject: initramfs-uniboot: FSTYPE -> ROOT_FSTYPE, set from rootfstype= command line param. --- packages/initrdscripts/files/30-bootmenu.sh | 2 +- packages/initrdscripts/files/85-blockboot.sh | 4 ++-- packages/initrdscripts/files/init.sh | 2 ++ packages/initrdscripts/initramfs-module-block_1.0.bb | 2 +- packages/initrdscripts/initramfs-module-bootmenu_1.0.bb | 2 +- packages/initrdscripts/initramfs-uniboot_1.0.bb | 2 +- 6 files changed, 8 insertions(+), 6 deletions(-) (limited to 'packages/initrdscripts') diff --git a/packages/initrdscripts/files/30-bootmenu.sh b/packages/initrdscripts/files/30-bootmenu.sh index a45b55a353..3f3b8c7079 100644 --- a/packages/initrdscripts/files/30-bootmenu.sh +++ b/packages/initrdscripts/files/30-bootmenu.sh @@ -157,7 +157,7 @@ else ROOT_DEVICE="/dev/$dev" # jffs2 is not recognized by mount automagically if [ "$fstype" == "(jffs2)" ]; then - FSTYPE="jffs2" + ROOT_FSTYPE="jffs2" fi CMDLINE="$CMDLINE root=$ROOT_DEVICE" fi diff --git a/packages/initrdscripts/files/85-blockboot.sh b/packages/initrdscripts/files/85-blockboot.sh index fee9072d3a..e1c3ed893e 100644 --- a/packages/initrdscripts/files/85-blockboot.sh +++ b/packages/initrdscripts/files/85-blockboot.sh @@ -4,8 +4,8 @@ if [ -e "$ROOT_DEVICE" ]; then echo "booting from: $ROOT_DEVICE" type="" - if [ -n "$FSTYPE" ]; then - type="-t $FSTYPE" + if [ -n "$ROOT_FSTYPE" ]; then + type="-t $ROOT_FSTYPE" fi mount $type "$ROOT_DEVICE" /mnt || fatal "Unable to mount rootfs device" BOOT_ROOT=/mnt diff --git a/packages/initrdscripts/files/init.sh b/packages/initrdscripts/files/init.sh index 08163fa040..8b9fe12429 100644 --- a/packages/initrdscripts/files/init.sh +++ b/packages/initrdscripts/files/init.sh @@ -31,6 +31,8 @@ read_args() { case $arg in root=*) ROOT_DEVICE=$optarg ;; + rootfstype=*) + ROOT_FSTYPE=$optarg ;; rootdelay=*) rootdelay=$optarg ;; esac diff --git a/packages/initrdscripts/initramfs-module-block_1.0.bb b/packages/initrdscripts/initramfs-module-block_1.0.bb index dcee113dd1..b4b2d43150 100644 --- a/packages/initrdscripts/initramfs-module-block_1.0.bb +++ b/packages/initrdscripts/initramfs-module-block_1.0.bb @@ -1,5 +1,5 @@ SRC_URI = "file://85-blockboot.sh" -PR = "r2" +PR = "r3" RDEPENDS = "initramfs-uniboot" DESCRIPTION = "An initramfs module for booting off normal block devices." diff --git a/packages/initrdscripts/initramfs-module-bootmenu_1.0.bb b/packages/initrdscripts/initramfs-module-bootmenu_1.0.bb index 6f3c6ec565..8c66521f30 100644 --- a/packages/initrdscripts/initramfs-module-bootmenu_1.0.bb +++ b/packages/initrdscripts/initramfs-module-bootmenu_1.0.bb @@ -1,5 +1,5 @@ SRC_URI = "file://30-bootmenu.sh" -PR = "r10" +PR = "r11" DESCRIPTION = "An initramfs module with UI for selection of boot device." RDEPENDS = "klibc-utils-fstype initramfs-uniboot initramfs-module-block initramfs-module-loop initramfs-module-nfs" # For VFAT mounting. diff --git a/packages/initrdscripts/initramfs-uniboot_1.0.bb b/packages/initrdscripts/initramfs-uniboot_1.0.bb index 786afb972c..e0f726582e 100644 --- a/packages/initrdscripts/initramfs-uniboot_1.0.bb +++ b/packages/initrdscripts/initramfs-uniboot_1.0.bb @@ -1,5 +1,5 @@ SRC_URI = "file://init.sh" -PR = "r3" +PR = "r4" DESCRIPTON = "A modular initramfs init script system." RRECOMMENDS = "kernel-module-mtdblock" -- cgit v1.2.3 From c84138ac986f55076982bc368b5ae6a9033ea15d Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 17 Feb 2008 14:18:01 +0000 Subject: kernel-initramfs, initramfs-image-ipk: Remove recipes with recursive bitbake invocations. * As not maintainable on global OE level. --- packages/initrdscripts/initramfs-image-ipk_1.0.bb | 15 ------- packages/initrdscripts/kernel-initramfs_1.0.bb | 48 ----------------------- 2 files changed, 63 deletions(-) delete mode 100644 packages/initrdscripts/initramfs-image-ipk_1.0.bb delete mode 100644 packages/initrdscripts/kernel-initramfs_1.0.bb (limited to 'packages/initrdscripts') diff --git a/packages/initrdscripts/initramfs-image-ipk_1.0.bb b/packages/initrdscripts/initramfs-image-ipk_1.0.bb deleted file mode 100644 index 8c79c24478..0000000000 --- a/packages/initrdscripts/initramfs-image-ipk_1.0.bb +++ /dev/null @@ -1,15 +0,0 @@ -DESCRIPTION = "Boot initramfs as a package" -PR = "r1" - -do_compile() { - cd ${TOPDIR}; DISTRO=${USERDISTRO} MACHINE=${MACHINE} ANGSTROM_MODE=uclibc IMAGE_FSTYPES=cpio.gz DEPLOY_TO=${D}/boot/initramfs.bin bitbake initramfs-image -} - -do_install() { - install -d ${D}/boot/ - cd ${TOPDIR}; DISTRO=${USERDISTRO} MACHINE=${MACHINE} ANGSTROM_MODE=uclibc IMAGE_FSTYPES=cpio.gz DEPLOY_TO=${D}/boot/initramfs.bin bitbake initramfs-image -c deploy_to -} - -FILES_${PN} += "/boot/*" - -PACKAGE_ARCH = "${MACHINE_ARCH}" diff --git a/packages/initrdscripts/kernel-initramfs_1.0.bb b/packages/initrdscripts/kernel-initramfs_1.0.bb deleted file mode 100644 index be1c067ba2..0000000000 --- a/packages/initrdscripts/kernel-initramfs_1.0.bb +++ /dev/null @@ -1,48 +0,0 @@ -DESCRIPTION = "A kernel with internal initramfs" -PR = "r1" - -#inherit kernel -KERNEL_IMAGETYPE ?= "zImage" - -# Name of initramfs recipe to build and put result into kernel -KERNEL_INITRAMFS ?= "initramfs-image" - -do_compile() { - cd ${TOPDIR}; DISTRO=${USERDISTRO} MACHINE=${MACHINE} ANGSTROM_MODE=uclibc IMAGE_FSTYPES=cpio.gz DEPLOY_TO=${WORKDIR}/initramfs.bin bitbake ${KERNEL_INITRAMFS} -c deploy_to - cd ${TOPDIR}; DISTRO=${USERDISTRO} MACHINE=${MACHINE} INITRAMFS_LOC=${WORKDIR}/initramfs.bin DEPLOY_TO=${WORKDIR}/\${KERNEL_IMAGE_BASE_NAME} bitbake virtual/kernel -c builtin_initramfs -} - -do_install() { - install -d ${D}/boot/ - install -m 644 ${WORKDIR}/${KERNEL_IMAGETYPE}* ${D}/boot/${KERNEL_IMAGETYPE}-${@get_pv(d)} -} - -def get_version(d): - import bb - import os - dest = bb.data.getVar("WORKDIR", d, 1) - try: - files = os.listdir(dest) - files = filter(lambda f:f.startswith("zImage-"), files) - ver = files[0][len("zImage-"):] - return ver - except: - return "dum-m-y" - -def get_pv(d): - ver = get_version(d) - verc = ver.split("-") - return verc[0] + "-" + verc[1] - -def get_pr(d): - ver = get_version(d) - verc = ver.split("-") - return verc[2] - -PACKAGES = "kernel-image" -FILES_kernel-image = "/boot/*" -PKG_kernel-image = "kernel-image-${@get_pv(d)}" -PKGPV_kernel-image = "${@get_pv(d)}" -PKGPR_kernel-image = "${@get_pr(d)}" - -PACKAGE_ARCH = "${MACHINE_ARCH}" -- cgit v1.2.3 From 6e8198eadd0e3f9b108f2907fbe20a4afd62b3ec Mon Sep 17 00:00:00 2001 From: Thomas Kunze Date: Fri, 22 Feb 2008 21:14:32 +0000 Subject: initramfs-kexec: change rootdev vor collie from mtdblock2 to mtd2 --- packages/initrdscripts/initramfs-kexec_1.0.bb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'packages/initrdscripts') diff --git a/packages/initrdscripts/initramfs-kexec_1.0.bb b/packages/initrdscripts/initramfs-kexec_1.0.bb index b5bf497f37..b14ebbe60c 100644 --- a/packages/initrdscripts/initramfs-kexec_1.0.bb +++ b/packages/initrdscripts/initramfs-kexec_1.0.bb @@ -1,11 +1,11 @@ DESCRIPTON = "A init script that mounts a device and kexecs a new kernel from it." -PR = "r3" +PR = "r4" do_compile() { cat > init.sh << EOF #!/bin/sh /bin/mount -t proc proc /proc -/bin/mount -t ${ROOTFS} /dev/${ROOTDEV} /mnt +/bin/mount -t ${ROOTFS} ${ROOTDEV} /mnt /usr/sbin/kexec -l /mnt/zImage /usr/sbin/kexec -e EOF @@ -21,5 +21,5 @@ PACKAGE_ARCH = "all" FILES_${PN} = "/init /proc /mnt" -ROOTDEV = "mtdblock2" +ROOTDEV = "mtd2" ROOTFS = "jffs2" -- cgit v1.2.3