summaryrefslogtreecommitdiff
path: root/helpers/lh_binary_rootfs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2008-03-01 13:19:54 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:36:19 +0100
commit9ffb223d703a4bbb76e5278e59b3cc183f2f1aca (patch)
treee96de372ae42bef50e022d5769e7388d34769bf8 /helpers/lh_binary_rootfs
parent5330b557ace8686e8f1ffc94ee120a1dc57714d7 (diff)
downloadvyos-live-build-9ffb223d703a4bbb76e5278e59b3cc183f2f1aca.tar.gz
vyos-live-build-9ffb223d703a4bbb76e5278e59b3cc183f2f1aca.zip
Adding --jffs2-eraseblock parameter.
Marco sais, that flash devices often need a different erase size than mkfs.jffs2 defaults to. Hence, this parameter passes the blocksize to the mkfs.jffs2 call through --eraseblock option.
Diffstat (limited to 'helpers/lh_binary_rootfs')
-rwxr-xr-xhelpers/lh_binary_rootfs11
1 files changed, 8 insertions, 3 deletions
diff --git a/helpers/lh_binary_rootfs b/helpers/lh_binary_rootfs
index cc8de11a4..97cdaabc0 100755
--- a/helpers/lh_binary_rootfs
+++ b/helpers/lh_binary_rootfs
@@ -150,15 +150,20 @@ case "${LH_CHROOT_FILESYSTEM}" in
# Installing depends
Install_package
- # Remove old ext2 image
+ # Remove old jffs2 image
if [ -f binary/${INITFS}/filesystem.jffs2 ]
then
rm -f binary/${INITFS}/filesystem.jffs2
fi
+ if [ -n "${LH_JFFS2_ERASEBLOCK}" ]
+ then
+ JFFS2_OPTIONS="--eraseblock=${LH_JFFS2_ERASEBLOCK}"
+ fi
+
case "${LH_CHROOT_BUILD}" in
enabled)
- Chroot "mkfs.jffs2 --root=chroot --output filesystem.jffs2"
+ Chroot "mkfs.jffs2 ${JFFS2_OPTIONS} --root=chroot --output filesystem.jffs2"
# Move image
mv chroot/filesystem.jffs2 binary/${INITFS}
@@ -166,7 +171,7 @@ case "${LH_CHROOT_FILESYSTEM}" in
;;
disabled)
- mkfs.jffs2 --root=chroot --output binary/${INITFS}/filesystem.jffs2
+ mkfs.jffs2 ${JFFS2_OPTIONS} --root=chroot --output binary/${INITFS}/filesystem.jffs2
;;
esac