2019-05-28 17:21:14 +00:00
|
|
|
|
|
|
|
define Device/default-nand
|
|
|
|
BLOCKSIZE := 128k
|
|
|
|
PAGESIZE := 2048
|
|
|
|
SUBPAGESIZE := 2048
|
|
|
|
MKUBIFS_OPTS := -m $$(PAGESIZE) -e 124KiB -c 2048
|
|
|
|
endef
|
|
|
|
|
2019-08-14 00:42:15 +00:00
|
|
|
define Build/at91-sdcard
|
|
|
|
$(if $(findstring ext4,$@), \
|
|
|
|
rm -f $@.boot
|
|
|
|
mkfs.fat -C $@.boot $(FAT32_BLOCKS)
|
|
|
|
|
2019-09-11 18:35:55 +00:00
|
|
|
mcopy -i $@.boot \
|
|
|
|
$(KDIR)/$(DEVICE_NAME)-fit-zImage.itb \
|
2020-08-23 18:15:17 +00:00
|
|
|
::$(DEVICE_NAME)-fit.itb
|
2019-08-14 00:42:15 +00:00
|
|
|
|
2020-08-23 18:15:17 +00:00
|
|
|
$(if $(findstring sama5d27-som1-ek,$@), \
|
2019-08-14 00:42:15 +00:00
|
|
|
mcopy -i $@.boot \
|
2020-08-23 18:15:17 +00:00
|
|
|
$(BIN_DIR)/u-boot-$(DEVICE_DTS:at91-%=%)_mmc1/u-boot.bin \
|
2019-08-14 00:42:15 +00:00
|
|
|
::u-boot.bin
|
|
|
|
mcopy -i $@.boot \
|
2020-08-23 18:15:17 +00:00
|
|
|
$(BIN_DIR)/at91bootstrap-$(DEVICE_DTS:at91-%=%)sd1_uboot/at91bootstrap.bin \
|
2019-08-14 00:42:15 +00:00
|
|
|
::BOOT.bin,
|
|
|
|
mcopy -i $@.boot \
|
2020-08-23 18:15:17 +00:00
|
|
|
$(BIN_DIR)/u-boot-$(DEVICE_DTS:at91-%=%)_mmc/u-boot.bin \
|
2019-08-14 00:42:15 +00:00
|
|
|
::u-boot.bin
|
2020-08-23 18:15:17 +00:00
|
|
|
$(if $(findstring sama5d4-xplained,$@), \
|
2019-08-14 21:02:17 +00:00
|
|
|
mcopy -i $@.boot \
|
2020-08-23 18:15:17 +00:00
|
|
|
$(BIN_DIR)/at91bootstrap-$(DEVICE_DTS:at91-%=%)sd_uboot_secure/at91bootstrap.bin \
|
2019-08-14 21:02:17 +00:00
|
|
|
::BOOT.bin,
|
|
|
|
mcopy -i $@.boot \
|
2020-08-23 18:15:17 +00:00
|
|
|
$(BIN_DIR)/at91bootstrap-$(DEVICE_DTS:at91-%=%)sd_uboot/at91bootstrap.bin \
|
2019-08-14 21:02:17 +00:00
|
|
|
::BOOT.bin))
|
2019-08-14 00:42:15 +00:00
|
|
|
|
2019-08-14 00:42:15 +00:00
|
|
|
$(CP) uboot-env.txt $@-uboot-env.txt
|
|
|
|
sed -i '2d;3d' $@-uboot-env.txt
|
2020-08-23 18:15:17 +00:00
|
|
|
sed -i '2i board='"$(DEVICE_NAME)"'' $@-uboot-env.txt
|
|
|
|
sed -i '3i board_name='"$(firstword $(SUPPORTED_DEVICES))"'' $@-uboot-env.txt
|
2019-08-14 00:42:15 +00:00
|
|
|
|
|
|
|
mkenvimage -s 0x4000 -o $@-uboot.env $@-uboot-env.txt
|
|
|
|
|
|
|
|
mcopy -i $@.boot $@-uboot.env ::uboot.env
|
|
|
|
|
2019-08-14 00:42:15 +00:00
|
|
|
./gen_at91_sdcard_img.sh \
|
2020-08-23 18:15:17 +00:00
|
|
|
$@.img \
|
|
|
|
$@.boot \
|
|
|
|
$(KDIR)/root.ext4 \
|
|
|
|
$(AT91_SD_BOOT_PARTSIZE) \
|
|
|
|
$(CONFIG_TARGET_ROOTFS_PARTSIZE)
|
2019-08-14 00:42:15 +00:00
|
|
|
|
|
|
|
gzip -nc9 $@.img > $@
|
|
|
|
|
2019-08-14 00:42:15 +00:00
|
|
|
rm -f $@.img $@.boot $@-uboot.env $@-uboot-env.txt)
|
2019-08-14 00:42:15 +00:00
|
|
|
endef
|
|
|
|
|
2020-08-23 18:15:17 +00:00
|
|
|
define Device/microchip_sama5d2-xplained
|
2019-05-28 17:21:14 +00:00
|
|
|
$(Device/evaluation-dtb)
|
2019-09-09 22:00:40 +00:00
|
|
|
DEVICE_VENDOR := Microchip
|
|
|
|
DEVICE_MODEL := SAMA5D2 Xplained
|
2020-08-23 18:15:17 +00:00
|
|
|
DEVICE_DTS := at91-sama5d2_xplained
|
|
|
|
SUPPORTED_DEVICES := atmel,sama5d2-xplained
|
2019-05-28 17:21:14 +00:00
|
|
|
KERNEL_SIZE := 6144k
|
|
|
|
$(Device/evaluation-sdimage)
|
|
|
|
endef
|
2020-08-23 18:15:17 +00:00
|
|
|
TARGET_DEVICES += microchip_sama5d2-xplained
|
2019-05-28 17:21:14 +00:00
|
|
|
|
2020-08-23 18:15:17 +00:00
|
|
|
define Device/microchip_sama5d27-som1-ek
|
2019-05-28 17:21:14 +00:00
|
|
|
$(Device/evaluation-dtb)
|
2019-09-09 22:00:40 +00:00
|
|
|
DEVICE_VENDOR := Microchip
|
|
|
|
DEVICE_MODEL := SAMA5D27 SOM1 Ek
|
2020-08-23 18:15:17 +00:00
|
|
|
DEVICE_DTS := at91-sama5d27_som1_ek
|
|
|
|
SUPPORTED_DEVICES := atmel,sama5d27-som1-ek
|
2019-05-28 17:21:14 +00:00
|
|
|
KERNEL_SIZE := 6144k
|
|
|
|
$(Device/evaluation-sdimage)
|
|
|
|
endef
|
2020-08-23 18:15:17 +00:00
|
|
|
TARGET_DEVICES += microchip_sama5d27-som1-ek
|
2019-05-28 17:21:14 +00:00
|
|
|
|
2020-08-23 18:15:17 +00:00
|
|
|
define Device/microchip_sama5d2-ptc-ek
|
2019-05-28 17:21:14 +00:00
|
|
|
$(Device/evaluation-dtb)
|
2019-09-09 22:00:40 +00:00
|
|
|
DEVICE_VENDOR := Microchip
|
|
|
|
DEVICE_MODEL := SAMA5D2 PTC Ek
|
2020-08-23 18:15:17 +00:00
|
|
|
DEVICE_DTS := at91-sama5d2_ptc_ek
|
|
|
|
SUPPORTED_DEVICES := atmel,sama5d2-ptc_ek
|
2019-05-28 17:21:14 +00:00
|
|
|
KERNEL_SIZE := 6144k
|
|
|
|
$(Device/evaluation-sdimage)
|
|
|
|
endef
|
2020-08-23 18:15:17 +00:00
|
|
|
TARGET_DEVICES += microchip_sama5d2-ptc-ek
|
2019-05-28 17:21:14 +00:00
|
|
|
|
2020-08-23 18:15:17 +00:00
|
|
|
define Device/microchip_sama5d3-xplained
|
2019-05-28 17:21:14 +00:00
|
|
|
$(Device/evaluation-dtb)
|
2019-09-09 22:00:40 +00:00
|
|
|
DEVICE_VENDOR := Microchip
|
|
|
|
DEVICE_MODEL := SAMA5D3 Xplained
|
2020-08-23 18:15:17 +00:00
|
|
|
DEVICE_DTS := at91-sama5d3_xplained
|
|
|
|
SUPPORTED_DEVICES := atmel,sama5d3-xplained
|
2019-05-28 17:21:14 +00:00
|
|
|
KERNEL_SIZE := 6144k
|
|
|
|
$(Device/evaluation-sdimage)
|
|
|
|
endef
|
2020-08-23 18:15:17 +00:00
|
|
|
TARGET_DEVICES += microchip_sama5d3-xplained
|
2019-05-28 17:21:14 +00:00
|
|
|
|
|
|
|
ifeq ($(strip $(CONFIG_EXTERNAL_KERNEL_TREE)),"")
|
|
|
|
ifeq ($(strip $(CONFIG_KERNEL_GIT_CLONE_URI)),"")
|
2020-08-23 18:15:17 +00:00
|
|
|
define Device/laird_wb50n
|
2019-05-28 17:21:14 +00:00
|
|
|
$(Device/evaluation-fit)
|
2019-09-09 22:00:40 +00:00
|
|
|
DEVICE_VENDOR := Laird
|
|
|
|
DEVICE_MODEL := WB50N
|
2021-10-11 08:47:21 +00:00
|
|
|
DEVICE_DTS := at91-wb50n
|
2019-05-28 17:21:14 +00:00
|
|
|
DEVICE_PACKAGES := \
|
|
|
|
kmod-mmc-at91 kmod-ath6kl-sdio ath6k-firmware \
|
|
|
|
kmod-usb-storage kmod-fs-vfat kmod-fs-msdos \
|
|
|
|
kmod-leds-gpio
|
|
|
|
BLOCKSIZE := 128k
|
|
|
|
PAGESIZE := 2048
|
|
|
|
SUBPAGESIZE := 2048
|
|
|
|
MKUBIFS_OPTS := -m $$(PAGESIZE) -e 124KiB -c 955
|
|
|
|
endef
|
2020-08-23 18:15:17 +00:00
|
|
|
TARGET_DEVICES += laird_wb50n
|
2019-05-28 17:21:14 +00:00
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2020-08-23 18:15:17 +00:00
|
|
|
define Device/microchip_sama5d4-xplained
|
2019-05-28 17:21:14 +00:00
|
|
|
$(Device/evaluation-dtb)
|
2019-09-09 22:00:40 +00:00
|
|
|
DEVICE_VENDOR := Microchip
|
|
|
|
DEVICE_MODEL := SAMA5D4 Xplained
|
2020-08-23 18:15:17 +00:00
|
|
|
DEVICE_DTS := at91-sama5d4_xplained
|
|
|
|
SUPPORTED_DEVICES := atmel,sama5d4-xplained
|
2019-05-28 17:21:14 +00:00
|
|
|
KERNEL_SIZE := 6144k
|
|
|
|
BLOCKSIZE := 256k
|
|
|
|
PAGESIZE := 4096
|
|
|
|
SUBPAGESIZE := 2048
|
|
|
|
MKUBIFS_OPTS := -m $$(PAGESIZE) -e 248KiB -c 2082
|
|
|
|
$(Device/evaluation-sdimage)
|
|
|
|
endef
|
2020-08-23 18:15:17 +00:00
|
|
|
TARGET_DEVICES += microchip_sama5d4-xplained
|