summaryrefslogtreecommitdiff
diff options
authorMichael Hudson-Doyle <[email protected]>2023-11-21 11:29:44 +1300
committerMichael Hudson-Doyle <[email protected]>2023-11-23 06:57:50 +1300
commitde9122e82efb295e786614f36d32fec67609b07f (patch)
treec60cdf5e10c32302416b0d095ee58653e72cfb27
parent02aec0591ee0c024c88f510c8d3634fa825a2906 (diff)
remove ability to create vfat images
-rw-r--r--CONF.sh1
-rw-r--r--Makefile25
-rw-r--r--README4
-rwxr-xr-xtools/make-vfat-img28
-rwxr-xr-xtools/pi-makelist-vfat53
5 files changed, 7 insertions, 104 deletions
diff --git a/CONF.sh b/CONF.sh
index b15a95a..b005f88 100644
--- a/CONF.sh
+++ b/CONF.sh
@@ -298,7 +298,6 @@ export NORECOMMENDS=1
export NOSUGGESTS=1
# Image format:
-# vfat = Output an image in VFAT format (.img)
# iso = Output an image in ISO 9660 format (.iso)
# img = Output a raw partitioned disk image (.img)
if [ -z "$IMAGE_FORMAT" ]; then
diff --git a/Makefile b/Makefile
index 74d82a0..b4888ad 100644
--- a/Makefile
+++ b/Makefile
@@ -109,7 +109,6 @@ fastsums=$(BASEDIR)/tools/fast_sums
add_live_filesystem=$(BASEDIR)/tools/add_live_filesystem
add_winfoss=$(BASEDIR)/tools/add_winfoss
verbose=$(BASEDIR)/tools/verbose_command
-make_vfat_img=$(BASEDIR)/tools/make-vfat-img
make_raw_img=$(BASEDIR)/tools/make-raw-img
hardlink=$(BASEDIR)/tools/hardlink
@@ -119,14 +118,9 @@ SDIR=$(TDIR)/$(CODENAME)-src
FIRSTDISKS=CD1
-# we don't know how to generate ISOs for arm; force vfat images
-ifneq (,$(findstring $(ARCH),armel armhf))
-IMAGE_FORMAT := vfat
-else
- # also, riscv64 images are raw images (non-ISO)
- ifeq ($(ARCH),riscv64)
- IMAGE_FORMAT := img
- endif
+# riscv64 images are raw images (non-ISO)
+ifeq ($(ARCH),riscv64)
+ IMAGE_FORMAT := img
endif
# CDBASE = $(CODENAME)-$(FULLARCH)-$(1)
@@ -662,13 +656,7 @@ bin-images: ok bin-md5list $(OUT)
opts=`cat $(BDIR)/1.mkisofs_opts`; \
volid=`cat $(BDIR)/1.volid`; \
rm -f $(OUT)/$(CDBASE).raw; \
- if [ "$(IMAGE_FORMAT)" = "vfat" ]; then \
- if [ -d boot1/ ]; then \
- cp -a boot1/* CD1; \
- fi; \
- $(make_vfat_img) -d CD1 \
- -o $(OUT)/$(CDBASE).raw; \
- elif [ "$(IMAGE_FORMAT)" = "img" ]; then \
+ if [ "$(IMAGE_FORMAT)" = "img" ]; then \
$(make_raw_img) -g cd-boot-images/ \
-d CD1 -o $(OUT)/$(CDBASE).raw; \
elif [ "$(IMAGE_FORMAT)" = "iso" ]; then \
@@ -732,10 +720,7 @@ src-images: ok src-md5list $(OUT)
pi-makelist:
$(Q)set -e; \
cd $(OUT); for file in `find * -name \*.raw`; do \
- if [ "$(IMAGE_FORMAT)" = "vfat" ]; then \
- $(BASEDIR)/tools/pi-makelist-vfat \
- $$file > $${file%%.raw}.list; \
- elif [ "$(IMAGE_FORMAT)" = "iso" ]; then \
+ if [ "$(IMAGE_FORMAT)" = "iso" ]; then \
$(BASEDIR)/tools/pi-makelist \
$$file > $${file%%.raw}.list; \
fi \
diff --git a/README b/README
index 0936886..8513768 100644
--- a/README
+++ b/README
@@ -258,10 +258,10 @@ Additional targets
Image format
------------
-You may want to generate images in ISO 9660 or VFAT formats.
+You may want to generate images in ISO 9660 or raw formats.
Set the IMAGE_FORMAT variable in CONF.sh. You can choose "iso" for generation
-of .iso (default), or "vfat" for generation of .img.
+of .iso (default), or "img" for generation of raw images.
About the symlink farm
diff --git a/tools/make-vfat-img b/tools/make-vfat-img
deleted file mode 100755
index 0ef7ab7..0000000
--- a/tools/make-vfat-img
+++ /dev/null
@@ -1,28 +0,0 @@
-#!/bin/sh
-
-set -e
-
-dir=""
-size=20
-outfile=""
-while getopts d:s:o: opt; do
- case "$opt" in
- d) dir="$OPTARG";;
- s) size="$OPTARG";;
- o) outfile="$OPTARG";;
- esac
-done
-if [ -z "$dir" ] || [ -z "$outfile" ]; then
- echo "Usage: $0 -d <DIR> -s <SIZE> -o <OUTFILE>"
- exit 1
-fi
-
-size=$(((($(du -sk $dir | cut -d' ' -f1) + ($size * 1024)) / 32) * 32))
-/sbin/mkdosfs -C $outfile $size
-for indir in $(find $dir -mindepth 1 -type d | cut -d/ -f2-); do
- mmd -i $outfile $indir
-done
-for file in $(find $dir -type f | cut -d/ -f2-); do
- mcopy -i $outfile $dir/$file ::$file
-done
-
diff --git a/tools/pi-makelist-vfat b/tools/pi-makelist-vfat
deleted file mode 100755
index 8938d02..0000000
--- a/tools/pi-makelist-vfat
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/bin/sh
-
-set -e
-
-if [ $# != 1 ]; then
- cat << EOF
-Usage: pi-makelist-vfat image.img >image.list
-
-Outputs list of files in a VFAT or in the VFAT of the second partition
-EOF
- exit 1
-fi
-IMG="$1"
-
-MTOOLSRC=""
-cleanup() {
- if [ -n "$MTOOLSRC" ]; then
- rm -f "$MTOOLSRC"
- fi
-}
-trap "cleanup" 0 1 2 3 9 11 13 15
-export MTOOLSRC=`tempfile --prefix pimkl --mode 644`
-
-# will try both of C: and D:
-cat >$MTOOLSRC <<EOF
-drive c:
- file="$IMG"
-
-drive d:
- file="$IMG"
- partition=1
-
-drive e:
- file="$IMG"
- partition=2
-EOF
-
-ARGS="-/ -f -a -b"
-
-drive=""
-for d in "c:" "d:" "e:"; do
- if mdir "$d" $ARGS >/dev/null 2>&1; then
- drive="$d"
- break
- fi
-done
-
-if [ -z "$drive" ]; then
- echo "$0: Couldn't list any drive" >&2
- exit 1
-fi
-
-mdir "$drive" $ARGS | sed '/\/$/ d; s/^[CDE]://'