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.
41 lines
1.1 KiB
41 lines
1.1 KiB
CHROOT_CMD := chroot build/rootfs /bin/bash -c
|
|
|
|
FILES = $(shell find src/ -type f -print | sed -e 's|^src/|build/rootfs/|')
|
|
FILES_SRC = $(shell find src/ -type f -print)
|
|
|
|
all: $(FILES) menu images build/rootfs/initrd.img
|
|
|
|
clean:
|
|
rm -rf build/rootfs
|
|
|
|
menu: build/rootfs | build
|
|
$(CHROOT_CMD) "apt install dialog"
|
|
$(CHROOT_CMD) "chmod +x /scripts/menu.sh"
|
|
$(CHROOT_CMD) "usermod -s /scripts/menu.sh root"
|
|
|
|
images: build/rootfs | build
|
|
$(CHROOT_CMD) "apt install -y udpcast"
|
|
$(CHROOT_CMD) "apt install -y partclone"
|
|
$(CHROOT_CMD) "apt install -y lzop strace"
|
|
$(CHROOT_CMD) "touch /etc/mtab"
|
|
|
|
build/rootfs/initrd.img: build/rootfs $(FILES) | build
|
|
chmod +x build/rootfs/etc/initramfs-tools/scripts/local-top/download.sh
|
|
$(CHROOT_CMD) "apt update && apt install -y linux-image-4.19.0-*-amd64"
|
|
$(CHROOT_CMD) "update-initramfs -c -kall"
|
|
|
|
$(FILES): $(FILES_SRC) build/rootfs | build
|
|
mkdir -p $(@D)
|
|
cp $(shell echo $@ | sed -e 's|^build/rootfs/|src/|') $@
|
|
|
|
build/rootfs: build/cache | build
|
|
rm -rf build/rootfs
|
|
cp -r build/cache build/rootfs
|
|
rm -rf $(FILES)
|
|
|
|
build/cache: | build
|
|
rm -rf build/cache || true
|
|
debootstrap buster build/cache
|
|
|
|
build:
|
|
mkdir -p build
|
|
|