sama7.mk 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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-%=%)_mmc1-u-boot.bin \
  16. ::u-boot.bin
  17. mcopy -i [email protected] \
  18. $(STAGING_DIR_IMAGE)/$(DEVICE_DTS:at91-%=%)sd_uboot-at91bootstrap.bin \
  19. ::BOOT.bin
  20. $(CP) uboot-env.txt [email protected]
  21. sed -i '2d;3d' [email protected]
  22. sed -i '2i board='"$(DEVICE_NAME)"'' [email protected]
  23. sed -i '3i board_name='"$(firstword $(SUPPORTED_DEVICES))"'' [email protected]
  24. mkenvimage -s 0x4000 -o [email protected] [email protected]
  25. mcopy -i [email protected] [email protected] ::uboot.env
  26. ./gen_at91_sdcard_img.sh \
  27. [email protected] \
  28. [email protected] \
  29. $(IMAGE_ROOTFS) \
  30. $(AT91_SD_BOOT_PARTSIZE) \
  31. $(CONFIG_TARGET_ROOTFS_PARTSIZE)
  32. gzip -nc9 [email protected] > $@
  33. rm -f [email protected] [email protected] [email protected] [email protected])
  34. endef
  35. define Device/microchip_sama7g5-ek
  36. $(Device/evaluation-dtb)
  37. DEVICE_VENDOR := Microchip
  38. DEVICE_MODEL := SAMA7G5-EK
  39. DEVICE_DTS := at91-sama7g5ek
  40. SUPPORTED_DEVICES := microchip,sama7g5ek
  41. KERNEL_SIZE := 6144k
  42. KERNEL_LOADADDR := 0x62000000
  43. $(Device/evaluation-sdimage)
  44. endef
  45. TARGET_DEVICES += microchip_sama7g5-ek