summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorTal Keren <kooolk@gmail.com>2016-01-07 02:40:47 +0200
committerJo-Philipp Wich <jo@mein.io>2016-12-22 14:50:05 +0100
commit0d9d980ecd6fce5708003ed16c3238a680b1b16e (patch)
tree4fdf81d05143bd7d2b9ad891b9d72e106dd2fb30 /target
parent87b0747263bdfdfd58eff6c8d772ba5d959692f4 (diff)
downloadmtk-20170518-0d9d980ecd6fce5708003ed16c3238a680b1b16e.zip
mtk-20170518-0d9d980ecd6fce5708003ed16c3238a680b1b16e.tar.gz
mtk-20170518-0d9d980ecd6fce5708003ed16c3238a680b1b16e.tar.bz2
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>
Diffstat (limited to 'target')
-rw-r--r--target/linux/ar71xx/image/tp-link.mk10
1 files changed, 10 insertions, 0 deletions
diff --git a/target/linux/ar71xx/image/tp-link.mk b/target/linux/ar71xx/image/tp-link.mk
index 616bdb7..c650883 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