tCreate and install initramfs. - pi3-aoe - ATA over Ethernet setup for Raspberry Pi 3
HTML git clone https://git.parazyd.org/pi3-aoe
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit cefafa06e70d6ca7d591a175e35fa7be703f9e2e
DIR parent a60adf60ac36c11446d0d0da8217649adca2df23
HTML 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(-)
---
DIR diff --git a/Makefile b/Makefile
t@@ -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