-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
27 lines (21 loc) · 763 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
ROOTFS_DIR ?= multistrap-debian-buster
.multistrap: debian-config-buster debian-debconf
# Generation multistrap
rm -f $(ROOTFS_DIR)/var/lib/dpkg/status
multistrap -f $< -d $(ROOTFS_DIR)
# Copy custom files
cp -R files/* $(ROOTFS_DIR)
touch $@
.multistrap-config: multistrap.configscript .multistrap
# Configuring multistrap
cp /usr/bin/qemu-arm-static $(ROOTFS_DIR)/usr/bin
cp multistrap.configscript $(ROOTFS_DIR)/multistrap.configscript
mount -o bind /dev $(ROOTFS_DIR)/dev
chroot $(ROOTFS_DIR) /usr/bin/qemu-arm-static /bin/sh -c ./$<
umount $(ROOTFS_DIR)/dev
rm -f $(ROOTFS_DIR)/usr/bin/qemu-arm-static
rm -f $(ROOTFS_DIR)/multistrap.configscript
touch $@
clean:
rm -f .multistrap-config .multistrap
all: .multistrap .multistrap-config