[SCM] debian-live/live-helper branch, master, updated. 1.0_a38-1-14-g2e50db2

Daniel Baumann daniel at debian.org
Sat Mar 1 12:22:01 UTC 2008


The following commit has been merged in the master branch:
commit 2e50db26fda76e81ca0caeca11596a1d26a96c01
Author: Daniel Baumann <daniel at debian.org>
Date:   Sat Mar 1 13:19:54 2008 +0100

    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.

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}"

-- 
debian-live/live-helper



More information about the debian-live-changes mailing list