From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 90AD5138350 for ; Sat, 2 May 2020 23:00:50 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B7A5AE0A94; Sat, 2 May 2020 23:00:49 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 8A420E0A94 for ; Sat, 2 May 2020 23:00:49 +0000 (UTC) Date: Sat, 2 May 2020 16:00:46 -0700 From: Brian Dolbec To: gentoo-catalyst@lists.gentoo.org Subject: Re: [gentoo-catalyst] [PATCH 2/8] targets: Drop most fstypes Message-ID: <20200502160006.48a12e40@storm> In-Reply-To: <20200502014036.1039317-2-mattst88@gentoo.org> References: <20200502014036.1039317-1-mattst88@gentoo.org> <20200502014036.1039317-2-mattst88@gentoo.org> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Archives-Salt: 793d5c71-ec39-4cf3-b284-9e195c4114ce X-Archives-Hash: 5b4c809daaa18109e2c2e7d87661ac08 On Fri, 1 May 2020 18:40:30 -0700 Matt Turner wrote: > Signed-off-by: Matt Turner > --- > doc/catalyst-spec.5.txt | 9 +--- > examples/livecd-stage2_template.spec | 8 +-- > targets/embedded/fs-runscript.sh | 15 ------ > targets/support/filesystem-functions.sh | 65 > ------------------------- targets/support/functions.sh | > 14 ------ targets/support/target_image_setup.sh | 20 -------- > 6 files changed, 4 insertions(+), 127 deletions(-) > Commit message is too short, no exlanation of why they are being dropped. Without any reasoning, the actual changes are meaningless to me. > diff --git a/doc/catalyst-spec.5.txt b/doc/catalyst-spec.5.txt > index e269e16d..16c8773d 100644 > --- a/doc/catalyst-spec.5.txt > +++ b/doc/catalyst-spec.5.txt > @@ -171,17 +171,12 @@ Filesystem > The fstype is used to determine what sort of CD we should build. > This is used to set the type of loopback filesystem that we will use > on our CD. Possible values are as follows: > - `squashfs`;; This gives the best compression, but requires a > kernel patch. > - `zisofs`;; This uses in-kernel compression and is supported on all > platforms. > - `normal`;; This creates a loop without compression. > - `noloop`;; This copies the files to the CD directly, without using > a > - loopback. > + `squashfs`;; > + `jffs2`;; > > *livecd/fsops*:: > The fsops are a list of optional parameters that can be passed to the > tool which will create the filesystem specified in *livecd/fstype* > -It is valid for the following fstypes: `squashfs`, `jffs`, `jffs2`, > -and `cramfs`. > > *livecd/iso*:: > This is the full path and filename to the ISO image that the > diff --git a/examples/livecd-stage2_template.spec > b/examples/livecd-stage2_template.spec index 3b9ca1da..f4a20cab 100644 > --- a/examples/livecd-stage2_template.spec > +++ b/examples/livecd-stage2_template.spec > @@ -83,18 +83,14 @@ kerncache_path: > > # The fstype is used to determine what sort of CD we should build. > This is # used to set the type of loopback filesystem that we will > use on our CD. -# Possible options are as follows: > -# squashfs - This gives the best compression, but requires a kernel > patch. -# zisofs - This uses in-kernel compression and is supported > on all platforms. -# normal - This creates a loop without compression. > -# noloop - This copies the files to the CD directly, without using a > loopback. +# Possible options are as follows: squashfs, jffs2 > # example: > # livecd/fstype: squashfs > livecd/fstype: > > # The fsops are a list of optional parameters that can be passed to > the tool # which will create the filesystem specified in > livecd/fstype. It is valid for -# the following fstypes: squashfs, > jffs, jffs2, cramfs +# the following fstypes: squashfs, jffs2 > livecd/fsops: > > # The cdtar is essentially the bootloader for the CD. It also holds > the main diff --git a/targets/embedded/fs-runscript.sh > b/targets/embedded/fs-runscript.sh index 7e70848b..5e339608 100755 > --- a/targets/embedded/fs-runscript.sh > +++ b/targets/embedded/fs-runscript.sh > @@ -13,32 +13,17 @@ fs_check() { > } > > case ${1} in > - jffs) > - fs_check /usr/sbin/mkfs.jffs jffs sys-fs/mtd > - mkfs.jffs -d ${root_fs_path} -o > ${clst_image_path}/root.img \ > - ${clst_embedded_fs_ops} || die "Could not > create a jffs filesystem" > - ;; > jffs2) > fs_check /usr/sbin/mkfs.jffs2 jffs2 sys-fs/mtd > mkfs.jffs2 --root=${root_fs_path} > --output=${clst_image_path}/root.img\ ${clst_embedded_fs_ops} || die > "Could not create a jffs2 filesystem" ;; > > - cramfs) > - fs_check /sbin/mkcramfs cramfs sys-fs/cramfs > - mkcramfs ${clst_embedded_fs_ops} ${root_fs_path} \ > - ${clst_image_path}/root.img || \ > - die "Could not create a cramfs filesystem" > - ;; > - > squashfs) > fs_check /usr/bin/gensquashfs squashfs > sys-fs/squashfs-tools-ng gensquashfs -D ${root_fs_path} > ${clst_embedded_fs_ops} \ ${clst_image_path}/root.img || > die "Could not create a squashfs filesystem" > ;; > - > - *) > - ;; > esac > exit $? > diff --git a/targets/support/filesystem-functions.sh > b/targets/support/filesystem-functions.sh index 03303b14..a95ae0b9 > 100755 --- a/targets/support/filesystem-functions.sh > +++ b/targets/support/filesystem-functions.sh > @@ -3,55 +3,6 @@ > # Dont forget to update functions.sh check_looptype > # $1 is the target directory for the filesystem > > -create_normal_loop() { > - export source_path="${clst_destpath}" > - export destination_path="$1" > - export loopname="image.loop" > - > - # We get genkernel-built kernels and initrds in place, > create the loopback > - # file system on $clst_target_path, mount it, copy our > bootable filesystem > - # over, umount it, and have a ready-to-burn ISO tree at > $clst_target_path. - > - echo "Calculating size of loopback filesystem..." > - loopsize=`du -ks ${source_path} | cut -f1` > - [ "${loopsize}" = "0" ] && loopsize=1 > - # Add 4MB for filesystem slop > - loopsize=`expr ${loopsize} + 4096` > - echo "Creating loopback file..." > - dd if=/dev/zero of=${destination_path}/${loopname} bs=1k > count=${loopsize} \ > - || die "${loopname} creation failure" > - mke2fs -m 0 -F -q ${destination_path}/${loopname} \ > - || die "Couldn't create ext2 filesystem" > - install -d ${destination_path}/loopmount > - sync; sync; sleep 3 # Try to work around 2.6.0+ loopback bug > - mount -t ext2 -o loop ${destination_path}/${loopname} \ > - ${destination_path}/loopmount \ > - || die "Couldn't mount loopback ext2 filesystem" > - sync; sync; sleep 3 # Try to work around 2.6.0+ loopback bug > - echo "cp -pPR ${source_path}/* ${destination_path}/loopmount" > - cp -pPR ${source_path}/* ${destination_path}/loopmount > - [ $? -ne 0 ] && { umount ${destination_path}/${loopname}; \ > - die "Couldn't copy files to loopback ext2 > filesystem"; } > - umount ${destination_path}/loopmount \ > - || die "Couldn't unmount loopback ext2 filesystem" > - rm -rf ${destination_path}/loopmount > - # Now, $clst_target_path should contain a proper bootable > image for our > - # ISO, including boot loader and loopback filesystem. > -} > - > -create_zisofs() { > - rm -rf "$1/zisofs" > /dev/null 2>&1 > - echo "Creating zisofs..." > - mkzftree -z 9 -p2 "${clst_destpath}" "$1/zisofs" \ > - || die "Could not run mkzftree, did you emerge > zisofs" -} > - > -create_noloop() { > - echo "Copying files for image (no loop)..." > - cp -pPR "${clst_destpath}"/* "$1" \ > - || die "Could not copy files to image (no loop)" > -} > - > create_squashfs() { > echo "Creating squashfs..." > export loopname="image.squashfs" > @@ -59,14 +10,6 @@ create_squashfs() { > || die "gensquashfs failed, did you emerge > squashfs-tools-ng?" } > > -create_jffs() { > - echo "Creating jffs..." > - export loopname="image.jffs" > - # fs_check /usr/sbin/mkfs.jffs jffs sys-fs/mtd > - mkfs.jffs -d ${clst_destpath} -o $1/${loopname} > ${clst_fsops} \ > - || die "Could not create a jffs filesystem" > -} > - > create_jffs2(){ > echo "Creating jffs2..." > export loopname="image.jffs" > @@ -74,11 +17,3 @@ create_jffs2(){ > mkfs.jffs2 --root=${clst_destpath} --output=$1/${loopname} > ${clst_fsops} \ || die "Could not create a jffs2 filesystem" > } > - > -create_cramfs(){ > - echo "Creating cramfs..." > - export loopname="image.cramfs" > - #fs_check /sbin/mkcramfs cramfs sys-fs/cramfs > - mkcramfs ${clst_fsops} ${clst_destpath} $1/${loopname} \ > - || die "Could not create a cramfs filesystem" > -} > diff --git a/targets/support/functions.sh > b/targets/support/functions.sh index 9da13baf..daf6f190 100755 > --- a/targets/support/functions.sh > +++ b/targets/support/functions.sh > @@ -230,26 +230,12 @@ check_bootargs(){ > > check_filesystem_type(){ > case ${clst_fstype} in > - normal) > - cmdline_opts="${cmdline_opts} > looptype=normal loop=/image.loop" > - ;; > - zisofs) > - cmdline_opts="${cmdline_opts} > looptype=zisofs loop=/zisofs" > - ;; > - noloop) > - ;; > squashfs) > cmdline_opts="${cmdline_opts} > looptype=squashfs loop=/image.squashfs" ;; > - jffs) > - cmdline_opts="${cmdline_opts} looptype=jffs > loop=/image.jffs" > - ;; > jffs2) > cmdline_opts="${cmdline_opts} looptype=jffs2 > loop=/image.jffs2" ;; > - cramfs) > - cmdline_opts="${cmdline_opts} > looptype=cramfs loop=/image.cramfs" > - ;; > esac > } > > diff --git a/targets/support/target_image_setup.sh > b/targets/support/target_image_setup.sh index 559bc56c..423dc4c4 > 100755 --- a/targets/support/target_image_setup.sh > +++ b/targets/support/target_image_setup.sh > @@ -8,34 +8,14 @@ mkdir -p $1 > > loopret=1 > case ${clst_fstype} in > - normal) > - create_normal_loop $1 > - loopret=$? > - ;; > - zisofs) > - create_zisofs $1 > - loopret=$? > - ;; > - noloop) > - create_noloop $1 > - loopret=$? > - ;; > squashfs) > create_squashfs $1 > loopret=$? > ;; > - jffs) > - create_jffs $1 > - loopret=$? > - ;; > jffs2) > create_jffs2 $1 > loopret=$? > ;; > - cramfs) > - create_cramfs $1 > - loopret=$? > - ;; > esac > > if [ ${loopret} = "1" ]