summaryrefslogtreecommitdiff
path: root/helpers
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
parent5330b557ace8686e8f1ffc94ee120a1dc57714d7 (diff)
downloadlive-build-9ffb223d703a4bbb76e5278e59b3cc183f2f1aca.zip
live-build-9ffb223d703a4bbb76e5278e59b3cc183f2f1aca.tar.gz
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')
-rwxr-xr-xhelpers/lh_binary_rootfs11
-rwxr-xr-xhelpers/lh_config12
2 files changed, 19 insertions, 4 deletions
diff --git a/helpers/lh_binary_rootfs b/helpers/lh_binary_rootfs
index cc8de11..97cdaab 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
diff --git a/helpers/lh_config b/helpers/lh_config
index bc4ca48..01edeba 100755
--- a/helpers/lh_config
+++ b/helpers/lh_config
@@ -70,6 +70,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
\t [--iso-preparer NAME]\n\
\t [--iso-publisher NAME]\n\
\t [--iso-volume NAME]\n\
+\t [--jffs2-eraseblock SIZE]\n\
\t [--keyring-packages PACKAGE|\"PACKAGES\"]\n\
\t [-l|--language LANGUAGE]\n\
\t [-k|--linux-flavours FLAVOUR|\"FLAVOURS\"]\n\
@@ -114,7 +115,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
Local_arguments ()
{
- ARGUMENTS="$(getopt --longoptions apt:,apt-ftp-proxy:,apt-http-proxy:,apt-pdiffs:,apt-options:,aptitute-options:,apt-pipeline:,apt-recommends:,apt-secure:,bootstrap:,cache:,cache-indices:,cache-packages:,cache-stages:,debconf-frontend:,debconf-nowarnings:,debconf-priority:,genisoimage:,initramfs:,fdisk:,losetup:,mode:,root-command:,use-fakeroot:,tasksel:,includes:,templates:,architecture:,bootstrap-config:,bootstrap-flavour:,bootstrap-keyring:,distribution:,mirror-bootstrap:,mirror-chroot:,mirror-chroot-security:,mirror-binary:,mirror-binary-security:,sections:,chroot-filesystem:,union-filesystem:,exposed-root:,hooks:,interactive:,keyring-packages:,language:,linux-flavours:,linux-packages:,packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,binary-filesystem:,binary-images:,binary-indices:,bootappend-install:,bootappend-live:,bootloader:,checksums:,chroot-build:,debian-installer:,debian-installer-daily:,encryption:,grub-splash:,hostname:,iso-application:,iso-preparer:,iso-publisher:,iso-volume:,memtest:,net-root-filesystem:,net-root-mountoptions:,net-root-path:,net-root-server:,net-cow-filesystem:,net-cow-mountoptions:,net-cow-path:,net-cow-server:,net-tarball:,syslinux-splash:,syslinux-timeout:,syslinux-menu:,username:,source:,source-images:,breakpoints,conffile:,debug,force,help,quiet,usage,verbose,version --name=${PROGRAM} --options a:f:d:m:l:k:p:b:e:s:c:huv --shell sh -- "${@}")"
+ ARGUMENTS="$(getopt --longoptions apt:,apt-ftp-proxy:,apt-http-proxy:,apt-pdiffs:,apt-options:,aptitute-options:,apt-pipeline:,apt-recommends:,apt-secure:,bootstrap:,cache:,cache-indices:,cache-packages:,cache-stages:,debconf-frontend:,debconf-nowarnings:,debconf-priority:,genisoimage:,initramfs:,fdisk:,losetup:,mode:,root-command:,use-fakeroot:,tasksel:,includes:,templates:,architecture:,bootstrap-config:,bootstrap-flavour:,bootstrap-keyring:,distribution:,mirror-bootstrap:,mirror-chroot:,mirror-chroot-security:,mirror-binary:,mirror-binary-security:,sections:,chroot-filesystem:,union-filesystem:,exposed-root:,hooks:,interactive:,keyring-packages:,language:,linux-flavours:,linux-packages:,packages:,packages-lists:,tasks:,security:,symlinks:,sysvinit:,binary-filesystem:,binary-images:,binary-indices:,bootappend-install:,bootappend-live:,bootloader:,checksums:,chroot-build:,debian-installer:,debian-installer-daily:,encryption:,grub-splash:,hostname:,iso-application:,iso-preparer:,iso-publisher:,iso-volume:,jffs2-eraseblock:,memtest:,net-root-filesystem:,net-root-mountoptions:,net-root-path:,net-root-server:,net-cow-filesystem:,net-cow-mountoptions:,net-cow-path:,net-cow-server:,net-tarball:,syslinux-splash:,syslinux-timeout:,syslinux-menu:,username:,source:,source-images:,breakpoints,conffile:,debug,force,help,quiet,usage,verbose,version --name=${PROGRAM} --options a:f:d:m:l:k:p:b:e:s:c:huv --shell sh -- "${@}")"
if [ "${?}" != "0" ]
then
@@ -505,6 +506,11 @@ Local_arguments ()
shift 2
;;
+ --jffs2-eraseblock)
+ LH_JFFS2_ERASEBLOCK="${2}"
+ shift 2
+ ;;
+
--memtest)
LH_MEMTEST="${2}"
shift 2
@@ -1010,6 +1016,10 @@ LH_ISO_PUBLISHER="${LH_ISO_PUBLISHER}"
# (Default: ${LH_ISO_VOLUME})
LH_ISO_VOLUME="${LH_ISO_VOLUME}"
+# \$LH_JFFS2_ERASEBLOCK: set jffs2 eraseblock size
+# (Default: unset)
+LH_JFFS2_ERASEBLOCK=""
+
# \$LH_MEMTEST: set memtest
# (Default: ${LH_MEMTEST})
LH_MEMTEST="${LH_MEMTEST}"