diff options
author | Paul Sokolovsky <pmiscml@gmail.com> | 2008-02-17 03:02:36 +0000 |
---|---|---|
committer | Paul Sokolovsky <pmiscml@gmail.com> | 2008-02-17 03:02:36 +0000 |
commit | 2959e0e2f5006bc4c0a3837e8915069fda2a0b57 (patch) | |
tree | 1bdbb89224aa2b9bb10c5cdd8e8962fcd96aabaa /packages | |
parent | d9971a1a3d12421aea6e77f90e80589786a3a40a (diff) | |
parent | 71a0ef43a6bf3c9eabc5ca4b9bd62229e574015d (diff) |
merge of 'a534fd1530fba63215db0ae44dbdd6e877c589b4'
and 'f6ab5be390e4400fb993f0e449049b62daece68e'
Diffstat (limited to 'packages')
-rw-r--r-- | packages/initrdscripts/devimage_0.1.bb | 8 | ||||
-rw-r--r-- | packages/initrdscripts/files/10-initfs.sh | 1 | ||||
-rw-r--r-- | packages/initrdscripts/files/30-bootmenu.sh | 10 | ||||
-rw-r--r-- | packages/initrdscripts/files/85-blockboot.sh | 6 | ||||
-rw-r--r-- | packages/initrdscripts/files/init.sh | 10 | ||||
-rw-r--r-- | packages/initrdscripts/initramfs-module-block_1.0.bb | 2 | ||||
-rw-r--r-- | packages/initrdscripts/initramfs-module-bootmenu_1.0.bb | 2 | ||||
-rw-r--r-- | packages/initrdscripts/initramfs-module-initfs_1.0.bb | 2 | ||||
-rw-r--r-- | packages/initrdscripts/initramfs-uniboot_1.0.bb | 3 |
9 files changed, 31 insertions, 13 deletions
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/*" 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/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/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-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." 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" 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 |