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 C8CE6138350 for ; Sat, 2 May 2020 01:40:52 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C9FA7E09A5; Sat, 2 May 2020 01:40:51 +0000 (UTC) Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) (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 C01BBE09A5 for ; Sat, 2 May 2020 01:40:51 +0000 (UTC) Received: by mail-pl1-f172.google.com with SMTP id t16so4271070plo.7 for ; Fri, 01 May 2020 18:40:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=U+Cxa1ysb3ROTZ00ZxrtJiPeTXNPaT/ObrNxo1vUEHs=; b=OVH1SXnSQuvZTmex+1I7JfHUwIs++nPqSgciChv8TV+UVPe73pslit9ZWqSwogrmca rjfcU1eeEQ8CFO4BiG9vZR5mZ7KqREaOeHPetnBpcQ3pTewq9Cm+6izC8sO0eI9CpqhD v6K4zcsPmKvejrVCMw11bEE1iVlgUgMJBsWcKGu/aIK+ShvZQrK9wPU7fpNg0tps15Iz KKeLtfJPhBNQ4HJnL5EqUZG+QU3J3NKMxsY3RVMh8DSm7ZdNpm+4ejmg3fgnHx4sMgvV SW5gnoFOTfK/Ycxe4HsRV2RSvOUhhU5qjrginp1WAovwVH7dvdWnc8gj30d9NTKlaK/P cjHg== X-Gm-Message-State: AGi0PubpU0pi7aRhDP6NRYnf1N+hhDzpsJY9QNy7tP8Y27zCKQbeEesK pCcde2ZWIbiu6qzf5IE+0PRvCmeg X-Google-Smtp-Source: APiQypKGAAuWmxKUXaQRe2oGWfxEZu3HYah7/UVroDx2DiNxIrvLsvstRfUtP0Vyf3c0B9ticBoDvw== X-Received: by 2002:a17:90b:30cb:: with SMTP id hi11mr3011025pjb.103.1588383650225; Fri, 01 May 2020 18:40:50 -0700 (PDT) Received: from localhost ([108.161.26.224]) by smtp.gmail.com with ESMTPSA id d126sm3369744pfc.81.2020.05.01.18.40.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 May 2020 18:40:49 -0700 (PDT) From: Matt Turner To: gentoo-catalyst@lists.gentoo.org Cc: Matt Turner Subject: [gentoo-catalyst] [PATCH 2/8] targets: Drop most fstypes Date: Fri, 1 May 2020 18:40:30 -0700 Message-Id: <20200502014036.1039317-2-mattst88@gentoo.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200502014036.1039317-1-mattst88@gentoo.org> References: <20200502014036.1039317-1-mattst88@gentoo.org> 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-Transfer-Encoding: 8bit X-Archives-Salt: 97bed216-e912-4a65-99e4-a1f22950fe70 X-Archives-Hash: af685472c277e581470e143934fb1017 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(-) 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