.PHONY: clean .FORCE _target
.PHONY: _bootloader_raspi _bootloader_pc _partition_gpt _partition_raspi
.PHONY: _squash_modules
-.PHONY: _qemu _bootstrap _install _copy _config _bootloader _squash
-.PHONY: _partition _format _mount _sparse _umount _partcopy _mbr
+.PHONY: _qemu _bootstrap _install _copy _config _squash
+.PHONY: _format _mount _sparse _umount _partcopy _mbr
ARCH := amd64
KEYRING := keys/debian-archive-stretch-stable.gpg
endif
define SOURCES :=
+deb http://cdn.debian.net/debian stretch main
+deb http://cdn.debian.net/debian buster main
deb http://cdn.debian.net/debian ${release} main
endef
SYSROOT := hdd_mount/
CFGROOT := hdd_mount/
- _target: _mbr _umount _config _install _partition
+ _target: _mbr _umount _config _install _partition_gpt
- _partition: _partition_gpt
- _format: _partition
+ _partition_gpt:
+ _format: _partition_gpt
_mount: _format
_bootstrap: _mount
_install: _bootstrap _mount
_config: _install _mount
- _bootloader: _mount _bootloader_pc
- _umount: _mount _config _bootloader
- _mbr: _umount _bootloader
+ _bootloader_pc: _mount
+ _umount: _mount _config _bootloader_pc
+ _mbr: _umount _bootloader_pc
else ifdef image
VOLUME := ${image}
SYSROOT := sys_root_${release}/
CFGROOT := img_mount/
- _target: _mbr _umount _partcopy _config _install
+ _target: _mbr _umount _config _install
_bootstrap:
_install: _bootstrap
_sparse:
_format: _sparse
- _mount: _format
- _copy: _install _mount
- _config: _copy _mount
- _bootloader: _mount _bootloader_pc
- _umount: _mount _config _bootloader
- _partition: _partition_gpt
- _partcopy: _partition _umount
- _mbr: _partcopy _bootloader
+ _partition_gpt: _sparse
+ _partcopy: _partition_gpt _format
+ _img_mount: _partcopy
+ _copy: _install _img_mount
+ _config: _copy _img_mount
+ _bootloader_pc: _img_mount
+ _umount: _img_mount _config _bootloader_pc
+ _mbr: _partcopy _bootloader_pc
else ifdef squash
SQUASH := ${squash}
PACKAGES += firmware-brcm80211 libraspberrypi-bin libraspberrypi0 pi-bluetooth raspberrypi-bootloader raspberrypi-kernel
- _target: _umount _partcopy _config _install
+ _target: _umount _config
_qemu:
_bootstrap: _qemu
_install: _bootstrap
_sparse:
_format: _sparse
- _mount: _format
- _copy: _install _mount
- _config: _copy _mount
- _bootloader: _mount _bootloader_raspi
- _umount: _mount _config _bootloader
- _partition: _partition_raspi
- _partcopy: _partition _umount
+ _partition_raspi: _sparse
+ _partcopy: _partition_raspi _format
+ _img_mount: _partcopy
+ _copy: _install _img_mount
+ _config: _copy _img_mount
+ _bootloader_raspi: _img_mount
+ _umount: _img_mount _config _bootloader_raspi
else
_target:
mkdir -p -m 755 "$${CFGROOT}/boot"
mount -t vfat "$${PBOOT}" "$${CFGROOT}/boot"
+_img_mount:
+ mount -o loop,offset="$$((${BOOT_MB} + 2))"M,sizelimit=${ROOT_MB}M \
+ -t ext4 "$${VOLUME}" "$${CFGROOT}"
+ chmod 755 "$${CFGROOT}"
+ mkdir -p -m 755 "$${CFGROOT}/boot"
+ mount -o loop,offset=2M,sizelimit=${BOOT_MB}M \
+ -t vfat "$${VOLUME}" "$${CFGROOT}/boot"
+
_umount: ${CFGROOT}
-umount "$${CFGROOT}/boot"
umount "$${CFGROOT}" && rmdir "$${CFGROOT}"
ifdef approx
BOOTSTRAP := ${approx}
define SOURCES =
+ deb ${approx} stretch main
+ deb ${approx} buster main
deb ${approx} ${release} main
endef
else ifdef raspi
BOOTSTRAP := http://localhost/raspbian
define SOURCES :=
- deb http://localhost/raspbian ${release} main non-free firmware rpi
- deb http://localhost/rpidebian ${release} main
+ deb http://localhost/raspbian stretch main non-free firmware rpi
+ deb http://localhost/rpidebian stretch main
+ deb http://localhost/raspbian buster main non-free firmware rpi
+ deb http://localhost/rpidebian buster main
endef
else
BOOTSTRAP := http://localhost/debian
define SOURCES :=
+ deb http://localhost/debian stretch main
+ deb http://localhost/debian buster main
deb http://localhost/debian ${release} main
endef
endif