summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2008-02-20 21:07:54 -0300
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:36:05 +0100
commit1ffce292fb24b3e77605a76e2388172927bebae7 (patch)
tree9e0ea32c4e7ee634e555c2df968d04de69697671 /helpers
parent5d3c850ccbe4c0b83cd267c1d4d5847c2d13706a (diff)
downloadlive-build-1ffce292fb24b3e77605a76e2388172927bebae7.zip
live-build-1ffce292fb24b3e77605a76e2388172927bebae7.tar.gz
lh_binary_rootfs: add support to generate jffs2 filesystem
Diffstat (limited to 'helpers')
-rwxr-xr-xhelpers/lh_binary_rootfs37
1 files changed, 37 insertions, 0 deletions
diff --git a/helpers/lh_binary_rootfs b/helpers/lh_binary_rootfs
index 20098c6..cc8de11 100755
--- a/helpers/lh_binary_rootfs
+++ b/helpers/lh_binary_rootfs
@@ -140,6 +140,43 @@ case "${LH_CHROOT_FILESYSTEM}" in
Remove_package
;;
+ jffs2)
+ # Checking depends
+ Check_package chroot/usr/sbin/mkfs.jffs2 mtd-tools
+
+ # Restoring cache
+ Restore_cache cache/packages_binary
+
+ # Installing depends
+ Install_package
+
+ # Remove old ext2 image
+ if [ -f binary/${INITFS}/filesystem.jffs2 ]
+ then
+ rm -f binary/${INITFS}/filesystem.jffs2
+ fi
+
+ case "${LH_CHROOT_BUILD}" in
+ enabled)
+ Chroot "mkfs.jffs2 --root=chroot --output filesystem.jffs2"
+
+ # Move image
+ mv chroot/filesystem.jffs2 binary/${INITFS}
+ rm -rf chroot/chroot
+ ;;
+
+ disabled)
+ mkfs.jffs2 --root=chroot --output binary/${INITFS}/filesystem.jffs2
+ ;;
+ esac
+
+ # Saving cache
+ Save_cache cache/packages_binary
+
+ # Removing depends
+ Remove_package
+ ;;
+
plain)
if [ -d binary/${INITFS}/filesystem.dir ]
then