aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/image/generic.mk
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ar71xx/image/generic.mk')
-rw-r--r--target/linux/ar71xx/image/generic.mk21
1 files changed, 21 insertions, 0 deletions
diff --git a/target/linux/ar71xx/image/generic.mk b/target/linux/ar71xx/image/generic.mk
index ae0c7fcae1..d6142c1a5c 100644
--- a/target/linux/ar71xx/image/generic.mk
+++ b/target/linux/ar71xx/image/generic.mk
@@ -626,3 +626,24 @@ define Device/dap-2695-a1
endef
TARGET_DEVICES += dap-2695-a1
+
+define Build/mkbuffaloimg
+ $(STAGING_DIR_HOST)/bin/mkbuffaloimg -B $(BOARDNAME) \
+ -R $$(($(subst k, * 1024,$(ROOTFS_SIZE)))) \
+ -K $$(($(subst k, * 1024,$(KERNEL_SIZE)))) \
+ -i $@ -o $@.new
+ mv $@.new $@
+endef
+
+define Device/bhr-4grv2
+ DEVICE_TITLE := Buffalo BHR-4GRV2
+ BOARDNAME := BHR-4GRV2
+ ROOTFS_SIZE := 14528k
+ KERNEL_SIZE := 1472k
+ IMAGE_SIZE := 16000k
+ MTDPARTS := spi0.0:256k(u-boot)ro,64k(u-boot-env)ro,14528k(rootfs),1472k(kernel),64k(art)ro,16000k@0x50000(firmware)
+ IMAGES := sysupgrade.bin factory.bin
+ IMAGE/sysupgrade.bin = append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | append-kernel | check-size $$$$(IMAGE_SIZE)
+ IMAGE/factory.bin = append-kernel | pad-to $$$$(KERNEL_SIZE) | append-rootfs | mkbuffaloimg
+endef
+TARGET_DEVICES += bhr-4grv2