aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2022-03-27 21:00:30 +0200
committerDavid Bauer <mail@david-bauer.net>2022-10-14 23:15:20 +0200
commit5db6914f7cfddd1c3cb8a46017d4360e1ec26c5d (patch)
tree4f3e036f925852b05730749a28f08788bc75e6e1
parentf7a43e46065609910bdd2fa6f97ffa1deeda222b (diff)
downloadupstream-5db6914f7cfddd1c3cb8a46017d4360e1ec26c5d.tar.gz
upstream-5db6914f7cfddd1c3cb8a46017d4360e1ec26c5d.tar.bz2
upstream-5db6914f7cfddd1c3cb8a46017d4360e1ec26c5d.zip
mpc85xx: p1010: make TP-Link WDR4900 v1 build again
Add the spi-loader as a pre-kernel stage, so we can lift the kernel size limit. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net> (cherry picked from commit 2fa53c9214b7b93fd82ad1ff885145b9e1c1f71b)
-rw-r--r--target/linux/mpc85xx/image/p1010.mk20
1 files changed, 17 insertions, 3 deletions
diff --git a/target/linux/mpc85xx/image/p1010.mk b/target/linux/mpc85xx/image/p1010.mk
index 86ab53e355..a18cd6d178 100644
--- a/target/linux/mpc85xx/image/p1010.mk
+++ b/target/linux/mpc85xx/image/p1010.mk
@@ -1,5 +1,19 @@
DEVICE_VARS += TPLINK_HWID TPLINK_HWREV TPLINK_FLASHLAYOUT TPLINK_HEADER_VERSION
+define Build/spi-loader-okli-compile
+ rm -rf $@.spi-loader-okli
+ $(CP) spi-loader $@.spi-loader-okli
+ $(MAKE) -C $@.spi-loader-okli \
+ CROSS_COMPILE="$(TARGET_CROSS)" CONFIG="$(DEVICE_NAME)"
+ cp "$@.spi-loader-okli/out/uImage" "$@"
+ rm -rf $@.spi-loader-okli
+endef
+
+define Build/spi-loader-okli
+ cat $(KDIR)/loader-$(1) "$@" > "$@.new"
+ mv "$@.new" "$@"
+endef
+
define Device/tplink_tl-wdr4900-v1
DEVICE_VENDOR := TP-Link
DEVICE_MODEL := TL-WDR4900
@@ -8,19 +22,19 @@ define Device/tplink_tl-wdr4900-v1
TPLINK_HWID := 0x49000001
TPLINK_HWREV := 1
TPLINK_FLASHLAYOUT := 16Mppc
- KERNEL_SIZE := 2684k
KERNEL_NAME := simpleImage.tl-wdr4900-v1
KERNEL_INITRAMFS :=
- KERNEL := kernel-bin | uImage none
+ KERNEL := kernel-bin | uImage none -M 0x4f4b4c49 | spi-loader-okli $(1)
KERNEL_ENTRY := 0x1000000
KERNEL_LOADADDR := 0x1000000
SUPPORTED_DEVICES += tl-wdr4900-v1
+ COMPILE := loader-$(1)
+ COMPILE/loader-$(1) := spi-loader-okli-compile
ARTIFACTS := fdt.bin
ARTIFACT/fdt.bin := append-dtb
IMAGES := factory.bin sysupgrade.bin
IMAGE/sysupgrade.bin := tplink-v1-image sysupgrade | append-metadata
IMAGE/factory.bin := tplink-v1-image factory
- DEFAULT := n
endef
TARGET_DEVICES += tplink_tl-wdr4900-v1