p1020.mk 3.8 KB

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