firmware-utils: kernel image generator for TP-Link RE450

The firmware image that is used in TP-Link RE450 (and some more devices from
the RE series) is tplink-safeloader.
In the kernel partition, the kernel is compressed in a regular tp-link
firmware that is just used for booting. Since it is only used for compressing
and booting, only four fields are filled in the header:
Vendor, version, kernel load address and kernel entry point.
mktplinkfw-kernel is a simpler version of mktpolinkfw that generate such
images. It also specifies the hardware id (as it is in the product info
section), so when doing a sysupgrade - the existing code will check for
hardware compatibility.

Signed-off-by: Tal Keren <kooolk@gmail.com>
[rd@radekdostal.com: add build target to .../image/tp-link.mk]
Signed-off-by: Radek Dostál <rd@radekdostal.com>
This commit is contained in:
Tal Keren
2016-01-07 02:40:47 +02:00
committed by Jo-Philipp Wich
parent 87b0747263
commit 0d9d980ecd
3 changed files with 363 additions and 0 deletions

View File

@@ -35,6 +35,16 @@ define Build/mktplinkfw-combined
@mv $@.new $@
endef
# add RE450 and similar header to the kernel image
define Build/mktplinkfw-kernel
$(STAGING_DIR_HOST)/bin/mktplinkfw-kernel \
-H $(TPLINK_HWID) -N OpenWrt -V $(REVISION) \
-L $(KERNEL_LOADADDR) -E $(KERNEL_LOADADDR) \
-k $@ \
-o $@.new
@mv $@.new $@
endef
define Device/tplink
TPLINK_HWREV := 0x1
TPLINK_HEADER_VERSION := 1