1 DEVICE_VARS
+= TPLINK_HWID TPLINK_HWREV TPLINK_FLASHLAYOUT TPLINK_HEADER_VERSION TPLINK_BOARD_NAME
3 # combine kernel and rootfs into one image
4 # mktplinkfw <type> <optional extra arguments to mktplinkfw binary>
5 # <type> is "sysupgrade" or "factory"
7 # -a align the rootfs start on an <align> bytes boundary
8 # -j add jffs2 end-of-filesystem markers
9 # -s strip padding from end of the image
10 # -X reserve <size> bytes in the firmware image (hexval prefixed with 0x)
11 define Build
/mktplinkfw
12 -$(STAGING_DIR_HOST
)/bin
/mktplinkfw \
13 -H
$(TPLINK_HWID
) -W
$(TPLINK_HWREV
) -F
$(TPLINK_FLASHLAYOUT
) -N OpenWrt
-V
$(REVISION
) \
14 -m
$(TPLINK_HEADER_VERSION
) \
19 -a
$(call rootfs_align
,$(FILESYSTEM
)) \
20 $(wordlist
2,$(words $(1)),$(1)) \
21 $(if
$(findstring sysupgrade
,$(word 1,$(1))),-s
) && mv
$@.new
$@ ||
rm -f
$@
27 define Build
/mktplinkfw-combined
28 $(STAGING_DIR_HOST
)/bin
/mktplinkfw \
29 -H
$(TPLINK_HWID
) -W
$(TPLINK_HWREV
) -F
$(TPLINK_FLASHLAYOUT
) -N OpenWrt
-V
$(REVISION
) $(1) \
30 -m
$(TPLINK_HEADER_VERSION
) \
41 TPLINK_HEADER_VERSION
:= 1
43 IMAGES
:= sysupgrade.bin
44 IMAGE
/sysupgrade.bin
:= append-rootfs | mktplinkfw sysupgrade | append-metadata
47 define Device
/tplink-nolzma
49 LOADER_FLASH_OFFS
:= 0x22000
50 COMPILE
:= loader-
$(1).gz
51 COMPILE
/loader-
$(1).gz
:= loader-okli-compile
52 KERNEL
:= kernel-bin | append-dtb | lzma | uImage lzma
-M
0x4f4b4c49 | loader-okli
$(1)
53 KERNEL_INITRAMFS
:= copy-file
$(KDIR
)/vmlinux-initramfs.bin.lzma | loader-kernel-cmdline | mktplinkfw-combined
56 define Device
/tplink-4m
57 $(Device
/tplink-nolzma
)
58 TPLINK_FLASHLAYOUT
:= 4M
62 define Device
/tplink-8m
63 $(Device
/tplink-nolzma
)
64 TPLINK_FLASHLAYOUT
:= 8M
68 define Device
/tl_wr1043nd_v1
71 DEVICE_TITLE
:= TP-LINK TL-WR1043N
/ND v1
72 DEVICE_PACKAGES
:= kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
73 TPLINK_HWID
:= 0x10430001
74 SUPPORTED_DEVICES
:= tplink
,tl-wr1043nd-v1 tl-wr1043nd
76 #TARGET_DEVICES += tl_wr1043nd_v1