p1020.mk 4.8 KB

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