summaryrefslogtreecommitdiff
path: root/target/linux/ixp4xx/image
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-10-17 22:03:46 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-10-17 22:03:46 +0000
commit96fa602499456e804b5ed721adecb8b7ac0a06ba (patch)
treea8ab3a477a2efa116283faaf032f8cfaa7894b04 /target/linux/ixp4xx/image
parent879b7a7a9b1c99920a8a5c1f5329e060b564aca6 (diff)
downloadmtk-20170518-96fa602499456e804b5ed721adecb8b7ac0a06ba.zip
mtk-20170518-96fa602499456e804b5ed721adecb8b7ac0a06ba.tar.gz
mtk-20170518-96fa602499456e804b5ed721adecb8b7ac0a06ba.tar.bz2
ixp4xx: add sysupgrade support
Signed-off-by: Tim Harvey <tharvey@gateworks.com> target/linux/ixp4xx/base-files/lib/ixp4xx.sh | 25 ++ target/linux/ixp4xx/base-files/lib/upgrade/platform.sh | 156 +++++++++++++++++ target/linux/ixp4xx/image/Makefile | 11 + 3 files changed, 192 insertions(+) SVN-Revision: 33828
Diffstat (limited to 'target/linux/ixp4xx/image')
-rw-r--r--target/linux/ixp4xx/image/Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/target/linux/ixp4xx/image/Makefile b/target/linux/ixp4xx/image/Makefile
index 7a69998..30e5b12 100644
--- a/target/linux/ixp4xx/image/Makefile
+++ b/target/linux/ixp4xx/image/Makefile
@@ -40,8 +40,19 @@ define Image/BuildKernel
BIN_DIR=$(BIN_DIR) IMG_PREFIX="$(IMG_PREFIX)" $(TOPDIR)/scripts/arm-magic.sh
endef
+# Build sysupgrade image
+define BuildFirmware/Generic
+ dd if=$(KDIR)/zImage of=$(KDIR)/zImage.pad bs=64k conv=sync; \
+ dd if=$(KDIR)/root.$(1) of=$(KDIR)/root.$(1).pad bs=128k conv=sync; \
+ sh $(TOPDIR)/scripts/combined-image.sh \
+ $(KDIR)/zImage.pad \
+ $(KDIR)/root.$(1).pad \
+ $(BIN_DIR)/$(IMG_PREFIX)-$(patsubst jffs2-%,jffs2,$(patsubst squashfs-%,squashfs,$(1)))-sysupgrade.bin
+endef
+
define Image/Build
$(call Image/Build/$(1),$(1))
+ $(call BuildFirmware/Generic,$(1))
endef
define Image/Build/jffs2-64k