mpc85xx: fix address config for ws-ap3825i
[openwrt/openwrt.git] / target / linux / ath79 / image / common-buffalo.mk
1 DEVICE_VARS += BUFFALO_PRODUCT BUFFALO_HWVER
2
3 define Build/buffalo-tag
4 $(eval product=$(word 1,$(1)))
5 $(eval hwver=$(word 2,$(1)))
6 $(STAGING_DIR_HOST)/bin/buffalo-tag \
7 -c 0x80041000 -d 0x801e8000 -w $(hwver) \
8 -a ath -v 1.99 -m 1.01 -f 1 \
9 -b $(product) -p $(product) \
10 -r M_ -l mlang8 \
11 -i $@ -o $@.new
12 mv $@.new $@
13 endef
14
15 define Build/buffalo-tftp-header
16 ( \
17 echo -n -e "# Airstation Public Fmt1" | dd bs=32 count=1 conv=sync; \
18 dd if=$@; \
19 ) > $@.new
20 mv $@.new $@
21 endef
22
23
24 define Device/buffalo_common
25 DEVICE_VENDOR := Buffalo
26 BUFFALO_PRODUCT :=
27 BUFFALO_HWVER := 3
28 IMAGES += factory.bin tftp.bin
29 IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | \
30 pad-rootfs | check-size
31 IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc $$$$(BUFFALO_PRODUCT) 1.99 | \
32 buffalo-tag $$$$(BUFFALO_PRODUCT) $$$$(BUFFALO_HWVER)
33 IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
34 endef