From: Paul Hänsch Date: Mon, 21 Sep 2020 15:47:53 +0000 (+0200) Subject: improved filesystem selection X-Git-Url: http://git.plutz.net/?p=blast;a=commitdiff_plain;h=259e4dd34233f32b416fdffe7d248dbf37243af4 improved filesystem selection --- diff --git a/Makefile b/Makefile index 708fbcb..db032a6 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,8 @@ PACKAGES := ${PACKAGES} apt busybox-static debian-archive-keyring init systemd BOOT_MB := 62 ROOT_MB := 959 +fstype := ext4 + config.mk: cp "config.example" "$@" @@ -43,8 +45,6 @@ deb http://cdn.debian.net/debian ${release} main endef endif -fstype := ext4 - ifdef disk VOLUME := ${disk} PBOOT := ${disk}1 @@ -153,7 +153,6 @@ else ifdef raspi endef PACKAGES += firmware-brcm80211 libraspberrypi-bin libraspberrypi0 pi-bluetooth raspberrypi-bootloader raspberrypi-kernel initramfs-tools btrfs-tools - fstype := btrfs _target: _umount _config @@ -308,15 +307,15 @@ _partition_gpt: ${VOLUME} _sparse: ${PBOOT} ${PROOT} -ifdef raspi -_format_root: ${PROOT} - -umount "$${CFGROOT}/boot" "$${CFGROOT}" "${PROOT}" - mkfs.${fstype} -f -L FSROOT "$${PROOT}" +ifeq "${fstype}" "ext4" + fsflag:=-F else + fsflag:=-f +endif + _format_root: ${PROOT} -umount "$${CFGROOT}/boot" "$${CFGROOT}" "${PROOT}" - mkfs.ext4 -F -L FSROOT "$${PROOT}" -endif + mkfs.${fstype} ${fsflag} -L FSROOT "$${PROOT}" _format_boot: ${PBOOT} -umount "$${CFGROOT}/boot" "${PBOOT}"