aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorSzabolcs Hubai <szab.hu@gmail.com>2022-09-26 08:42:54 +0200
committerHauke Mehrtens <hauke@hauke-m.de>2022-11-12 21:55:11 +0100
commit292d3f00c713c3368ca2a7b5bc480b76d3f74c50 (patch)
tree5bdc094c0c9657d37716a6fae30cda772216cbdb /target
parentd25e1a3bde68dadaa480e3c9ee7cc767e03a4170 (diff)
downloadupstream-292d3f00c713c3368ca2a7b5bc480b76d3f74c50.tar.gz
upstream-292d3f00c713c3368ca2a7b5bc480b76d3f74c50.tar.bz2
upstream-292d3f00c713c3368ca2a7b5bc480b76d3f74c50.zip
ramips: define lzma-loader recipe for SEAMA devices
Define "Device/seama-lzma-loader" recipe for SEAMA devices to help contributors avoid doing recipe mistakes. In a forum topic [0] I was under the impression that the good old uimage-lzma-loader didn't fix the LZMA ERROR 1 for a device. It was found out, that the uimage-lzma-loader never worked because the KERNEL variable was overriden earlier (also an LZMA ERROR 1 related commit, 6fba88de1913), and the "use lzma-loader" fix (commit 09faa73c53bd) didn't catch that to include the "loader-kernel" part. I contributed an LZMA ERROR 1 fix (commit ce1957100411) for the SEAMA device D-Link DIR-860L B1, where I had to duplicate the whole uimage-lzma-loader recipe because of the special needs of the vendor bootloader. This new recipe reuse most of uimage-lzma-loader's KERNEL definiton to avoid duplication. It uses "relocate-kernel" as it needed for D-Link DIR-860L B1 to boot from flash, and it's compatible with D-Link DIR-645 too. It repacks lzma-loader with lzma for kernel (without uImage), because these weird hacked vendor bootloaders accepts only LZMA compressed kernels from flash: We have SEAMA, Image Size = 4759794 Verifying Checksum ... Uncompressing SEAMA linux.lzma ... OK It uses uImage header for initramfs kernel to be little bit verbose. 0: https://forum.openwrt.org/t/136435/10 Signed-off-by: Szabolcs Hubai <szab.hu@gmail.com> (cherry picked from commit e7ad68d682bdb73b7d13d6c4b8d1d65d9f050138)
Diffstat (limited to 'target')
-rw-r--r--target/linux/ramips/image/Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index f481e6e447..c89510a43b 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -215,7 +215,15 @@ endef
define Device/uimage-lzma-loader
LOADER_TYPE := bin
- KERNEL := kernel-bin | append-dtb | lzma | loader-kernel | uImage none
+ KERNEL/lzma-loader := kernel-bin | append-dtb | lzma | loader-kernel
+ KERNEL := $$(KERNEL/lzma-loader) | uImage none
+endef
+
+define Device/seama-lzma-loader
+ $(Device/seama)
+ $(Device/uimage-lzma-loader)
+ KERNEL := $$(KERNEL/lzma-loader) | relocate-kernel | lzma -a0
+ KERNEL_INITRAMFS := $$(KERNEL/lzma-loader) | uImage none
endef
include $(SUBTARGET).mk