From 0d9d980ecd6fce5708003ed16c3238a680b1b16e Mon Sep 17 00:00:00 2001 From: Tal Keren Date: Thu, 7 Jan 2016 02:40:47 +0200 Subject: firmware-utils: kernel image generator for TP-Link RE450 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 [rd@radekdostal.com: add build target to .../image/tp-link.mk] Signed-off-by: Radek Dostál --- target/linux/ar71xx/image/tp-link.mk | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'target') diff --git a/target/linux/ar71xx/image/tp-link.mk b/target/linux/ar71xx/image/tp-link.mk index 616bdb7a4b..c6508839cc 100644 --- a/target/linux/ar71xx/image/tp-link.mk +++ b/target/linux/ar71xx/image/tp-link.mk @@ -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 -- cgit v1.2.3