aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips/image
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2014-11-03 08:00:13 +0000
committerJohn Crispin <john@openwrt.org>2014-11-03 08:00:13 +0000
commitcc5194cf030c422ef82442091598582cf4aeca34 (patch)
tree655972cf7bc4b19a6390e84553713349a289cc56 /target/linux/ramips/image
parent101289156b4748583995d4cdb27751cea4efe917 (diff)
downloadupstream-cc5194cf030c422ef82442091598582cf4aeca34.tar.gz
upstream-cc5194cf030c422ef82442091598582cf4aeca34.tar.bz2
upstream-cc5194cf030c422ef82442091598582cf4aeca34.zip
ramips: add support for Airlink101 AR670W
This is a RT2880-based board, 32MB RAM, 4MB flash. The bootloader is a hacked u-Boot that reads an LZMA image directly, so we skip generating the uImage header and enable the lzma mtdsplit parser. Signed-off-by: Claudio Leite <leitec@staticky.com> SVN-Revision: 43153
Diffstat (limited to 'target/linux/ramips/image')
-rw-r--r--target/linux/ramips/image/Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile
index 759de53020..1f03386c4f 100644
--- a/target/linux/ramips/image/Makefile
+++ b/target/linux/ramips/image/Makefile
@@ -295,10 +295,36 @@ define BuildFirmware/Gemtek/squashfs
endef
BuildFirmware/Gemtek/initramfs=$(call BuildFirmware/OF/initramfs,$(1),$(2),$(3))
+# Airlink101 AR670W -- LZMA without uImage header
+define BuildFirmware/AR670W/squashfs
+ $(call PatchKernelLzmaDtb,$(2),$(3),$(5))
+
+ $(eval output_name=$(IMG_PREFIX)-$(2)-$(1)-$(if $(4),$(4),sysupgrade).bin)
+ $(eval factory_name=$(IMG_PREFIX)-$(2)-$(1)-factory.bin)
+
+ ( dd if=$(KDIR)/vmlinux-$(2).bin.lzma bs=65536 \
+ conv=sync; dd if=$(KDIR)/root.$(1) ) > $(KDIR)/$(output_name)
+
+ $(call prepare_generic_squashfs,$(KDIR)/$(output_name))
+
+ if [ `stat -c%s "$(KDIR)/$(output_name)"` \
+ -gt $(ralink_default_fw_size_4M) ]; then \
+ echo "Warning: $(KDIR)/$(output_name) is too big" >&2; \
+ else \
+ mkwrgimg -i $(KDIR)/$(output_name) \
+ -d "/dev/mtdblock/2" \
+ -s "wrgn16a_airlink_ar670w" \
+ -o $(BIN_DIR)/$(factory_name); \
+ $(CP) $(KDIR)/$(output_name) $(BIN_DIR)/$(output_name); \
+ fi
+endef
+
#
# RT288X Profiles
#
+Image/Build/Profile/AR670W=$(call BuildFirmware/AR670W/$(1),$(1),ar670w,AR670W)
+
Image/Build/Profile/AR725W=$(call BuildFirmware/Gemtek/$(1),$(1),ar725w,AR725W)
# 0x790000
@@ -313,6 +339,7 @@ Image/Build/Profile/WLITX4AG300N=$(call BuildFirmware/Default4M/$(1),$(1),wli-tx
ifeq ($(SUBTARGET),rt288x)
define Image/Build/Profile/Default
+ $(call Image/Build/Profile/AR670W,$(1))
$(call Image/Build/Profile/AR725W,$(1))
$(call Image/Build/Profile/F5D8235V1,$(1))
$(call Image/Build/Profile/RTN15,$(1))