Skip to contentSkip to conversation

boot/at91bootstrap3: add support for at91bootstrap 4.x series

PATCH Superseded Eugen Hristev 1 participant 2 messages Apr 27, 2021 Arm/Microchip (AT91) SoC support

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 boot/at91bootstrap3: add support for at91bootstrap 4.x series

Introduce support for the next generation of at91bootstrap, at91bootstrap 4.x series.

AT91Bootstrap 4.x only supports devices: sam9x60, sama5d2, sama5d3, sama5d4, sama7g5.

User can select 4.x series as a bool, and if so, the latest 4.x version is automatically selected.
If the user deselects this option, only 3.x latest version can be picked.

---
Changes in v2:
- adapt both 3.x and 4.x series in the same package

 boot/at91bootstrap3/Config.in         | 20 ++++++++++++++++++--
 boot/at91bootstrap3/at91bootstrap3.mk | 12 +++++++++++-
 2 files changed, 29 insertions(+), 3 deletions(-)
boot/at91bootstrap3/Config.in +18 -2
index 25ab30489f..18f027639c 100644
@@ -14,13 +14,23 @@ config BR2_TARGET_AT91BOOTSTRAP3
 
 if BR2_TARGET_AT91BOOTSTRAP3
 
+config BR2_TARGET_AT91BOOTSTRAP3_4SERIES
+	bool "AT91Bootstrap3 4.x series"
+	help
+	  AT91Bootstrap3 4.x series version
+
 choice
 
 	prompt "AT91 Bootstrap 3 version"
 
-config BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION
+config BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION_3X
+	depends on !BR2_TARGET_AT91BOOTSTRAP3_4SERIES
 	bool "3.9.3"
 
+config BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION_4X
+	depends on BR2_TARGET_AT91BOOTSTRAP3_4SERIES
+	bool "4.0.0-rc1"
+
 config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT
 	bool "Custom Git repository"
 	help
@@ -51,7 +61,8 @@ endif
 
 config BR2_TARGET_AT91BOOTSTRAP3_VERSION
 	string
-	default "v3.9.3" if BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION
+	default "v3.9.3" if BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION_3X
+	default "v4.0.0-rc1" if BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION_4X
 	default BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION \
 		if BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT
 	default "custom"	if BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL
@@ -96,4 +107,9 @@ config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE
 	help
 	  Path to the at91bootstrap3 configuration file
 
+config BR2_TARGET_AT91BOOTSTRAP3_NEEDS_PYTHON3
+	bool "AT91Bootstrap3 requires host Python 3.x for NAND/PMECC scripts"
+	help
+	  Host Python 3.x needs to be installed to use the NAND/PMECC python scripts
+
 endif # BR2_TARGET_AT91BOOTSTRAP3
boot/at91bootstrap3/at91bootstrap3.mk +11 -1
index a942afcdc9..e16bd0eee7 100644
@@ -6,6 +6,10 @@
 
 AT91BOOTSTRAP3_VERSION = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_VERSION))
 
+ifeq ($(BR2_TARGET_AT91BOOTSTRAP4_NEEDS_PYTHON3),y)
+AT91BOOTSTRAP3_DEPENDENCIES += host-python3
+endif
+
 ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL),y)
 AT91BOOTSTRAP3_TARBALL = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION))
 AT91BOOTSTRAP3_SITE = $(patsubst %/,%,$(dir $(AT91BOOTSTRAP3_TARBALL)))
@@ -19,7 +23,7 @@ else
 AT91BOOTSTRAP3_SITE = $(call github,linux4sam,at91bootstrap,$(AT91BOOTSTRAP3_VERSION))
 endif
 
-AT91BOOTSTRAP3_LICENSE = Atmel License
+AT91BOOTSTRAP3_LICENSE = Microchip License
 ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION),y)
 AT91BOOTSTRAP3_LICENSE_FILES = main.c
 endif
@@ -47,9 +51,15 @@ define AT91BOOTSTRAP3_BUILD_CMDS
 	$(MAKE) $(AT91BOOTSTRAP3_MAKE_OPTS) -C $(@D)
 endef
 
+ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_4SERIES),y)
+define AT91BOOTSTRAP3_INSTALL_IMAGES_CMDS
+	cp $(@D)/build/binaries/*.bin $(BINARIES_DIR)
+endef
+else
 define AT91BOOTSTRAP3_INSTALL_IMAGES_CMDS
 	cp $(@D)/binaries/*.bin $(BINARIES_DIR)
 endef
+endif
 
 ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG),y)
 AT91BOOTSTRAP3_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG))_defconfig
Signature · 1 line
2.25.1
#1 lore raw

PATCH v2 2/2 configs/microchip_sama5d2_icp: new defconfigs

Add the new SAMA5D2 ICP (Industrial Connectivity Board) with linux4sam_2020.10 components.
Update README file with new defconfigs.

https://www.linux4sam.org/bin/view/Linux4SAM/Sama5d2IcpMainPage

---
Changes in v2:
- removed unwanted configs
- adapted to use bootstrap3 4.x series.

 board/atmel/readme.txt                        |  2 +
 board/microchip/sama5d2_icp/genimage.cfg      | 31 ++++++++
 configs/microchip_sama5d2_icp_mmc_defconfig   | 32 ++++++++
 .../microchip_sama5d2_icp_mmc_dev_defconfig   | 75 +++++++++++++++++++
 4 files changed, 140 insertions(+)
 create mode 100644 board/microchip/sama5d2_icp/genimage.cfg
 create mode 100644 configs/microchip_sama5d2_icp_mmc_defconfig
 create mode 100644 configs/microchip_sama5d2_icp_mmc_dev_defconfig
board/atmel/readme.txt +2 -0
index 1f21dd15e4..a29d027214 100644
@@ -23,6 +23,8 @@ This guide covers the following configurations:
  - microchip_sama5d27_wlsom1_ek_mmc_dev_defconfig
  - microchip_sam9x60ek_mmc_defconfig
  - microchip_sam9x60ek_mmc_dev_defconfig
+ - microchip_sama5d2_icp_mmc_defconfig
+ - microchip_sama5d2_icp_mmc_dev_defconfig
 
 These configurations will use AT91Bootstrap, u-boot and a linux kernel from
 the git trees maintained by Atmel.
board/microchip/sama5d2_icp/genimage.cfg new file +31 -0
new file mode 100644
index 0000000000..854751713f
@@ -0,0 +1,31 @@
+# Image for SD card boot on Microchip SAMA5D2 ICP (Industrial Connectivity Platform)
+#
+image boot.vfat {
+	vfat {
+		files = {
+			"zImage",
+			"at91-sama5d2_icp.dtb",
+			"boot.bin",
+			"u-boot.bin"
+		}
+	}
+	size = 16M
+}
+
+image sdcard.img {
+	hdimage {
+	}
+
+	partition boot {
+		partition-type = 0xC
+		bootable = "true"
+		image = "boot.vfat"
+		offset = 1M
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext4"
+		size = 512M
+	}
+}
configs/microchip_sama5d2_icp_mmc_defconfig new file +32 -0
new file mode 100644
index 0000000000..f1d11a25b0
@@ -0,0 +1,32 @@
+BR2_arm=y
+BR2_cortex_a5=y
+BR2_ARM_ENABLE_NEON=y
+BR2_ARM_ENABLE_VFP=y
+BR2_ARM_INSTRUCTIONS_THUMB2=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/microchip/sama5d2_icp/genimage.cfg"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,linux-at91,linux4sam-2020.10)/linux-linux4sam-2020.10.tar.gz"
+BR2_LINUX_KERNEL_DEFCONFIG="sama5"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="at91-sama5d2_icp"
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
+BR2_TARGET_AT91BOOTSTRAP3=y
+BR2_TARGET_AT91BOOTSTRAP3_4SERIES=y
+BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT=y
+BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL=y
+BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,at91bootstrap,v4.0.0-rc1)/at91bootstrap-v4.0.0-rc1.tar.gz"
+BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG="sama5d2_icpsd_uboot"
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_TARBALL=y
+BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="$(call github,linux4sam,u-boot-at91,linux4sam-2020.10)/u-boot-at91-linux4sam-2020.10.tar.gz"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="sama5d2_icp_mmc"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
configs/microchip_sama5d2_icp_mmc_dev_defconfig new file +75 -0

75 lines not on this page · raw message

Signature · 1 line
2.25.1