aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2018-05-09 22:34:47 +0200
committerMatthias Schiffer <mschiffer@universe-factory.net>2018-05-17 22:11:56 +0200
commitaea146736cfd5792fbce06f33371adc13516e318 (patch)
tree28be6083ce1e32a629639b891ae4694fcc098b62 /target/linux/ath79
parent4ff23afdcc75a4b65440a08292b84824c96feac8 (diff)
downloadupstream-aea146736cfd5792fbce06f33371adc13516e318.tar.gz
upstream-aea146736cfd5792fbce06f33371adc13516e318.tar.bz2
upstream-aea146736cfd5792fbce06f33371adc13516e318.zip
ath79: fix TP-Link TL-WR1043ND v1 image build
Both initramfs and flashed images are built and boot. No Ethernet, no WLAN, probably further issues, so the image is not added to TARGET_DEVICES for now. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Diffstat (limited to 'target/linux/ath79')
-rw-r--r--target/linux/ath79/config-4.141
-rw-r--r--target/linux/ath79/dts/ar9132.dtsi4
-rw-r--r--target/linux/ath79/image/generic-tp-link.mk15
3 files changed, 16 insertions, 4 deletions
diff --git a/target/linux/ath79/config-4.14 b/target/linux/ath79/config-4.14
index cd12af7529..d1d7d7d932 100644
--- a/target/linux/ath79/config-4.14
+++ b/target/linux/ath79/config-4.14
@@ -178,6 +178,7 @@ CONFIG_MTD_SPI_NOR=y
CONFIG_MTD_SPLIT_FIRMWARE=y
CONFIG_MTD_SPLIT_LZMA_FW=y
CONFIG_MTD_SPLIT_SEAMA_FW=y
+CONFIG_MTD_SPLIT_TPLINK_FW=y
CONFIG_MTD_SPLIT_UIMAGE_FW=y
CONFIG_MTD_SPLIT_WRGG_FW=y
CONFIG_MTD_TPLINK_PARTS=y
diff --git a/target/linux/ath79/dts/ar9132.dtsi b/target/linux/ath79/dts/ar9132.dtsi
index 7a7a5f1b3d..4cc4f04a2e 100644
--- a/target/linux/ath79/dts/ar9132.dtsi
+++ b/target/linux/ath79/dts/ar9132.dtsi
@@ -7,6 +7,10 @@
#address-cells = <1>;
#size-cells = <1>;
+ chosen {
+ bootargs = "console=ttyS0,115200";
+ };
+
cpus {
#address-cells = <1>;
#size-cells = <0>;
diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk
index 901ced9a81..dd1a983b7f 100644
--- a/target/linux/ath79/image/generic-tp-link.mk
+++ b/target/linux/ath79/image/generic-tp-link.mk
@@ -1,5 +1,9 @@
DEVICE_VARS += TPLINK_HWID TPLINK_HWREV TPLINK_FLASHLAYOUT TPLINK_HEADER_VERSION TPLINK_BOARD_NAME
+define rootfs_align
+$(patsubst %-256k,0x40000,$(patsubst %-128k,0x20000,$(patsubst %-64k,0x10000,$(patsubst squashfs%,0x4,$(patsubst root.%,%,$(1))))))
+endef
+
# combine kernel and rootfs into one image
# mktplinkfw <type> <optional extra arguments to mktplinkfw binary>
# <type> is "sysupgrade" or "factory"
@@ -40,8 +44,11 @@ define Device/tplink
TPLINK_HWREV := 0x1
TPLINK_HEADER_VERSION := 1
LOADER_TYPE := gz
- IMAGES := sysupgrade.bin
- IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade | append-metadata
+ KERNEL := kernel-bin | append-dtb | lzma
+ KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | tplink-v1-header
+ IMAGES := sysupgrade.bin factory.bin
+ IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade
+ IMAGE/factory.bin := append-rootfs | mktplinkfw factory
endef
define Device/tplink-nolzma
@@ -49,8 +56,8 @@ define Device/tplink-nolzma
LOADER_FLASH_OFFS := 0x22000
COMPILE := loader-$(1).gz
COMPILE/loader-$(1).gz := loader-okli-compile
- KERNEL:= kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1)
- KERNEL_INITRAMFS := copy-file $(KDIR)/vmlinux-initramfs.bin.lzma | loader-kernel-cmdline | mktplinkfw-combined
+ KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1)
+ KERNEL_INITRAMFS := kernel-bin | append-dtb | gzip | tplink-v1-header
endef
define Device/tplink-4m