DistroKit Mailinglist
 help / color / mirror / Atom feed
* [DistroKit] [PATCH 0/6] v7a: add basic STM32MP157C-DK2 support
@ 2020-03-02 11:03 Ahmad Fatoum
  2020-03-02 11:03 ` [DistroKit] [PATCH 1/6] v7a: kernel: configure for STM32MP157 support Ahmad Fatoum
                   ` (5 more replies)
  0 siblings, 6 replies; 18+ messages in thread
From: Ahmad Fatoum @ 2020-03-02 11:03 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum

Hi,

this series extends the v7a platform of DistroKit to generate images for
the STM32MP157C-DK2 as well. I term it basic support, because I omitted
the graphical parts. They are functional and usable with upstream kernel
and ptxdist recipes with no changes necessary; only some config options
need to be flipped to get it working.

I've not included them in this patch series, because I didn't want to
enable them for all the existing boards. I think they are better left to
a layer (or maybe added via collections?), which can go into a follow up
patch series if desired.

Cheers,
Ahmad Fatoum (6):
  v7a: kernel: configure for STM32MP157 support
  v7a: barebox: add new stm32mp rule
  rules: add ARM Trusted Firmware-A
  v7a: stm32mp: enable TF-A for first stage
  datapartition: disable autoformat of non-MBR Linux partitions
  v7a: add stm32mp157c-dk2 SD-Card image

 .../init/bootsource                           |   9 +
 configs/platform-v7a/barebox-stm32mp.config   | 781 ++++++++++++++++++
 .../platform-v7a/barebox-stm32mp.config.diff  | 147 ++++
 .../platform-v7a/config/images/stm32mp.config |  31 +
 configs/platform-v7a/kernelconfig             |  81 +-
 configs/platform-v7a/platformconfig           |  22 +-
 .../platform-v7a/platforms/barebox-stm32mp.in |   8 +
 .../platforms/blspec-stm32mp157c-dk2.in       |   5 +
 .../platforms/image-stm32mp157c-dk2.in        |  11 +
 .../loader/entries/stm32mp157c-dk2.conf       |   6 +
 .../platform-v7a/rules/barebox-stm32mp.make   | 107 +++
 .../rules/blspec-stm32mp157c-dk2.make         |  36 +
 .../rules/image-stm32mp157c-dk2.make          |  38 +
 .../usr/lib/udev/rules.d/91-mkfs-ext4.rules   |   2 +-
 rules/tf-a.in                                 | 140 ++++
 rules/tf-a.make                               | 122 +++
 16 files changed, 1536 insertions(+), 10 deletions(-)
 create mode 100755 configs/platform-v7a/barebox-stm32mp-defaultenv/init/bootsource
 create mode 100644 configs/platform-v7a/barebox-stm32mp.config
 create mode 100644 configs/platform-v7a/barebox-stm32mp.config.diff
 create mode 100644 configs/platform-v7a/config/images/stm32mp.config
 create mode 100644 configs/platform-v7a/platforms/barebox-stm32mp.in
 create mode 100644 configs/platform-v7a/platforms/blspec-stm32mp157c-dk2.in
 create mode 100644 configs/platform-v7a/platforms/image-stm32mp157c-dk2.in
 create mode 100644 configs/platform-v7a/projectroot/loader/entries/stm32mp157c-dk2.conf
 create mode 100644 configs/platform-v7a/rules/barebox-stm32mp.make
 create mode 100644 configs/platform-v7a/rules/blspec-stm32mp157c-dk2.make
 create mode 100644 configs/platform-v7a/rules/image-stm32mp157c-dk2.make
 create mode 100644 rules/tf-a.in
 create mode 100644 rules/tf-a.make

-- 
2.25.0


_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [DistroKit] [PATCH 1/6] v7a: kernel: configure for STM32MP157 support
  2020-03-02 11:03 [DistroKit] [PATCH 0/6] v7a: add basic STM32MP157C-DK2 support Ahmad Fatoum
@ 2020-03-02 11:03 ` Ahmad Fatoum
  2020-03-05 16:43   ` Robert Schwebel
  2020-03-02 11:03 ` [DistroKit] [PATCH 2/6] v7a: barebox: add new stm32mp rule Ahmad Fatoum
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 18+ messages in thread
From: Ahmad Fatoum @ 2020-03-02 11:03 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum

The STM32MP157 is an ARM SoC from STMicro with 2x Cortex-A7 cores
as well a Cortex-M MCU. Amend kernel configuration to support this
SoC as well as main peripherals used on the STM32MP157C-DK2 SBC.

For now, only driver for the non-video HW components are enabled.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 configs/platform-v7a/kernelconfig | 81 ++++++++++++++++++++++++++++---
 1 file changed, 73 insertions(+), 8 deletions(-)

diff --git a/configs/platform-v7a/kernelconfig b/configs/platform-v7a/kernelconfig
index c5682f9278c6..4e62eaec01a8 100644
--- a/configs/platform-v7a/kernelconfig
+++ b/configs/platform-v7a/kernelconfig
@@ -392,7 +392,8 @@ CONFIG_ARCH_OMAP2PLUS=y
 # CONFIG_ARCH_SOCFPGA is not set
 # CONFIG_PLAT_SPEAR is not set
 # CONFIG_ARCH_STI is not set
-# CONFIG_ARCH_STM32 is not set
+CONFIG_ARCH_STM32=y
+CONFIG_MACH_STM32MP157=y
 # CONFIG_ARCH_SUNXI is not set
 # CONFIG_ARCH_TANGO is not set
 # CONFIG_ARCH_TEGRA is not set
@@ -475,7 +476,7 @@ CONFIG_ARM_ERRATA_775420=y
 #
 # Bus support
 #
-# CONFIG_ARM_ERRATA_814220 is not set
+CONFIG_ARM_ERRATA_814220=y
 # end of Bus support
 
 #
@@ -499,7 +500,7 @@ CONFIG_VMSPLIT_3G=y
 CONFIG_PAGE_OFFSET=0xC0000000
 CONFIG_NR_CPUS=4
 CONFIG_HOTPLUG_CPU=y
-# CONFIG_ARM_PSCI is not set
+CONFIG_ARM_PSCI=y
 CONFIG_ARCH_NR_GPIO=0
 CONFIG_HZ_FIXED=0
 CONFIG_HZ_100=y
@@ -596,6 +597,8 @@ CONFIG_DT_IDLE_STATES=y
 # ARM CPU Idle Drivers
 #
 CONFIG_ARM_CPUIDLE=y
+# CONFIG_ARM_PSCI_CPUIDLE is not set
+# CONFIG_ARM_HIGHBANK_CPUIDLE is not set
 # end of ARM CPU Idle Drivers
 # end of CPU Idle
 # end of CPU Power Management
@@ -640,6 +643,8 @@ CONFIG_ARCH_HIBERNATION_POSSIBLE=y
 CONFIG_RASPBERRYPI_FIRMWARE=y
 # CONFIG_TRUSTED_FOUNDATIONS is not set
 CONFIG_HAVE_ARM_SMCCC=y
+CONFIG_ARM_PSCI_FW=y
+# CONFIG_ARM_PSCI_CHECKER is not set
 # CONFIG_GOOGLE_FIRMWARE is not set
 # CONFIG_IMX_DSP is not set
 # CONFIG_IMX_SCU is not set
@@ -1105,6 +1110,8 @@ CONFIG_REGMAP_I2C=y
 CONFIG_REGMAP_SPI=y
 CONFIG_REGMAP_MMIO=y
 CONFIG_REGMAP_IRQ=y
+CONFIG_DMA_SHARED_BUFFER=y
+# CONFIG_DMA_FENCE_TRACE is not set
 CONFIG_GENERIC_ARCH_TOPOLOGY=y
 # end of Generic Driver Options
 
@@ -1390,7 +1397,13 @@ CONFIG_NET_VENDOR_SMSC=y
 # CONFIG_SMC911X is not set
 CONFIG_SMSC911X=y
 # CONFIG_NET_VENDOR_SOCIONEXT is not set
-# CONFIG_NET_VENDOR_STMICRO is not set
+CONFIG_NET_VENDOR_STMICRO=y
+CONFIG_STMMAC_ETH=y
+# CONFIG_STMMAC_SELFTESTS is not set
+CONFIG_STMMAC_PLATFORM=y
+# CONFIG_DWMAC_DWC_QOS_ETH is not set
+CONFIG_DWMAC_GENERIC=y
+CONFIG_DWMAC_STM32=y
 # CONFIG_NET_VENDOR_SYNOPSYS is not set
 CONFIG_NET_VENDOR_TI=y
 CONFIG_TI_DAVINCI_MDIO=y
@@ -1411,6 +1424,7 @@ CONFIG_MDIO_BUS=y
 # CONFIG_MDIO_BUS_MUX_MULTIPLEXER is not set
 # CONFIG_MDIO_HISI_FEMAC is not set
 # CONFIG_MDIO_MSCC_MIIM is not set
+CONFIG_PHYLINK=y
 CONFIG_PHYLIB=y
 CONFIG_SWPHY=y
 # CONFIG_LED_TRIGGER_PHY is not set
@@ -1418,6 +1432,7 @@ CONFIG_SWPHY=y
 #
 # MII PHY device drivers
 #
+# CONFIG_SFP is not set
 # CONFIG_ADIN_PHY is not set
 # CONFIG_AMD_PHY is not set
 # CONFIG_AQUANTIA_PHY is not set
@@ -1447,7 +1462,7 @@ CONFIG_FIXED_PHY=y
 # CONFIG_NATIONAL_PHY is not set
 # CONFIG_AT803X_PHY is not set
 # CONFIG_QSEMI_PHY is not set
-# CONFIG_REALTEK_PHY is not set
+CONFIG_REALTEK_PHY=y
 # CONFIG_RENESAS_PHY is not set
 # CONFIG_ROCKCHIP_PHY is not set
 # CONFIG_SMSC_PHY is not set
@@ -1620,6 +1635,8 @@ CONFIG_SERIAL_OMAP_CONSOLE=y
 # CONFIG_SERIAL_FSL_LINFLEXUART is not set
 # CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set
 # CONFIG_SERIAL_ST_ASC is not set
+CONFIG_SERIAL_STM32=y
+CONFIG_SERIAL_STM32_CONSOLE=y
 # end of Serial drivers
 
 CONFIG_SERIAL_MCTRL_GPIO=y
@@ -1628,12 +1645,14 @@ CONFIG_SERIAL_MCTRL_GPIO=y
 # CONFIG_HVC_DCC is not set
 # CONFIG_VIRTIO_CONSOLE is not set
 # CONFIG_IPMI_HANDLER is not set
+# CONFIG_IPMB_DEVICE_INTERFACE is not set
 CONFIG_HW_RANDOM=y
 # CONFIG_HW_RANDOM_TIMERIOMEM is not set
 CONFIG_HW_RANDOM_BCM2835=y
 CONFIG_HW_RANDOM_OMAP=y
 CONFIG_HW_RANDOM_VIRTIO=y
 CONFIG_HW_RANDOM_IMX_RNGC=y
+CONFIG_HW_RANDOM_STM32=y
 # CONFIG_RAW_DRIVER is not set
 # CONFIG_TCG_TPM is not set
 # CONFIG_XILLYBUS is not set
@@ -1671,6 +1690,8 @@ CONFIG_I2C_OMAP=y
 # CONFIG_I2C_PCA_PLATFORM is not set
 # CONFIG_I2C_RK3X is not set
 # CONFIG_I2C_SIMTEC is not set
+# CONFIG_I2C_STM32F4 is not set
+CONFIG_I2C_STM32F7=y
 # CONFIG_I2C_VERSATILE is not set
 # CONFIG_I2C_XILINX is not set
 
@@ -1689,7 +1710,8 @@ CONFIG_I2C_OMAP=y
 # end of I2C Hardware Bus support
 
 # CONFIG_I2C_STUB is not set
-# CONFIG_I2C_SLAVE is not set
+CONFIG_I2C_SLAVE=y
+# CONFIG_I2C_SLAVE_EEPROM is not set
 # CONFIG_I2C_DEBUG_CORE is not set
 # CONFIG_I2C_DEBUG_ALGO is not set
 # CONFIG_I2C_DEBUG_BUS is not set
@@ -1725,6 +1747,8 @@ CONFIG_SPI_OMAP24XX=y
 # CONFIG_SPI_ROCKCHIP is not set
 # CONFIG_SPI_SC18IS602 is not set
 # CONFIG_SPI_SIFIVE is not set
+# CONFIG_SPI_STM32 is not set
+# CONFIG_SPI_STM32_QSPI is not set
 # CONFIG_SPI_MXIC is not set
 # CONFIG_SPI_XCOMM is not set
 # CONFIG_SPI_XILINX is not set
@@ -1779,6 +1803,8 @@ CONFIG_PINCTRL_BCM2835=y
 CONFIG_PINCTRL_IMX=y
 CONFIG_PINCTRL_IMX6Q=y
 CONFIG_PINCTRL_IMX6SX=y
+CONFIG_PINCTRL_STM32=y
+CONFIG_PINCTRL_STM32MP157=y
 # CONFIG_PINCTRL_EQUILIBRIUM is not set
 CONFIG_ARCH_HAVE_CUSTOM_GPIO_H=y
 CONFIG_GPIOLIB=y
@@ -1934,6 +1960,15 @@ CONFIG_BCM2835_THERMAL=y
 # CONFIG_TI_SOC_THERMAL is not set
 # end of Texas Instruments thermal drivers
 
+#
+# STMicroelectronics thermal drivers
+#
+# CONFIG_ST_THERMAL is not set
+# CONFIG_ST_THERMAL_SYSCFG is not set
+# CONFIG_ST_THERMAL_MEMMAP is not set
+CONFIG_STM32_THERMAL=y
+# end of STMicroelectronics thermal drivers
+
 CONFIG_WATCHDOG=y
 CONFIG_WATCHDOG_CORE=y
 # CONFIG_WATCHDOG_NOWAYOUT is not set
@@ -1962,6 +1997,8 @@ CONFIG_OMAP_WATCHDOG=y
 # CONFIG_MAX63XX_WATCHDOG is not set
 CONFIG_IMX2_WDT=y
 # CONFIG_IMX7ULP_WDT is not set
+CONFIG_STM32_WATCHDOG=y
+CONFIG_STPMIC1_WATCHDOG=y
 CONFIG_BCM2835_WDT=y
 # CONFIG_MEN_A21_WDT is not set
 
@@ -2078,7 +2115,9 @@ CONFIG_TWL6040_CORE=y
 # CONFIG_MFD_WM8994 is not set
 # CONFIG_MFD_ROHM_BD718XX is not set
 # CONFIG_MFD_ROHM_BD70528 is not set
-# CONFIG_MFD_STPMIC1 is not set
+# CONFIG_MFD_STM32_LPTIMER is not set
+CONFIG_MFD_STM32_TIMERS=y
+CONFIG_MFD_STPMIC1=y
 # CONFIG_MFD_STMFX is not set
 CONFIG_MFD_VEXPRESS_SYSREG=y
 # end of Multifunction device drivers
@@ -2119,6 +2158,10 @@ CONFIG_REGULATOR_PBIAS=y
 # CONFIG_REGULATOR_PV88090 is not set
 # CONFIG_REGULATOR_PWM is not set
 # CONFIG_REGULATOR_SLG51000 is not set
+# CONFIG_REGULATOR_STM32_BOOSTER is not set
+CONFIG_REGULATOR_STM32_VREFBUF=y
+CONFIG_REGULATOR_STM32_PWR=y
+CONFIG_REGULATOR_STPMIC1=y
 CONFIG_REGULATOR_TI_ABB=y
 # CONFIG_REGULATOR_SY8106A is not set
 # CONFIG_REGULATOR_SY8824X is not set
@@ -2650,6 +2693,7 @@ CONFIG_RTC_DRV_OMAP=y
 # CONFIG_RTC_DRV_MXC_V2 is not set
 # CONFIG_RTC_DRV_SNVS is not set
 # CONFIG_RTC_DRV_R7301 is not set
+CONFIG_RTC_DRV_STM32=y
 
 #
 # HID Sensor RTC drivers
@@ -2677,6 +2721,9 @@ CONFIG_MX3_IPU=y
 CONFIG_MX3_IPU_IRQS=4
 # CONFIG_NBPFAXI_DMA is not set
 # CONFIG_PL330_DMA is not set
+CONFIG_STM32_DMA=y
+CONFIG_STM32_DMAMUX=y
+CONFIG_STM32_MDMA=y
 # CONFIG_QCOM_HIDMA_MGMT is not set
 # CONFIG_QCOM_HIDMA is not set
 # CONFIG_DW_DMAC is not set
@@ -2695,7 +2742,10 @@ CONFIG_TI_DMA_CROSSBAR=y
 #
 # DMABUF options
 #
-# CONFIG_SYNC_FILE is not set
+CONFIG_SYNC_FILE=y
+# CONFIG_SW_SYNC is not set
+# CONFIG_UDMABUF is not set
+# CONFIG_DMABUF_SELFTESTS is not set
 # end of DMABUF options
 
 # CONFIG_AUXDISPLAY is not set
@@ -2745,6 +2795,7 @@ CONFIG_CLK_VEXPRESS_OSC=y
 CONFIG_COMMON_CLK_PALMAS=y
 # CONFIG_COMMON_CLK_PWM is not set
 # CONFIG_COMMON_CLK_VC5 is not set
+CONFIG_COMMON_CLK_STM32MP157=y
 # CONFIG_COMMON_CLK_FIXED_MMIO is not set
 CONFIG_CLK_BCM2835=y
 # CONFIG_CLK_RASPBERRYPI is not set
@@ -2754,6 +2805,7 @@ CONFIG_MXC_CLK=y
 
 CONFIG_HWSPINLOCK=y
 CONFIG_HWSPINLOCK_OMAP=y
+CONFIG_HWSPINLOCK_STM32=y
 
 #
 # Clock Source drivers
@@ -2764,6 +2816,7 @@ CONFIG_OMAP_DM_TIMER=y
 CONFIG_CLKSRC_MMIO=y
 CONFIG_BCM2835_TIMER=y
 CONFIG_CLKSRC_TI_32K=y
+CONFIG_CLKSRC_STM32=y
 CONFIG_ARM_ARCH_TIMER=y
 CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
 CONFIG_ARM_GLOBAL_TIMER=y
@@ -2782,6 +2835,7 @@ CONFIG_IMX_MBOX=y
 # CONFIG_ALTERA_MBOX is not set
 CONFIG_BCM2835_MBOX=y
 # CONFIG_MAILBOX_TEST is not set
+CONFIG_STM32_IPCC=y
 # CONFIG_IOMMU_SUPPORT is not set
 
 #
@@ -2790,6 +2844,7 @@ CONFIG_BCM2835_MBOX=y
 CONFIG_REMOTEPROC=y
 CONFIG_IMX_REMOTEPROC=y
 CONFIG_WKUP_M3_RPROC=y
+CONFIG_STM32_RPROC=y
 # end of Remoteproc drivers
 
 #
@@ -2895,6 +2950,7 @@ CONFIG_PWM_BCM2835=y
 # CONFIG_PWM_IMX_TPM is not set
 # CONFIG_PWM_OMAP_DMTIMER is not set
 # CONFIG_PWM_PCA9685 is not set
+# CONFIG_PWM_STM32 is not set
 # CONFIG_PWM_TIECAP is not set
 # CONFIG_PWM_TIEHRPWM is not set
 # CONFIG_PWM_TWL is not set
@@ -2908,12 +2964,15 @@ CONFIG_ARM_GIC=y
 CONFIG_ARM_GIC_MAX_NR=1
 # CONFIG_AL_FIC is not set
 CONFIG_OMAP_IRQCHIP=y
+CONFIG_STM32_EXTI=y
 # CONFIG_IMX_IRQSTEER is not set
 # end of IRQ chip support
 
 # CONFIG_IPACK_BUS is not set
 CONFIG_ARCH_HAS_RESET_CONTROLLER=y
 CONFIG_RESET_CONTROLLER=y
+CONFIG_RESET_SIMPLE=y
+CONFIG_RESET_STM32MP157=y
 # CONFIG_RESET_TI_SYSCON is not set
 
 #
@@ -2933,6 +2992,7 @@ CONFIG_GENERIC_PHY=y
 # CONFIG_PHY_QCOM_USB_HS is not set
 # CONFIG_PHY_QCOM_USB_HSIC is not set
 # CONFIG_PHY_SAMSUNG_USB2 is not set
+CONFIG_PHY_STM32_USBPHYC=y
 # CONFIG_PHY_DM816X_USB is not set
 # CONFIG_OMAP_CONTROL_PHY is not set
 # CONFIG_OMAP_USB2 is not set
@@ -2966,6 +3026,7 @@ CONFIG_NVMEM=y
 CONFIG_NVMEM_SYSFS=y
 CONFIG_NVMEM_IMX_IIM=y
 CONFIG_NVMEM_IMX_OCOTP=y
+CONFIG_NVMEM_STM32_ROMEM=y
 # CONFIG_NVMEM_SNVS_LPGPR is not set
 
 #
@@ -2983,6 +3044,7 @@ CONFIG_PM_OPP=y
 # CONFIG_SLIMBUS is not set
 # CONFIG_INTERCONNECT is not set
 CONFIG_COUNTER=y
+# CONFIG_STM32_TIMER_CNT is not set
 # CONFIG_TI_EQEP is not set
 # CONFIG_FTM_QUADDEC is not set
 # end of Device Drivers
@@ -3363,6 +3425,9 @@ CONFIG_CRYPTO_DEV_FSL_CAAM_RNG_API=y
 # CONFIG_CRYPTO_DEV_ATMEL_SHA204A is not set
 # CONFIG_CRYPTO_DEV_MXS_DCP is not set
 # CONFIG_CRYPTO_DEV_VIRTIO is not set
+# CONFIG_CRYPTO_DEV_STM32_CRC is not set
+# CONFIG_CRYPTO_DEV_STM32_HASH is not set
+# CONFIG_CRYPTO_DEV_STM32_CRYP is not set
 # CONFIG_CRYPTO_DEV_SAFEXCEL is not set
 # CONFIG_CRYPTO_DEV_CCREE is not set
 # CONFIG_CRYPTO_DEV_AMLOGIC_GXL is not set
-- 
2.25.0


_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [DistroKit] [PATCH 2/6] v7a: barebox: add new stm32mp rule
  2020-03-02 11:03 [DistroKit] [PATCH 0/6] v7a: add basic STM32MP157C-DK2 support Ahmad Fatoum
  2020-03-02 11:03 ` [DistroKit] [PATCH 1/6] v7a: kernel: configure for STM32MP157 support Ahmad Fatoum
@ 2020-03-02 11:03 ` Ahmad Fatoum
  2020-03-03  9:43   ` Roland Hieber
  2020-03-05 16:44   ` Robert Schwebel
  2020-03-02 11:03 ` [DistroKit] [PATCH 3/6] rules: add ARM Trusted Firmware-A Ahmad Fatoum
                   ` (3 subsequent siblings)
  5 siblings, 2 replies; 18+ messages in thread
From: Ahmad Fatoum @ 2020-03-02 11:03 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum

Since v2019.12.0, barebox now has SD/MMC and Ethernet support for the
STM32MP1.  Thus there is nothing holding us back from extending
DistroKit's v7a platform to support the SoC. Add a barebox-stm32mp
rule as first step.

The barebox rule add here is only meant as second-stage bootloader
(SSBL). First-stage (FSBL) will be TF-A introduced in a later patch.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 .../init/bootsource                           |   9 +
 configs/platform-v7a/barebox-stm32mp.config   | 781 ++++++++++++++++++
 .../platform-v7a/barebox-stm32mp.config.diff  | 147 ++++
 configs/platform-v7a/platformconfig           |   1 +
 .../platform-v7a/platforms/barebox-stm32mp.in |   8 +
 .../platform-v7a/rules/barebox-stm32mp.make   | 107 +++
 6 files changed, 1053 insertions(+)
 create mode 100755 configs/platform-v7a/barebox-stm32mp-defaultenv/init/bootsource
 create mode 100644 configs/platform-v7a/barebox-stm32mp.config
 create mode 100644 configs/platform-v7a/barebox-stm32mp.config.diff
 create mode 100644 configs/platform-v7a/platforms/barebox-stm32mp.in
 create mode 100644 configs/platform-v7a/rules/barebox-stm32mp.make

diff --git a/configs/platform-v7a/barebox-stm32mp-defaultenv/init/bootsource b/configs/platform-v7a/barebox-stm32mp-defaultenv/init/bootsource
new file mode 100755
index 000000000000..b529384e939b
--- /dev/null
+++ b/configs/platform-v7a/barebox-stm32mp-defaultenv/init/bootsource
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+if [ -n "$nv.boot.default" ]; then
+	exit
+fi
+
+if [ $bootsource = mmc ]; then
+	global.boot.default="mmc${bootsource_instance}.root net"
+fi
diff --git a/configs/platform-v7a/barebox-stm32mp.config b/configs/platform-v7a/barebox-stm32mp.config
new file mode 100644
index 000000000000..5b532804ffb7
--- /dev/null
+++ b/configs/platform-v7a/barebox-stm32mp.config
@@ -0,0 +1,781 @@
+#
+# Automatically generated file; DO NOT EDIT.
+# Barebox/arm 2020.02.0-20200302-1 Configuration
+#
+CONFIG_ARM=y
+CONFIG_ARM_LINUX=y
+CONFIG_ARM_USE_COMPRESSED_DTB=y
+CONFIG_TEXT_BASE=0x0
+
+#
+# System Type
+#
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_BCM283X is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_DAVINCI is not set
+# CONFIG_ARCH_DIGIC is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_HIGHBANK is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_LAYERSCAPE is not set
+# CONFIG_ARCH_MVEBU is not set
+# CONFIG_ARCH_MXS is not set
+# CONFIG_ARCH_NOMADIK is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_ROCKCHIP is not set
+# CONFIG_ARCH_SOCFPGA is not set
+# CONFIG_ARCH_S3C24xx is not set
+# CONFIG_ARCH_S5PCxx is not set
+# CONFIG_ARCH_S3C64xx is not set
+CONFIG_ARCH_STM32MP=y
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_VEXPRESS is not set
+# CONFIG_ARCH_TEGRA is not set
+# CONFIG_ARCH_UEMD is not set
+# CONFIG_ARCH_ZYNQ is not set
+# CONFIG_ARCH_ZYNQMP is not set
+# CONFIG_ARCH_QEMU is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_V7=y
+CONFIG_CPU_32v7=y
+
+#
+# processor features
+#
+# CONFIG_BOOT_ENDIANNESS_SWITCH is not set
+CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xffffffff
+CONFIG_ARCH_NR_GPIO=416
+CONFIG_ARCH_STM32MP157=y
+CONFIG_MACH_STM32MP157C_DK2=y
+# CONFIG_BOARD_ARM_GENERIC_DT is not set
+CONFIG_ARM_ASM_UNIFIED=y
+CONFIG_AEABI=y
+CONFIG_THUMB2_BAREBOX=y
+CONFIG_ARM_BOARD_APPEND_ATAG=y
+# CONFIG_ARM_BOARD_PREPEND_ATAG is not set
+# end of System Type
+
+#
+# ARM specific settings
+#
+CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
+CONFIG_ARM_EXCEPTIONS=y
+CONFIG_ARM_UNWIND=y
+# CONFIG_ARM_SEMIHOSTING is not set
+CONFIG_ARM_SMCCC=y
+CONFIG_ARM_PSCI_OF=y
+# CONFIG_ARM_PSCI is not set
+CONFIG_ARM_PSCI_CLIENT=y
+# end of ARM specific settings
+
+CONFIG_GREGORIAN_CALENDER=y
+CONFIG_HAS_KALLSYMS=y
+CONFIG_HAS_MODULES=y
+CONFIG_HAS_CACHE=y
+CONFIG_HAS_DMA=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_BLOCK=y
+CONFIG_BLOCK_WRITE=y
+CONFIG_FILETYPE=y
+CONFIG_BINFMT=y
+CONFIG_UIMAGE=y
+CONFIG_LOGBUF=y
+CONFIG_STDDEV=y
+CONFIG_BAREBOX_UPDATE=y
+CONFIG_MENUTREE=y
+CONFIG_BOOT=y
+
+#
+# General Settings
+#
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_BANNER=y
+CONFIG_MEMINFO=y
+CONFIG_ENVIRONMENT_VARIABLES=y
+CONFIG_GLOBALVAR=y
+CONFIG_NVVAR=y
+
+#
+# memory layout
+#
+CONFIG_HAVE_PBL_IMAGE=y
+CONFIG_HAVE_PBL_MULTI_IMAGES=y
+CONFIG_HAVE_IMAGE_COMPRESSION=y
+CONFIG_PBL_IMAGE=y
+CONFIG_PBL_MULTI_IMAGES=y
+CONFIG_PBL_RELOCATABLE=y
+CONFIG_IMAGE_COMPRESSION=y
+# CONFIG_IMAGE_COMPRESSION_LZ4 is not set
+CONFIG_IMAGE_COMPRESSION_LZO=y
+# CONFIG_IMAGE_COMPRESSION_GZIP is not set
+# CONFIG_IMAGE_COMPRESSION_XZKERN is not set
+# CONFIG_IMAGE_COMPRESSION_NONE is not set
+CONFIG_MMU=y
+CONFIG_MMU_EARLY=y
+CONFIG_BAREBOX_MAX_PBL_SIZE=0xffffffff
+CONFIG_BAREBOX_MAX_BARE_INIT_SIZE=0xffffffff
+CONFIG_STACK_SIZE=0x8000
+CONFIG_MALLOC_SIZE=0x0
+# end of memory layout
+
+# CONFIG_EXPERIMENTAL is not set
+# CONFIG_MALLOC_DLMALLOC is not set
+CONFIG_MALLOC_TLSF=y
+CONFIG_KALLSYMS=y
+CONFIG_RELOCATABLE=y
+# CONFIG_PANIC_HANG is not set
+CONFIG_PROMPT="barebox:"
+CONFIG_BAUDRATE=115200
+CONFIG_CBSIZE=1024
+CONFIG_SHELL_HUSH=y
+# CONFIG_SHELL_SIMPLE is not set
+# CONFIG_SHELL_NONE is not set
+CONFIG_GLOB=y
+CONFIG_GLOB_SORT=y
+CONFIG_PROMPT_HUSH_PS2="> "
+CONFIG_HUSH_FANCY_PROMPT=y
+CONFIG_CMDLINE_EDITING=y
+CONFIG_AUTO_COMPLETE=y
+CONFIG_MENU=y
+# CONFIG_PASSWORD is not set
+CONFIG_DYNAMIC_CRC_TABLE=y
+CONFIG_ERRNO_MESSAGES=y
+CONFIG_TIMESTAMP=y
+CONFIG_BOOTM=y
+CONFIG_BOOTM_SHOW_TYPE=y
+CONFIG_BOOTM_VERBOSE=y
+CONFIG_BOOTM_INITRD=y
+CONFIG_BOOTM_OFTREE=y
+CONFIG_BOOTM_OFTREE_UIMAGE=y
+# CONFIG_BOOTM_AIMAGE is not set
+# CONFIG_BOOTM_FITIMAGE is not set
+# CONFIG_BOOTM_OPTEE is not set
+CONFIG_BLSPEC=y
+CONFIG_FLEXIBLE_BOOTARGS=y
+CONFIG_IMD=y
+# CONFIG_IMD_TARGET is not set
+# CONFIG_KERNEL_INSTALL_TARGET is not set
+CONFIG_CONSOLE_FULL=y
+# CONFIG_CONSOLE_SIMPLE is not set
+# CONFIG_CONSOLE_NONE is not set
+# CONFIG_CONSOLE_ACTIVATE_FIRST is not set
+# CONFIG_CONSOLE_ACTIVATE_ALL is not set
+CONFIG_CONSOLE_ACTIVATE_NONE=y
+CONFIG_CONSOLE_ALLOW_COLOR=y
+CONFIG_PBL_CONSOLE=y
+# CONFIG_CONSOLE_RATP is not set
+CONFIG_PARTITION=y
+CONFIG_PARTITION_DISK=y
+CONFIG_PARTITION_DISK_DOS=y
+CONFIG_PARTITION_DISK_EFI=y
+# CONFIG_PARTITION_DISK_EFI_GPT_NO_FORCE is not set
+# CONFIG_PARTITION_DISK_EFI_GPT_COMPARE is not set
+CONFIG_ENV_HANDLING=y
+CONFIG_DEFAULT_ENVIRONMENT=y
+# CONFIG_DEFAULT_COMPRESSION_GZIP is not set
+# CONFIG_DEFAULT_COMPRESSION_LZO is not set
+CONFIG_DEFAULT_COMPRESSION_NONE=y
+CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
+CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_MENU=y
+CONFIG_DEFAULT_ENVIRONMENT_PATH="$(objtree)/.ptxdist-defaultenv"
+# CONFIG_BAREBOXENV_TARGET is not set
+# CONFIG_BAREBOXCRC32_TARGET is not set
+CONFIG_POLLER=y
+# CONFIG_STATE is not set
+# CONFIG_BOOTCHOOSER is not set
+CONFIG_RESET_SOURCE=y
+# end of General Settings
+
+#
+# Debugging
+#
+CONFIG_COMPILE_LOGLEVEL=6
+CONFIG_DEFAULT_LOGLEVEL=7
+# CONFIG_DEBUG_LL is not set
+# CONFIG_DEBUG_INITCALLS is not set
+# CONFIG_PBL_BREAK is not set
+# CONFIG_UBSAN is not set
+CONFIG_UBSAN_ALIGNMENT=y
+# end of Debugging
+
+CONFIG_HAS_DEBUG_LL=y
+CONFIG_COMMAND_SUPPORT=y
+CONFIG_COMPILE_HASH=y
+
+#
+# Commands
+#
+
+#
+# Information
+#
+CONFIG_CMD_ARM_CPUINFO=y
+CONFIG_CMD_DEVINFO=y
+CONFIG_CMD_DMESG=y
+CONFIG_CMD_DRVINFO=y
+CONFIG_CMD_HELP=y
+CONFIG_LONGHELP=y
+CONFIG_CMD_IOMEM=y
+CONFIG_CMD_IMD=y
+CONFIG_CMD_MEMINFO=y
+CONFIG_CMD_ARM_MMUINFO=y
+CONFIG_CMD_REGULATOR=y
+CONFIG_CMD_VERSION=y
+CONFIG_CMD_MMC=y
+# CONFIG_CMD_MMC_EXTCSD is not set
+# end of Information
+
+#
+# Boot
+#
+CONFIG_CMD_BOOT=y
+CONFIG_CMD_BOOTM=y
+# CONFIG_CMD_BOOTU is not set
+# CONFIG_CMD_BOOTZ is not set
+CONFIG_CMD_GO=y
+# CONFIG_CMD_LOADB is not set
+# CONFIG_CMD_LOADS is not set
+# CONFIG_CMD_LOADY is not set
+CONFIG_CMD_RESET=y
+CONFIG_CMD_UIMAGE=y
+# end of Boot
+
+#
+# Partition
+#
+CONFIG_CMD_PARTITION=y
+CONFIG_CMD_AUTOMOUNT=y
+CONFIG_CMD_MOUNT=y
+CONFIG_CMD_UMOUNT=y
+# end of Partition
+
+#
+# Environment
+#
+CONFIG_CMD_NV=y
+CONFIG_CMD_EXPORT=y
+# CONFIG_CMD_DEFAULTENV is not set
+CONFIG_CMD_GLOBAL=y
+CONFIG_CMD_LOADENV=y
+CONFIG_CMD_PRINTENV=y
+CONFIG_CMD_MAGICVAR=y
+CONFIG_CMD_MAGICVAR_HELP=y
+CONFIG_CMD_SAVEENV=y
+# end of Environment
+
+#
+# File
+#
+CONFIG_CMD_BASENAME=y
+CONFIG_CMD_CAT=y
+CONFIG_CMD_CD=y
+CONFIG_CMD_CP=y
+# CONFIG_CMD_CMP is not set
+CONFIG_CMD_DIGEST=y
+CONFIG_CMD_DIRNAME=y
+CONFIG_CMD_FILETYPE=y
+CONFIG_CMD_LN=y
+CONFIG_CMD_LS=y
+CONFIG_CMD_MD5SUM=y
+CONFIG_CMD_MKDIR=y
+CONFIG_CMD_PWD=y
+CONFIG_CMD_READLINK=y
+CONFIG_CMD_RM=y
+CONFIG_CMD_RMDIR=y
+# CONFIG_CMD_SHA1SUM is not set
+# CONFIG_CMD_SHA224SUM is not set
+# CONFIG_CMD_SHA256SUM is not set
+# CONFIG_CMD_SHA384SUM is not set
+# CONFIG_CMD_SHA512SUM is not set
+CONFIG_CMD_UNCOMPRESS=y
+# end of File
+
+#
+# Shell scripting
+#
+CONFIG_CMD_FALSE=y
+CONFIG_CMD_GETOPT=y
+CONFIG_CMD_LET=y
+CONFIG_CMD_MSLEEP=y
+CONFIG_CMD_READF=y
+CONFIG_CMD_SLEEP=y
+CONFIG_CMD_TEST=y
+CONFIG_CMD_TRUE=y
+# end of Shell scripting
+
+#
+# Network
+#
+CONFIG_CMD_DHCP=y
+CONFIG_CMD_HOST=y
+CONFIG_NET_CMD_IFUP=y
+CONFIG_CMD_MIITOOL=y
+CONFIG_CMD_PING=y
+CONFIG_CMD_TFTP=y
+CONFIG_CMD_IP_ROUTE_GET=y
+# end of Network
+
+#
+# Console and Framebuffer interaction
+#
+CONFIG_CMD_CLEAR=y
+CONFIG_CMD_ECHO=y
+CONFIG_CMD_ECHO_E=y
+CONFIG_CMD_EDIT=y
+# CONFIG_CMD_LOGIN is not set
+CONFIG_CMD_MENU=y
+CONFIG_CMD_MENU_MANAGEMENT=y
+CONFIG_CMD_MENUTREE=y
+CONFIG_CMD_READLINE=y
+CONFIG_CMD_TIMEOUT=y
+# end of Console and Framebuffer interaction
+
+#
+# Memory
+#
+CONFIG_CMD_CRC=y
+CONFIG_CMD_CRC_CMP=y
+CONFIG_CMD_MD=y
+CONFIG_CMD_MEMCMP=y
+CONFIG_CMD_MEMCPY=y
+CONFIG_CMD_MEMSET=y
+CONFIG_CMD_MEMTEST=y
+CONFIG_CMD_MM=y
+CONFIG_CMD_MW=y
+# end of Memory
+
+#
+# Hardware manipulation
+#
+CONFIG_CMD_CLK=y
+CONFIG_CMD_DETECT=y
+CONFIG_CMD_FLASH=y
+CONFIG_CMD_GPIO=y
+# CONFIG_CMD_I2C is not set
+CONFIG_CMD_LED=y
+CONFIG_CMD_POWEROFF=y
+# CONFIG_CMD_SMC is not set
+CONFIG_CMD_WD=y
+CONFIG_CMD_WD_DEFAULT_TIMOUT=0
+# end of Hardware manipulation
+
+#
+# Miscellaneous
+#
+# CONFIG_CMD_2048 is not set
+CONFIG_CMD_BAREBOX_UPDATE=y
+# CONFIG_CMD_BLOBGEN is not set
+# CONFIG_CMD_FIRMWARELOAD is not set
+# CONFIG_CMD_OF_DIFF is not set
+CONFIG_CMD_OF_DUMP=y
+CONFIG_CMD_OF_NODE=y
+CONFIG_CMD_OF_PROPERTY=y
+# CONFIG_CMD_OF_DISPLAY_TIMINGS is not set
+# CONFIG_CMD_OF_FIXUP_STATUS is not set
+# CONFIG_CMD_OF_OVERLAY is not set
+CONFIG_CMD_OFTREE=y
+CONFIG_CMD_TIME=y
+# CONFIG_CMD_DHRYSTONE is not set
+# CONFIG_CMD_SPD_DECODE is not set
+# CONFIG_CMD_SEED is not set
+# end of Miscellaneous
+# end of Commands
+
+CONFIG_NET=y
+# CONFIG_NET_NFS is not set
+CONFIG_NET_NETCONSOLE=y
+CONFIG_NET_RESOLV=y
+CONFIG_NET_IFUP=y
+CONFIG_NET_DHCP=y
+# CONFIG_NET_SNTP is not set
+
+#
+# Drivers
+#
+CONFIG_OFTREE=y
+CONFIG_OFTREE_MEM_GENERIC=y
+CONFIG_DTC=y
+CONFIG_OFDEVICE=y
+CONFIG_OF_NET=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_BAREBOX_DRIVERS=y
+# CONFIG_OF_BAREBOX_ENV_IN_FS is not set
+# CONFIG_OF_OVERLAY is not set
+# CONFIG_AIODEV is not set
+CONFIG_ARM_AMBA=y
+
+#
+# serial drivers
+#
+# CONFIG_SERIAL_DEV_BUS is not set
+# CONFIG_DRIVER_SERIAL_ARM_DCC is not set
+# CONFIG_SERIAL_AMBA_PL011 is not set
+CONFIG_DRIVER_SERIAL_STM32=y
+# CONFIG_DRIVER_SERIAL_NS16550 is not set
+# CONFIG_DRIVER_SERIAL_CADENCE is not set
+# end of serial drivers
+
+CONFIG_PHYLIB=y
+
+#
+# Network drivers
+#
+# CONFIG_DRIVER_NET_ARC_EMAC is not set
+# CONFIG_DRIVER_NET_CALXEDA_XGMAC is not set
+# CONFIG_DRIVER_NET_DESIGNWARE is not set
+CONFIG_DRIVER_NET_DESIGNWARE_EQOS=y
+CONFIG_DRIVER_NET_DESIGNWARE_STM32=y
+# CONFIG_DRIVER_NET_DESIGNWARE_TEGRA186 is not set
+# CONFIG_DRIVER_NET_FSL_FMAN is not set
+# CONFIG_DRIVER_NET_KS8851_MLL is not set
+# CONFIG_DRIVER_NET_SMC911X is not set
+# CONFIG_DRIVER_NET_SMC91111 is not set
+
+#
+# phylib
+#
+
+#
+# MII PHY device drivers
+#
+# CONFIG_AR8327N_PHY is not set
+CONFIG_AT803X_PHY=y
+# CONFIG_DAVICOM_PHY is not set
+# CONFIG_DP83867_PHY is not set
+# CONFIG_LXT_PHY is not set
+# CONFIG_MARVELL_PHY is not set
+CONFIG_MICREL_PHY=y
+# CONFIG_NATIONAL_PHY is not set
+# CONFIG_REALTEK_PHY is not set
+# CONFIG_SMSC_PHY is not set
+# CONFIG_NET_DSA_MV88E6XXX is not set
+
+#
+# MII bus device drivers
+#
+# CONFIG_MDIO_BITBANG is not set
+# CONFIG_MDIO_BUS_MUX_GPIO is not set
+# end of phylib
+# end of Network drivers
+
+#
+# SPI drivers
+#
+# CONFIG_SPI is not set
+# end of SPI drivers
+
+CONFIG_I2C=y
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_GPIO is not set
+# CONFIG_I2C_DESIGNWARE is not set
+# CONFIG_I2C_MV64XXX is not set
+CONFIG_I2C_STM32=y
+# end of I2C Hardware Bus support
+
+# CONFIG_I2C_MUX is not set
+# CONFIG_MTD is not set
+CONFIG_DISK=y
+CONFIG_DISK_WRITE=y
+
+#
+# drive types
+#
+# CONFIG_DISK_ATA is not set
+# CONFIG_DISK_AHCI is not set
+
+#
+# interface types
+#
+# CONFIG_DISK_INTF_PLATFORM_IDE is not set
+# CONFIG_USB_HOST is not set
+# CONFIG_USB_GADGET is not set
+# CONFIG_USB_MUSB is not set
+# CONFIG_VIDEO is not set
+CONFIG_MCI=y
+
+#
+# --- Feature list ---
+#
+CONFIG_MCI_STARTUP=y
+CONFIG_MCI_INFO=y
+CONFIG_MCI_WRITE=y
+# CONFIG_MCI_MMC_BOOT_PARTITIONS is not set
+
+#
+# --- MCI host drivers ---
+#
+# CONFIG_MCI_DW is not set
+# CONFIG_MCI_MMCI is not set
+# CONFIG_MCI_ARASAN is not set
+CONFIG_MCI_STM32_SDMMC2=y
+CONFIG_HAVE_CLK=y
+CONFIG_CLKDEV_LOOKUP=y
+CONFIG_COMMON_CLK=y
+CONFIG_COMMON_CLK_OF_PROVIDER=y
+
+#
+# Clocksource
+#
+CONFIG_CLOCKSOURCE_DUMMY_RATE=1000
+CONFIG_CLOCKSOURCE_ARMV8_TIMER=y
+# CONFIG_CLOCKSOURCE_DW_APB_TIMER is not set
+# end of Clocksource
+
+#
+# MFD
+#
+# CONFIG_MFD_ACT8846 is not set
+# CONFIG_MFD_DA9053 is not set
+# CONFIG_MFD_DA9063 is not set
+# CONFIG_MFD_LP3972 is not set
+# CONFIG_MFD_MC13XXX is not set
+# CONFIG_MFD_MC34704 is not set
+# CONFIG_MFD_MC9SDZ60 is not set
+# CONFIG_MFD_STMPE is not set
+CONFIG_MFD_SYSCON=y
+# CONFIG_MFD_TWL4030 is not set
+# CONFIG_MFD_TWL6030 is not set
+CONFIG_MFD_STPMIC1=y
+# CONFIG_FINTEK_SUPERIO is not set
+# CONFIG_SMSC_SUPERIO is not set
+# end of MFD
+
+#
+# Misc devices
+#
+# CONFIG_JTAG is not set
+# CONFIG_SRAM is not set
+CONFIG_DEV_MEM=y
+# CONFIG_UBOOTVAR is not set
+# end of Misc devices
+
+CONFIG_LED=y
+CONFIG_LED_GPIO=y
+CONFIG_LED_GPIO_OF=y
+# CONFIG_LED_GPIO_RGB is not set
+# CONFIG_LED_GPIO_BICOLOR is not set
+# CONFIG_LED_TRIGGERS is not set
+# CONFIG_LED_PCA955X is not set
+
+#
+# EEPROM support
+#
+# CONFIG_EEPROM_AT24 is not set
+# end of EEPROM support
+
+#
+# Input device support
+#
+# CONFIG_KEYBOARD_GPIO is not set
+# CONFIG_KEYBOARD_QT1070 is not set
+# CONFIG_INPUT_SPECIALKEYS is not set
+# end of Input device support
+
+CONFIG_WATCHDOG=y
+CONFIG_WATCHDOG_POLLER=y
+# CONFIG_WATCHDOG_DW is not set
+CONFIG_STM32_IWDG_WATCHDOG=y
+# CONFIG_STPMIC1_WATCHDOG is not set
+# CONFIG_PWM is not set
+# CONFIG_HWRNG is not set
+
+#
+# DMA support
+#
+# end of DMA support
+
+CONFIG_GPIOLIB=y
+
+#
+# GPIO
+#
+# CONFIG_GPIO_GENERIC_PLATFORM is not set
+# CONFIG_GPIO_PCA953X is not set
+# CONFIG_GPIO_PCF857X is not set
+# CONFIG_GPIO_PL061 is not set
+# CONFIG_GPIO_DESIGNWARE is not set
+# CONFIG_GPIO_SX150X is not set
+# end of GPIO
+
+# CONFIG_W1 is not set
+
+#
+# Pin controllers
+#
+CONFIG_PINCTRL=y
+# CONFIG_PINCTRL_SINGLE is not set
+CONFIG_PINCTRL_STM32=y
+# end of Pin controllers
+
+CONFIG_NVMEM=y
+# CONFIG_NVMEM_SNVS_LPGPR is not set
+CONFIG_STM32_BSEC=y
+
+#
+# Bus devices
+#
+# end of Bus devices
+
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED=y
+CONFIG_REGULATOR_STPMIC1=y
+# CONFIG_REGULATOR_ANATOP is not set
+
+#
+# Remoteproc drivers
+#
+# CONFIG_REMOTEPROC is not set
+# end of Remoteproc drivers
+
+CONFIG_ARCH_HAS_RESET_CONTROLLER=y
+CONFIG_RESET_CONTROLLER=y
+# CONFIG_RESET_IMX7 is not set
+CONFIG_RESET_STM32=y
+# CONFIG_RTC_CLASS is not set
+
+#
+# Firmware Drivers
+#
+# end of Firmware Drivers
+
+# CONFIG_GENERIC_PHY is not set
+# CONFIG_CRYPTO_HW is not set
+
+#
+# Memory controller drivers
+#
+# end of Memory controller drivers
+
+#
+# i.MX SoC drivers
+#
+# end of i.MX SoC drivers
+
+#
+# NVME Support
+#
+# end of NVME Support
+# end of Drivers
+
+#
+# Filesystem support
+#
+CONFIG_FS=y
+CONFIG_FS_LEGACY=y
+
+#
+# Some selected filesystems still use the legacy FS API.
+#
+
+#
+# Consider updating them.
+#
+CONFIG_FS_AUTOMOUNT=y
+# CONFIG_FS_CRAMFS is not set
+CONFIG_FS_EXT4=y
+CONFIG_FS_RAMFS=y
+CONFIG_FS_DEVFS=y
+CONFIG_FS_TFTP=y
+CONFIG_FS_NFS=y
+CONFIG_FS_FAT=y
+CONFIG_FS_FAT_WRITE=y
+CONFIG_FS_FAT_LFN=y
+# CONFIG_FS_BPKFS is not set
+# CONFIG_FS_UIMAGEFS is not set
+# CONFIG_FS_PSTORE is not set
+# CONFIG_FS_SQUASHFS is not set
+
+#
+# ZLIB support disabled
+#
+
+#
+# LZ4 support disabled
+#
+
+#
+# LZO support disabled
+#
+
+#
+# XZ support disabled
+#
+
+#
+# ZSTD support disabled
+#
+# end of Filesystem support
+
+#
+# Library routines
+#
+CONFIG_PARAMETER=y
+CONFIG_UNCOMPRESS=y
+CONFIG_ZLIB=y
+# CONFIG_BZLIB is not set
+# CONFIG_LZ4_DECOMPRESS is not set
+# CONFIG_ZSTD_DECOMPRESS is not set
+# CONFIG_XZ_DECOMPRESS is not set
+# CONFIG_BASE64 is not set
+CONFIG_PROCESS_ESCAPE_SEQUENCE=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_FNMATCH=y
+CONFIG_QSORT=y
+# CONFIG_RATP is not set
+# CONFIG_ALLOW_PRNG_FALLBACK is not set
+# CONFIG_CRC_CCITT is not set
+CONFIG_CRC8=y
+
+#
+# Library gui routines
+#
+# end of Library gui routines
+
+# CONFIG_BAREBOX_LOGO is not set
+CONFIG_PRINTF_UUID=y
+# CONFIG_NLS is not set
+# CONFIG_BLOBGEN is not set
+CONFIG_ARCH_HAS_STACK_DUMP=y
+CONFIG_ARCH_HAS_DATA_ABORT_MASK=y
+# end of Library routines
+
+#
+# Crypto support
+#
+CONFIG_CRC32=y
+CONFIG_DIGEST=y
+CONFIG_MD5=y
+# CONFIG_DIGEST_CRC32_GENERIC is not set
+CONFIG_DIGEST_MD5_GENERIC=y
+# CONFIG_DIGEST_SHA1_GENERIC is not set
+# CONFIG_DIGEST_SHA224_GENERIC is not set
+# CONFIG_DIGEST_SHA256_GENERIC is not set
+# CONFIG_DIGEST_SHA384_GENERIC is not set
+# CONFIG_DIGEST_SHA512_GENERIC is not set
+# CONFIG_DIGEST_HMAC_GENERIC is not set
+# CONFIG_DIGEST_SHA1_ARM is not set
+# CONFIG_DIGEST_SHA256_ARM is not set
+# CONFIG_CRYPTO_KEYSTORE is not set
+# end of Crypto support
+
+#
+# Firmware files
+#
+CONFIG_EXTRA_FIRMWARE_DIR="firmware"
+# end of Firmware files
+
+#
+# Host Tools
+#
+# CONFIG_COMPILE_HOST_TOOLS is not set
+# end of Host Tools
diff --git a/configs/platform-v7a/barebox-stm32mp.config.diff b/configs/platform-v7a/barebox-stm32mp.config.diff
new file mode 100644
index 000000000000..ae685bc0303f
--- /dev/null
+++ b/configs/platform-v7a/barebox-stm32mp.config.diff
@@ -0,0 +1,147 @@
+3535341c60838c5a3a5b02da35648d4a
+# CONFIG_ARCH_BCM283X is not set
+CONFIG_ARCH_HAS_RESET_CONTROLLER=y
+CONFIG_ARCH_NR_GPIO=416
+CONFIG_ARCH_STM32MP157=y
+CONFIG_ARCH_STM32MP=y
+# CONFIG_ARCH_TEXT_BASE is undefined
+CONFIG_ARM_ASM_UNIFIED=y
+CONFIG_ARM_BOARD_APPEND_ATAG=y
+# CONFIG_ARM_BOARD_PREPEND_ATAG is not set
+CONFIG_ARM_PSCI_CLIENT=y
+CONFIG_ARM_PSCI_OF=y
+# CONFIG_ARM_SECURE_MONITOR is undefined
+CONFIG_ARM_USE_COMPRESSED_DTB=y
+CONFIG_AT803X_PHY=y
+# CONFIG_BOARD_ARM_GENERIC_DT is not set
+CONFIG_BOOTM_INITRD=y
+CONFIG_BOOTM_OFTREE_UIMAGE=y
+# CONFIG_BZLIB is not set
+# CONFIG_CLOCKSOURCE_BCM283X is undefined
+# CONFIG_CMD_BOOTZ is not set
+# CONFIG_CMD_DEFAULTENV is not set
+# CONFIG_CMD_I2C is not set
+# CONFIG_CMD_LED_TRIGGER is undefined
+CONFIG_CMD_MENU_MANAGEMENT=y
+CONFIG_CMD_MIITOOL=y
+CONFIG_CMD_POWEROFF=y
+# CONFIG_CMD_SHA1SUM is not set
+# CONFIG_CMD_SPI is undefined
+# CONFIG_CMD_STATE is undefined
+# CONFIG_CMD_USB is undefined
+# CONFIG_CMD_USBGADGET is undefined
+CONFIG_COMMON_CLK_OF_PROVIDER=y
+CONFIG_COMPILE_LOGLEVEL=6
+# CONFIG_CONSOLE_ACTIVATE_FIRST is not set
+CONFIG_CONSOLE_ACTIVATE_NONE=y
+CONFIG_CRC8=y
+# CONFIG_DEFAULT_COMPRESSION_BZIP2 is undefined
+# CONFIG_DEFAULT_COMPRESSION_XZ is undefined
+CONFIG_DEFAULT_LOGLEVEL=7
+# CONFIG_DIGEST_SHA1_GENERIC is not set
+# CONFIG_DRIVER_CFI is undefined
+CONFIG_DRIVER_NET_DESIGNWARE_EQOS=y
+CONFIG_DRIVER_NET_DESIGNWARE_STM32=y
+# CONFIG_DRIVER_NET_DESIGNWARE_TEGRA186 is not set
+# CONFIG_DRIVER_NET_ENC28J60 is undefined
+# CONFIG_DRIVER_NET_MICREL is undefined
+CONFIG_DRIVER_SERIAL_STM32=y
+# CONFIG_DRIVER_SPI_GPIO is undefined
+# CONFIG_EEPROM_AT25 is undefined
+# CONFIG_FILE_LIST is undefined
+# CONFIG_FIRMWARE_ALTERA_SERIAL is undefined
+# CONFIG_GPIO_74164 is undefined
+# CONFIG_GPIO_RASPBERRYPI_EXP is undefined
+# CONFIG_HWRNG is not set
+# CONFIG_I2C_ALGOBIT is undefined
+# CONFIG_I2C_GPIO is not set
+CONFIG_I2C_STM32=y
+# CONFIG_KEYBOARD_USB is undefined
+# CONFIG_LED_TRIGGERS is not set
+# CONFIG_LIBFDT is undefined
+# CONFIG_MACHINE_ID is undefined
+# CONFIG_MACH_RPI2 is undefined
+# CONFIG_MACH_RPI3 is undefined
+# CONFIG_MACH_RPI is undefined
+# CONFIG_MACH_RPI_CM3 is undefined
+# CONFIG_MACH_RPI_COMMON is undefined
+CONFIG_MACH_STM32MP157C_DK2=y
+# CONFIG_MCI_BCM283X is undefined
+# CONFIG_MCI_BCM283X_SDHOST is undefined
+# CONFIG_MCI_MMCI is not set
+# CONFIG_MCI_SPI is undefined
+CONFIG_MCI_STM32_SDMMC2=y
+CONFIG_MFD_STPMIC1=y
+CONFIG_MFD_SYSCON=y
+CONFIG_MICREL_PHY=y
+# CONFIG_MTD is not set
+# CONFIG_MTD_CONCAT is undefined
+# CONFIG_MTD_DATAFLASH is undefined
+# CONFIG_MTD_DOCG3 is undefined
+# CONFIG_MTD_M25P80 is undefined
+# CONFIG_MTD_MTDRAM is undefined
+# CONFIG_MTD_OOB_DEVICE is undefined
+# CONFIG_MTD_PEB_DEBUG is undefined
+# CONFIG_MTD_RAW_DEVICE is undefined
+# CONFIG_MTD_SPI_NOR is undefined
+# CONFIG_MTD_UBI is undefined
+# CONFIG_MTD_WRITE is undefined
+# CONFIG_NAND is undefined
+CONFIG_NET_NETCONSOLE=y
+# CONFIG_NET_NFS is not set
+# CONFIG_NET_USB is undefined
+# CONFIG_NET_USB_ASIX is undefined
+# CONFIG_NET_USB_SMSC95XX is undefined
+CONFIG_NVMEM=y
+# CONFIG_NVMEM_SNVS_LPGPR is not set
+CONFIG_PARTITION_DISK_EFI=y
+# CONFIG_PARTITION_DISK_EFI_GPT_COMPARE is not set
+# CONFIG_PARTITION_DISK_EFI_GPT_NO_FORCE is not set
+CONFIG_PBL_CONSOLE=y
+# CONFIG_PINCTRL_BCM283X is undefined
+CONFIG_PINCTRL_STM32=y
+CONFIG_PRINTF_UUID=y
+CONFIG_PROMPT="barebox:"
+# CONFIG_REGULATOR_ANATOP is not set
+# CONFIG_REGULATOR_BCM283X is undefined
+CONFIG_REGULATOR_FIXED=y
+CONFIG_REGULATOR_STPMIC1=y
+CONFIG_RESET_CONTROLLER=y
+# CONFIG_RESET_IMX7 is not set
+CONFIG_RESET_STM32=y
+# CONFIG_SHA1 is undefined
+# CONFIG_SPI is not set
+# CONFIG_SPI_MEM is undefined
+# CONFIG_STATE is not set
+# CONFIG_STATE_BACKWARD_COMPATIBLE is undefined
+# CONFIG_STATE_CRYPTO is undefined
+# CONFIG_STATE_DRV is undefined
+CONFIG_STM32_BSEC=y
+CONFIG_STM32_IWDG_WATCHDOG=y
+# CONFIG_STPMIC1_WATCHDOG is not set
+CONFIG_THUMB2_BAREBOX=y
+# CONFIG_USB is undefined
+# CONFIG_USBGADGET_START is undefined
+# CONFIG_USB_DWC2_HOST is undefined
+# CONFIG_USB_DWC3 is undefined
+# CONFIG_USB_EHCI is undefined
+# CONFIG_USB_GADGET is not set
+# CONFIG_USB_GADGET_AUTOSTART is undefined
+# CONFIG_USB_GADGET_DFU is undefined
+# CONFIG_USB_GADGET_FASTBOOT is undefined
+# CONFIG_USB_GADGET_FASTBOOT_SPARSE is undefined
+# CONFIG_USB_GADGET_SERIAL is undefined
+# CONFIG_USB_HOST is not set
+# CONFIG_USB_HUB_USB251XB is undefined
+# CONFIG_USB_STORAGE is undefined
+# CONFIG_USB_ULPI is undefined
+# CONFIG_USB_XHCI is undefined
+# CONFIG_WATCHDOG_BCM2835 is undefined
+CONFIG_WATCHDOG_POLLER=y
+# CONFIG_XZ_DECOMPRESS is not set
+# CONFIG_XZ_DEC_ARM is undefined
+# CONFIG_XZ_DEC_ARMTHUMB is undefined
+# CONFIG_XZ_DEC_IA64 is undefined
+# CONFIG_XZ_DEC_POWERPC is undefined
+# CONFIG_XZ_DEC_SPARC is undefined
+# CONFIG_XZ_DEC_X86 is undefined
diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
index 3a0bab50c4ee..f468a77e4f96 100644
--- a/configs/platform-v7a/platformconfig
+++ b/configs/platform-v7a/platformconfig
@@ -173,6 +173,7 @@ PTXCONF_BAREBOX_AM335X_MLO=y
 PTXCONF_BAREBOX_AM335X=y
 PTXCONF_BAREBOX_MX6=y
 PTXCONF_BAREBOX_RPI2=y
+PTXCONF_BAREBOX_STM32MP=y
 PTXCONF_BAREBOX_VEXPRESS=y
 PTXCONF_BAREBOX_ARCH_STRING="arm"
 # PTXCONF_BAREBOX is not set
diff --git a/configs/platform-v7a/platforms/barebox-stm32mp.in b/configs/platform-v7a/platforms/barebox-stm32mp.in
new file mode 100644
index 000000000000..6fc59546d8f4
--- /dev/null
+++ b/configs/platform-v7a/platforms/barebox-stm32mp.in
@@ -0,0 +1,8 @@
+## SECTION=bootloader
+
+config BAREBOX_STM32MP
+	tristate
+	prompt "Barebox (stm32mp)"
+	select BAREBOX_COMMON
+	help
+	  Barebox image for STM32MP
diff --git a/configs/platform-v7a/rules/barebox-stm32mp.make b/configs/platform-v7a/rules/barebox-stm32mp.make
new file mode 100644
index 000000000000..962409696483
--- /dev/null
+++ b/configs/platform-v7a/rules/barebox-stm32mp.make
@@ -0,0 +1,107 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Sascha Hauer <s.hauer@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_BAREBOX_STM32MP) += barebox-stm32mp
+
+#
+# Paths and names
+#
+BAREBOX_STM32MP_VERSION		:= $(call remove_quotes,$(PTXCONF_BAREBOX_COMMON_VERSION))
+BAREBOX_STM32MP_MD5		:= $(call remove_quotes,$(PTXCONF_BAREBOX_COMMON_MD5))
+BAREBOX_STM32MP			:= barebox-$(BAREBOX_STM32MP_VERSION)
+BAREBOX_STM32MP_SUFFIX		:= tar.bz2
+BAREBOX_STM32MP_DIR		:= $(BUILDDIR)/barebox-stm32mp-$(BAREBOX_STM32MP_VERSION)
+BAREBOX_STM32MP_CONFIG		:= $(call ptx/in-platformconfigdir, barebox-stm32mp.config)
+BAREBOX_STM32MP_REF_CONFIG	:= $(call ptx/in-platformconfigdir, barebox.config)
+BAREBOX_STM32MP_LICENSE		:= GPL-2.0
+BAREBOX_STM32MP_URL		:= $(call barebox-url, BAREBOX_STM32MP)
+BAREBOX_STM32MP_SOURCE		:= $(SRCDIR)/$(BAREBOX_STM32MP).$(BAREBOX_STM32MP_SUFFIX)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+BAREBOX_STM32MP_WRAPPER_BLACKLIST := \
+	TARGET_HARDEN_RELRO \
+	TARGET_HARDEN_BINDNOW \
+	TARGET_HARDEN_PIE \
+	TARGET_DEBUG \
+	TARGET_BUILD_ID
+
+BAREBOX_STM32MP_CONF_ENV := KCONFIG_NOTIMESTAMP=1
+BAREBOX_STM32MP_CONF_OPT := $(call barebox-opts, BAREBOX_STM32MP)
+
+BAREBOX_STM32MP_MAKE_ENV := $(BAREBOX_STM32MP_CONF_ENV)
+BAREBOX_STM32MP_MAKE_OPT := $(BAREBOX_STM32MP_CONF_OPT)
+
+BAREBOX_STM32MP_IMAGES := \
+	images/barebox-stm32mp157c-dk2.img
+
+BAREBOX_STM32MP_IMAGES := $(addprefix $(BAREBOX_STM32MP_DIR)/,$(BAREBOX_STM32MP_IMAGES))
+
+ifdef PTXCONF_BAREBOX_STM32MP
+$(BAREBOX_STM32MP_CONFIG):
+	@echo
+	@echo "****************************************************************************"
+	@echo " Please generate a bareboxconfig with 'ptxdist menuconfig barebox-stm32mp'"
+	@echo "****************************************************************************"
+	@echo
+	@echo
+	@exit 1
+endif
+
+$(STATEDIR)/barebox-stm32mp.prepare: $(BAREBOX_STM32MP_CONFIG)
+	@$(call targetinfo)
+	@rm -f "$(BAREBOX_STM32MP_DIR)/.ptxdist-defaultenv"
+	@ln -s "$(call ptx/in-platformconfigdir, barebox-stm32mp-defaultenv)" \
+		"$(BAREBOX_STM32MP_DIR)/.ptxdist-defaultenv"
+	@$(call world/prepare, BAREBOX_STM32MP)
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/barebox-stm32mp.install:
+	@$(call targetinfo)
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Targetinstall
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/barebox-stm32mp.targetinstall:
+	@$(call targetinfo)
+	@$(foreach image, $(BAREBOX_STM32MP_IMAGES), \
+		install -m 644 \
+			$(image) $(IMAGEDIR)/$(notdir $(image));)
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/barebox-stm32mp.clean:
+	@$(call targetinfo)
+	@$(call clean_pkg, BAREBOX_STM32MP)
+	@$(foreach image, $(BAREBOX_STM32MP_IMAGES), \
+		rm -fv $(IMAGEDIR)/$(notdir $(image))-stm32mp;)
+
+# ----------------------------------------------------------------------------
+# oldconfig / menuconfig
+# ----------------------------------------------------------------------------
+
+barebox-stm32mp_oldconfig barebox-stm32mp_menuconfig barebox-stm32mp_nconfig: $(STATEDIR)/barebox-stm32mp.extract
+	@$(call world/kconfig, BAREBOX_STM32MP, $(subst barebox-stm32mp_,,$@))
+
+# vim: syntax=make
-- 
2.25.0


_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [DistroKit] [PATCH 3/6] rules: add ARM Trusted Firmware-A
  2020-03-02 11:03 [DistroKit] [PATCH 0/6] v7a: add basic STM32MP157C-DK2 support Ahmad Fatoum
  2020-03-02 11:03 ` [DistroKit] [PATCH 1/6] v7a: kernel: configure for STM32MP157 support Ahmad Fatoum
  2020-03-02 11:03 ` [DistroKit] [PATCH 2/6] v7a: barebox: add new stm32mp rule Ahmad Fatoum
@ 2020-03-02 11:03 ` Ahmad Fatoum
  2020-03-05 16:44   ` Robert Schwebel
  2020-03-02 11:03 ` [DistroKit] [PATCH 4/6] v7a: stm32mp: enable TF-A for first stage Ahmad Fatoum
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 18+ messages in thread
From: Ahmad Fatoum @ 2020-03-02 11:03 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum, Michael Tretter

Trusted Firmware-A (TF-A) is a reference implementation of secure world
software for Arm A-Profile architectures (Armv8-A and Armv7-A).

TF-A is used as first-stage bootloader on the STM32MP1. We'll use
barebox for second-stage only for now, thus add a rule for TF-A.

Tested-by: Michael Tretter <m.tretter@pengutronix.de>
Signed-off-by: Rouven Czerwinski <rouven@czerwinskis.de>
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
Link: https://www.mail-archive.com/ptxdist@pengutronix.de/msg15828.html
---
 configs/platform-v7a/platformconfig |   1 +
 rules/tf-a.in                       | 140 ++++++++++++++++++++++++++++
 rules/tf-a.make                     | 122 ++++++++++++++++++++++++
 3 files changed, 263 insertions(+)
 create mode 100644 rules/tf-a.in
 create mode 100644 rules/tf-a.make

diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
index f468a77e4f96..e3a9b6433172 100644
--- a/configs/platform-v7a/platformconfig
+++ b/configs/platform-v7a/platformconfig
@@ -181,6 +181,7 @@ PTXCONF_BAREBOX_ARCH_STRING="arm"
 # PTXCONF_GRUB is not set
 # PTXCONF_HOST_MXS_UTILS is not set
 # PTXCONF_OPTEE is not set
+# PTXCONF_TF_A is not set
 # PTXCONF_U_BOOT is not set
 # PTXCONF_X_LOAD is not set
 
diff --git a/rules/tf-a.in b/rules/tf-a.in
new file mode 100644
index 000000000000..3cddf7907960
--- /dev/null
+++ b/rules/tf-a.in
@@ -0,0 +1,140 @@
+## SECTION=bootloader
+
+menuconfig TF_A
+	select BOOTLOADER
+	prompt "ARM Trusted Firmware-A        "
+	depends on ARCH_ARM || ARCH_ARM64
+	bool
+
+if TF_A
+
+config TF_A_VERSION
+	string
+	default "v2.2"
+	prompt "TF-A version"
+	help
+	  Enter the TF-A git commit-ish you want to build. Usually a tagged
+	  release like "v2.2"
+
+config TF_A_MD5
+	string
+	default "bb300e5a62c911e189c80d935d497a4b"
+	prompt "TF-A source md5"
+
+config TF_A_ARCH_STRING
+        string
+        default "aarch32" if ARCH_ARM
+        default "aarch64" if ARCH_ARM64
+
+choice
+	prompt "TF-A Architecture"
+	default TF_A_ARM_ARCH_MAJOR_7 if ARCH_ARM
+	default TF_A_ARM_ARCH_MAJOR_8 if ARCH_ARM64
+	help
+	  Architecture version major number
+
+	config TF_A_ARM_ARCH_MAJOR_7
+		depends on ARCH_ARM
+		prompt "ARMv7"
+		bool
+
+	config TF_A_ARM_ARCH_MAJOR_8_32_BIT
+		depends on ARCH_ARM
+		prompt "ARMv8 32-bit"
+		bool
+
+	config TF_A_ARM_ARCH_MAJOR_8
+		depends on ARCH_ARM64
+		prompt "ARMv8"
+		bool
+
+endchoice
+
+config TF_A_ARM_ARCH_MAJOR
+        int
+        default 7 if TF_A_ARM_ARCH_MAJOR_7
+        default 8 if TF_A_ARM_ARCH_MAJOR_8_32_BIT
+        default 8 if TF_A_ARM_ARCH_MAJOR_8
+
+
+config TF_A_PLATFORM
+	string
+	prompt "TF-A target platform"
+	help
+	  The TF-A target platform.
+
+config TF_A_ARM_ARCH_MINOR
+	depends on TF_A_ARM_ARCH_MAJOR_8 || TF_A_ARM_ARCH_MAJOR_8_32_BIT
+	int
+	default 0
+	prompt "TF-A target ARMv8.MINOR version"
+	help
+	  The minor version of the ARMv8 architecture targeted. Defaults to 0.
+
+config TF_A_EXTRA_ARGS
+	string
+	prompt "TF-A extra build arguments"
+	help
+	  Extra platform-specific build arguments to pass to the TF-A build
+	  process, e.g. DTB_FILE_NAME= for the stm32mp1
+
+config TF_A_ARTIFACTS
+	string
+	prompt "TF-A artifact file names"
+	help
+	  A space-separated list of glob patterns of artifacts to copy from the
+	  build directory.
+	  All file names are relative to the appropriate TF-A platform build
+	  directory.
+
+comment "Payloads"
+
+choice
+	prompt "BL32 Payload"
+	default TF_A_BL32_NONE
+	help
+	  payload for BL32 (Secure World OS)
+
+	config TF_A_BL32_NONE
+		prompt "None"
+		bool
+
+	config TF_A_BL32_SP_MIN
+		depends on ARCH_ARM
+		prompt "sp_min"
+		bool
+
+	config TF_A_BL32_TSP
+		depends on ARCH_ARM64
+		prompt "Test Secure Payload"
+		bool
+
+endchoice
+
+if TF_A_BL32_TSP
+choice TF_A_BL32_TSP_RAM_LOCATION
+	prompt "TSP location"
+	default TF_A_BL32_TSP_RAM_LOCATION_TSRAM
+
+	config TF_A_BL32_TSP_RAM_LOCATION_TSRAM
+		prompt "Trusted SRAM"
+		bool
+
+	config TF_A_BL32_TSP_RAM_LOCATION_TDRAM
+		prompt "Trusted DRAM (if available)"
+		bool
+
+	config TF_A_BL32_TSP_RAM_LOCATION_DRAM
+		prompt "Secure DRAM region (configured by TrustZone controller)"
+		bool
+endchoice
+
+config TF_A_BL32_TSP_RAM_LOCATION_STRING
+        string
+        default "tsram" if TF_A_BL32_TSP_RAM_LOCATION_TSRAM
+        default "tdram" if TF_A_BL32_TSP_RAM_LOCATION_TDRAM
+        default "dram"  if TF_A_BL32_TSP_RAM_LOCATION_DRAM
+
+endif
+
+endif
diff --git a/rules/tf-a.make b/rules/tf-a.make
new file mode 100644
index 000000000000..3ba5ca275050
--- /dev/null
+++ b/rules/tf-a.make
@@ -0,0 +1,122 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2018 by Rouven Czerwinski <r.czerwinski@pengutronix.de>
+#               2019 by Ahmad Fatoum <a.fatoum@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_TF_A) += tf-a
+
+#
+# Paths and names
+#
+TF_A_VERSION	:= $(call remove_quotes,$(PTXCONF_TF_A_VERSION))
+TF_A_MD5	:= $(call remove_quotes,$(PTXCONF_TF_A_MD5))
+TF_A		:= tf-a-$(TF_A_VERSION)
+TF_A_SUFFIX	:= tar.gz
+TF_A_URL	:= https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/snapshot/$(TF_A_VERSION).$(TF_A_SUFFIX)
+TF_A_SOURCE	:= $(SRCDIR)/$(TF_A).$(TF_A_SUFFIX)
+TF_A_DIR	:= $(BUILDDIR)/$(TF_A)
+TF_A_LICENSE    := BSD-3-Clause AND BSD-2-Clause \
+		   AND (GPL-2.0-or-later OR BSD-2-Clause) \
+		   AND (NCSA OR MIT) \
+		   AND Zlib \
+		   AND (GPL-2.0-or-later OR BSD-3-Clause)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+TF_A_WRAPPER_BLACKLIST := \
+	TARGET_HARDEN_RELRO \
+	TARGET_HARDEN_BINDNOW \
+	TARGET_HARDEN_PIE \
+	TARGET_DEBUG \
+	TARGET_BUILD_ID
+
+TF_A_RELEASE := 1
+
+TF_A_PATH	:= PATH=$(CROSS_PATH)
+TF_A_MAKE_OPT	:= \
+	CROSS_COMPILE=$(BOOTLOADER_CROSS_COMPILE) \
+	HOSTCC=$(HOSTCC) \
+	PLAT=$(PTXCONF_TF_A_PLATFORM) \
+	DEBUG=$(if $(filter 1,$(TF_A_RELEASE)),0,1) \
+	ARCH=$(PTXCONF_TF_A_ARCH_STRING) \
+	ARM_ARCH_MAJOR=$(PTXCONF_TF_A_ARM_ARCH_MAJOR) \
+	BUILD_STRING=$(PTXCONF_TF_A_VERSION) \
+	$(call remove_quotes,$(PTXCONF_TF_A_EXTRA_ARGS)) \
+	all
+
+ifdef PTXCONF_TF_A_BL32_TSP
+TF_A_MAKE_OPT += ARM_TSP_RAM_LOCATION=$(PTXCONF_TF_A_BL32_TSP_RAM_LOCATION_STRING)
+endif
+ifdef PTXCONF_TF_A_ARM_ARCH_MINOR
+TF_A_MAKE_OPT += ARM_ARCH_MINOR=$(PTXCONF_TF_A_ARM_ARCH_MINOR)
+endif
+ifdef PTXCONF_TF_A_BL32_SP_MIN
+TF_A_MAKE_OPT += AARCH32_SP=sp_min
+endif
+
+ifdef PTXCONF_TF_A
+ifeq ($(PTXCONF_TF_A_ARTIFACTS),)
+$(error TF_A_ARTIFACTS is empty. nothing to install.)
+endif
+endif
+
+TF_A_CONF_TOOL	:= NO
+
+$(STATEDIR)/tf-a.prepare:
+	@$(call targetinfo)
+	@rm -rf $(TF_A_DIR)/build/
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+TF_A_MAKE_ENV	:= $(CROSS_ENV)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+TF_A_BUILD_OUTPUT_DIR := $(TF_A_DIR)/build/$(call remove_quotes, \
+	$(PTXCONF_TF_A_PLATFORM))/$(if $(filter 1,$(TF_A_RELEASE)),release,debug)
+TF_A_ARTIFACTS_SRC = $(wildcard $(addprefix $(TF_A_BUILD_OUTPUT_DIR)/, \
+	$(call remove_quotes,$(PTXCONF_TF_A_ARTIFACTS))))
+TF_A_ARTIFACTS_DEST = $(subst $(TF_A_BUILD_OUTPUT_DIR)/,,$(TF_A_ARTIFACTS_SRC))
+
+$(STATEDIR)/tf-a.install:
+	@$(call targetinfo)
+	@$(foreach artifact, $(TF_A_ARTIFACTS_SRC), \
+		install -v -D -m 644 $(artifact) \
+		$(TF_A_PKGDIR)/usr/lib/firmware/$(notdir $(artifact))$(ptx/nl))
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/tf-a.targetinstall:
+	@$(call targetinfo)
+	@$(foreach artifact, $(TF_A_ARTIFACTS_SRC), \
+		install -v -D -m 644 $(artifact) \
+		$(IMAGEDIR)/$(notdir $(artifact))$(ptx/nl))
+	@$(call touch)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/tf-a.clean:
+	@$(call targetinfo)
+	@rm -f $(addprefix $(IMAGEDIR)/, $(TF_A_ARTIFACTS_DEST))
+	@$(call clean_pkg, TF_A)
+
+# vim: syntax=make
-- 
2.25.0


_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [DistroKit] [PATCH 4/6] v7a: stm32mp: enable TF-A for first stage
  2020-03-02 11:03 [DistroKit] [PATCH 0/6] v7a: add basic STM32MP157C-DK2 support Ahmad Fatoum
                   ` (2 preceding siblings ...)
  2020-03-02 11:03 ` [DistroKit] [PATCH 3/6] rules: add ARM Trusted Firmware-A Ahmad Fatoum
@ 2020-03-02 11:03 ` Ahmad Fatoum
  2020-03-05 16:45   ` Robert Schwebel
  2020-03-02 11:03 ` [DistroKit] [PATCH 5/6] datapartition: disable autoformat of non-MBR Linux partitions Ahmad Fatoum
  2020-03-02 11:03 ` [DistroKit] [PATCH 6/6] v7a: add stm32mp157c-dk2 SD-Card image Ahmad Fatoum
  5 siblings, 1 reply; 18+ messages in thread
From: Ahmad Fatoum @ 2020-03-02 11:03 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum

The STM32MP uses TF-A as first stage boot loader. Configure it
appropriately for use.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 configs/platform-v7a/platformconfig | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
index e3a9b6433172..02111f2750d7 100644
--- a/configs/platform-v7a/platformconfig
+++ b/configs/platform-v7a/platformconfig
@@ -178,10 +178,26 @@ PTXCONF_BAREBOX_VEXPRESS=y
 PTXCONF_BAREBOX_ARCH_STRING="arm"
 # PTXCONF_BAREBOX is not set
 # PTXCONF_BAREBOX_MLO is not set
+PTXCONF_BOOTLOADER=y
 # PTXCONF_GRUB is not set
 # PTXCONF_HOST_MXS_UTILS is not set
 # PTXCONF_OPTEE is not set
-# PTXCONF_TF_A is not set
+PTXCONF_TF_A=y
+PTXCONF_TF_A_VERSION="v2.2"
+PTXCONF_TF_A_MD5="bb300e5a62c911e189c80d935d497a4b"
+PTXCONF_TF_A_ARCH_STRING="aarch32"
+PTXCONF_TF_A_ARM_ARCH_MAJOR_7=y
+# PTXCONF_TF_A_ARM_ARCH_MAJOR_8_32_BIT is not set
+PTXCONF_TF_A_ARM_ARCH_MAJOR=7
+PTXCONF_TF_A_PLATFORM="stm32mp1"
+PTXCONF_TF_A_EXTRA_ARGS="DTB_FILE_NAME=stm32mp157c-dk2.dtb"
+PTXCONF_TF_A_ARTIFACTS="tf-a-*.stm32"
+
+#
+# Payloads
+#
+# PTXCONF_TF_A_BL32_NONE is not set
+PTXCONF_TF_A_BL32_SP_MIN=y
 # PTXCONF_U_BOOT is not set
 # PTXCONF_X_LOAD is not set
 
-- 
2.25.0


_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [DistroKit] [PATCH 5/6] datapartition: disable autoformat of non-MBR Linux partitions
  2020-03-02 11:03 [DistroKit] [PATCH 0/6] v7a: add basic STM32MP157C-DK2 support Ahmad Fatoum
                   ` (3 preceding siblings ...)
  2020-03-02 11:03 ` [DistroKit] [PATCH 4/6] v7a: stm32mp: enable TF-A for first stage Ahmad Fatoum
@ 2020-03-02 11:03 ` Ahmad Fatoum
  2020-03-05 16:45   ` Robert Schwebel
  2020-03-02 11:03 ` [DistroKit] [PATCH 6/6] v7a: add stm32mp157c-dk2 SD-Card image Ahmad Fatoum
  5 siblings, 1 reply; 18+ messages in thread
From: Ahmad Fatoum @ 2020-03-02 11:03 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum

The upcoming STM32MP157C-DK2 board will be the first DistroKit board
with a GPT based image and it has barebox as partition 3, unlike the
other boards where this is always the data partition.

This causes the data partition rule to brick the image by overwriting
barebox.

As a temporary measure, disable the data partition auto formatting
on GPT-images by explicitly checking for partition type 0x83 before
starting the service. Eventually we might want to match against
a UUID before autoformatting, or create the partition anew altogether.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 projectroot/usr/lib/udev/rules.d/91-mkfs-ext4.rules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/projectroot/usr/lib/udev/rules.d/91-mkfs-ext4.rules b/projectroot/usr/lib/udev/rules.d/91-mkfs-ext4.rules
index 1c1a39612aed..8af8f6cd39ba 100644
--- a/projectroot/usr/lib/udev/rules.d/91-mkfs-ext4.rules
+++ b/projectroot/usr/lib/udev/rules.d/91-mkfs-ext4.rules
@@ -1,5 +1,5 @@
 ACTION!="add", GOTO="systemd-autoformat-ext4-devices_end"
 SUBSYSTEM!="block", GOTO="systemd-autoformat-ext4-devices_end"
-ENV{ID_FS_USAGE}!="filesystem", SUBSYSTEMS=="mmc", KERNEL=="mmcblk0p3", ENV{ID_FS_TYPE}!="ext4", ENV{SYSTEMD_WANTS}+="systemd-autoformat@$name.service"
+ENV{ID_FS_USAGE}!="filesystem", SUBSYSTEMS=="mmc", KERNEL=="mmcblk0p3", ENV{ID_PART_ENTRY_TYPE}=="0x83", ENV{ID_FS_TYPE}!="ext4", ENV{SYSTEMD_WANTS}+="systemd-autoformat@$name.service"
 
 LABEL="systemd-autoformat-ext4-devices_end"
-- 
2.25.0


_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de

^ permalink raw reply	[flat|nested] 18+ messages in thread

* [DistroKit] [PATCH 6/6] v7a: add stm32mp157c-dk2 SD-Card image
  2020-03-02 11:03 [DistroKit] [PATCH 0/6] v7a: add basic STM32MP157C-DK2 support Ahmad Fatoum
                   ` (4 preceding siblings ...)
  2020-03-02 11:03 ` [DistroKit] [PATCH 5/6] datapartition: disable autoformat of non-MBR Linux partitions Ahmad Fatoum
@ 2020-03-02 11:03 ` Ahmad Fatoum
  2020-03-03 12:08   ` Roland Hieber
  2020-03-05 16:46   ` Robert Schwebel
  5 siblings, 2 replies; 18+ messages in thread
From: Ahmad Fatoum @ 2020-03-02 11:03 UTC (permalink / raw)
  To: distrokit; +Cc: Ahmad Fatoum

Both STM32MP BootROM and TF-A expect the subsequent bootloader stage to
come from a GPT partition when booting from SD-Card.
Add a genimage config that describes this.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 .../platform-v7a/config/images/stm32mp.config | 31 +++++++++++++++
 configs/platform-v7a/platformconfig           |  4 +-
 .../platforms/blspec-stm32mp157c-dk2.in       |  5 +++
 .../platforms/image-stm32mp157c-dk2.in        | 11 ++++++
 .../loader/entries/stm32mp157c-dk2.conf       |  6 +++
 .../rules/blspec-stm32mp157c-dk2.make         | 36 ++++++++++++++++++
 .../rules/image-stm32mp157c-dk2.make          | 38 +++++++++++++++++++
 7 files changed, 130 insertions(+), 1 deletion(-)
 create mode 100644 configs/platform-v7a/config/images/stm32mp.config
 create mode 100644 configs/platform-v7a/platforms/blspec-stm32mp157c-dk2.in
 create mode 100644 configs/platform-v7a/platforms/image-stm32mp157c-dk2.in
 create mode 100644 configs/platform-v7a/projectroot/loader/entries/stm32mp157c-dk2.conf
 create mode 100644 configs/platform-v7a/rules/blspec-stm32mp157c-dk2.make
 create mode 100644 configs/platform-v7a/rules/image-stm32mp157c-dk2.make

diff --git a/configs/platform-v7a/config/images/stm32mp.config b/configs/platform-v7a/config/images/stm32mp.config
new file mode 100644
index 000000000000..0b9cfe888791
--- /dev/null
+++ b/configs/platform-v7a/config/images/stm32mp.config
@@ -0,0 +1,31 @@
+image @IMAGE@ {
+	hdimage {
+		align = 1M
+		gpt = "true"
+	}
+	partition fsbl1 {
+		image = "tf-a-@STM32MP_BOARD@.stm32"
+		size = 256K
+	}
+	partition fsbl2 {
+		image = "tf-a-@STM32MP_BOARD@.stm32"
+		size = 256K
+	}
+	partition ssbl {
+		image = "barebox-@STM32MP_BOARD@.img"
+		size = 1M
+	}
+	partition barebox-environment {
+		size = 1M
+	}
+	partition root {
+		image = root.ext2
+		partition-type = 0x83
+		size = 512M
+	}
+	partition data {
+		partition-type = 0x83
+		size = 100M
+	}
+}
+/* vim: set tabstop=8 noexpandtab : */
diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
index 02111f2750d7..d4dbc9a47b6f 100644
--- a/configs/platform-v7a/platformconfig
+++ b/configs/platform-v7a/platformconfig
@@ -143,7 +143,7 @@ PTXCONF_KERNEL_EXTRA_MAKEVARS=""
 PTXCONF_DTC=y
 PTXCONF_DTC_INSTALL_OFTREE=y
 PTXCONF_DTC_OFTREE_DTS_PATH="${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts"
-PTXCONF_DTC_OFTREE_DTS="am335x-bone.dts am335x-boneblack.dts vexpress-v2p-ca9.dts bcm2836-rpi-2-b.dts imx6q-sabrelite.dts imx6sx-udoo-neo-full.dts imx6dl-riotboard.dts imx6q-nitrogen6x.dts imx6qp-nitrogen6_max.dts bcm2837-rpi-3-b.dts"
+PTXCONF_DTC_OFTREE_DTS="am335x-bone.dts am335x-boneblack.dts vexpress-v2p-ca9.dts bcm2836-rpi-2-b.dts imx6q-sabrelite.dts imx6sx-udoo-neo-full.dts imx6dl-riotboard.dts imx6q-nitrogen6x.dts imx6qp-nitrogen6_max.dts bcm2837-rpi-3-b.dts stm32mp157c-dk2.dts"
 PTXCONF_DTC_EXTRA_ARGS=""
 PTXCONF_HOST_DTC=y
 PTXCONF_HOST_DTC_VERSION="1.5.1"
@@ -214,6 +214,7 @@ PTXCONF_BLSPEC_RIOTBOARD=y
 PTXCONF_BLSPEC_RPI2=y
 PTXCONF_BLSPEC_RPI3=y
 PTXCONF_BLSPEC_SABRELITE=y
+PTXCONF_BLSPEC_STM32MP157C_DK2=y
 PTXCONF_BLSPEC_UDOO_NEO=y
 PTXCONF_BLSPEC_VEXPRESS=y
 
@@ -258,6 +259,7 @@ PTXCONF_IMAGE_ROOT_TGZ_LABEL=""
 PTXCONF_IMAGE_RPI2=y
 PTXCONF_IMAGE_RPI3=y
 PTXCONF_IMAGE_SABRELITE=y
+PTXCONF_IMAGE_STM32MP157C_DK2=y
 PTXCONF_IMAGE_UDOO_NEO=y
 PTXCONF_IMAGE_VEXPRESS_NOR=y
 PTXCONF_IMAGE_VEXPRESS=y
diff --git a/configs/platform-v7a/platforms/blspec-stm32mp157c-dk2.in b/configs/platform-v7a/platforms/blspec-stm32mp157c-dk2.in
new file mode 100644
index 000000000000..fc142950e21a
--- /dev/null
+++ b/configs/platform-v7a/platforms/blspec-stm32mp157c-dk2.in
@@ -0,0 +1,5 @@
+## SECTION=blspec
+
+config BLSPEC_STM32MP157C_DK2
+	tristate
+	prompt "/loader/entries/stm32mp157c-dk2.conf bootloader spec entry"
diff --git a/configs/platform-v7a/platforms/image-stm32mp157c-dk2.in b/configs/platform-v7a/platforms/image-stm32mp157c-dk2.in
new file mode 100644
index 000000000000..d7b9c235edaa
--- /dev/null
+++ b/configs/platform-v7a/platforms/image-stm32mp157c-dk2.in
@@ -0,0 +1,11 @@
+## SECTION=image
+
+config IMAGE_STM32MP157C_DK2
+	tristate
+	select HOST_GENIMAGE
+	select IMAGE_ROOT_EXT
+	select BAREBOX_STM32MP
+	select TF_A
+	prompt "Generate images/stm32mp157c-dk2.hdimg"
+	help
+	  Generate GPT image for the STM32MP157C-DK2
diff --git a/configs/platform-v7a/projectroot/loader/entries/stm32mp157c-dk2.conf b/configs/platform-v7a/projectroot/loader/entries/stm32mp157c-dk2.conf
new file mode 100644
index 000000000000..1fbba657bfbe
--- /dev/null
+++ b/configs/platform-v7a/projectroot/loader/entries/stm32mp157c-dk2.conf
@@ -0,0 +1,6 @@
+title		PTXdist - Pengutronix-DistroKit
+version		5.3
+options		rootwait rw
+linux		/boot/zImage
+devicetree	/boot/stm32mp157c-dk2.dtb
+linux-appendroot true
diff --git a/configs/platform-v7a/rules/blspec-stm32mp157c-dk2.make b/configs/platform-v7a/rules/blspec-stm32mp157c-dk2.make
new file mode 100644
index 000000000000..e057fa95f98c
--- /dev/null
+++ b/configs/platform-v7a/rules/blspec-stm32mp157c-dk2.make
@@ -0,0 +1,36 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Sascha Hauer <s.hauer@pengutronix.de>
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+PACKAGES-$(PTXCONF_BLSPEC_STM32MP157C_DK2) += blspec-stm32mp157c-dk2
+
+BLSPEC_STM32MP157C_DK2_VERSION	:= 4.11
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+$(STATEDIR)/blspec-stm32mp157c-dk2.targetinstall:
+	@$(call targetinfo)
+
+	@$(call install_init, blspec-stm32mp157c-dk2)
+	@$(call install_fixup,blspec-stm32mp157c-dk2,PRIORITY,optional)
+	@$(call install_fixup,blspec-stm32mp157c-dk2,SECTION,base)
+	@$(call install_fixup,blspec-stm32mp157c-dk2,AUTHOR,"Sascha Hauer <s.hauer@pengutronix.de>")
+	@$(call install_fixup,blspec-stm32mp157c-dk2,DESCRIPTION,missing)
+
+	@$(call install_alternative, blspec-stm32mp157c-dk2, 0, 0, 0644, \
+		/loader/entries/stm32mp157c-dk2.conf)
+
+	@$(call install_finish,blspec-stm32mp157c-dk2)
+
+	@$(call touch)
+
+# vim: syntax=make
diff --git a/configs/platform-v7a/rules/image-stm32mp157c-dk2.make b/configs/platform-v7a/rules/image-stm32mp157c-dk2.make
new file mode 100644
index 000000000000..d5e524646a50
--- /dev/null
+++ b/configs/platform-v7a/rules/image-stm32mp157c-dk2.make
@@ -0,0 +1,38 @@
+# -*-makefile-*-
+#
+# Copyright (C) 2017 by Sascha Hauer <s.hauer@pengutronix.de>
+#
+# See CREDITS for details about who has contributed to this project.
+#
+# For further information about the PTXdist project and license conditions
+# see the README file.
+#
+
+#
+# We provide this package
+#
+IMAGE_PACKAGES-$(PTXCONF_IMAGE_STM32MP157C_DK2) += image-stm32mp157c-dk2
+
+IMAGE_STM32MP157C_DK2_ENV := \
+	STM32MP_BOARD=stm32mp157c-dk2
+
+#
+# Paths and names
+#
+IMAGE_STM32MP157C_DK2		:= image-stm32mp157c-dk2
+IMAGE_STM32MP157C_DK2_DIR	:= $(BUILDDIR)/$(IMAGE_STM32MP157C_DK2)
+IMAGE_STM32MP157C_DK2_IMAGE	:= $(IMAGEDIR)/stm32mp157c-dk2.hdimg
+IMAGE_STM32MP157C_DK2_FILES	:= $(IMAGEDIR)/root.tgz
+IMAGE_STM32MP157C_DK2_CONFIG	:= stm32mp.config
+
+# ----------------------------------------------------------------------------
+# Image
+# ----------------------------------------------------------------------------
+
+$(IMAGE_STM32MP157C_DK2_IMAGE):
+	@$(call targetinfo)
+	@$(call image/genimage, IMAGE_STM32MP157C_DK2)
+	@$(call finish)
+
+# vim: syntax=make
+
-- 
2.25.0


_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [DistroKit] [PATCH 2/6] v7a: barebox: add new stm32mp rule
  2020-03-02 11:03 ` [DistroKit] [PATCH 2/6] v7a: barebox: add new stm32mp rule Ahmad Fatoum
@ 2020-03-03  9:43   ` Roland Hieber
  2020-03-03  9:54     ` Ahmad Fatoum
  2020-03-05 16:44   ` Robert Schwebel
  1 sibling, 1 reply; 18+ messages in thread
From: Roland Hieber @ 2020-03-03  9:43 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: distrokit

On Mon, Mar 02, 2020 at 12:03:52PM +0100, Ahmad Fatoum wrote:
> Since v2019.12.0, barebox now has SD/MMC and Ethernet support for the
> STM32MP1.  Thus there is nothing holding us back from extending
> DistroKit's v7a platform to support the SoC. Add a barebox-stm32mp
> rule as first step.
> 
> The barebox rule add here is only meant as second-stage bootloader
> (SSBL). First-stage (FSBL) will be TF-A introduced in a later patch.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  .../init/bootsource                           |   9 +
>  configs/platform-v7a/barebox-stm32mp.config   | 781 ++++++++++++++++++
>  .../platform-v7a/barebox-stm32mp.config.diff  | 147 ++++
>  configs/platform-v7a/platformconfig           |   1 +
>  .../platform-v7a/platforms/barebox-stm32mp.in |   8 +
>  .../platform-v7a/rules/barebox-stm32mp.make   | 107 +++
>  6 files changed, 1053 insertions(+)
>  create mode 100755 configs/platform-v7a/barebox-stm32mp-defaultenv/init/bootsource
>  create mode 100644 configs/platform-v7a/barebox-stm32mp.config
>  create mode 100644 configs/platform-v7a/barebox-stm32mp.config.diff
>  create mode 100644 configs/platform-v7a/platforms/barebox-stm32mp.in
>  create mode 100644 configs/platform-v7a/rules/barebox-stm32mp.make
> 
> diff --git a/configs/platform-v7a/barebox-stm32mp-defaultenv/init/bootsource b/configs/platform-v7a/barebox-stm32mp-defaultenv/init/bootsource
> new file mode 100755
> index 000000000000..b529384e939b
> --- /dev/null
> +++ b/configs/platform-v7a/barebox-stm32mp-defaultenv/init/bootsource
> @@ -0,0 +1,9 @@
> +#!/bin/sh
> +
> +if [ -n "$nv.boot.default" ]; then
> +	exit
> +fi
> +
> +if [ $bootsource = mmc ]; then
> +	global.boot.default="mmc${bootsource_instance}.root net"
> +fi
> diff --git a/configs/platform-v7a/barebox-stm32mp.config b/configs/platform-v7a/barebox-stm32mp.config
> new file mode 100644
> index 000000000000..5b532804ffb7
> --- /dev/null
> +++ b/configs/platform-v7a/barebox-stm32mp.config
> @@ -0,0 +1,781 @@
> +#
> +# Automatically generated file; DO NOT EDIT.
> +# Barebox/arm 2020.02.0-20200302-1 Configuration
> +#
> +CONFIG_ARM=y
> +CONFIG_ARM_LINUX=y
> +CONFIG_ARM_USE_COMPRESSED_DTB=y
> +CONFIG_TEXT_BASE=0x0
> +
> +#
> +# System Type
> +#
> +# CONFIG_ARCH_AT91 is not set
> +# CONFIG_ARCH_BCM283X is not set
> +# CONFIG_ARCH_CLPS711X is not set
> +# CONFIG_ARCH_DAVINCI is not set
> +# CONFIG_ARCH_DIGIC is not set
> +# CONFIG_ARCH_EP93XX is not set
> +# CONFIG_ARCH_HIGHBANK is not set
> +# CONFIG_ARCH_IMX is not set
> +# CONFIG_ARCH_LAYERSCAPE is not set
> +# CONFIG_ARCH_MVEBU is not set
> +# CONFIG_ARCH_MXS is not set
> +# CONFIG_ARCH_NOMADIK is not set
> +# CONFIG_ARCH_OMAP is not set
> +# CONFIG_ARCH_PXA is not set
> +# CONFIG_ARCH_ROCKCHIP is not set
> +# CONFIG_ARCH_SOCFPGA is not set
> +# CONFIG_ARCH_S3C24xx is not set
> +# CONFIG_ARCH_S5PCxx is not set
> +# CONFIG_ARCH_S3C64xx is not set
> +CONFIG_ARCH_STM32MP=y
> +# CONFIG_ARCH_VERSATILE is not set
> +# CONFIG_ARCH_VEXPRESS is not set
> +# CONFIG_ARCH_TEGRA is not set
> +# CONFIG_ARCH_UEMD is not set
> +# CONFIG_ARCH_ZYNQ is not set
> +# CONFIG_ARCH_ZYNQMP is not set
> +# CONFIG_ARCH_QEMU is not set
> +
> +#
> +# Processor Type
> +#
> +CONFIG_CPU_32=y
> +CONFIG_CPU_V7=y
> +CONFIG_CPU_32v7=y
> +
> +#
> +# processor features
> +#
> +# CONFIG_BOOT_ENDIANNESS_SWITCH is not set
> +CONFIG_BAREBOX_MAX_IMAGE_SIZE=0xffffffff
> +CONFIG_ARCH_NR_GPIO=416
> +CONFIG_ARCH_STM32MP157=y
> +CONFIG_MACH_STM32MP157C_DK2=y
> +# CONFIG_BOARD_ARM_GENERIC_DT is not set
> +CONFIG_ARM_ASM_UNIFIED=y
> +CONFIG_AEABI=y
> +CONFIG_THUMB2_BAREBOX=y
> +CONFIG_ARM_BOARD_APPEND_ATAG=y
> +# CONFIG_ARM_BOARD_PREPEND_ATAG is not set
> +# end of System Type
> +
> +#
> +# ARM specific settings
> +#
> +CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
> +CONFIG_ARM_EXCEPTIONS=y
> +CONFIG_ARM_UNWIND=y
> +# CONFIG_ARM_SEMIHOSTING is not set
> +CONFIG_ARM_SMCCC=y
> +CONFIG_ARM_PSCI_OF=y
> +# CONFIG_ARM_PSCI is not set
> +CONFIG_ARM_PSCI_CLIENT=y
> +# end of ARM specific settings
> +
> +CONFIG_GREGORIAN_CALENDER=y
> +CONFIG_HAS_KALLSYMS=y
> +CONFIG_HAS_MODULES=y
> +CONFIG_HAS_CACHE=y
> +CONFIG_HAS_DMA=y
> +CONFIG_GENERIC_GPIO=y
> +CONFIG_BLOCK=y
> +CONFIG_BLOCK_WRITE=y
> +CONFIG_FILETYPE=y
> +CONFIG_BINFMT=y
> +CONFIG_UIMAGE=y
> +CONFIG_LOGBUF=y
> +CONFIG_STDDEV=y
> +CONFIG_BAREBOX_UPDATE=y
> +CONFIG_MENUTREE=y
> +CONFIG_BOOT=y
> +
> +#
> +# General Settings
> +#
> +CONFIG_LOCALVERSION=""
> +CONFIG_LOCALVERSION_AUTO=y
> +CONFIG_BANNER=y
> +CONFIG_MEMINFO=y
> +CONFIG_ENVIRONMENT_VARIABLES=y
> +CONFIG_GLOBALVAR=y
> +CONFIG_NVVAR=y
> +
> +#
> +# memory layout
> +#
> +CONFIG_HAVE_PBL_IMAGE=y
> +CONFIG_HAVE_PBL_MULTI_IMAGES=y
> +CONFIG_HAVE_IMAGE_COMPRESSION=y
> +CONFIG_PBL_IMAGE=y
> +CONFIG_PBL_MULTI_IMAGES=y
> +CONFIG_PBL_RELOCATABLE=y
> +CONFIG_IMAGE_COMPRESSION=y
> +# CONFIG_IMAGE_COMPRESSION_LZ4 is not set
> +CONFIG_IMAGE_COMPRESSION_LZO=y
> +# CONFIG_IMAGE_COMPRESSION_GZIP is not set
> +# CONFIG_IMAGE_COMPRESSION_XZKERN is not set
> +# CONFIG_IMAGE_COMPRESSION_NONE is not set
> +CONFIG_MMU=y
> +CONFIG_MMU_EARLY=y
> +CONFIG_BAREBOX_MAX_PBL_SIZE=0xffffffff
> +CONFIG_BAREBOX_MAX_BARE_INIT_SIZE=0xffffffff
> +CONFIG_STACK_SIZE=0x8000
> +CONFIG_MALLOC_SIZE=0x0
> +# end of memory layout
> +
> +# CONFIG_EXPERIMENTAL is not set
> +# CONFIG_MALLOC_DLMALLOC is not set
> +CONFIG_MALLOC_TLSF=y
> +CONFIG_KALLSYMS=y
> +CONFIG_RELOCATABLE=y
> +# CONFIG_PANIC_HANG is not set
> +CONFIG_PROMPT="barebox:"
> +CONFIG_BAUDRATE=115200
> +CONFIG_CBSIZE=1024
> +CONFIG_SHELL_HUSH=y
> +# CONFIG_SHELL_SIMPLE is not set
> +# CONFIG_SHELL_NONE is not set
> +CONFIG_GLOB=y
> +CONFIG_GLOB_SORT=y
> +CONFIG_PROMPT_HUSH_PS2="> "
> +CONFIG_HUSH_FANCY_PROMPT=y
> +CONFIG_CMDLINE_EDITING=y
> +CONFIG_AUTO_COMPLETE=y
> +CONFIG_MENU=y
> +# CONFIG_PASSWORD is not set
> +CONFIG_DYNAMIC_CRC_TABLE=y
> +CONFIG_ERRNO_MESSAGES=y
> +CONFIG_TIMESTAMP=y
> +CONFIG_BOOTM=y
> +CONFIG_BOOTM_SHOW_TYPE=y
> +CONFIG_BOOTM_VERBOSE=y
> +CONFIG_BOOTM_INITRD=y
> +CONFIG_BOOTM_OFTREE=y
> +CONFIG_BOOTM_OFTREE_UIMAGE=y
> +# CONFIG_BOOTM_AIMAGE is not set
> +# CONFIG_BOOTM_FITIMAGE is not set
> +# CONFIG_BOOTM_OPTEE is not set
> +CONFIG_BLSPEC=y
> +CONFIG_FLEXIBLE_BOOTARGS=y
> +CONFIG_IMD=y
> +# CONFIG_IMD_TARGET is not set
> +# CONFIG_KERNEL_INSTALL_TARGET is not set
> +CONFIG_CONSOLE_FULL=y
> +# CONFIG_CONSOLE_SIMPLE is not set
> +# CONFIG_CONSOLE_NONE is not set
> +# CONFIG_CONSOLE_ACTIVATE_FIRST is not set
> +# CONFIG_CONSOLE_ACTIVATE_ALL is not set
> +CONFIG_CONSOLE_ACTIVATE_NONE=y
> +CONFIG_CONSOLE_ALLOW_COLOR=y
> +CONFIG_PBL_CONSOLE=y
> +# CONFIG_CONSOLE_RATP is not set
> +CONFIG_PARTITION=y
> +CONFIG_PARTITION_DISK=y
> +CONFIG_PARTITION_DISK_DOS=y
> +CONFIG_PARTITION_DISK_EFI=y
> +# CONFIG_PARTITION_DISK_EFI_GPT_NO_FORCE is not set
> +# CONFIG_PARTITION_DISK_EFI_GPT_COMPARE is not set
> +CONFIG_ENV_HANDLING=y
> +CONFIG_DEFAULT_ENVIRONMENT=y
> +# CONFIG_DEFAULT_COMPRESSION_GZIP is not set
> +# CONFIG_DEFAULT_COMPRESSION_LZO is not set
> +CONFIG_DEFAULT_COMPRESSION_NONE=y
> +CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
> +CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW_MENU=y
> +CONFIG_DEFAULT_ENVIRONMENT_PATH="$(objtree)/.ptxdist-defaultenv"
> +# CONFIG_BAREBOXENV_TARGET is not set
> +# CONFIG_BAREBOXCRC32_TARGET is not set
> +CONFIG_POLLER=y
> +# CONFIG_STATE is not set
> +# CONFIG_BOOTCHOOSER is not set
> +CONFIG_RESET_SOURCE=y
> +# end of General Settings
> +
> +#
> +# Debugging
> +#
> +CONFIG_COMPILE_LOGLEVEL=6
> +CONFIG_DEFAULT_LOGLEVEL=7
> +# CONFIG_DEBUG_LL is not set
> +# CONFIG_DEBUG_INITCALLS is not set
> +# CONFIG_PBL_BREAK is not set
> +# CONFIG_UBSAN is not set
> +CONFIG_UBSAN_ALIGNMENT=y
> +# end of Debugging
> +
> +CONFIG_HAS_DEBUG_LL=y
> +CONFIG_COMMAND_SUPPORT=y
> +CONFIG_COMPILE_HASH=y
> +
> +#
> +# Commands
> +#
> +
> +#
> +# Information
> +#
> +CONFIG_CMD_ARM_CPUINFO=y
> +CONFIG_CMD_DEVINFO=y
> +CONFIG_CMD_DMESG=y
> +CONFIG_CMD_DRVINFO=y
> +CONFIG_CMD_HELP=y
> +CONFIG_LONGHELP=y
> +CONFIG_CMD_IOMEM=y
> +CONFIG_CMD_IMD=y
> +CONFIG_CMD_MEMINFO=y
> +CONFIG_CMD_ARM_MMUINFO=y
> +CONFIG_CMD_REGULATOR=y
> +CONFIG_CMD_VERSION=y
> +CONFIG_CMD_MMC=y
> +# CONFIG_CMD_MMC_EXTCSD is not set
> +# end of Information
> +
> +#
> +# Boot
> +#
> +CONFIG_CMD_BOOT=y
> +CONFIG_CMD_BOOTM=y
> +# CONFIG_CMD_BOOTU is not set
> +# CONFIG_CMD_BOOTZ is not set
> +CONFIG_CMD_GO=y
> +# CONFIG_CMD_LOADB is not set
> +# CONFIG_CMD_LOADS is not set
> +# CONFIG_CMD_LOADY is not set
> +CONFIG_CMD_RESET=y
> +CONFIG_CMD_UIMAGE=y
> +# end of Boot
> +
> +#
> +# Partition
> +#
> +CONFIG_CMD_PARTITION=y
> +CONFIG_CMD_AUTOMOUNT=y
> +CONFIG_CMD_MOUNT=y
> +CONFIG_CMD_UMOUNT=y
> +# end of Partition
> +
> +#
> +# Environment
> +#
> +CONFIG_CMD_NV=y
> +CONFIG_CMD_EXPORT=y
> +# CONFIG_CMD_DEFAULTENV is not set
> +CONFIG_CMD_GLOBAL=y
> +CONFIG_CMD_LOADENV=y
> +CONFIG_CMD_PRINTENV=y
> +CONFIG_CMD_MAGICVAR=y
> +CONFIG_CMD_MAGICVAR_HELP=y
> +CONFIG_CMD_SAVEENV=y
> +# end of Environment
> +
> +#
> +# File
> +#
> +CONFIG_CMD_BASENAME=y
> +CONFIG_CMD_CAT=y
> +CONFIG_CMD_CD=y
> +CONFIG_CMD_CP=y
> +# CONFIG_CMD_CMP is not set
> +CONFIG_CMD_DIGEST=y
> +CONFIG_CMD_DIRNAME=y
> +CONFIG_CMD_FILETYPE=y
> +CONFIG_CMD_LN=y
> +CONFIG_CMD_LS=y
> +CONFIG_CMD_MD5SUM=y
> +CONFIG_CMD_MKDIR=y
> +CONFIG_CMD_PWD=y
> +CONFIG_CMD_READLINK=y
> +CONFIG_CMD_RM=y
> +CONFIG_CMD_RMDIR=y
> +# CONFIG_CMD_SHA1SUM is not set
> +# CONFIG_CMD_SHA224SUM is not set
> +# CONFIG_CMD_SHA256SUM is not set
> +# CONFIG_CMD_SHA384SUM is not set
> +# CONFIG_CMD_SHA512SUM is not set
> +CONFIG_CMD_UNCOMPRESS=y
> +# end of File
> +
> +#
> +# Shell scripting
> +#
> +CONFIG_CMD_FALSE=y
> +CONFIG_CMD_GETOPT=y
> +CONFIG_CMD_LET=y
> +CONFIG_CMD_MSLEEP=y
> +CONFIG_CMD_READF=y
> +CONFIG_CMD_SLEEP=y
> +CONFIG_CMD_TEST=y
> +CONFIG_CMD_TRUE=y
> +# end of Shell scripting
> +
> +#
> +# Network
> +#
> +CONFIG_CMD_DHCP=y
> +CONFIG_CMD_HOST=y
> +CONFIG_NET_CMD_IFUP=y
> +CONFIG_CMD_MIITOOL=y
> +CONFIG_CMD_PING=y
> +CONFIG_CMD_TFTP=y
> +CONFIG_CMD_IP_ROUTE_GET=y
> +# end of Network
> +
> +#
> +# Console and Framebuffer interaction
> +#
> +CONFIG_CMD_CLEAR=y
> +CONFIG_CMD_ECHO=y
> +CONFIG_CMD_ECHO_E=y
> +CONFIG_CMD_EDIT=y
> +# CONFIG_CMD_LOGIN is not set
> +CONFIG_CMD_MENU=y
> +CONFIG_CMD_MENU_MANAGEMENT=y
> +CONFIG_CMD_MENUTREE=y
> +CONFIG_CMD_READLINE=y
> +CONFIG_CMD_TIMEOUT=y
> +# end of Console and Framebuffer interaction
> +
> +#
> +# Memory
> +#
> +CONFIG_CMD_CRC=y
> +CONFIG_CMD_CRC_CMP=y
> +CONFIG_CMD_MD=y
> +CONFIG_CMD_MEMCMP=y
> +CONFIG_CMD_MEMCPY=y
> +CONFIG_CMD_MEMSET=y
> +CONFIG_CMD_MEMTEST=y
> +CONFIG_CMD_MM=y
> +CONFIG_CMD_MW=y
> +# end of Memory
> +
> +#
> +# Hardware manipulation
> +#
> +CONFIG_CMD_CLK=y
> +CONFIG_CMD_DETECT=y
> +CONFIG_CMD_FLASH=y
> +CONFIG_CMD_GPIO=y
> +# CONFIG_CMD_I2C is not set
> +CONFIG_CMD_LED=y
> +CONFIG_CMD_POWEROFF=y
> +# CONFIG_CMD_SMC is not set
> +CONFIG_CMD_WD=y
> +CONFIG_CMD_WD_DEFAULT_TIMOUT=0
> +# end of Hardware manipulation
> +
> +#
> +# Miscellaneous
> +#
> +# CONFIG_CMD_2048 is not set
> +CONFIG_CMD_BAREBOX_UPDATE=y
> +# CONFIG_CMD_BLOBGEN is not set
> +# CONFIG_CMD_FIRMWARELOAD is not set
> +# CONFIG_CMD_OF_DIFF is not set
> +CONFIG_CMD_OF_DUMP=y
> +CONFIG_CMD_OF_NODE=y
> +CONFIG_CMD_OF_PROPERTY=y
> +# CONFIG_CMD_OF_DISPLAY_TIMINGS is not set
> +# CONFIG_CMD_OF_FIXUP_STATUS is not set
> +# CONFIG_CMD_OF_OVERLAY is not set
> +CONFIG_CMD_OFTREE=y
> +CONFIG_CMD_TIME=y
> +# CONFIG_CMD_DHRYSTONE is not set
> +# CONFIG_CMD_SPD_DECODE is not set
> +# CONFIG_CMD_SEED is not set
> +# end of Miscellaneous
> +# end of Commands
> +
> +CONFIG_NET=y
> +# CONFIG_NET_NFS is not set
> +CONFIG_NET_NETCONSOLE=y
> +CONFIG_NET_RESOLV=y
> +CONFIG_NET_IFUP=y
> +CONFIG_NET_DHCP=y
> +# CONFIG_NET_SNTP is not set
> +
> +#
> +# Drivers
> +#
> +CONFIG_OFTREE=y
> +CONFIG_OFTREE_MEM_GENERIC=y
> +CONFIG_DTC=y
> +CONFIG_OFDEVICE=y
> +CONFIG_OF_NET=y
> +CONFIG_OF_GPIO=y
> +CONFIG_OF_BAREBOX_DRIVERS=y
> +# CONFIG_OF_BAREBOX_ENV_IN_FS is not set
> +# CONFIG_OF_OVERLAY is not set
> +# CONFIG_AIODEV is not set
> +CONFIG_ARM_AMBA=y
> +
> +#
> +# serial drivers
> +#
> +# CONFIG_SERIAL_DEV_BUS is not set
> +# CONFIG_DRIVER_SERIAL_ARM_DCC is not set
> +# CONFIG_SERIAL_AMBA_PL011 is not set
> +CONFIG_DRIVER_SERIAL_STM32=y
> +# CONFIG_DRIVER_SERIAL_NS16550 is not set
> +# CONFIG_DRIVER_SERIAL_CADENCE is not set
> +# end of serial drivers
> +
> +CONFIG_PHYLIB=y
> +
> +#
> +# Network drivers
> +#
> +# CONFIG_DRIVER_NET_ARC_EMAC is not set
> +# CONFIG_DRIVER_NET_CALXEDA_XGMAC is not set
> +# CONFIG_DRIVER_NET_DESIGNWARE is not set
> +CONFIG_DRIVER_NET_DESIGNWARE_EQOS=y
> +CONFIG_DRIVER_NET_DESIGNWARE_STM32=y
> +# CONFIG_DRIVER_NET_DESIGNWARE_TEGRA186 is not set
> +# CONFIG_DRIVER_NET_FSL_FMAN is not set
> +# CONFIG_DRIVER_NET_KS8851_MLL is not set
> +# CONFIG_DRIVER_NET_SMC911X is not set
> +# CONFIG_DRIVER_NET_SMC91111 is not set
> +
> +#
> +# phylib
> +#
> +
> +#
> +# MII PHY device drivers
> +#
> +# CONFIG_AR8327N_PHY is not set
> +CONFIG_AT803X_PHY=y
> +# CONFIG_DAVICOM_PHY is not set
> +# CONFIG_DP83867_PHY is not set
> +# CONFIG_LXT_PHY is not set
> +# CONFIG_MARVELL_PHY is not set
> +CONFIG_MICREL_PHY=y
> +# CONFIG_NATIONAL_PHY is not set
> +# CONFIG_REALTEK_PHY is not set
> +# CONFIG_SMSC_PHY is not set
> +# CONFIG_NET_DSA_MV88E6XXX is not set
> +
> +#
> +# MII bus device drivers
> +#
> +# CONFIG_MDIO_BITBANG is not set
> +# CONFIG_MDIO_BUS_MUX_GPIO is not set
> +# end of phylib
> +# end of Network drivers
> +
> +#
> +# SPI drivers
> +#
> +# CONFIG_SPI is not set
> +# end of SPI drivers
> +
> +CONFIG_I2C=y
> +
> +#
> +# I2C Hardware Bus support
> +#
> +# CONFIG_I2C_GPIO is not set
> +# CONFIG_I2C_DESIGNWARE is not set
> +# CONFIG_I2C_MV64XXX is not set
> +CONFIG_I2C_STM32=y
> +# end of I2C Hardware Bus support
> +
> +# CONFIG_I2C_MUX is not set
> +# CONFIG_MTD is not set
> +CONFIG_DISK=y
> +CONFIG_DISK_WRITE=y
> +
> +#
> +# drive types
> +#
> +# CONFIG_DISK_ATA is not set
> +# CONFIG_DISK_AHCI is not set
> +
> +#
> +# interface types
> +#
> +# CONFIG_DISK_INTF_PLATFORM_IDE is not set
> +# CONFIG_USB_HOST is not set
> +# CONFIG_USB_GADGET is not set
> +# CONFIG_USB_MUSB is not set
> +# CONFIG_VIDEO is not set
> +CONFIG_MCI=y
> +
> +#
> +# --- Feature list ---
> +#
> +CONFIG_MCI_STARTUP=y
> +CONFIG_MCI_INFO=y
> +CONFIG_MCI_WRITE=y
> +# CONFIG_MCI_MMC_BOOT_PARTITIONS is not set
> +
> +#
> +# --- MCI host drivers ---
> +#
> +# CONFIG_MCI_DW is not set
> +# CONFIG_MCI_MMCI is not set
> +# CONFIG_MCI_ARASAN is not set
> +CONFIG_MCI_STM32_SDMMC2=y
> +CONFIG_HAVE_CLK=y
> +CONFIG_CLKDEV_LOOKUP=y
> +CONFIG_COMMON_CLK=y
> +CONFIG_COMMON_CLK_OF_PROVIDER=y
> +
> +#
> +# Clocksource
> +#
> +CONFIG_CLOCKSOURCE_DUMMY_RATE=1000
> +CONFIG_CLOCKSOURCE_ARMV8_TIMER=y
> +# CONFIG_CLOCKSOURCE_DW_APB_TIMER is not set
> +# end of Clocksource
> +
> +#
> +# MFD
> +#
> +# CONFIG_MFD_ACT8846 is not set
> +# CONFIG_MFD_DA9053 is not set
> +# CONFIG_MFD_DA9063 is not set
> +# CONFIG_MFD_LP3972 is not set
> +# CONFIG_MFD_MC13XXX is not set
> +# CONFIG_MFD_MC34704 is not set
> +# CONFIG_MFD_MC9SDZ60 is not set
> +# CONFIG_MFD_STMPE is not set
> +CONFIG_MFD_SYSCON=y
> +# CONFIG_MFD_TWL4030 is not set
> +# CONFIG_MFD_TWL6030 is not set
> +CONFIG_MFD_STPMIC1=y
> +# CONFIG_FINTEK_SUPERIO is not set
> +# CONFIG_SMSC_SUPERIO is not set
> +# end of MFD
> +
> +#
> +# Misc devices
> +#
> +# CONFIG_JTAG is not set
> +# CONFIG_SRAM is not set
> +CONFIG_DEV_MEM=y
> +# CONFIG_UBOOTVAR is not set
> +# end of Misc devices
> +
> +CONFIG_LED=y
> +CONFIG_LED_GPIO=y
> +CONFIG_LED_GPIO_OF=y
> +# CONFIG_LED_GPIO_RGB is not set
> +# CONFIG_LED_GPIO_BICOLOR is not set
> +# CONFIG_LED_TRIGGERS is not set
> +# CONFIG_LED_PCA955X is not set
> +
> +#
> +# EEPROM support
> +#
> +# CONFIG_EEPROM_AT24 is not set
> +# end of EEPROM support
> +
> +#
> +# Input device support
> +#
> +# CONFIG_KEYBOARD_GPIO is not set
> +# CONFIG_KEYBOARD_QT1070 is not set
> +# CONFIG_INPUT_SPECIALKEYS is not set
> +# end of Input device support
> +
> +CONFIG_WATCHDOG=y
> +CONFIG_WATCHDOG_POLLER=y
> +# CONFIG_WATCHDOG_DW is not set
> +CONFIG_STM32_IWDG_WATCHDOG=y
> +# CONFIG_STPMIC1_WATCHDOG is not set
> +# CONFIG_PWM is not set
> +# CONFIG_HWRNG is not set
> +
> +#
> +# DMA support
> +#
> +# end of DMA support
> +
> +CONFIG_GPIOLIB=y
> +
> +#
> +# GPIO
> +#
> +# CONFIG_GPIO_GENERIC_PLATFORM is not set
> +# CONFIG_GPIO_PCA953X is not set
> +# CONFIG_GPIO_PCF857X is not set
> +# CONFIG_GPIO_PL061 is not set
> +# CONFIG_GPIO_DESIGNWARE is not set
> +# CONFIG_GPIO_SX150X is not set
> +# end of GPIO
> +
> +# CONFIG_W1 is not set
> +
> +#
> +# Pin controllers
> +#
> +CONFIG_PINCTRL=y
> +# CONFIG_PINCTRL_SINGLE is not set
> +CONFIG_PINCTRL_STM32=y
> +# end of Pin controllers
> +
> +CONFIG_NVMEM=y
> +# CONFIG_NVMEM_SNVS_LPGPR is not set
> +CONFIG_STM32_BSEC=y
> +
> +#
> +# Bus devices
> +#
> +# end of Bus devices
> +
> +CONFIG_REGULATOR=y
> +CONFIG_REGULATOR_FIXED=y
> +CONFIG_REGULATOR_STPMIC1=y
> +# CONFIG_REGULATOR_ANATOP is not set
> +
> +#
> +# Remoteproc drivers
> +#
> +# CONFIG_REMOTEPROC is not set
> +# end of Remoteproc drivers
> +
> +CONFIG_ARCH_HAS_RESET_CONTROLLER=y
> +CONFIG_RESET_CONTROLLER=y
> +# CONFIG_RESET_IMX7 is not set
> +CONFIG_RESET_STM32=y
> +# CONFIG_RTC_CLASS is not set
> +
> +#
> +# Firmware Drivers
> +#
> +# end of Firmware Drivers
> +
> +# CONFIG_GENERIC_PHY is not set
> +# CONFIG_CRYPTO_HW is not set
> +
> +#
> +# Memory controller drivers
> +#
> +# end of Memory controller drivers
> +
> +#
> +# i.MX SoC drivers
> +#
> +# end of i.MX SoC drivers
> +
> +#
> +# NVME Support
> +#
> +# end of NVME Support
> +# end of Drivers
> +
> +#
> +# Filesystem support
> +#
> +CONFIG_FS=y
> +CONFIG_FS_LEGACY=y
> +
> +#
> +# Some selected filesystems still use the legacy FS API.
> +#
> +
> +#
> +# Consider updating them.
> +#
> +CONFIG_FS_AUTOMOUNT=y
> +# CONFIG_FS_CRAMFS is not set
> +CONFIG_FS_EXT4=y
> +CONFIG_FS_RAMFS=y
> +CONFIG_FS_DEVFS=y
> +CONFIG_FS_TFTP=y
> +CONFIG_FS_NFS=y
> +CONFIG_FS_FAT=y
> +CONFIG_FS_FAT_WRITE=y
> +CONFIG_FS_FAT_LFN=y
> +# CONFIG_FS_BPKFS is not set
> +# CONFIG_FS_UIMAGEFS is not set
> +# CONFIG_FS_PSTORE is not set
> +# CONFIG_FS_SQUASHFS is not set
> +
> +#
> +# ZLIB support disabled
> +#
> +
> +#
> +# LZ4 support disabled
> +#
> +
> +#
> +# LZO support disabled
> +#
> +
> +#
> +# XZ support disabled
> +#
> +
> +#
> +# ZSTD support disabled
> +#
> +# end of Filesystem support
> +
> +#
> +# Library routines
> +#
> +CONFIG_PARAMETER=y
> +CONFIG_UNCOMPRESS=y
> +CONFIG_ZLIB=y
> +# CONFIG_BZLIB is not set
> +# CONFIG_LZ4_DECOMPRESS is not set
> +# CONFIG_ZSTD_DECOMPRESS is not set
> +# CONFIG_XZ_DECOMPRESS is not set
> +# CONFIG_BASE64 is not set
> +CONFIG_PROCESS_ESCAPE_SEQUENCE=y
> +CONFIG_LZO_DECOMPRESS=y
> +CONFIG_FNMATCH=y
> +CONFIG_QSORT=y
> +# CONFIG_RATP is not set
> +# CONFIG_ALLOW_PRNG_FALLBACK is not set
> +# CONFIG_CRC_CCITT is not set
> +CONFIG_CRC8=y
> +
> +#
> +# Library gui routines
> +#
> +# end of Library gui routines
> +
> +# CONFIG_BAREBOX_LOGO is not set
> +CONFIG_PRINTF_UUID=y
> +# CONFIG_NLS is not set
> +# CONFIG_BLOBGEN is not set
> +CONFIG_ARCH_HAS_STACK_DUMP=y
> +CONFIG_ARCH_HAS_DATA_ABORT_MASK=y
> +# end of Library routines
> +
> +#
> +# Crypto support
> +#
> +CONFIG_CRC32=y
> +CONFIG_DIGEST=y
> +CONFIG_MD5=y
> +# CONFIG_DIGEST_CRC32_GENERIC is not set
> +CONFIG_DIGEST_MD5_GENERIC=y
> +# CONFIG_DIGEST_SHA1_GENERIC is not set
> +# CONFIG_DIGEST_SHA224_GENERIC is not set
> +# CONFIG_DIGEST_SHA256_GENERIC is not set
> +# CONFIG_DIGEST_SHA384_GENERIC is not set
> +# CONFIG_DIGEST_SHA512_GENERIC is not set
> +# CONFIG_DIGEST_HMAC_GENERIC is not set
> +# CONFIG_DIGEST_SHA1_ARM is not set
> +# CONFIG_DIGEST_SHA256_ARM is not set
> +# CONFIG_CRYPTO_KEYSTORE is not set
> +# end of Crypto support
> +
> +#
> +# Firmware files
> +#
> +CONFIG_EXTRA_FIRMWARE_DIR="firmware"
> +# end of Firmware files
> +
> +#
> +# Host Tools
> +#
> +# CONFIG_COMPILE_HOST_TOOLS is not set
> +# end of Host Tools
> diff --git a/configs/platform-v7a/barebox-stm32mp.config.diff b/configs/platform-v7a/barebox-stm32mp.config.diff
> new file mode 100644
> index 000000000000..ae685bc0303f
> --- /dev/null
> +++ b/configs/platform-v7a/barebox-stm32mp.config.diff
> @@ -0,0 +1,147 @@
> +3535341c60838c5a3a5b02da35648d4a
> +# CONFIG_ARCH_BCM283X is not set
> +CONFIG_ARCH_HAS_RESET_CONTROLLER=y
> +CONFIG_ARCH_NR_GPIO=416
> +CONFIG_ARCH_STM32MP157=y
> +CONFIG_ARCH_STM32MP=y
> +# CONFIG_ARCH_TEXT_BASE is undefined
> +CONFIG_ARM_ASM_UNIFIED=y
> +CONFIG_ARM_BOARD_APPEND_ATAG=y
> +# CONFIG_ARM_BOARD_PREPEND_ATAG is not set
> +CONFIG_ARM_PSCI_CLIENT=y
> +CONFIG_ARM_PSCI_OF=y
> +# CONFIG_ARM_SECURE_MONITOR is undefined
> +CONFIG_ARM_USE_COMPRESSED_DTB=y
> +CONFIG_AT803X_PHY=y
> +# CONFIG_BOARD_ARM_GENERIC_DT is not set
> +CONFIG_BOOTM_INITRD=y
> +CONFIG_BOOTM_OFTREE_UIMAGE=y
> +# CONFIG_BZLIB is not set
> +# CONFIG_CLOCKSOURCE_BCM283X is undefined
> +# CONFIG_CMD_BOOTZ is not set
> +# CONFIG_CMD_DEFAULTENV is not set
> +# CONFIG_CMD_I2C is not set
> +# CONFIG_CMD_LED_TRIGGER is undefined
> +CONFIG_CMD_MENU_MANAGEMENT=y
> +CONFIG_CMD_MIITOOL=y
> +CONFIG_CMD_POWEROFF=y
> +# CONFIG_CMD_SHA1SUM is not set
> +# CONFIG_CMD_SPI is undefined
> +# CONFIG_CMD_STATE is undefined
> +# CONFIG_CMD_USB is undefined
> +# CONFIG_CMD_USBGADGET is undefined
> +CONFIG_COMMON_CLK_OF_PROVIDER=y
> +CONFIG_COMPILE_LOGLEVEL=6
> +# CONFIG_CONSOLE_ACTIVATE_FIRST is not set
> +CONFIG_CONSOLE_ACTIVATE_NONE=y
> +CONFIG_CRC8=y
> +# CONFIG_DEFAULT_COMPRESSION_BZIP2 is undefined
> +# CONFIG_DEFAULT_COMPRESSION_XZ is undefined
> +CONFIG_DEFAULT_LOGLEVEL=7
> +# CONFIG_DIGEST_SHA1_GENERIC is not set
> +# CONFIG_DRIVER_CFI is undefined
> +CONFIG_DRIVER_NET_DESIGNWARE_EQOS=y
> +CONFIG_DRIVER_NET_DESIGNWARE_STM32=y
> +# CONFIG_DRIVER_NET_DESIGNWARE_TEGRA186 is not set
> +# CONFIG_DRIVER_NET_ENC28J60 is undefined
> +# CONFIG_DRIVER_NET_MICREL is undefined
> +CONFIG_DRIVER_SERIAL_STM32=y
> +# CONFIG_DRIVER_SPI_GPIO is undefined
> +# CONFIG_EEPROM_AT25 is undefined
> +# CONFIG_FILE_LIST is undefined
> +# CONFIG_FIRMWARE_ALTERA_SERIAL is undefined
> +# CONFIG_GPIO_74164 is undefined
> +# CONFIG_GPIO_RASPBERRYPI_EXP is undefined
> +# CONFIG_HWRNG is not set
> +# CONFIG_I2C_ALGOBIT is undefined
> +# CONFIG_I2C_GPIO is not set
> +CONFIG_I2C_STM32=y
> +# CONFIG_KEYBOARD_USB is undefined
> +# CONFIG_LED_TRIGGERS is not set
> +# CONFIG_LIBFDT is undefined
> +# CONFIG_MACHINE_ID is undefined
> +# CONFIG_MACH_RPI2 is undefined
> +# CONFIG_MACH_RPI3 is undefined
> +# CONFIG_MACH_RPI is undefined
> +# CONFIG_MACH_RPI_CM3 is undefined
> +# CONFIG_MACH_RPI_COMMON is undefined
> +CONFIG_MACH_STM32MP157C_DK2=y
> +# CONFIG_MCI_BCM283X is undefined
> +# CONFIG_MCI_BCM283X_SDHOST is undefined
> +# CONFIG_MCI_MMCI is not set
> +# CONFIG_MCI_SPI is undefined
> +CONFIG_MCI_STM32_SDMMC2=y
> +CONFIG_MFD_STPMIC1=y
> +CONFIG_MFD_SYSCON=y
> +CONFIG_MICREL_PHY=y
> +# CONFIG_MTD is not set
> +# CONFIG_MTD_CONCAT is undefined
> +# CONFIG_MTD_DATAFLASH is undefined
> +# CONFIG_MTD_DOCG3 is undefined
> +# CONFIG_MTD_M25P80 is undefined
> +# CONFIG_MTD_MTDRAM is undefined
> +# CONFIG_MTD_OOB_DEVICE is undefined
> +# CONFIG_MTD_PEB_DEBUG is undefined
> +# CONFIG_MTD_RAW_DEVICE is undefined
> +# CONFIG_MTD_SPI_NOR is undefined
> +# CONFIG_MTD_UBI is undefined
> +# CONFIG_MTD_WRITE is undefined
> +# CONFIG_NAND is undefined
> +CONFIG_NET_NETCONSOLE=y

Is this needed?

> +# CONFIG_NET_NFS is not set
> +# CONFIG_NET_USB is undefined
> +# CONFIG_NET_USB_ASIX is undefined
> +# CONFIG_NET_USB_SMSC95XX is undefined
> +CONFIG_NVMEM=y
> +# CONFIG_NVMEM_SNVS_LPGPR is not set
> +CONFIG_PARTITION_DISK_EFI=y
> +# CONFIG_PARTITION_DISK_EFI_GPT_COMPARE is not set
> +# CONFIG_PARTITION_DISK_EFI_GPT_NO_FORCE is not set
> +CONFIG_PBL_CONSOLE=y
> +# CONFIG_PINCTRL_BCM283X is undefined
> +CONFIG_PINCTRL_STM32=y
> +CONFIG_PRINTF_UUID=y
> +CONFIG_PROMPT="barebox:"
> +# CONFIG_REGULATOR_ANATOP is not set
> +# CONFIG_REGULATOR_BCM283X is undefined
> +CONFIG_REGULATOR_FIXED=y
> +CONFIG_REGULATOR_STPMIC1=y
> +CONFIG_RESET_CONTROLLER=y
> +# CONFIG_RESET_IMX7 is not set
> +CONFIG_RESET_STM32=y
> +# CONFIG_SHA1 is undefined
> +# CONFIG_SPI is not set
> +# CONFIG_SPI_MEM is undefined
> +# CONFIG_STATE is not set
> +# CONFIG_STATE_BACKWARD_COMPATIBLE is undefined
> +# CONFIG_STATE_CRYPTO is undefined
> +# CONFIG_STATE_DRV is undefined
> +CONFIG_STM32_BSEC=y
> +CONFIG_STM32_IWDG_WATCHDOG=y
> +# CONFIG_STPMIC1_WATCHDOG is not set
> +CONFIG_THUMB2_BAREBOX=y
> +# CONFIG_USB is undefined
> +# CONFIG_USBGADGET_START is undefined
> +# CONFIG_USB_DWC2_HOST is undefined
> +# CONFIG_USB_DWC3 is undefined
> +# CONFIG_USB_EHCI is undefined
> +# CONFIG_USB_GADGET is not set
> +# CONFIG_USB_GADGET_AUTOSTART is undefined
> +# CONFIG_USB_GADGET_DFU is undefined
> +# CONFIG_USB_GADGET_FASTBOOT is undefined
> +# CONFIG_USB_GADGET_FASTBOOT_SPARSE is undefined
> +# CONFIG_USB_GADGET_SERIAL is undefined
> +# CONFIG_USB_HOST is not set
> +# CONFIG_USB_HUB_USB251XB is undefined
> +# CONFIG_USB_STORAGE is undefined
> +# CONFIG_USB_ULPI is undefined
> +# CONFIG_USB_XHCI is undefined
> +# CONFIG_WATCHDOG_BCM2835 is undefined
> +CONFIG_WATCHDOG_POLLER=y
> +# CONFIG_XZ_DECOMPRESS is not set
> +# CONFIG_XZ_DEC_ARM is undefined
> +# CONFIG_XZ_DEC_ARMTHUMB is undefined
> +# CONFIG_XZ_DEC_IA64 is undefined
> +# CONFIG_XZ_DEC_POWERPC is undefined
> +# CONFIG_XZ_DEC_SPARC is undefined
> +# CONFIG_XZ_DEC_X86 is undefined
> diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
> index 3a0bab50c4ee..f468a77e4f96 100644
> --- a/configs/platform-v7a/platformconfig
> +++ b/configs/platform-v7a/platformconfig
> @@ -173,6 +173,7 @@ PTXCONF_BAREBOX_AM335X_MLO=y
>  PTXCONF_BAREBOX_AM335X=y
>  PTXCONF_BAREBOX_MX6=y
>  PTXCONF_BAREBOX_RPI2=y
> +PTXCONF_BAREBOX_STM32MP=y
>  PTXCONF_BAREBOX_VEXPRESS=y
>  PTXCONF_BAREBOX_ARCH_STRING="arm"
>  # PTXCONF_BAREBOX is not set
> diff --git a/configs/platform-v7a/platforms/barebox-stm32mp.in b/configs/platform-v7a/platforms/barebox-stm32mp.in
> new file mode 100644
> index 000000000000..6fc59546d8f4
> --- /dev/null
> +++ b/configs/platform-v7a/platforms/barebox-stm32mp.in
> @@ -0,0 +1,8 @@
> +## SECTION=bootloader
> +
> +config BAREBOX_STM32MP
> +	tristate
> +	prompt "Barebox (stm32mp)"
> +	select BAREBOX_COMMON
> +	help
> +	  Barebox image for STM32MP
> diff --git a/configs/platform-v7a/rules/barebox-stm32mp.make b/configs/platform-v7a/rules/barebox-stm32mp.make
> new file mode 100644
> index 000000000000..962409696483
> --- /dev/null
> +++ b/configs/platform-v7a/rules/barebox-stm32mp.make
> @@ -0,0 +1,107 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2017 by Sascha Hauer <s.hauer@pengutronix.de>

Very humble of you to give credit to someone else :)

> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_BAREBOX_STM32MP) += barebox-stm32mp
> +
> +#
> +# Paths and names
> +#
> +BAREBOX_STM32MP_VERSION		:= $(call remove_quotes,$(PTXCONF_BAREBOX_COMMON_VERSION))
> +BAREBOX_STM32MP_MD5		:= $(call remove_quotes,$(PTXCONF_BAREBOX_COMMON_MD5))
> +BAREBOX_STM32MP			:= barebox-$(BAREBOX_STM32MP_VERSION)
> +BAREBOX_STM32MP_SUFFIX		:= tar.bz2
> +BAREBOX_STM32MP_DIR		:= $(BUILDDIR)/barebox-stm32mp-$(BAREBOX_STM32MP_VERSION)
> +BAREBOX_STM32MP_CONFIG		:= $(call ptx/in-platformconfigdir, barebox-stm32mp.config)
> +BAREBOX_STM32MP_REF_CONFIG	:= $(call ptx/in-platformconfigdir, barebox.config)
> +BAREBOX_STM32MP_LICENSE		:= GPL-2.0
> +BAREBOX_STM32MP_URL		:= $(call barebox-url, BAREBOX_STM32MP)
> +BAREBOX_STM32MP_SOURCE		:= $(SRCDIR)/$(BAREBOX_STM32MP).$(BAREBOX_STM32MP_SUFFIX)
> +
> +# ----------------------------------------------------------------------------
> +# Prepare
> +# ----------------------------------------------------------------------------
> +
> +BAREBOX_STM32MP_WRAPPER_BLACKLIST := \
> +	TARGET_HARDEN_RELRO \
> +	TARGET_HARDEN_BINDNOW \
> +	TARGET_HARDEN_PIE \
> +	TARGET_DEBUG \
> +	TARGET_BUILD_ID
> +
> +BAREBOX_STM32MP_CONF_ENV := KCONFIG_NOTIMESTAMP=1
> +BAREBOX_STM32MP_CONF_OPT := $(call barebox-opts, BAREBOX_STM32MP)
> +
> +BAREBOX_STM32MP_MAKE_ENV := $(BAREBOX_STM32MP_CONF_ENV)
> +BAREBOX_STM32MP_MAKE_OPT := $(BAREBOX_STM32MP_CONF_OPT)
> +
> +BAREBOX_STM32MP_IMAGES := \
> +	images/barebox-stm32mp157c-dk2.img
> +
> +BAREBOX_STM32MP_IMAGES := $(addprefix $(BAREBOX_STM32MP_DIR)/,$(BAREBOX_STM32MP_IMAGES))
> +
> +ifdef PTXCONF_BAREBOX_STM32MP
> +$(BAREBOX_STM32MP_CONFIG):
> +	@echo
> +	@echo "****************************************************************************"
> +	@echo " Please generate a bareboxconfig with 'ptxdist menuconfig barebox-stm32mp'"
> +	@echo "****************************************************************************"
> +	@echo
> +	@echo
> +	@exit 1
> +endif
> +
> +$(STATEDIR)/barebox-stm32mp.prepare: $(BAREBOX_STM32MP_CONFIG)
> +	@$(call targetinfo)
> +	@rm -f "$(BAREBOX_STM32MP_DIR)/.ptxdist-defaultenv"
> +	@ln -s "$(call ptx/in-platformconfigdir, barebox-stm32mp-defaultenv)" \
> +		"$(BAREBOX_STM32MP_DIR)/.ptxdist-defaultenv"
> +	@$(call world/prepare, BAREBOX_STM32MP)
> +	@$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/barebox-stm32mp.install:
> +	@$(call targetinfo)
> +	@$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Targetinstall
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/barebox-stm32mp.targetinstall:
> +	@$(call targetinfo)
> +	@$(foreach image, $(BAREBOX_STM32MP_IMAGES), \
> +		install -m 644 \
> +			$(image) $(IMAGEDIR)/$(notdir $(image));)
> +	@$(call touch)
> +
> +# ----------------------------------------------------------------------------
> +# Clean
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/barebox-stm32mp.clean:
> +	@$(call targetinfo)
> +	@$(call clean_pkg, BAREBOX_STM32MP)
> +	@$(foreach image, $(BAREBOX_STM32MP_IMAGES), \
> +		rm -fv $(IMAGEDIR)/$(notdir $(image))-stm32mp;)
> +
> +# ----------------------------------------------------------------------------
> +# oldconfig / menuconfig
> +# ----------------------------------------------------------------------------
> +
> +barebox-stm32mp_oldconfig barebox-stm32mp_menuconfig barebox-stm32mp_nconfig: $(STATEDIR)/barebox-stm32mp.extract
> +	@$(call world/kconfig, BAREBOX_STM32MP, $(subst barebox-stm32mp_,,$@))
> +
> +# vim: syntax=make
> -- 
> 2.25.0
> 
> 
> _______________________________________________
> DistroKit mailing list
> DistroKit@pengutronix.de
> 

-- 
Roland Hieber, Pengutronix e.K.          | r.hieber@pengutronix.de     |
Steuerwalder Str. 21                     | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686         | Fax:   +49-5121-206917-5555 |

_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [DistroKit] [PATCH 2/6] v7a: barebox: add new stm32mp rule
  2020-03-03  9:43   ` Roland Hieber
@ 2020-03-03  9:54     ` Ahmad Fatoum
  0 siblings, 0 replies; 18+ messages in thread
From: Ahmad Fatoum @ 2020-03-03  9:54 UTC (permalink / raw)
  To: Roland Hieber; +Cc: distrokit

Hi,

On 3/3/20 10:43 AM, Roland Hieber wrote:
> On Mon, Mar 02, 2020 at 12:03:52PM +0100, Ahmad Fatoum wrote:
>> Since v2019.12.0, barebox now has SD/MMC and Ethernet support for the
>> STM32MP1.  Thus there is nothing holding us back from extending
>> DistroKit's v7a platform to support the SoC. Add a barebox-stm32mp
>> rule as first step.
>>
>> The barebox rule add here is only meant as second-stage bootloader
>> (SSBL). First-stage (FSBL) will be TF-A introduced in a later patch.
>>
>> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> ---

>> +CONFIG_NET_NETCONSOLE=y
> 
> Is this needed?

It's enabled in most other DistroKit barebox configs as well. I've never
used it myself, but we don't exactly have a size limitation, so I don't
think it hurts.

>> +++ b/configs/platform-v7a/rules/barebox-stm32mp.make
>> @@ -0,0 +1,107 @@
>> +# -*-makefile-*-
>> +#
>> +# Copyright (C) 2017 by Sascha Hauer <s.hauer@pengutronix.de>
> 
> Very humble of you to give credit to someone else :)

I trust Sascha's judgement on how to deal with infringements on my modifications
to his base rule. ;-)

Cheers,
Ahmad

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [DistroKit] [PATCH 6/6] v7a: add stm32mp157c-dk2 SD-Card image
  2020-03-02 11:03 ` [DistroKit] [PATCH 6/6] v7a: add stm32mp157c-dk2 SD-Card image Ahmad Fatoum
@ 2020-03-03 12:08   ` Roland Hieber
  2020-03-05 16:46     ` Robert Schwebel
  2020-03-05 16:46   ` Robert Schwebel
  1 sibling, 1 reply; 18+ messages in thread
From: Roland Hieber @ 2020-03-03 12:08 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: distrokit

On Mon, Mar 02, 2020 at 12:03:56PM +0100, Ahmad Fatoum wrote:
> Both STM32MP BootROM and TF-A expect the subsequent bootloader stage to
> come from a GPT partition when booting from SD-Card.
> Add a genimage config that describes this.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  .../platform-v7a/config/images/stm32mp.config | 31 +++++++++++++++
>  configs/platform-v7a/platformconfig           |  4 +-
>  .../platforms/blspec-stm32mp157c-dk2.in       |  5 +++
>  .../platforms/image-stm32mp157c-dk2.in        | 11 ++++++
>  .../loader/entries/stm32mp157c-dk2.conf       |  6 +++
>  .../rules/blspec-stm32mp157c-dk2.make         | 36 ++++++++++++++++++
>  .../rules/image-stm32mp157c-dk2.make          | 38 +++++++++++++++++++
>  7 files changed, 130 insertions(+), 1 deletion(-)
>  create mode 100644 configs/platform-v7a/config/images/stm32mp.config
>  create mode 100644 configs/platform-v7a/platforms/blspec-stm32mp157c-dk2.in
>  create mode 100644 configs/platform-v7a/platforms/image-stm32mp157c-dk2.in
>  create mode 100644 configs/platform-v7a/projectroot/loader/entries/stm32mp157c-dk2.conf
>  create mode 100644 configs/platform-v7a/rules/blspec-stm32mp157c-dk2.make
>  create mode 100644 configs/platform-v7a/rules/image-stm32mp157c-dk2.make
> 
> diff --git a/configs/platform-v7a/config/images/stm32mp.config b/configs/platform-v7a/config/images/stm32mp.config
> new file mode 100644
> index 000000000000..0b9cfe888791
> --- /dev/null
> +++ b/configs/platform-v7a/config/images/stm32mp.config
> @@ -0,0 +1,31 @@
> +image @IMAGE@ {
> +	hdimage {
> +		align = 1M
> +		gpt = "true"
> +	}
> +	partition fsbl1 {
> +		image = "tf-a-@STM32MP_BOARD@.stm32"
> +		size = 256K
> +	}
> +	partition fsbl2 {
> +		image = "tf-a-@STM32MP_BOARD@.stm32"
> +		size = 256K
> +	}
> +	partition ssbl {
> +		image = "barebox-@STM32MP_BOARD@.img"
> +		size = 1M
> +	}
> +	partition barebox-environment {
> +		size = 1M
> +	}
> +	partition root {
> +		image = root.ext2
> +		partition-type = 0x83
> +		size = 512M
> +	}
> +	partition data {
> +		partition-type = 0x83
> +		size = 100M
> +	}
> +}
> +/* vim: set tabstop=8 noexpandtab : */
> diff --git a/configs/platform-v7a/platformconfig b/configs/platform-v7a/platformconfig
> index 02111f2750d7..d4dbc9a47b6f 100644
> --- a/configs/platform-v7a/platformconfig
> +++ b/configs/platform-v7a/platformconfig
> @@ -143,7 +143,7 @@ PTXCONF_KERNEL_EXTRA_MAKEVARS=""
>  PTXCONF_DTC=y
>  PTXCONF_DTC_INSTALL_OFTREE=y
>  PTXCONF_DTC_OFTREE_DTS_PATH="${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts"
> -PTXCONF_DTC_OFTREE_DTS="am335x-bone.dts am335x-boneblack.dts vexpress-v2p-ca9.dts bcm2836-rpi-2-b.dts imx6q-sabrelite.dts imx6sx-udoo-neo-full.dts imx6dl-riotboard.dts imx6q-nitrogen6x.dts imx6qp-nitrogen6_max.dts bcm2837-rpi-3-b.dts"
> +PTXCONF_DTC_OFTREE_DTS="am335x-bone.dts am335x-boneblack.dts vexpress-v2p-ca9.dts bcm2836-rpi-2-b.dts imx6q-sabrelite.dts imx6sx-udoo-neo-full.dts imx6dl-riotboard.dts imx6q-nitrogen6x.dts imx6qp-nitrogen6_max.dts bcm2837-rpi-3-b.dts stm32mp157c-dk2.dts"
>  PTXCONF_DTC_EXTRA_ARGS=""
>  PTXCONF_HOST_DTC=y
>  PTXCONF_HOST_DTC_VERSION="1.5.1"
> @@ -214,6 +214,7 @@ PTXCONF_BLSPEC_RIOTBOARD=y
>  PTXCONF_BLSPEC_RPI2=y
>  PTXCONF_BLSPEC_RPI3=y
>  PTXCONF_BLSPEC_SABRELITE=y
> +PTXCONF_BLSPEC_STM32MP157C_DK2=y
>  PTXCONF_BLSPEC_UDOO_NEO=y
>  PTXCONF_BLSPEC_VEXPRESS=y
>  
> @@ -258,6 +259,7 @@ PTXCONF_IMAGE_ROOT_TGZ_LABEL=""
>  PTXCONF_IMAGE_RPI2=y
>  PTXCONF_IMAGE_RPI3=y
>  PTXCONF_IMAGE_SABRELITE=y
> +PTXCONF_IMAGE_STM32MP157C_DK2=y
>  PTXCONF_IMAGE_UDOO_NEO=y
>  PTXCONF_IMAGE_VEXPRESS_NOR=y
>  PTXCONF_IMAGE_VEXPRESS=y
> diff --git a/configs/platform-v7a/platforms/blspec-stm32mp157c-dk2.in b/configs/platform-v7a/platforms/blspec-stm32mp157c-dk2.in
> new file mode 100644
> index 000000000000..fc142950e21a
> --- /dev/null
> +++ b/configs/platform-v7a/platforms/blspec-stm32mp157c-dk2.in
> @@ -0,0 +1,5 @@
> +## SECTION=blspec
> +
> +config BLSPEC_STM32MP157C_DK2
> +	tristate
> +	prompt "/loader/entries/stm32mp157c-dk2.conf bootloader spec entry"
> diff --git a/configs/platform-v7a/platforms/image-stm32mp157c-dk2.in b/configs/platform-v7a/platforms/image-stm32mp157c-dk2.in
> new file mode 100644
> index 000000000000..d7b9c235edaa
> --- /dev/null
> +++ b/configs/platform-v7a/platforms/image-stm32mp157c-dk2.in
> @@ -0,0 +1,11 @@
> +## SECTION=image
> +
> +config IMAGE_STM32MP157C_DK2
> +	tristate
> +	select HOST_GENIMAGE
> +	select IMAGE_ROOT_EXT
> +	select BAREBOX_STM32MP
> +	select TF_A
> +	prompt "Generate images/stm32mp157c-dk2.hdimg"
> +	help
> +	  Generate GPT image for the STM32MP157C-DK2
> diff --git a/configs/platform-v7a/projectroot/loader/entries/stm32mp157c-dk2.conf b/configs/platform-v7a/projectroot/loader/entries/stm32mp157c-dk2.conf
> new file mode 100644
> index 000000000000..1fbba657bfbe
> --- /dev/null
> +++ b/configs/platform-v7a/projectroot/loader/entries/stm32mp157c-dk2.conf
> @@ -0,0 +1,6 @@
> +title		PTXdist - Pengutronix-DistroKit
> +version		5.3
> +options		rootwait rw
> +linux		/boot/zImage
> +devicetree	/boot/stm32mp157c-dk2.dtb
> +linux-appendroot true
> diff --git a/configs/platform-v7a/rules/blspec-stm32mp157c-dk2.make b/configs/platform-v7a/rules/blspec-stm32mp157c-dk2.make
> new file mode 100644
> index 000000000000..e057fa95f98c
> --- /dev/null
> +++ b/configs/platform-v7a/rules/blspec-stm32mp157c-dk2.make
> @@ -0,0 +1,36 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2017 by Sascha Hauer <s.hauer@pengutronix.de>
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_BLSPEC_STM32MP157C_DK2) += blspec-stm32mp157c-dk2
> +
> +BLSPEC_STM32MP157C_DK2_VERSION	:= 4.11
> +
> +# ----------------------------------------------------------------------------
> +# Target-Install
> +# ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/blspec-stm32mp157c-dk2.targetinstall:
> +	@$(call targetinfo)
> +
> +	@$(call install_init, blspec-stm32mp157c-dk2)
> +	@$(call install_fixup,blspec-stm32mp157c-dk2,PRIORITY,optional)
> +	@$(call install_fixup,blspec-stm32mp157c-dk2,SECTION,base)
> +	@$(call install_fixup,blspec-stm32mp157c-dk2,AUTHOR,"Sascha Hauer <s.hauer@pengutronix.de>")
> +	@$(call install_fixup,blspec-stm32mp157c-dk2,DESCRIPTION,missing)
> +
> +	@$(call install_alternative, blspec-stm32mp157c-dk2, 0, 0, 0644, \
> +		/loader/entries/stm32mp157c-dk2.conf)
> +
> +	@$(call install_finish,blspec-stm32mp157c-dk2)
> +
> +	@$(call touch)
> +
> +# vim: syntax=make
> diff --git a/configs/platform-v7a/rules/image-stm32mp157c-dk2.make b/configs/platform-v7a/rules/image-stm32mp157c-dk2.make
> new file mode 100644
> index 000000000000..d5e524646a50
> --- /dev/null
> +++ b/configs/platform-v7a/rules/image-stm32mp157c-dk2.make
> @@ -0,0 +1,38 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2017 by Sascha Hauer <s.hauer@pengutronix.de>
> +#
> +# See CREDITS for details about who has contributed to this project.

Leave these lines out, I just sent a patch for all other rules.

 - Roland

> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +IMAGE_PACKAGES-$(PTXCONF_IMAGE_STM32MP157C_DK2) += image-stm32mp157c-dk2
> +
> +IMAGE_STM32MP157C_DK2_ENV := \
> +	STM32MP_BOARD=stm32mp157c-dk2
> +
> +#
> +# Paths and names
> +#
> +IMAGE_STM32MP157C_DK2		:= image-stm32mp157c-dk2
> +IMAGE_STM32MP157C_DK2_DIR	:= $(BUILDDIR)/$(IMAGE_STM32MP157C_DK2)
> +IMAGE_STM32MP157C_DK2_IMAGE	:= $(IMAGEDIR)/stm32mp157c-dk2.hdimg
> +IMAGE_STM32MP157C_DK2_FILES	:= $(IMAGEDIR)/root.tgz
> +IMAGE_STM32MP157C_DK2_CONFIG	:= stm32mp.config
> +
> +# ----------------------------------------------------------------------------
> +# Image
> +# ----------------------------------------------------------------------------
> +
> +$(IMAGE_STM32MP157C_DK2_IMAGE):
> +	@$(call targetinfo)
> +	@$(call image/genimage, IMAGE_STM32MP157C_DK2)
> +	@$(call finish)
> +
> +# vim: syntax=make
> +
> -- 
> 2.25.0
> 
> 
> _______________________________________________
> DistroKit mailing list
> DistroKit@pengutronix.de
> 

-- 
Roland Hieber, Pengutronix e.K.          | r.hieber@pengutronix.de     |
Steuerwalder Str. 21                     | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686         | Fax:   +49-5121-206917-5555 |

_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [DistroKit] [PATCH 1/6] v7a: kernel: configure for STM32MP157 support
  2020-03-02 11:03 ` [DistroKit] [PATCH 1/6] v7a: kernel: configure for STM32MP157 support Ahmad Fatoum
@ 2020-03-05 16:43   ` Robert Schwebel
  0 siblings, 0 replies; 18+ messages in thread
From: Robert Schwebel @ 2020-03-05 16:43 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: distrokit

On Mon, Mar 02, 2020 at 12:03:51PM +0100, Ahmad Fatoum wrote:
> The STM32MP157 is an ARM SoC from STMicro with 2x Cortex-A7 cores
> as well a Cortex-M MCU. Amend kernel configuration to support this
> SoC as well as main peripherals used on the STM32MP157C-DK2 SBC.
> 
> For now, only driver for the non-video HW components are enabled.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  configs/platform-v7a/kernelconfig | 81 ++++++++++++++++++++++++++++---
>  1 file changed, 73 insertions(+), 8 deletions(-)

Applied to next.

rsc
-- 
Pengutronix e.K.                           | Dipl.-Ing. Robert Schwebel  |
Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [DistroKit] [PATCH 2/6] v7a: barebox: add new stm32mp rule
  2020-03-02 11:03 ` [DistroKit] [PATCH 2/6] v7a: barebox: add new stm32mp rule Ahmad Fatoum
  2020-03-03  9:43   ` Roland Hieber
@ 2020-03-05 16:44   ` Robert Schwebel
  1 sibling, 0 replies; 18+ messages in thread
From: Robert Schwebel @ 2020-03-05 16:44 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: distrokit

On Mon, Mar 02, 2020 at 12:03:52PM +0100, Ahmad Fatoum wrote:
> Since v2019.12.0, barebox now has SD/MMC and Ethernet support for the
> STM32MP1.  Thus there is nothing holding us back from extending
> DistroKit's v7a platform to support the SoC. Add a barebox-stm32mp
> rule as first step.
> 
> The barebox rule add here is only meant as second-stage bootloader
> (SSBL). First-stage (FSBL) will be TF-A introduced in a later patch.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  .../init/bootsource                           |   9 +
>  configs/platform-v7a/barebox-stm32mp.config   | 781 ++++++++++++++++++
>  .../platform-v7a/barebox-stm32mp.config.diff  | 147 ++++
>  configs/platform-v7a/platformconfig           |   1 +
>  .../platform-v7a/platforms/barebox-stm32mp.in |   8 +
>  .../platform-v7a/rules/barebox-stm32mp.make   | 107 +++
>  6 files changed, 1053 insertions(+)
>  create mode 100755 configs/platform-v7a/barebox-stm32mp-defaultenv/init/bootsource
>  create mode 100644 configs/platform-v7a/barebox-stm32mp.config
>  create mode 100644 configs/platform-v7a/barebox-stm32mp.config.diff
>  create mode 100644 configs/platform-v7a/platforms/barebox-stm32mp.in
>  create mode 100644 configs/platform-v7a/rules/barebox-stm32mp.make

Applied to next.

rsc
-- 
Pengutronix e.K.                           | Dipl.-Ing. Robert Schwebel  |
Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [DistroKit] [PATCH 3/6] rules: add ARM Trusted Firmware-A
  2020-03-02 11:03 ` [DistroKit] [PATCH 3/6] rules: add ARM Trusted Firmware-A Ahmad Fatoum
@ 2020-03-05 16:44   ` Robert Schwebel
  2020-03-05 17:28     ` Robert Schwebel
  0 siblings, 1 reply; 18+ messages in thread
From: Robert Schwebel @ 2020-03-05 16:44 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: distrokit, Michael Tretter

On Mon, Mar 02, 2020 at 12:03:53PM +0100, Ahmad Fatoum wrote:
> Trusted Firmware-A (TF-A) is a reference implementation of secure world
> software for Arm A-Profile architectures (Armv8-A and Armv7-A).
> 
> TF-A is used as first-stage bootloader on the STM32MP1. We'll use
> barebox for second-stage only for now, thus add a rule for TF-A.
> 
> Tested-by: Michael Tretter <m.tretter@pengutronix.de>
> Signed-off-by: Rouven Czerwinski <rouven@czerwinskis.de>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> Link: https://www.mail-archive.com/ptxdist@pengutronix.de/msg15828.html
> ---
>  configs/platform-v7a/platformconfig |   1 +
>  rules/tf-a.in                       | 140 ++++++++++++++++++++++++++++
>  rules/tf-a.make                     | 122 ++++++++++++++++++++++++
>  3 files changed, 263 insertions(+)
>  create mode 100644 rules/tf-a.in
>  create mode 100644 rules/tf-a.make

Applied to next.

rsc
-- 
Pengutronix e.K.                           | Dipl.-Ing. Robert Schwebel  |
Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [DistroKit] [PATCH 4/6] v7a: stm32mp: enable TF-A for first stage
  2020-03-02 11:03 ` [DistroKit] [PATCH 4/6] v7a: stm32mp: enable TF-A for first stage Ahmad Fatoum
@ 2020-03-05 16:45   ` Robert Schwebel
  0 siblings, 0 replies; 18+ messages in thread
From: Robert Schwebel @ 2020-03-05 16:45 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: distrokit

On Mon, Mar 02, 2020 at 12:03:54PM +0100, Ahmad Fatoum wrote:
> The STM32MP uses TF-A as first stage boot loader. Configure it
> appropriately for use.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  configs/platform-v7a/platformconfig | 18 +++++++++++++++++-
>  1 file changed, 17 insertions(+), 1 deletion(-)

Applied to next.

rsc
-- 
Pengutronix e.K.                           | Dipl.-Ing. Robert Schwebel  |
Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [DistroKit] [PATCH 5/6] datapartition: disable autoformat of non-MBR Linux partitions
  2020-03-02 11:03 ` [DistroKit] [PATCH 5/6] datapartition: disable autoformat of non-MBR Linux partitions Ahmad Fatoum
@ 2020-03-05 16:45   ` Robert Schwebel
  0 siblings, 0 replies; 18+ messages in thread
From: Robert Schwebel @ 2020-03-05 16:45 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: distrokit

On Mon, Mar 02, 2020 at 12:03:55PM +0100, Ahmad Fatoum wrote:
> The upcoming STM32MP157C-DK2 board will be the first DistroKit board
> with a GPT based image and it has barebox as partition 3, unlike the
> other boards where this is always the data partition.
> 
> This causes the data partition rule to brick the image by overwriting
> barebox.
> 
> As a temporary measure, disable the data partition auto formatting
> on GPT-images by explicitly checking for partition type 0x83 before
> starting the service. Eventually we might want to match against
> a UUID before autoformatting, or create the partition anew altogether.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  projectroot/usr/lib/udev/rules.d/91-mkfs-ext4.rules | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to next.

rsc
-- 
Pengutronix e.K.                           | Dipl.-Ing. Robert Schwebel  |
Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [DistroKit] [PATCH 6/6] v7a: add stm32mp157c-dk2 SD-Card image
  2020-03-02 11:03 ` [DistroKit] [PATCH 6/6] v7a: add stm32mp157c-dk2 SD-Card image Ahmad Fatoum
  2020-03-03 12:08   ` Roland Hieber
@ 2020-03-05 16:46   ` Robert Schwebel
  1 sibling, 0 replies; 18+ messages in thread
From: Robert Schwebel @ 2020-03-05 16:46 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: distrokit

On Mon, Mar 02, 2020 at 12:03:56PM +0100, Ahmad Fatoum wrote:
> Both STM32MP BootROM and TF-A expect the subsequent bootloader stage to
> come from a GPT partition when booting from SD-Card.
> Add a genimage config that describes this.
> 
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  .../platform-v7a/config/images/stm32mp.config | 31 +++++++++++++++
>  configs/platform-v7a/platformconfig           |  4 +-
>  .../platforms/blspec-stm32mp157c-dk2.in       |  5 +++
>  .../platforms/image-stm32mp157c-dk2.in        | 11 ++++++
>  .../loader/entries/stm32mp157c-dk2.conf       |  6 +++
>  .../rules/blspec-stm32mp157c-dk2.make         | 36 ++++++++++++++++++
>  .../rules/image-stm32mp157c-dk2.make          | 38 +++++++++++++++++++
>  7 files changed, 130 insertions(+), 1 deletion(-)
>  create mode 100644 configs/platform-v7a/config/images/stm32mp.config
>  create mode 100644 configs/platform-v7a/platforms/blspec-stm32mp157c-dk2.in
>  create mode 100644 configs/platform-v7a/platforms/image-stm32mp157c-dk2.in
>  create mode 100644 configs/platform-v7a/projectroot/loader/entries/stm32mp157c-dk2.conf
>  create mode 100644 configs/platform-v7a/rules/blspec-stm32mp157c-dk2.make
>  create mode 100644 configs/platform-v7a/rules/image-stm32mp157c-dk2.make

Applied to next.

rsc
-- 
Pengutronix e.K.                           | Dipl.-Ing. Robert Schwebel  |
Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [DistroKit] [PATCH 6/6] v7a: add stm32mp157c-dk2 SD-Card image
  2020-03-03 12:08   ` Roland Hieber
@ 2020-03-05 16:46     ` Robert Schwebel
  0 siblings, 0 replies; 18+ messages in thread
From: Robert Schwebel @ 2020-03-05 16:46 UTC (permalink / raw)
  To: Roland Hieber; +Cc: distrokit, Ahmad Fatoum

On Tue, Mar 03, 2020 at 01:08:10PM +0100, Roland Hieber wrote:
> > +# Copyright (C) 2017 by Sascha Hauer <s.hauer@pengutronix.de>
> > +#
> > +# See CREDITS for details about who has contributed to this project.
> 
> Leave these lines out, I just sent a patch for all other rules.

Could you send a follow-up patch?

rsc
-- 
Pengutronix e.K.                           | Dipl.-Ing. Robert Schwebel  |
Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de

^ permalink raw reply	[flat|nested] 18+ messages in thread

* Re: [DistroKit] [PATCH 3/6] rules: add ARM Trusted Firmware-A
  2020-03-05 16:44   ` Robert Schwebel
@ 2020-03-05 17:28     ` Robert Schwebel
  0 siblings, 0 replies; 18+ messages in thread
From: Robert Schwebel @ 2020-03-05 17:28 UTC (permalink / raw)
  To: Ahmad Fatoum; +Cc: distrokit, Michael Tretter

On Thu, Mar 05, 2020 at 05:44:40PM +0100, Robert Schwebel wrote:
> On Mon, Mar 02, 2020 at 12:03:53PM +0100, Ahmad Fatoum wrote:
> > Trusted Firmware-A (TF-A) is a reference implementation of secure world
> > software for Arm A-Profile architectures (Armv8-A and Armv7-A).
> > 
> > TF-A is used as first-stage bootloader on the STM32MP1. We'll use
> > barebox for second-stage only for now, thus add a rule for TF-A.
> > 
> > Tested-by: Michael Tretter <m.tretter@pengutronix.de>
> > Signed-off-by: Rouven Czerwinski <rouven@czerwinskis.de>
> > Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> > Link: https://www.mail-archive.com/ptxdist@pengutronix.de/msg15828.html
> > ---
> >  configs/platform-v7a/platformconfig |   1 +
> >  rules/tf-a.in                       | 140 ++++++++++++++++++++++++++++
> >  rules/tf-a.make                     | 122 ++++++++++++++++++++++++
> >  3 files changed, 263 insertions(+)
> >  create mode 100644 rules/tf-a.in
> >  create mode 100644 rules/tf-a.make
> 
> Applied to next.

While applying, I added oldconfiged platformconfigs for rpi and v8a as
well.

rsc
-- 
Pengutronix e.K.                           | Dipl.-Ing. Robert Schwebel  |
Steuerwalder Str. 21                       | https://www.pengutronix.de/ |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
DistroKit mailing list
DistroKit@pengutronix.de

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2020-03-05 17:28 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-02 11:03 [DistroKit] [PATCH 0/6] v7a: add basic STM32MP157C-DK2 support Ahmad Fatoum
2020-03-02 11:03 ` [DistroKit] [PATCH 1/6] v7a: kernel: configure for STM32MP157 support Ahmad Fatoum
2020-03-05 16:43   ` Robert Schwebel
2020-03-02 11:03 ` [DistroKit] [PATCH 2/6] v7a: barebox: add new stm32mp rule Ahmad Fatoum
2020-03-03  9:43   ` Roland Hieber
2020-03-03  9:54     ` Ahmad Fatoum
2020-03-05 16:44   ` Robert Schwebel
2020-03-02 11:03 ` [DistroKit] [PATCH 3/6] rules: add ARM Trusted Firmware-A Ahmad Fatoum
2020-03-05 16:44   ` Robert Schwebel
2020-03-05 17:28     ` Robert Schwebel
2020-03-02 11:03 ` [DistroKit] [PATCH 4/6] v7a: stm32mp: enable TF-A for first stage Ahmad Fatoum
2020-03-05 16:45   ` Robert Schwebel
2020-03-02 11:03 ` [DistroKit] [PATCH 5/6] datapartition: disable autoformat of non-MBR Linux partitions Ahmad Fatoum
2020-03-05 16:45   ` Robert Schwebel
2020-03-02 11:03 ` [DistroKit] [PATCH 6/6] v7a: add stm32mp157c-dk2 SD-Card image Ahmad Fatoum
2020-03-03 12:08   ` Roland Hieber
2020-03-05 16:46     ` Robert Schwebel
2020-03-05 16:46   ` Robert Schwebel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox