mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-01 19:46:51 +00:00
ath79: image: fix initramfs for safeloader devices
Currently it's not possible to tftpboot initramfs image on archer-c7-v5
as the image contains tplink-v1-header which leads to:
ath> bootm
## Booting image at 81000000 ...
Bad Magic Number
as U-Boot expects uImage wrapped image. This is caused by following
inheritance issue:
define Device/Init
KERNEL_INITRAMFS = $$(KERNEL)
define Device/tplink-v1
KERNEL := kernel-bin | append-dtb | lzma
KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | tplink-v1-header
define Device/tplink-safeloader
$(Device/tplink-v1)
define Device/tplink-safeloader-uimage
$(Device/tplink-safeloader)
KERNEL := kernel-bin | append-dtb | lzma | uImageArcher lzma
define Device/tplink_archer-c7-v5
$(Device/tplink-safeloader-uimage)
where tplink-v1 defines KERNEL_INITRAMFS with tplink-v1-header and it's
then used by all devices inheriting from tplink-safeloader. Fix this by
overriding KERNEL_INITRAMFS to KERNEL variable again.
Signed-off-by: Petr Štetiar <ynezz@true.cz>
(cherry picked from commit ceeece9ffa
)
This commit is contained in:
parent
cb58c7fe73
commit
b14eeccdfe
@ -102,6 +102,7 @@ endef
|
|||||||
define Device/tplink-safeloader
|
define Device/tplink-safeloader
|
||||||
$(Device/tplink)
|
$(Device/tplink)
|
||||||
KERNEL := kernel-bin | append-dtb | lzma | tplink-v1-header -O
|
KERNEL := kernel-bin | append-dtb | lzma | tplink-v1-header -O
|
||||||
|
KERNEL_INITRAMFS := $$(KERNEL)
|
||||||
IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \
|
IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | \
|
||||||
append-metadata | check-size $$$$(IMAGE_SIZE)
|
append-metadata | check-size $$$$(IMAGE_SIZE)
|
||||||
IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
|
IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
|
||||||
@ -110,4 +111,5 @@ endef
|
|||||||
define Device/tplink-safeloader-uimage
|
define Device/tplink-safeloader-uimage
|
||||||
$(Device/tplink-safeloader)
|
$(Device/tplink-safeloader)
|
||||||
KERNEL := kernel-bin | append-dtb | lzma | uImageArcher lzma
|
KERNEL := kernel-bin | append-dtb | lzma | uImageArcher lzma
|
||||||
|
KERNEL_INITRAMFS := $$(KERNEL)
|
||||||
endef
|
endef
|
||||||
|
Loading…
Reference in New Issue
Block a user