1 define Build
/MultiImage
2 rm -rf
$@.fakerd
$@.new
4 dd if
=/dev
/zero of
=$@.fakerd bs
=32 count
=1 conv
=sync
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
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
20 KERNEL
:= kernel-bin | uImage none
21 KERNEL_INITRAMFS
:= kernel-bin | uImage none
22 KERNEL_NAME
:= simpleImage.hiveap-330
24 IMAGES
:= sysupgrade.bin
25 KERNEL_ENTRY
:= 0x1500000
26 KERNEL_LOADADDR
:= 0x1500000
27 # append-dtb is still needed, as otherwise u-boot bootm complains
28 # about not having a FDT to edit.
29 IMAGE
/sysupgrade.bin
:= append-dtb | pad-to
256k | append-kernel | \
30 append-rootfs | pad-rootfs | check-size | append-metadata
32 DEVICE_COMPAT_VERSION
:= 2.0
33 DEVICE_COMPAT_MESSAGE
:= \n$\
34 !The partitioning of the HiveAP
330 has changed
! \n$\
35 To upgrade
, please take a look at the
install instructions over \
36 at the device
's wiki: <https://openwrt.org/toh/aerohive/hiveap-330> \n$\
37 An abridged version for the console is provided here for comfort. \n$\
38 Run the following script into a shell on the device and retry this \
39 sysupgrade again: \n$\
40 cat <<- "EOF" > /tmp/uboot-fix.sh; sh /tmp/uboot-fix.sh \n$\
41 . /lib/functions.sh \n$\
42 . /lib/functions/system.sh \n$\
43 opkg update && opkg install uboot-envtools kmod-mtd-rw || exit 2 \n$\
44 insmod mtd-rw i_want_a_brick=y || exit 3 \n$\
45 echo "/dev/mtd$$$$(find_mtd_index u-boot-env) 0x0 0x20000 0x10000" > "/etc/fw_env.config" \n$\
46 fw_setenv owrt_boot 'setenv bootargs console
=ttyS0
,9600;bootm
0xEC040000 - 0xEC000000' \n$\
47 cp "/dev/mtd$$$$(find_mtd_index 'u-boot
')" /tmp/uboot \n$\
48 cp /tmp/uboot /tmp/uboot_patched \n$\
49 strings -td < /tmp/uboot | grep '^
*[0-9]* *\\(run owrt_boot
\\|setenv bootargs
\\).
*cp
\\.l
' | \n$\
50 awk '{print $$$$1}' | \n$\
51 while read offset; do \n$\
52 echo -n "run owrt_boot; " | dd of=/tmp/uboot_patched bs=1 seek=$$$${offset} conv=notrunc \n$\
54 mtd write /tmp/uboot_patched u-boot \n$\
55 uci set system.@system[0].compat_version=2.0; uci commit; \n$\
58 Note that if this fails, you will need to use the serial console \n$\
59 to re-install OpenWrt. \n$\
60 Note that after this sysupgrade, the AP will be unavailable for 7 \n$\
61 minutes to reformat flash."
64 TARGET_DEVICES += aerohive_hiveap-330
66 define Device/enterasys_ws-ap3710i
67 DEVICE_VENDOR := Enterasys
68 DEVICE_MODEL := WS-AP3710i
70 KERNEL_NAME := simpleImage.ws-ap3710i
71 KERNEL_ENTRY := 0x1500000
72 KERNEL_LOADADDR := 0x1500000
73 KERNEL = kernel-bin | uImage none
74 KERNEL_INITRAMFS := kernel-bin | uImage none
75 IMAGES := sysupgrade.bin
76 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
78 TARGET_DEVICES += enterasys_ws-ap3710i
80 define Device/extreme-networks_ws-ap3825i
81 DEVICE_VENDOR := Extreme Networks
82 DEVICE_MODEL := WS-AP3825i
83 DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
85 KERNEL_NAME := simpleImage.ws-ap3825i
86 KERNEL_ENTRY := 0x1500000
87 KERNEL_LOADADDR := 0x1500000
88 KERNEL = kernel-bin | fit none $(KDIR)/image-$$(DEVICE_DTS).dtb
89 IMAGES := sysupgrade.bin
90 IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
92 TARGET_DEVICES += extreme-networks_ws-ap3825i
94 define Device/hpe_msm460
95 DEVICE_VENDOR := Hewlett-Packard
96 DEVICE_MODEL := MSM460
97 KERNEL = kernel-bin | fit none $(KDIR)/image-$$(DEVICE_DTS).dtb
98 KERNEL_NAME := zImage.la3000000
99 KERNEL_ENTRY := 0x3000000
100 KERNEL_LOADADDR := 0x3000000
106 IMAGES := factory.bin sysupgrade.bin
107 IMAGE/factory.bin := append-ubi
108 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
110 TARGET_DEVICES += hpe_msm460
112 define Device/ocedo_panda
113 DEVICE_VENDOR := OCEDO
114 DEVICE_MODEL := Panda
115 DEVICE_PACKAGES := kmod-rtc-ds1307
116 KERNEL = kernel-bin | gzip | fit gzip $(KDIR)/image-$$(DEVICE_DTS).dtb
120 IMAGES := fdt.bin sysupgrade.bin
121 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
122 IMAGE/fdt.bin := append-dtb
123 DEVICE_COMPAT_VERSION := 1.1
124 DEVICE_COMPAT_MESSAGE := Config cannot be migrated from swconfig to DSA
126 TARGET_DEVICES += ocedo_panda