From e926f81d2b0222eb366b13d0ef5634b1590d3b81 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Paul=20H=C3=A4nsch?= Date: Fri, 3 Jul 2020 14:39:15 +0200 Subject: [PATCH] raspi filesystem experiments --- Makefile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 6c97122..453fa6a 100644 --- a/Makefile +++ b/Makefile @@ -152,8 +152,8 @@ else ifdef raspi deb http://archive.raspberrypi.org/debian ${release} main endef - PACKAGES += firmware-brcm80211 libraspberrypi-bin libraspberrypi0 pi-bluetooth raspberrypi-bootloader raspberrypi-kernel initramfs-tools nilfs-tools - fstype := nilfs2 + PACKAGES += firmware-brcm80211 libraspberrypi-bin libraspberrypi0 pi-bluetooth raspberrypi-bootloader raspberrypi-kernel initramfs-tools btrfs-tools + fstype := btrfs _target: _umount _config @@ -257,7 +257,6 @@ _install: ${SYSROOT} _aptkeys _norecommends _copy: ${SYSROOT} ${CFGROOT} sync - find "$${SYSROOT}" -lname '' -exec ln -sf /dev/null '{}' \; cp -au "$${SYSROOT}/." "$${CFGROOT}/" _config: ${CFGROOT} @@ -311,7 +310,7 @@ _sparse: ${PBOOT} ${PROOT} ifdef raspi _format_root: ${PROOT} -umount "$${CFGROOT}/boot" "$${CFGROOT}" "${PROOT}" - mkfs.nilfs2 -f -L FSROOT "$${PROOT}" + mkfs.${fstype} -f -L FSROOT "$${PROOT}" else _format_root: ${PROOT} -umount "$${CFGROOT}/boot" "$${CFGROOT}" "${PROOT}" @@ -396,6 +395,7 @@ _efi_mount: ${PBOOT} mount -t vfat -o loop "$${PBOOT}" "efi/" _efi_umount: _efi_mount + sync umount efi/ && rmdir efi/ .PHONY: _syslinux_mbr _grub_mbr @@ -433,7 +433,6 @@ _img_mount: ${CFGROOT} mountpoint "$${CFGROOT}" \ || mount -o loop,offset="$$((${BOOT_MB} + 2))"M,sizelimit=${ROOT_MB}M \ -t ${fstype} "$${VOLUME}" "$${CFGROOT}" - sync chmod 755 "$${CFGROOT}" mkdir -p -m 755 "$${CFGROOT}/boot" mountpoint "$${CFGROOT}/boot" \ @@ -441,9 +440,11 @@ _img_mount: ${CFGROOT} -t vfat "$${VOLUME}" "$${CFGROOT}/boot" _umount_boot: ${CFGROOT} _config + sync -umount "$${CFGROOT}/boot" _umount_root: _umount_boot _config + sync umount "$${CFGROOT}" && rmdir "$${CFGROOT}" _umount: _umount_boot _umount_root -- 2.39.2