From: Paul Hänsch Date: Fri, 26 Jul 2019 15:06:09 +0000 (+0200) Subject: simplified image packing (eliminated block copy stage), enabled mixed release package... X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=94825873e9d1651ddd885049306cb44319bf9f41;p=blast simplified image packing (eliminated block copy stage), enabled mixed release package installation --- diff --git a/Makefile b/Makefile index c3309a2..adec7d7 100644 --- a/Makefile +++ b/Makefile @@ -7,8 +7,8 @@ space_:= ${nul_} ${nul_} .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 @@ -33,6 +33,8 @@ ifndef release 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 @@ -43,17 +45,17 @@ ifdef disk 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} @@ -62,20 +64,20 @@ else ifdef 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} @@ -110,20 +112,20 @@ else ifdef raspi 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: @@ -325,6 +327,14 @@ _mount: ${PBOOT} ${PROOT} ${CFG_ROOT} 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}" diff --git a/modules/approx.mk b/modules/approx.mk index 8e4fd78..009e445 100644 --- a/modules/approx.mk +++ b/modules/approx.mk @@ -6,17 +6,23 @@ export approx_original_sources 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