diff options
author | Mathias Kresin <dev@kresin.me> | 2021-11-14 21:53:45 +0100 |
---|---|---|
committer | Mathias Kresin <dev@kresin.me> | 2021-11-27 21:40:12 +0100 |
commit | 9764968bbac00a1b8a99ef22f24f1a3c25e76f9d (patch) | |
tree | 11e3572c2699d4c4706ec5be783a1225cc68ff56 /target/linux/lantiq/image/Makefile | |
parent | a328b6831c0f1e47e4fd4da4e00c0b9cb53cf2e4 (diff) | |
download | upstream-9764968bbac00a1b8a99ef22f24f1a3c25e76f9d.tar.gz upstream-9764968bbac00a1b8a99ef22f24f1a3c25e76f9d.tar.bz2 upstream-9764968bbac00a1b8a99ef22f24f1a3c25e76f9d.zip |
lantiq: ar7: use okli loader for FRITZ!Box
With Kernel 5.10 the ar7 FRITZ!Box are not booting the initramfs nor the
sysupgrade image any more. Presumably due to the grown kernel.
Use the okli preloader to workaround the bootloader issue. No solution
so far for the initramfs.
Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/lantiq/image/Makefile')
-rw-r--r-- | target/linux/lantiq/image/Makefile | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/target/linux/lantiq/image/Makefile b/target/linux/lantiq/image/Makefile index ec10cd882a..facc3fbe09 100644 --- a/target/linux/lantiq/image/Makefile +++ b/target/linux/lantiq/image/Makefile @@ -49,12 +49,35 @@ define Build/fullimage rm $@.tmp endef -DEVICE_VARS += SIGNATURE MAGIC CRC32_POLY +define Build/loader-okli-compile + rm -rf $@.src + $(MAKE) -C lzma-loader \ + PKG_BUILD_DIR="$@.src" \ + TARGET_DIR="$(dir $@)" LOADER_NAME="$(notdir $@)" \ + PLATFORM="lantiq" \ + LZMA_TEXT_START=0x82000000 \ + LOADADDR=0x80002000 \ + FLASH_START=0x10000000 \ + FLASH_OFFS=$(LOADER_FLASH_OFFS) \ + FLASH_MAX=0x0 \ + $(1) compile loader.bin + mv "$@.bin" "$@" + rm -rf $@.src +endef + +define Build/prepend-loader-okli + cat "$(KDIR)/loader-$(word 1,$(1)).bin" "$@" >> "$@.new" + mv "$@.new" "$@" +endef + +DEVICE_VARS += SIGNATURE MAGIC CRC32_POLY LOADER_FLASH_OFFS + DTS_DIR := $(DTS_DIR)/lantiq # Shared device definition: applies to every defined device define Device/Default PROFILES = Default + COMPILE := KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts) KERNEL_INITRAMFS_NAME = $$(KERNEL_NAME)-initramfs KERNEL := kernel-bin | append-dtb | lzma | uImage lzma @@ -105,6 +128,16 @@ define Device/AVM append-rootfs | pad-rootfs | check-size | append-metadata endef +define Device/AVM_preloader + DEVICE_VENDOR := AVM + COMPILE := loader-$(1).bin + COMPILE/loader-$(1).bin := loader-okli-compile | lzma | eva-image | \ + pad-to 64k | append-avm-fakeroot | pad-to 4k + KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 | \ + prepend-loader-okli $(1) + KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | eva-image +endef + ifeq ($(SUBTARGET),ase) DEFAULT_SOC := amazonse include amazonse.mk |