aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2013-10-07 15:02:35 +0000
committerJohn Crispin <john@openwrt.org>2013-10-07 15:02:35 +0000
commitc077698e38876ecfc28454bcdd495ac36b387c2b (patch)
tree5829a9e658f845fc98dc4f1112710e4cb68545ef /target/linux
parent420c62205b3ff27b9733bf252762d1eefe9fcd27 (diff)
downloadupstream-c077698e38876ecfc28454bcdd495ac36b387c2b.tar.gz
upstream-c077698e38876ecfc28454bcdd495ac36b387c2b.tar.bz2
upstream-c077698e38876ecfc28454bcdd495ac36b387c2b.zip
ralink: build recovery images for dcs930 ip cam
Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 38322
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ramips/dts/DCS-930.dts10
-rw-r--r--target/linux/ramips/image/Makefile18
2 files changed, 27 insertions, 1 deletions
diff --git a/target/linux/ramips/dts/DCS-930.dts b/target/linux/ramips/dts/DCS-930.dts
index 31dab45814..dd959810ab 100644
--- a/target/linux/ramips/dts/DCS-930.dts
+++ b/target/linux/ramips/dts/DCS-930.dts
@@ -43,6 +43,16 @@
};
partition@50000 {
+ label = "kernel";
+ reg = <0x50000 0x150000>;
+ };
+
+ partition@150000 {
+ label = "rootfs";
+ reg = <0x150000 0x2b0000>;
+ };
+
+ partition {
label = "firmware";
reg = <0x50000 0x3b0000>;
};
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index 963e97cee7..43c71a99fb 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -357,7 +357,23 @@ Image/Build/Profile/DAP1350=$(call BuildFirmware/dap1350/$(1),$(1),dap-1350,DAP-
Image/Build/Profile/DAP1350WW=$(call BuildFirmware/dap1350/$(1),$(1),dap-1350WW,DAP-1350,RT3052-AP-DAP1350WW-3)
-Image/Build/Profile/DCS930=$(call BuildFirmware/Default4M/$(1),$(1),dcs-930,DCS-930)
+define BuildFirmware/DCS930/squashfs
+ $(call BuildFirmware/Default4M/squashfs,squashfs,$(2),$(3))
+ dd if=$(KDIR)/vmlinux-$(2).bin.lzma of=$(KDIR)/image.$(2).combined bs=1048512 count=1 conv=sync
+ cat $(KDIR)/root.squashfs >> $(KDIR)/image.$(2).combined
+ $(call MkImage,lzma,$(KDIR)/image.$(2).combined,$(KDIR)/image.$(2))
+ $(call prepare_generic_squashfs,$(KDIR)/image.$(2))
+ if [ `stat -c%s "$(KDIR)/image.$(2)"` -gt $(ralink_default_fw_size_4M) ]; then \
+ echo "Warning: $(KDIR)/image.$(2) is too big" >&2; \
+ else \
+ dd if=$(KDIR)/image.$(2) of=$(KDIR)/dcs.tmp bs=64K count=5 conv=sync ;\
+ cat $(KDIR)/image.$(2) >> $(KDIR)/dcs.tmp ; \
+ dd if=$(KDIR)/dcs.tmp of=$(call imgname,$(1),$(2))-factory.bin bs=4M count=1 conv=sync ;\
+ $(STAGING_DIR_HOST)/bin/mkdcs932 $(call imgname,$(1),$(2))-factory.bin ; \
+ fi
+endef
+BuildFirmware/DCS930/initramfs=$(call BuildFirmware/OF/initramfs,$(1),$(2),$(3))
+Image/Build/Profile/DCS930=$(call BuildFirmware/DCS930/$(1),$(1),dcs-930,DCS-930)
Image/Build/Profile/ESR-9753=$(call BuildFirmware/Default4M/$(1),$(1),esr-9753,ESR-9753)