Commit 78fa9d38 authored by Tomasz Wlostowski's avatar Tomasz Wlostowski

build/scripts: add .tar.gz and JFFS2 image targets

parent 2f16b648
......@@ -2,6 +2,7 @@
# check variables, like all scripts herein do
WRS_SCRIPT_NAME=$(basename $0)
if [ -z "$WRS_BASE_DIR" ]; then
echo "$0: Plesae set WRS_BASE_DIR" >& 2
exit 1
......@@ -24,7 +25,9 @@ rootfs_vanilla="$WRS_OUTPUT_DIR/build/buildroot-2011.11/output/target"
rootfs_override="$WRS_BASE_DIR/../userspace/rootfs_override"
TMPSCRIPT=$(mktemp /tmp/rootfs-script.XXXXXX)
ROOTFS_IMAGE="$WRS_OUTPUT_DIR/images/wrs-image.cpio.gz"
ROOTFS_IMAGE_CPIO="$WRS_OUTPUT_DIR/images/wrs-image.cpio.gz"
ROOTFS_IMAGE_TGZ="$WRS_OUTPUT_DIR/images/wrs-image.tar.gz"
ROOTFS_IMAGE_JFFS2="$WRS_OUTPUT_DIR/images/wrs-image.jffs2"
cat > $TMPSCRIPT << EOF
rm -r -f $TMPFS
......@@ -32,11 +35,9 @@ mkdir -p $TMPFS/wr
cp -r $rootfs_vanilla/* $TMPFS
cp -r $WRS_OUTPUT_DIR/images/wr/* $TMPFS/wr
cp -r $WRS_OUTPUT_DIR/images/lib/* $TMPFS/lib
cp -r $rootfs_override/* $TMPFS
mkdir -p $TMPFS/wr/lib/modules
cp $WRS_OUTPUT_DIR/images/*ko $TMPFS/wr/lib/modules
rm -rf $TMPFS/dev
(cd $TMPFS && tar xzf $DEVTAR)
(cd $TMPFS && ln -s sbin/init .)
......@@ -51,7 +52,9 @@ chmod g-w $TMPFS/root $TMPFS/root/.ssh
chown -R root:root $TMPFS/root
chown -R root:root $TMPFS/etc/dropbear
(cd "$TMPFS" && find . | cpio -o -H newc | gzip) > $ROOTFS_IMAGE
(cd "$TMPFS" && find . | cpio -o -H newc | gzip) > $ROOTFS_IMAGE_CPIO
(cd "$TMPFS" && tar cz .> $ROOTFS_IMAGE_TGZ)
/usr/sbin/mkfs.jffs2 --little-endian --eraseblock=0x20000 -n --pad -d $TMPFS -o $ROOTFS_IMAGE_JFFS2.img
EOF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment