parent
03d8c8df76
commit
1fd6fb1d98
@ -0,0 +1,20 @@ |
|||||||
|
CHROOT_CMD := chroot build/rootfs /bin/bash -c
|
||||||
|
ITDIR := build/rootfs/etc/initramfs-tools
|
||||||
|
|
||||||
|
build/rootfs/initrd.img: build/rootfs initramfs/modules initramfs/download.sh |
||||||
|
$(CHROOT_CMD) "apt update && apt install -y linux-image-4.19.0-6-amd64"
|
||||||
|
cp initramfs/download.sh $(ITDIR)/scripts/local-top
|
||||||
|
chmod +x $(ITDIR)/scripts/local-top/download.sh
|
||||||
|
cp initramfs/modules $(ITDIR)
|
||||||
|
$(CHROOT_CMD) "update-initramfs -c -kall"
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
clean: |
||||||
|
rm -r build/rootfs
|
||||||
@ -0,0 +1,2 @@ |
|||||||
|
# Linux for cloning |
||||||
|
Run `make` to build. |
||||||
@ -0,0 +1,8 @@ |
|||||||
|
#!/bin/sh |
||||||
|
. /scripts/functions |
||||||
|
configure_networking |
||||||
|
tftp -g -r root.squashfs 192.168.14.2 |
||||||
|
mkdir /mnt |
||||||
|
modprobe loop |
||||||
|
losetup /dev/loop0 |
||||||
|
losetup -r /dev/loop0 /root.squashfs |
||||||
@ -0,0 +1 @@ |
|||||||
|
squashfs |
||||||
Loading…
Reference in new issue