commit cefafa06e70d6ca7d591a175e35fa7be703f9e2e parent a60adf60ac36c11446d0d0da8217649adca2df23 Author: parazyd <parazyd@dyne.org> Date: Thu, 28 Jan 2021 14:44:42 +0100 Create and install initramfs. Diffstat:
M | Makefile | | | 16 | +++++++++------- |
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/Makefile b/Makefile @@ -64,16 +64,18 @@ bin/busybox: $(BUSYBOX_SRC) $(MAKE) -C $(BUSYBOX_SRC) ARCH=arm64 CROSS_COMPILE=$(TC) busybox cp $(BUSYBOX_SRC)/busybox $@ -install: all +initramfs.gz: bin/aoe-stat bin/busybox + mkdir -p initramfs/dev initramfs/proc initramfs/sys + cp init initramfs + cp -r bin initramfs + cp -a /dev/console /dev/random /dev/tty /dev/urandom initramfs/dev + ( cd initramfs ; find . | cpio -o -H newc | gzip -c9 > ../$@ ) + +install: all initramfs.gz ifeq ($(DESTDIR),) @echo "You need to set DESTDIR. See README.md for more information." @exit 1 endif - mkdir -p $(DESTDIR)/dev $(DESTDIR)/proc $(DESTDIR)/sys - cp -r boot/* $(DESTDIR)/boot - cp -r bin $(DESTDIR)/bin - cp init $(DESTDIR)/init - chmod 755 $(DESTDIR)/init - cp -a /dev/console /dev/random /dev/tty /dev/urandom $(DESTDIR)/dev + cp -r boot/* initramfs.gz $(DESTDIR) .PHONY: all install