mpc85xx: use bootwrapper for ws-ap3825i
[openwrt/openwrt.git] / target / linux / mpc85xx / image / p1020.mk
1 define Build/MultiImage
2 rm -rf $@.fakerd $@.new
3
4 dd if=/dev/zero of=$@.fakerd bs=32 count=1 conv=sync
5
6 -$(STAGING_DIR_HOST)/bin/mkimage -A $(LINUX_KARCH) -O linux -T multi -C $(1) \
7 -a $(KERNEL_LOADADDR) -e $(KERNEL_ENTRY) -n '$(BOARD_NAME) initramfs' \
8 -d $@:$@.fakerd:$(KDIR)/image-$(firstword $(DEVICE_DTS)).dtb $@.new
9 mv $@.new $@
10 rm -rf $@.fakerd
11 endef
12
13 define Device/aerohive_hiveap-330
14 DEVICE_VENDOR := Aerohive
15 DEVICE_MODEL := HiveAP-330
16 DEVICE_ALT0_VENDOR := Aerohive
17 DEVICE_ALT0_MODEL := HiveAP-350
18 DEVICE_PACKAGES := kmod-tpm-i2c-atmel kmod-hwmon-lm70
19 BLOCKSIZE := 128k
20 KERNEL := kernel-bin | uImage none
21 KERNEL_INITRAMFS := kernel-bin | MultiImage none
22 KERNEL_SIZE := 16m
23 IMAGES := sysupgrade.bin
24 IMAGE/sysupgrade.bin := append-dtb | pad-to 256k | append-kernel | \
25 append-rootfs | pad-rootfs | check-size | append-metadata
26 IMAGE_SIZE = 63m
27 DEVICE_COMPAT_VERSION := 2.0
28 DEVICE_COMPAT_MESSAGE := \n$\
29 !The partitioning of the HiveAP 330 has changed! \n$\
30 To upgrade, please take a look at the install instructions over \
31 at the device's wiki: <https://openwrt.org/toh/aerohive/hiveap-330> \n$\
32 An abridged version for the console is provided here for comfort. \n$\
33 Run the following script into a shell on the device and retry this \
34 sysupgrade again: \n$\
35 cat <<- "EOF" > /tmp/uboot-fix.sh; sh /tmp/uboot-fix.sh \n$\
36 . /lib/functions.sh \n$\
37 . /lib/functions/system.sh \n$\
38 opkg update && opkg install uboot-envtools kmod-mtd-rw || exit 2 \n$\
39 insmod mtd-rw i_want_a_brick=y || exit 3 \n$\
40 echo "/dev/mtd$$$$(find_mtd_index u-boot-env) 0x0 0x20000 0x10000" > "/etc/fw_env.config" \n$\
41 fw_setenv owrt_boot 'setenv bootargs console=ttyS0,9600;bootm 0xEC040000 - 0xEC000000' \n$\
42 cp "/dev/mtd$$$$(find_mtd_index 'u-boot')" /tmp/uboot \n$\
43 cp /tmp/uboot /tmp/uboot_patched \n$\
44 strings -td < /tmp/uboot | grep '^ *[0-9]* *\\(run owrt_boot\\|setenv bootargs\\).*cp\\.l' | \n$\
45 awk '{print $$$$1}' | \n$\
46 while read offset; do \n$\
47 echo -n "run owrt_boot; " | dd of=/tmp/uboot_patched bs=1 seek=$$$${offset} conv=notrunc \n$\
48 done \n$\
49 mtd write /tmp/uboot_patched u-boot \n$\
50 uci set system.@system[0].compat_version=2.0; uci commit; \n$\
51 EOF \n$\
52 \n$\
53 Note that if this fails, you will need to use the serial console \n$\
54 to re-install OpenWrt. \n$\
55 Note that after this sysupgrade, the AP will be unavailable for 7 \n$\
56 minutes to reformat flash."
57
58 endef
59 TARGET_DEVICES += aerohive_hiveap-330
60
61 define Device/enterasys_ws-ap3710i
62 DEVICE_VENDOR := Enterasys
63 DEVICE_MODEL := WS-AP3710i
64 BLOCKSIZE := 128k
65 KERNEL = kernel-bin | lzma | fit lzma $(KDIR)/image-$$(DEVICE_DTS).dtb
66 IMAGES := sysupgrade.bin
67 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
68 endef
69 TARGET_DEVICES += enterasys_ws-ap3710i
70
71 define Device/extreme-networks_ws-ap3825i
72 DEVICE_VENDOR := Extreme Networks
73 DEVICE_MODEL := WS-AP3825i
74 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
75 BLOCKSIZE := 128k
76 KERNEL_NAME := simpleImage.ws-ap3825i
77 KERNEL_ENTRY := 0x1000000
78 KERNEL_LOADADDR := 0x1000000
79 KERNEL = kernel-bin | lzma | fit lzma $(KDIR)/image-$$(DEVICE_DTS).dtb
80 IMAGES := sysupgrade.bin
81 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
82 endef
83 TARGET_DEVICES += extreme-networks_ws-ap3825i
84
85 define Device/ocedo_panda
86 DEVICE_VENDOR := OCEDO
87 DEVICE_MODEL := Panda
88 DEVICE_PACKAGES := kmod-rtc-ds1307
89 KERNEL = kernel-bin | gzip | fit gzip $(KDIR)/image-$$(DEVICE_DTS).dtb
90 PAGESIZE := 2048
91 SUBPAGESIZE := 512
92 BLOCKSIZE := 128k
93 IMAGES := fdt.bin sysupgrade.bin
94 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
95 IMAGE/fdt.bin := append-dtb
96 endef
97 TARGET_DEVICES += ocedo_panda
98