commit 48f31a0277552f8d8680edf6eac6fe0bbeef2590 parent 3ef8a00f085d53e258f49b5c8f2f9fc28eb3ef02 Author: parazyd <parazyd@dyne.org> Date: Thu, 28 Jan 2021 12:19:24 +0100 Add installation instructions. Diffstat:
M | Makefile | | | 14 | ++++++++++++-- |
A | README.md | | | 36 | ++++++++++++++++++++++++++++++++++++ |
2 files changed, 48 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile @@ -64,4 +64,15 @@ bin/busybox: $(BUSYBOX_SRC) $(MAKE) -C $(BUSYBOX_SRC) ARCH=arm64 CROSS_COMPILE=$(TC) busybox cp $(BUSYBOX_SRC)/busybox $@ -.PHONY: all- \ No newline at end of file +install: all +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 + +.PHONY: all install diff --git a/README.md b/README.md @@ -0,0 +1,36 @@ +pi3-aoe +======= + +A basic setup for ATA over Ethernet on a RPi3. + + +Build steps +----------- + +* Run `make -j32` to build everything + +``` +; make -j32 +``` + +* Create an image to dd on a microsd: + +``` +; dd if=/dev/zero of=pi3aoe.img bs=1M count=100 +; loopdevice="$(sudo losetup -f --show pi3aoe.img)" +; sudo parted "$loopdevice" --script -- mklabel msdos +; sudo parted "$loopdevice" --script -- mkpart primary "fat32 2048s 70MB" +; sudo parted "$loopdevice" --script -- mkpart primary "ext4 70MB 100%" +; sudo mkfs.vfat "${loopdevice}p1" +; sudo mkfs.ext4 "${loopdevice}p2" +; mkdir -p mnt +; sudo mount "${loopdevice}p2" mnt +; sudo mkdir -p mnt/boot +; sudo mount "${loopdevice}p1" mnt/boot +``` + +* Install + +``` +sudo make DESTDIR="$PWD/mnt" install +```