public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
From: Matt Turner <mattst88@gentoo.org>
To: gentoo-catalyst@lists.gentoo.org
Cc: Matt Turner <mattst88@gentoo.org>
Subject: [gentoo-catalyst] [PATCH 2/8] targets: Drop most fstypes
Date: Fri,  1 May 2020 18:40:30 -0700	[thread overview]
Message-ID: <20200502014036.1039317-2-mattst88@gentoo.org> (raw)
In-Reply-To: <20200502014036.1039317-1-mattst88@gentoo.org>

Signed-off-by: Matt Turner <mattst88@gentoo.org>
---
 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(-)

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" ]
-- 
2.26.2



  reply	other threads:[~2020-05-02  1:40 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-02  1:40 [gentoo-catalyst] [PATCH 1/8] targets: Use gensquashfs instead of mksquashfs Matt Turner
2020-05-02  1:40 ` Matt Turner [this message]
2020-05-02 23:00   ` [gentoo-catalyst] [PATCH 2/8] targets: Drop most fstypes Brian Dolbec
2020-05-02 23:17     ` Matt Turner
2020-05-02  1:40 ` [gentoo-catalyst] [PATCH 3/8] targets: Inline filesystem-functions.sh Matt Turner
2020-05-02 23:03   ` Brian Dolbec
2020-05-02 23:18     ` Matt Turner
2020-05-03  0:25       ` Brian Dolbec
2020-05-02  1:40 ` [gentoo-catalyst] [PATCH 4/8] targets: Remove unused source filesystem-functions.sh Matt Turner
2020-05-02 23:06   ` Brian Dolbec
2020-05-02 23:20     ` Matt Turner
2020-05-02 23:51       ` Brian Dolbec
2020-05-02  1:40 ` [gentoo-catalyst] [PATCH 5/8] targets: Remove run_crossdev() function Matt Turner
2020-05-02 23:06   ` Brian Dolbec
2020-05-02 23:22     ` Matt Turner
2020-05-02 23:45       ` Brian Dolbec
2020-05-02  1:40 ` [gentoo-catalyst] [PATCH 6/8] targets: Inline functions with one caller Matt Turner
2020-05-02 23:12   ` Brian Dolbec
2020-05-02  1:40 ` [gentoo-catalyst] [PATCH 7/8] targets: Remove unused extract_kernel() Matt Turner
2020-05-02 23:15   ` Brian Dolbec
2020-05-02  1:40 ` [gentoo-catalyst] [PATCH 8/8] catalyst: Replace target_portdir with repo_basedir+repo_name Matt Turner
2020-05-02 23:28   ` Brian Dolbec
2020-05-02 22:56 ` [gentoo-catalyst] [PATCH 1/8] targets: Use gensquashfs instead of mksquashfs Brian Dolbec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200502014036.1039317-2-mattst88@gentoo.org \
    --to=mattst88@gentoo.org \
    --cc=gentoo-catalyst@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox