summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Sokolovsky <pmiscml@gmail.com>2007-12-25 18:18:32 +0000
committerPaul Sokolovsky <pmiscml@gmail.com>2007-12-25 18:18:32 +0000
commit53d7efa6b73e39162f028cad3ce27f3265d226c0 (patch)
tree53d0868df0e1f568f56f1e70d5ecba14f71618d7
parentad4884607bc29ec799316df7179368e78cce747c (diff)
parentf274a408a2bda158f637bd1b3fa4e0068fb87ed8 (diff)
merge of '0f6a05ae6a2dd058bfe88bed97e9d6530e5c9395'
and 'a2db4317a6940d3a7ea74bc07545523686942a59'
-rw-r--r--contrib/deploy/.mtn2git_empty0
-rw-r--r--contrib/deploy/README2
-rw-r--r--contrib/deploy/nfs/.mtn2git_empty0
-rw-r--r--contrib/deploy/nfs/exports.sample2
-rwxr-xr-xcontrib/deploy/nfs/oe-nfs-deploy-image51
-rw-r--r--packages/initrdscripts/files/30-bootmenu.sh4
-rw-r--r--packages/initrdscripts/initramfs-module-bootmenu_1.0.bb2
7 files changed, 58 insertions, 3 deletions
diff --git a/contrib/deploy/.mtn2git_empty b/contrib/deploy/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/contrib/deploy/.mtn2git_empty
diff --git a/contrib/deploy/README b/contrib/deploy/README
new file mode 100644
index 0000000000..a285a7f75a
--- /dev/null
+++ b/contrib/deploy/README
@@ -0,0 +1,2 @@
+This directory contains script for deploying OE-generated images for various
+devices and boot methods.
diff --git a/contrib/deploy/nfs/.mtn2git_empty b/contrib/deploy/nfs/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/contrib/deploy/nfs/.mtn2git_empty
diff --git a/contrib/deploy/nfs/exports.sample b/contrib/deploy/nfs/exports.sample
new file mode 100644
index 0000000000..6d82f49202
--- /dev/null
+++ b/contrib/deploy/nfs/exports.sample
@@ -0,0 +1,2 @@
+# /etc/exports: NFS file systems being exported. See exports(5).
+/srv/nfs/oe 192.168.0.0/16(rw,insecure,no_root_squash)
diff --git a/contrib/deploy/nfs/oe-nfs-deploy-image b/contrib/deploy/nfs/oe-nfs-deploy-image
new file mode 100755
index 0000000000..ee540696d7
--- /dev/null
+++ b/contrib/deploy/nfs/oe-nfs-deploy-image
@@ -0,0 +1,51 @@
+#!/bin/sh
+
+# Wonder what the heck is /srv ? Read Filesystem Hierarchy Standard,
+# http://www.pathname.com/fhs/pub/fhs-2.3.html#SRVDATAFORSERVICESPROVIDEDBYSYSTEM
+# So, /srv/nfs is root of all NFS exports your system offers, and /srv/nfs/oe is
+# OpenEmbedded's subset (think security).
+NFS_ROOT=/srv/nfs/oe
+
+if [ -z "$1" ]; then
+ echo "$0 - Deploy OpenEmbedded-generated image for device NFS boot"
+ echo "Usage: $0 <image> | -l"
+ exit
+fi
+
+if [ "$1" == "-l" ]; then
+ if [ -n "$2" ]; then
+ extra="-name *$2*"
+ fi
+ find tmp/deploy/ -regextype posix-extended -wholename '*/images/*' -regex '.+\.(tar\.bz2|tar\.gz|cpio\.gz)$' $extra | xargs ls -l
+ exit
+fi
+
+if [ ! -f $1 ]; then
+ echo "Cannot find image $1"
+ exit
+fi
+
+ext=`echo $1 | sed -r -e 's/.+\.([^.]+\.[^.]+)/\1/'`
+basename=`basename $1 .$ext`
+
+if [ -z "$basename" ]; then
+ echo "Assertion failed"
+ exit 100
+fi
+
+echo "Deploying to: $NFS_ROOT/$basename"
+
+rm -rf $NFS_ROOT/$basename
+
+mkdir -p $NFS_ROOT/$basename
+
+if [ "$ext" == "tar.bz2" ]; then
+ tar -xj -f $1 -C $NFS_ROOT/$basename
+elif [ "$ext" == "tar.gz" ]; then
+ tar -xz -f $1 -C $NFS_ROOT/$basename
+else
+ FPATH=`pwd`
+ cd $NFS_ROOT/$basename
+ bash -c "gzip -d -c $FPATH/$1 | cpio -i --no-absolute-filenames"
+ cd $FPATH
+fi
diff --git a/packages/initrdscripts/files/30-bootmenu.sh b/packages/initrdscripts/files/30-bootmenu.sh
index 1bb53d20a3..319f85aa6e 100644
--- a/packages/initrdscripts/files/30-bootmenu.sh
+++ b/packages/initrdscripts/files/30-bootmenu.sh
@@ -94,7 +94,7 @@ while read maj min nblk dev; do
add_menu_item "$dev ($fstype)"
done < /proc/partitions
-add_menu_item "NFS (nfsroot=192.168.2.200:/nfs/image)"
+add_menu_item "NFS (nfsroot=192.168.2.200:/srv/nfs/oe/image)"
total=`echo -e $list | wc -l`
num=0
@@ -145,7 +145,7 @@ path=`expr "$sel" : '[^/]*\([^ ]*\).*'`
if [ "$dev" == "NFS" ]; then
ROOT_DEVICE="/dev/nfs"
- CMDLINE="$CMDLINE nfsroot=192.168.2.200:/nfs/image"
+ CMDLINE="$CMDLINE nfsroot=192.168.2.200:/srv/nfs/oe/image"
elif [ -n "$path" ]; then
ROOT_DEVICE="/dev/loop"
CMDLINE="looproot=/dev/$dev:$path"
diff --git a/packages/initrdscripts/initramfs-module-bootmenu_1.0.bb b/packages/initrdscripts/initramfs-module-bootmenu_1.0.bb
index e90247c522..e768954434 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 = "r4"
+PR = "r5"
DESCRIPTION = "An initramfs module with UI for selection of boot device."
RDEPENDS = "klibc-utils-fstype initramfs-uniboot initramfs-module-block initramfs-module-loop"
# For VFAT mounting.