armsr: armv8: enable serial console for Renesas platforms
[openwrt/staging/stintel.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 | uImage none
22 KERNEL_NAME := simpleImage.hiveap-330
23 KERNEL_SIZE := 16m
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
31 IMAGE_SIZE = 63m
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$\
53 done \n$\
54 mtd write /tmp/uboot_patched u-boot \n$\
55 uci set system.@system[0].compat_version=2.0; uci commit; \n$\
56 EOF \n$\
57 \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."
62
63 endef
64 TARGET_DEVICES += aerohive_hiveap-330
65
66 define Device/enterasys_ws-ap3710i
67 DEVICE_VENDOR := Enterasys
68 DEVICE_MODEL := WS-AP3710i
69 BLOCKSIZE := 128k
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
77 endef
78 TARGET_DEVICES += enterasys_ws-ap3710i
79
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
84 BLOCKSIZE := 128k
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
91 endef
92 TARGET_DEVICES += extreme-networks_ws-ap3825i
93
94 define Device/ocedo_panda
95 DEVICE_VENDOR := OCEDO
96 DEVICE_MODEL := Panda
97 DEVICE_PACKAGES := kmod-rtc-ds1307
98 KERNEL = kernel-bin | gzip | fit gzip $(KDIR)/image-$$(DEVICE_DTS).dtb
99 PAGESIZE := 2048
100 SUBPAGESIZE := 512
101 BLOCKSIZE := 128k
102 IMAGES := fdt.bin sysupgrade.bin
103 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
104 IMAGE/fdt.bin := append-dtb
105 endef
106 TARGET_DEVICES += ocedo_panda
107