adding the runscript
authorJohn P. Davis <zhen@gentoo.org>
Tue, 30 Mar 2004 18:37:56 +0000 (18:37 +0000)
committerJohn P. Davis <zhen@gentoo.org>
Tue, 30 Mar 2004 18:37:56 +0000 (18:37 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@325 d1e1f19c-881f-0410-ab34-b69fee027534

targets/embedded/cramfs-runscript.sh [new file with mode: 0644]

diff --git a/targets/embedded/cramfs-runscript.sh b/targets/embedded/cramfs-runscript.sh
new file mode 100644 (file)
index 0000000..4f7fe48
--- /dev/null
@@ -0,0 +1,29 @@
+# Copyright david@futuretel.com
+# puts a the embedded image into a cramfs
+
+root_fs_path="${clst_chroot_path}/tmp/mergeroot"
+
+die() {
+       echo "$1"
+       exit 1
+}
+
+case $1 in
+
+run)
+       # move this to preclean stage
+       # it's a hack because dhcpcd is lame
+       install -d $root_fs_path/var/lib/dhcpc
+       
+       install -d $clst_image_path
+       mkcramfs $root_fs_path $clst_image_path/root.img
+       imagesize=`du -sk $clst_image_path/root.img | cut -f1`
+       echo "Created cramfs image at ${clst_image_path}/root.img"
+       echo "Image size: ${imagesize}k"
+       ;;
+
+preclean)
+       ;;
+
+esac
+exit 0