You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
images/linux/Makefile

25 lines
656 B

CHROOT_CMD := chroot build/rootfs /bin/bash -c
FILES = $(shell find src/ -type f -print | sed -e 's|^src/|build/rootfs/|')
all: $(FILES) build/rootfs/initrd.img
clean:
rm -r build/rootfs
build/rootfs/initrd.img: $(FILES) | build/rootfs
chmod +x build/rootfs/etc/initramfs-tools/scripts/local-top/download.sh
$(CHROOT_CMD) "apt update && apt install -y linux-image-4.19.0-6-amd64"
$(CHROOT_CMD) "update-initramfs -c -kall"
build/rootfs/%: src/% | build/rootfs
mkdir -p $(@D)
cp $< $@
build/rootfs: build/cache
rm -r build/rootfs || true
cp -r build/cache build/rootfs
build/cache:
rm -r build/cache || true
debootstrap buster build/cache