sama5.mk 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. define Device/default-nand
  2. BLOCKSIZE := 128k
  3. PAGESIZE := 2048
  4. SUBPAGESIZE := 2048
  5. MKUBIFS_OPTS := -m $$(PAGESIZE) -e 124KiB -c 2048
  6. endef
  7. define Build/at91-sdcard
  8. $(if $(findstring ext4,$@), \
  9. rm -f [email protected]
  10. mkfs.fat -C [email protected] $(FAT32_BLOCKS)
  11. mcopy -i [email protected] \
  12. $(KDIR)/$(DEVICE_NAME)-fit-zImage.itb \
  13. ::$(DEVICE_NAME:at91-%=%)-fit.itb
  14. $(if $(findstring at91-sama5d27_som1_ek,$@), \
  15. mcopy -i [email protected] \
  16. $(BIN_DIR)/u-boot-$(DEVICE_NAME:at91-%=%)_mmc1/u-boot.bin \
  17. ::u-boot.bin
  18. mcopy -i [email protected] \
  19. $(BIN_DIR)/at91bootstrap-$(DEVICE_NAME:at91-%=%)sd1_uboot/at91bootstrap.bin \
  20. ::BOOT.bin,
  21. mcopy -i [email protected] \
  22. $(BIN_DIR)/u-boot-$(DEVICE_NAME:at91-%=%)_mmc/u-boot.bin \
  23. ::u-boot.bin
  24. $(if $(findstring sama5d4_xplained, $@), \
  25. mcopy -i [email protected] \
  26. $(BIN_DIR)/at91bootstrap-$(DEVICE_NAME:at91-%=%)sd_uboot_secure/at91bootstrap.bin \
  27. ::BOOT.bin,
  28. mcopy -i [email protected] \
  29. $(BIN_DIR)/at91bootstrap-$(DEVICE_NAME:at91-%=%)sd_uboot/at91bootstrap.bin \
  30. ::BOOT.bin))
  31. $(CP) uboot-env.txt [email protected]
  32. sed -i '2d;3d' [email protected]
  33. sed -i '2i board='"$(DEVICE_NAME:at91-%=%)"'' [email protected]
  34. sed -i '3i board_name='"$(DEVICE_NAME:at91-%=%)"'' [email protected]
  35. mkenvimage -s 0x4000 -o [email protected] [email protected]
  36. mcopy -i [email protected] [email protected] ::uboot.env
  37. ./gen_at91_sdcard_img.sh \
  38. [email protected] \
  39. [email protected] \
  40. $(KDIR)/root.ext4 \
  41. $(AT91_SD_BOOT_PARTSIZE) \
  42. $(CONFIG_TARGET_ROOTFS_PARTSIZE)
  43. gzip -nc9 [email protected] > $@
  44. rm -f [email protected] [email protected] [email protected] [email protected])
  45. endef
  46. define Device/at91-sama5d2_xplained
  47. $(Device/evaluation-dtb)
  48. DEVICE_VENDOR := Microchip
  49. DEVICE_MODEL := SAMA5D2 Xplained
  50. KERNEL_SIZE := 6144k
  51. $(Device/evaluation-sdimage)
  52. endef
  53. TARGET_DEVICES += at91-sama5d2_xplained
  54. define Device/at91-sama5d27_som1_ek
  55. $(Device/evaluation-dtb)
  56. DEVICE_VENDOR := Microchip
  57. DEVICE_MODEL := SAMA5D27 SOM1 Ek
  58. KERNEL_SIZE := 6144k
  59. $(Device/evaluation-sdimage)
  60. endef
  61. TARGET_DEVICES += at91-sama5d27_som1_ek
  62. define Device/at91-sama5d2_ptc_ek
  63. $(Device/evaluation-dtb)
  64. DEVICE_VENDOR := Microchip
  65. DEVICE_MODEL := SAMA5D2 PTC Ek
  66. KERNEL_SIZE := 6144k
  67. $(Device/evaluation-sdimage)
  68. endef
  69. TARGET_DEVICES += at91-sama5d2_ptc_ek
  70. define Device/at91-sama5d3_xplained
  71. $(Device/evaluation-dtb)
  72. DEVICE_VENDOR := Microchip
  73. DEVICE_MODEL := SAMA5D3 Xplained
  74. KERNEL_SIZE := 6144k
  75. $(Device/evaluation-sdimage)
  76. endef
  77. TARGET_DEVICES += at91-sama5d3_xplained
  78. ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
  79. ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
  80. define Device/wb50n
  81. $(Device/evaluation-fit)
  82. DEVICE_VENDOR := Laird
  83. DEVICE_MODEL := WB50N
  84. DEVICE_PACKAGES := \
  85. kmod-mmc-at91 kmod-ath6kl-sdio ath6k-firmware \
  86. kmod-usb-storage kmod-fs-vfat kmod-fs-msdos \
  87. kmod-leds-gpio
  88. BLOCKSIZE := 128k
  89. PAGESIZE := 2048
  90. SUBPAGESIZE := 2048
  91. MKUBIFS_OPTS := -m $$(PAGESIZE) -e 124KiB -c 955
  92. endef
  93. TARGET_DEVICES += wb50n
  94. endif
  95. endif
  96. define Device/at91-sama5d4_xplained
  97. $(Device/evaluation-dtb)
  98. DEVICE_VENDOR := Microchip
  99. DEVICE_MODEL := SAMA5D4 Xplained
  100. KERNEL_SIZE := 6144k
  101. BLOCKSIZE := 256k
  102. PAGESIZE := 4096
  103. SUBPAGESIZE := 2048
  104. MKUBIFS_OPTS := -m $$(PAGESIZE) -e 248KiB -c 2082
  105. $(Device/evaluation-sdimage)
  106. endef
  107. TARGET_DEVICES += at91-sama5d4_xplained