commit:     8a2d60dc2a299985ab966a1a630bb16381f3491d
Author:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
AuthorDate: Fri May  1 06:28:58 2020 +0000
Commit:     Matt Turner <mattst88 <AT> gentoo <DOT> org>
CommitDate: Sun May  3 22:04:18 2020 +0000
URL:        https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=8a2d60dc

targets: Drop most fstypes

This removes support for various file systems from the embedded target
(a target for producing images for embedded systems, as far as I
understand) and for ISOs. For ISOs, squashfs is great and everyone uses
it -- it provides better performance from a CD than the alternatives
like zisofs, normal, or noloop.

For embedded, it's unclear whether the target is used at all. There are
some very old specs in releng.git that use 'rel_type: embedded', but I'm
not sure if the target is used at all these days. To that end, I've
asked in #gentoo-embedded if anyone uses it. I've removed what I believe
to be the file system options that don't provide any value, leaving
jffs2 for now.

Signed-off-by: Matt Turner <mattst88 <AT> gentoo.org>

 doc/catalyst-spec.5.txt                 | 11 ++----
 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, 5 insertions(+), 128 deletions(-)

diff --git a/doc/catalyst-spec.5.txt b/doc/catalyst-spec.5.txt
index e269e16d..cd7aebd9 100644
--- a/doc/catalyst-spec.5.txt
+++ b/doc/catalyst-spec.5.txt
@@ -170,18 +170,13 @@ Filesystem
 *livecd/fstype*::
 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.
+CD.  Possible values are:
+  `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" ]

Reply via email to