sama5.mk 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  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)-fit.itb
  14. mcopy -i [email protected] \
  15. $(STAGING_DIR_IMAGE)/$(DEVICE_DTS:at91-%=%)_mmc-u-boot.bin \
  16. ::u-boot.bin
  17. $(if $(findstring sama5d4-xplained,$@), \
  18. mcopy -i [email protected] \
  19. $(STAGING_DIR_IMAGE)/$(DEVICE_DTS:at91-%=%)sd_uboot_secure-at91bootstrap.bin \
  20. ::BOOT.bin,
  21. mcopy -i [email protected] \
  22. $(STAGING_DIR_IMAGE)/$(DEVICE_DTS:at91-%=%)sd_uboot-at91bootstrap.bin \
  23. ::BOOT.bin)
  24. $(CP) uboot-env.txt [email protected]
  25. sed -i '2d;3d' [email protected]
  26. sed -i '2i board='"$(DEVICE_NAME)"'' [email protected]
  27. sed -i '3i board_name='"$(firstword $(SUPPORTED_DEVICES))"'' [email protected]
  28. mkenvimage -s 0x4000 -o [email protected] [email protected]
  29. mcopy -i [email protected] [email protected] ::uboot.env
  30. ./gen_at91_sdcard_img.sh \
  31. [email protected] \
  32. [email protected] \
  33. $(IMAGE_ROOTFS) \
  34. $(AT91_SD_BOOT_PARTSIZE) \
  35. $(CONFIG_TARGET_ROOTFS_PARTSIZE)
  36. gzip -nc9 [email protected] > $@
  37. rm -f [email protected] [email protected] [email protected] [email protected])
  38. endef
  39. define Device/microchip_sama5d2-icp
  40. $(Device/evaluation-dtb)
  41. DEVICE_VENDOR := Microchip
  42. DEVICE_MODEL := SAMA5D2 ICP
  43. DEVICE_DTS := at91-sama5d2_icp
  44. SUPPORTED_DEVICES := microchip,sama5d2-icp
  45. KERNEL_SIZE := 6144k
  46. $(Device/evaluation-sdimage)
  47. endef
  48. TARGET_DEVICES += microchip_sama5d2-icp
  49. define Device/microchip_sama5d2-xplained
  50. $(Device/evaluation-dtb)
  51. DEVICE_VENDOR := Microchip
  52. DEVICE_MODEL := SAMA5D2 Xplained
  53. DEVICE_DTS := at91-sama5d2_xplained
  54. SUPPORTED_DEVICES := atmel,sama5d2-xplained
  55. KERNEL_SIZE := 6144k
  56. $(Device/evaluation-sdimage)
  57. endef
  58. TARGET_DEVICES += microchip_sama5d2-xplained
  59. define Device/microchip_sama5d27-som1-ek
  60. $(Device/evaluation-dtb)
  61. DEVICE_VENDOR := Microchip
  62. DEVICE_MODEL := SAMA5D27 SOM1 Ek
  63. DEVICE_DTS := at91-sama5d27_som1_ek
  64. SUPPORTED_DEVICES := atmel,sama5d27-som1-ek
  65. KERNEL_SIZE := 6144k
  66. $(Device/evaluation-sdimage)
  67. endef
  68. TARGET_DEVICES += microchip_sama5d27-som1-ek
  69. define Device/microchip_sama5d27-wlsom1-ek
  70. $(Device/evaluation-dtb)
  71. DEVICE_VENDOR := Microchip
  72. DEVICE_MODEL := SAMA5D27 WSOM1 Ek
  73. DEVICE_DTS := at91-sama5d27_wlsom1_ek
  74. SUPPORTED_DEVICES := microchip,sama5d27-wlsom1-ek
  75. KERNEL_SIZE := 6144k
  76. $(Device/evaluation-sdimage)
  77. endef
  78. TARGET_DEVICES += microchip_sama5d27-wlsom1-ek
  79. define Device/microchip_sama5d2-ptc-ek
  80. $(Device/evaluation-dtb)
  81. DEVICE_VENDOR := Microchip
  82. DEVICE_MODEL := SAMA5D2 PTC Ek
  83. DEVICE_DTS := at91-sama5d2_ptc_ek
  84. SUPPORTED_DEVICES := atmel,sama5d2-ptc_ek
  85. KERNEL_SIZE := 6144k
  86. $(Device/evaluation-sdimage)
  87. endef
  88. TARGET_DEVICES += microchip_sama5d2-ptc-ek
  89. define Device/microchip_sama5d3-xplained
  90. $(Device/evaluation-dtb)
  91. DEVICE_VENDOR := Microchip
  92. DEVICE_MODEL := SAMA5D3 Xplained
  93. DEVICE_DTS := at91-sama5d3_xplained
  94. SUPPORTED_DEVICES := atmel,sama5d3-xplained
  95. KERNEL_SIZE := 6144k
  96. $(Device/evaluation-sdimage)
  97. endef
  98. TARGET_DEVICES += microchip_sama5d3-xplained
  99. ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
  100. ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
  101. define Device/laird_wb50n
  102. $(Device/evaluation-fit)
  103. DEVICE_VENDOR := Laird
  104. DEVICE_MODEL := WB50N
  105. DEVICE_DTS := at91-wb50n
  106. DEVICE_PACKAGES := \
  107. kmod-mmc-at91 kmod-ath6kl-sdio ath6k-firmware \
  108. kmod-usb-storage kmod-fs-vfat kmod-fs-msdos \
  109. kmod-leds-gpio
  110. BLOCKSIZE := 128k
  111. PAGESIZE := 2048
  112. SUBPAGESIZE := 2048
  113. MKUBIFS_OPTS := -m $$(PAGESIZE) -e 124KiB -c 955
  114. endef
  115. TARGET_DEVICES += laird_wb50n
  116. endif
  117. endif
  118. define Device/microchip_sama5d4-xplained
  119. $(Device/evaluation-dtb)
  120. DEVICE_VENDOR := Microchip
  121. DEVICE_MODEL := SAMA5D4 Xplained
  122. DEVICE_DTS := at91-sama5d4_xplained
  123. SUPPORTED_DEVICES := atmel,sama5d4-xplained
  124. KERNEL_SIZE := 6144k
  125. BLOCKSIZE := 256k
  126. PAGESIZE := 4096
  127. SUBPAGESIZE := 2048
  128. MKUBIFS_OPTS := -m $$(PAGESIZE) -e 248KiB -c 2082
  129. $(Device/evaluation-sdimage)
  130. endef
  131. TARGET_DEVICES += microchip_sama5d4-xplained