tUse the valid "upstream_kernel" setting and install kernel and dtb. - uwu - hardware bitcoin wallet software and build system (HTM) git clone https://git.parazyd.org/uwu (DIR) Log (DIR) Files (DIR) Refs (DIR) README (DIR) LICENSE --- (DIR) commit e891008ba4f1caf396ac65c127d1a7bf6f2bf8d2 (DIR) parent 76685eac09e017c4ea2fffe1934f797d42baa8cf (HTM) Author: parazyd <parazyd@dyne.org> Date: Fri, 27 Nov 2020 13:27:07 +0100 Use the valid "upstream_kernel" setting and install kernel and dtb. Diffstat: M Makefile | 14 +++++++++----- M config.mk | 3 +++ M kernel.mk | 6 +++--- 3 files changed, 15 insertions(+), 8 deletions(-) --- (DIR) diff --git a/Makefile b/Makefile t@@ -7,7 +7,7 @@ include config.mk BINS = qemu-wrapper install.sh -BOOT_BINS = rpi-boot/Image rpi-boot/bcm2835-rpi-zero.dtb +BOOT_BINS = rpi-boot/upstream/kernel.img rpi-boot/upstream/bcm2835-rpi-zero.dtb all: $(BINS) $(BOOT_BINS) t@@ -27,10 +27,10 @@ install.sh: install.sh.in -e 's,@ROOTCREDENTIALS@,$(ROOTCREDENTIALS),g' \ < $@.in > $@ -rpi-boot/Image: $(KERNEL_BINS) - cp -f linux-5.8.18/arch/arm/boot/Image $@ +rpi-boot/upstream/kernel.img: $(KERNEL_BINS) + cp -f linux-5.8.18/arch/arm/boot/zImage $@ -rpi-boot/bcm2835-rpi-zero.dtb: $(KERNEL_BINS) +rpi-boot/upstream/bcm2835-rpi-zero.dtb: $(KERNEL_BINS) cp -f linux-5.8.18/arch/arm/boot/dts/bcm2835-rpi-zero.dtb $@ $(IMAGE): $(BINS) $(BOOT_BINS) $(ALPINE_BINS) ch t@@ -47,7 +47,11 @@ $(IMAGE): $(BINS) $(BOOT_BINS) $(ALPINE_BINS) ch sudo umount -R ./ch/proc ./ch/sys ./ch/dev sudo rm -f ./ch/install.sh ./ch/qemu-wrapper ./ch/$(QEMU_ARM) sudo mkdir -p ./ch/boot - sudo cp -f rpi-boot/* ./ch/boot + sudo cp -r rpi-boot/* ./ch/boot +ifneq ($(DEBUG),) + sudo sed -e 's/BOOT_UART=0/BOOT_UART=1/' -i ./ch/boot/bootcode.bin + sudo sed -e 's/enable_uart=0/enable_uart=1/' -i ./ch/boot/config.txt +endif ( cd ch && sudo find . | sudo cpio -oa --reproducible --format=newc > ../$@) clean: (DIR) diff --git a/config.mk b/config.mk t@@ -5,6 +5,9 @@ VERSION = 0.1 IMAGE = uwu-$(VERSION).cpio +# Uncomment to enable certain things useful for debugging +DEBUG = 1 + # System path to qemu-arm binary used to emulate ARM ELFs in the chroot QEMU_ARM = /usr/bin/qemu-arm (DIR) diff --git a/kernel.mk b/kernel.mk t@@ -9,7 +9,7 @@ KERNEL_CFG = $(KERNEL_SRC)/config KERNEL_BINS = \ $(KERNEL_SRC) $(KERNEL_TAR) $(KERNEL_SIG) $(KERNEL_CFG) \ $(KERNEL_SRC)/arch/arm/boot/dts/bcm2835-rpi-zero.dtb \ - $(KERNEL_SRC)/arch/arm/boot/Image + $(KERNEL_SRC)/arch/arm/boot/zImage $(KERNEL_TAR): t@@ -36,5 +36,5 @@ $(KERNEL_CFG): $(KERNEL_SRC) $(KERNEL_SRC)/arch/arm/boot/dts/bcm2835-rpi-zero.dtb: $(KERNEL_CFG) $(MAKE) -C $(KERNEL_SRC) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) bcm2835-rpi-zero.dtb -$(KERNEL_SRC)/arch/arm/boot/Image: $(KERNEL_SRC)/arch/arm/boot/dts/bcm2835-rpi-zero.dtb - $(MAKE) -C $(KERNEL_SRC) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) Image +$(KERNEL_SRC)/arch/arm/boot/zImage: $(KERNEL_SRC)/arch/arm/boot/dts/bcm2835-rpi-zero.dtb + $(MAKE) -C $(KERNEL_SRC) ARCH=arm CROSS_COMPILE=$(CROSS_COMPILE) zImage