sama5.mk 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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. $(if $(findstring sama5d27-som1-ek,$@), \
  15. mcopy -i [email protected] \
  16. $(BIN_DIR)/u-boot-$(DEVICE_DTS:at91-%=%)_mmc1/u-boot.bin \
  17. ::u-boot.bin
  18. mcopy -i [email protected] \
  19. $(BIN_DIR)/at91bootstrap-$(DEVICE_DTS:at91-%=%)sd1_uboot/at91bootstrap.bin \
  20. ::BOOT.bin,
  21. mcopy -i [email protected] \
  22. $(BIN_DIR)/u-boot-$(DEVICE_DTS:at91-%=%)_mmc/u-boot.bin \
  23. ::u-boot.bin
  24. $(if $(findstring sama5d4-xplained,$@), \
  25. mcopy -i [email protected] \
  26. $(BIN_DIR)/at91bootstrap-$(DEVICE_DTS:at91-%=%)sd_uboot_secure/at91bootstrap.bin \
  27. ::BOOT.bin,
  28. mcopy -i [email protected] \
  29. $(BIN_DIR)/at91bootstrap-$(DEVICE_DTS: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)"'' [email protected]
  34. sed -i '3i board_name='"$(firstword $(SUPPORTED_DEVICES))"'' [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/microchip_sama5d2-xplained
  47. $(Device/evaluation-dtb)
  48. DEVICE_VENDOR := Microchip
  49. DEVICE_MODEL := SAMA5D2 Xplained
  50. DEVICE_DTS := at91-sama5d2_xplained
  51. SUPPORTED_DEVICES := atmel,sama5d2-xplained
  52. KERNEL_SIZE := 6144k
  53. $(Device/evaluation-sdimage)
  54. endef
  55. TARGET_DEVICES += microchip_sama5d2-xplained
  56. define Device/microchip_sama5d27-som1-ek
  57. $(Device/evaluation-dtb)
  58. DEVICE_VENDOR := Microchip
  59. DEVICE_MODEL := SAMA5D27 SOM1 Ek
  60. DEVICE_DTS := at91-sama5d27_som1_ek
  61. SUPPORTED_DEVICES := atmel,sama5d27-som1-ek
  62. KERNEL_SIZE := 6144k
  63. $(Device/evaluation-sdimage)
  64. endef
  65. TARGET_DEVICES += microchip_sama5d27-som1-ek
  66. define Device/microchip_sama5d2-ptc-ek
  67. $(Device/evaluation-dtb)
  68. DEVICE_VENDOR := Microchip
  69. DEVICE_MODEL := SAMA5D2 PTC Ek
  70. DEVICE_DTS := at91-sama5d2_ptc_ek
  71. SUPPORTED_DEVICES := atmel,sama5d2-ptc_ek
  72. KERNEL_SIZE := 6144k
  73. $(Device/evaluation-sdimage)
  74. endef
  75. TARGET_DEVICES += microchip_sama5d2-ptc-ek
  76. define Device/microchip_sama5d3-xplained
  77. $(Device/evaluation-dtb)
  78. DEVICE_VENDOR := Microchip
  79. DEVICE_MODEL := SAMA5D3 Xplained
  80. DEVICE_DTS := at91-sama5d3_xplained
  81. SUPPORTED_DEVICES := atmel,sama5d3-xplained
  82. KERNEL_SIZE := 6144k
  83. $(Device/evaluation-sdimage)
  84. endef
  85. TARGET_DEVICES += microchip_sama5d3-xplained
  86. ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
  87. ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
  88. define Device/laird_wb50n
  89. $(Device/evaluation-fit)
  90. DEVICE_VENDOR := Laird
  91. DEVICE_MODEL := WB50N
  92. DEVICE_PACKAGES := \
  93. kmod-mmc-at91 kmod-ath6kl-sdio ath6k-firmware \
  94. kmod-usb-storage kmod-fs-vfat kmod-fs-msdos \
  95. kmod-leds-gpio
  96. BLOCKSIZE := 128k
  97. PAGESIZE := 2048
  98. SUBPAGESIZE := 2048
  99. MKUBIFS_OPTS := -m $$(PAGESIZE) -e 124KiB -c 955
  100. endef
  101. TARGET_DEVICES += laird_wb50n
  102. endif
  103. endif
  104. define Device/microchip_sama5d4-xplained
  105. $(Device/evaluation-dtb)
  106. DEVICE_VENDOR := Microchip
  107. DEVICE_MODEL := SAMA5D4 Xplained
  108. DEVICE_DTS := at91-sama5d4_xplained
  109. SUPPORTED_DEVICES := atmel,sama5d4-xplained
  110. KERNEL_SIZE := 6144k
  111. BLOCKSIZE := 256k
  112. PAGESIZE := 4096
  113. SUBPAGESIZE := 2048
  114. MKUBIFS_OPTS := -m $$(PAGESIZE) -e 248KiB -c 2082
  115. $(Device/evaluation-sdimage)
  116. endef
  117. TARGET_DEVICES += microchip_sama5d4-xplained