All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 0/4] Add defconfig for STM32MP157 Discovery Kit
@ 2019-04-24  9:39 Thomas Petazzoni
  2019-04-24  9:39 ` [Buildroot] [PATCH 1/4] package/genimage: bump version Thomas Petazzoni
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2019-04-24  9:39 UTC (permalink / raw)
  To: buildroot

Hello,

This set of patches add a defconfig for the STM32MP157 Discovery Kit
platform. The first three patches are preparation patches and the last
one adds the defconfig itself and its related files.

Thanks!

Thomas

Thomas Petazzoni (4):
  package/genimage: bump version
  package/genimage: add patch to support bootable flag in GPT tables
  boot/uboot: add option to pass custom variables to U-Boot build
  configs/stm32mp157_dk: new defconfig

 .gitlab-ci.yml                                |   1 +
 DEVELOPERS                                    |   2 +
 .../stm32mp157-dk/genimage.cfg                |  24 +++
 .../stm32mp157-dk/linux.config                | 182 ++++++++++++++++++
 .../overlay/boot/extlinux/extlinux.conf       |   4 +
 .../stm32mp157-dk/readme.txt                  |  38 ++++
 .../stm32mp157-dk/uboot-fragment.config       |   1 +
 boot/uboot/Config.in                          |   6 +
 boot/uboot/uboot.mk                           |   3 +-
 configs/stm32mp157_dk_defconfig               |  30 +++
 ...dd-support-for-bootable-flags-on-GPT.patch |  45 +++++
 package/genimage/genimage.hash                |   2 +-
 package/genimage/genimage.mk                  |   7 +-
 13 files changed, 340 insertions(+), 5 deletions(-)
 create mode 100644 board/stmicroelectronics/stm32mp157-dk/genimage.cfg
 create mode 100644 board/stmicroelectronics/stm32mp157-dk/linux.config
 create mode 100644 board/stmicroelectronics/stm32mp157-dk/overlay/boot/extlinux/extlinux.conf
 create mode 100644 board/stmicroelectronics/stm32mp157-dk/readme.txt
 create mode 100644 board/stmicroelectronics/stm32mp157-dk/uboot-fragment.config
 create mode 100644 configs/stm32mp157_dk_defconfig
 create mode 100644 package/genimage/0001-image-hd-add-support-for-bootable-flags-on-GPT.patch

-- 
2.20.1

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

* [Buildroot] [PATCH 1/4] package/genimage: bump version
  2019-04-24  9:39 [Buildroot] [PATCH 0/4] Add defconfig for STM32MP157 Discovery Kit Thomas Petazzoni
@ 2019-04-24  9:39 ` Thomas Petazzoni
  2019-04-24  9:39 ` [Buildroot] [PATCH 2/4] package/genimage: add patch to support bootable flag in GPT tables Thomas Petazzoni
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2019-04-24  9:39 UTC (permalink / raw)
  To: buildroot

This commit bumps the genimage version to a not yet released commit,
in order to benefit from the GPT support that was added in upstream
genimage.

Indeed, we are about to add a defconfig for the STM32MP157 Discovery
Kit platform and the STM32MP157 BootROM loads the first stage
bootloader from the GPT partitions named fsbl*, which requires a GPT
partition table.

We will of course be able to switch back to a released version once a
release that includes GPT support will have been done upstream.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/genimage/genimage.hash | 2 +-
 package/genimage/genimage.mk   | 7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/package/genimage/genimage.hash b/package/genimage/genimage.hash
index 095eb1413f..00af52486b 100644
--- a/package/genimage/genimage.hash
+++ b/package/genimage/genimage.hash
@@ -1,2 +1,2 @@
 # Locally calculated
-sha256	5a36b2c1387007c2d6535a722ee257a387d0913bddcf8a94d460e6acd4d01859	genimage-10.tar.xz
+sha256	fd19ef94a82a014178255e181af91b403be6bebf217bae4c2541dbeeb1d4e1c9  genimage-abc1c32378debaccdfb63c711de56f3a1becb84b.tar.gz
diff --git a/package/genimage/genimage.mk b/package/genimage/genimage.mk
index 393c3e9b94..35502532f9 100644
--- a/package/genimage/genimage.mk
+++ b/package/genimage/genimage.mk
@@ -4,10 +4,11 @@
 #
 ################################################################################
 
-GENIMAGE_VERSION = 10
-GENIMAGE_SOURCE = genimage-$(GENIMAGE_VERSION).tar.xz
-GENIMAGE_SITE = https://github.com/pengutronix/genimage/releases/download/v$(GENIMAGE_VERSION)
+GENIMAGE_VERSION = abc1c32378debaccdfb63c711de56f3a1becb84b
+GENIMAGE_SITE = $(call github,pengutronix,genimage,$(GENIMAGE_VERSION))
 HOST_GENIMAGE_DEPENDENCIES = host-pkgconf host-libconfuse
+# fetching from git
+GENIMAGE_AUTORECONF = YES
 GENIMAGE_LICENSE = GPL-2.0
 GENIMAGE_LICENSE_FILES = COPYING
 
-- 
2.20.1

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

* [Buildroot] [PATCH 2/4] package/genimage: add patch to support bootable flag in GPT tables
  2019-04-24  9:39 [Buildroot] [PATCH 0/4] Add defconfig for STM32MP157 Discovery Kit Thomas Petazzoni
  2019-04-24  9:39 ` [Buildroot] [PATCH 1/4] package/genimage: bump version Thomas Petazzoni
@ 2019-04-24  9:39 ` Thomas Petazzoni
  2019-04-24  9:39 ` [Buildroot] [PATCH 3/4] boot/uboot: add option to pass custom variables to U-Boot build Thomas Petazzoni
  2019-04-24  9:39 ` [Buildroot] [PATCH 4/4] configs/stm32mp157_dk: new defconfig Thomas Petazzoni
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2019-04-24  9:39 UTC (permalink / raw)
  To: buildroot

This commit adds a patch, submitted upstream, to add support for
setting the bootable flag in GPT partition tables. While we normally
don't accept feature patches in Buildroot, this one is really minimal
(two lines of code) and is in fact necessary for the STM32MP157
Discovery Kit defconfig.

Indeed, the STM32MP157 BootROM loads the first stage bootloader from
the GPT partitions named fsbl*, which requires a GPT partition
table. But then, the "U-Boot Generic Distro" mechanism identifies the
GPT partition that contains the extlinux.conf file to use thanks to
the "bootable" flag of GPT partitions.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 ...dd-support-for-bootable-flags-on-GPT.patch | 45 +++++++++++++++++++
 1 file changed, 45 insertions(+)
 create mode 100644 package/genimage/0001-image-hd-add-support-for-bootable-flags-on-GPT.patch

diff --git a/package/genimage/0001-image-hd-add-support-for-bootable-flags-on-GPT.patch b/package/genimage/0001-image-hd-add-support-for-bootable-flags-on-GPT.patch
new file mode 100644
index 0000000000..03cc5dd39d
--- /dev/null
+++ b/package/genimage/0001-image-hd-add-support-for-bootable-flags-on-GPT.patch
@@ -0,0 +1,45 @@
+From f23a09b177d9a55679fd3a57951313b8a34dc4d9 Mon Sep 17 00:00:00 2001
+From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+Date: Tue, 23 Apr 2019 14:09:42 +0200
+Subject: [PATCH] image-hd: add support for bootable flags on GPT
+
+Bit 2 of the GPT partition table entry "flags" attribute allows to
+mark the partition as bootable, so we add support for setting this
+flag, using the same bootable flag used for MBR partition tables.
+
+Setting this flag is useful to properly support the "Generic Distro"
+concept from U-Boot [1], which searches for boot scripts in the
+bootable partition.
+
+[1] http://git.denx.de/?p=u-boot.git;a=blob;f=doc/README.distro
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
+Upstream: https://github.com/pengutronix/genimage/pull/58
+---
+ image-hd.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/image-hd.c b/image-hd.c
+index 2c2860c..1f80ae7 100644
+--- a/image-hd.c
++++ b/image-hd.c
+@@ -78,6 +78,8 @@ struct gpt_partition_entry {
+ #define GPT_SECTORS		(1 + GPT_ENTRIES * sizeof(struct gpt_partition_entry) / 512)
+ #define GPT_REVISION_1_0	0x00010000
+ 
++#define GPT_PE_FLAG_BOOTABLE	(1 << 2)
++
+ static void hdimage_setup_chs(unsigned int lba, unsigned char *chs)
+ {
+ 	const unsigned int hpc = 255;
+@@ -275,6 +277,7 @@ static int hdimage_insert_gpt(struct image *image, struct list_head *partitions)
+ 		uuid_parse(part->partition_uuid, table[i].uuid);
+ 		table[i].first_lba = htole64(part->offset/512);
+ 		table[i].last_lba = htole64((part->offset + part->size)/512 - 1);
++		table[i].flags = part->bootable ? GPT_PE_FLAG_BOOTABLE : 0;
+ 		for (j = 0; j < strlen(part->name) && j < 36; j++)
+ 			table[i].name[j] = htole16(part->name[j]);
+ 		i++;
+-- 
+2.20.1
+
-- 
2.20.1

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

* [Buildroot] [PATCH 3/4] boot/uboot: add option to pass custom variables to U-Boot build
  2019-04-24  9:39 [Buildroot] [PATCH 0/4] Add defconfig for STM32MP157 Discovery Kit Thomas Petazzoni
  2019-04-24  9:39 ` [Buildroot] [PATCH 1/4] package/genimage: bump version Thomas Petazzoni
  2019-04-24  9:39 ` [Buildroot] [PATCH 2/4] package/genimage: add patch to support bootable flag in GPT tables Thomas Petazzoni
@ 2019-04-24  9:39 ` Thomas Petazzoni
  2019-04-24  9:39 ` [Buildroot] [PATCH 4/4] configs/stm32mp157_dk: new defconfig Thomas Petazzoni
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2019-04-24  9:39 UTC (permalink / raw)
  To: buildroot

U-Boot supports a number of environment variables to pass specific
information. The following patches were submitted in the past to one
some specific Config.in option to pass some of these variables:

 - http://patchwork.ozlabs.org/patch/881197/ proposed an option to
   pass a custom EXT_DTB= variable

 - http://patchwork.ozlabs.org/patch/1018245/ proposed an option to
   pass a custom DEVICE_TREE= variable

Instead of adding one Config.in option for each of those variables,
let's provide a generic mechanism to pass arbitrary variables during
U-Boot build step.

Cc: Konstantin Porotchkin <kostap@marvell.com>
Cc: Clemens Gruber <clemens.gruber@pqgruber.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 boot/uboot/Config.in | 6 ++++++
 boot/uboot/uboot.mk  | 3 ++-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/boot/uboot/Config.in b/boot/uboot/Config.in
index 33b7e67ff7..799c201259 100644
--- a/boot/uboot/Config.in
+++ b/boot/uboot/Config.in
@@ -550,4 +550,10 @@ config BR2_TARGET_UBOOT_CUSTOM_DTS_PATH
 
 endif
 
+config BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS
+	string "Custom make options"
+	help
+	  List of custom make options passed at build time. Can be
+	  used for example to pass a DEVICE_TREE= value.
+
 endif # BR2_TARGET_UBOOT
diff --git a/boot/uboot/uboot.mk b/boot/uboot/uboot.mk
index ae09c37d84..aac5b96451 100644
--- a/boot/uboot/uboot.mk
+++ b/boot/uboot/uboot.mk
@@ -133,7 +133,8 @@ UBOOT_MAKE_OPTS += \
 	CROSS_COMPILE="$(TARGET_CROSS)" \
 	ARCH=$(UBOOT_ARCH) \
 	HOSTCC="$(HOSTCC) $(subst -I/,-isystem /,$(subst -I /,-isystem /,$(HOST_CFLAGS)))" \
-	HOSTLDFLAGS="$(HOST_LDFLAGS)"
+	HOSTLDFLAGS="$(HOST_LDFLAGS)" \
+	$(call qstrip,$(BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS))
 
 ifeq ($(BR2_TARGET_UBOOT_NEEDS_ATF_BL31),y)
 UBOOT_DEPENDENCIES += arm-trusted-firmware
-- 
2.20.1

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

* [Buildroot] [PATCH 4/4] configs/stm32mp157_dk: new defconfig
  2019-04-24  9:39 [Buildroot] [PATCH 0/4] Add defconfig for STM32MP157 Discovery Kit Thomas Petazzoni
                   ` (2 preceding siblings ...)
  2019-04-24  9:39 ` [Buildroot] [PATCH 3/4] boot/uboot: add option to pass custom variables to U-Boot build Thomas Petazzoni
@ 2019-04-24  9:39 ` Thomas Petazzoni
  3 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2019-04-24  9:39 UTC (permalink / raw)
  To: buildroot

This commit adds a minimal defconfig to build a Buildroot system for
the STM32MP157 Discovery Kit, which is the low-cost evaluation
platform for the new STM32MP157 system-on-chip from ST. This
system-on-chip features a single or dual Cortex-A7, a single
Cortex-M4, and a wide variety of peripherals.

This commit includes a custom linux configuration file, because there
is no specific defconfig for this platform in the kernel, only
multi_v7_defconfig supports it, which is really a massive
defconfig. That's why a custom linux configuration file is added.

A small U-Boot config fragment allows to disable the watchdog, so that
userspace by default doesn't need to have a watchdog daemon running.

The vendor U-Boot and Linux trees are used for the moment, but the
platform support is being upstreamed, so switching to upstream
versions will be possible in the relatively near future.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 .gitlab-ci.yml                                |   1 +
 DEVELOPERS                                    |   2 +
 .../stm32mp157-dk/genimage.cfg                |  24 +++
 .../stm32mp157-dk/linux.config                | 182 ++++++++++++++++++
 .../overlay/boot/extlinux/extlinux.conf       |   4 +
 .../stm32mp157-dk/readme.txt                  |  38 ++++
 .../stm32mp157-dk/uboot-fragment.config       |   1 +
 configs/stm32mp157_dk_defconfig               |  30 +++
 8 files changed, 282 insertions(+)
 create mode 100644 board/stmicroelectronics/stm32mp157-dk/genimage.cfg
 create mode 100644 board/stmicroelectronics/stm32mp157-dk/linux.config
 create mode 100644 board/stmicroelectronics/stm32mp157-dk/overlay/boot/extlinux/extlinux.conf
 create mode 100644 board/stmicroelectronics/stm32mp157-dk/readme.txt
 create mode 100644 board/stmicroelectronics/stm32mp157-dk/uboot-fragment.config
 create mode 100644 configs/stm32mp157_dk_defconfig

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e9869be784..e1428c0037 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -269,6 +269,7 @@ solidrun_macchiatobin_mainline_defconfig: { extends: .defconfig }
 solidrun_macchiatobin_marvell_defconfig: { extends: .defconfig }
 stm32f429_disco_defconfig: { extends: .defconfig }
 stm32f469_disco_defconfig: { extends: .defconfig }
+stm32mp157_dk_defconfig: { extends: .defconfig }
 toradex_apalis_imx6_defconfig: { extends: .defconfig }
 ts4800_defconfig: { extends: .defconfig }
 ts4900_defconfig: { extends: .defconfig }
diff --git a/DEVELOPERS b/DEVELOPERS
index e5b69c3ade..d8e096ae8f 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2169,9 +2169,11 @@ F:	toolchain/
 
 N:	Thomas Petazzoni <thomas.petazzoni@bootlin.com>
 F:	arch/Config.in.arm
+F:	board/stmicroelectronics/stm32mp157-dk/
 F:	boot/boot-wrapper-aarch64/
 F:	boot/grub2/
 F:	boot/gummiboot/
+F:	configs/stm32mp157_dk_defconfig
 F:	package/android-tools/
 F:	package/b43-firmware/
 F:	package/b43-fwcutter/
diff --git a/board/stmicroelectronics/stm32mp157-dk/genimage.cfg b/board/stmicroelectronics/stm32mp157-dk/genimage.cfg
new file mode 100644
index 0000000000..33c418b9a5
--- /dev/null
+++ b/board/stmicroelectronics/stm32mp157-dk/genimage.cfg
@@ -0,0 +1,24 @@
+image sdcard.img {
+	hdimage {
+		gpt = "true"
+	}
+
+	partition fsbl1 {
+		image = "u-boot-spl.stm32"
+	}
+
+	partition fsbl2 {
+		image = "u-boot-spl.stm32"
+	}
+
+	partition uboot {
+		image = "u-boot.img"
+	}
+
+	partition rootfs {
+		image = "rootfs.ext4"
+		partition-type = 0x83
+		bootable = "yes"
+		size = 256M
+	}
+}
diff --git a/board/stmicroelectronics/stm32mp157-dk/linux.config b/board/stmicroelectronics/stm32mp157-dk/linux.config
new file mode 100644
index 0000000000..878a0c39f1
--- /dev/null
+++ b/board/stmicroelectronics/stm32mp157-dk/linux.config
@@ -0,0 +1,182 @@
+CONFIG_SYSVIPC=y
+CONFIG_POSIX_MQUEUE=y
+CONFIG_USELIB=y
+CONFIG_NO_HZ=y
+CONFIG_HIGH_RES_TIMERS=y
+CONFIG_PREEMPT=y
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_ARCH_STM32=y
+CONFIG_ARM_THUMBEE=y
+# CONFIG_CACHE_L2X0 is not set
+CONFIG_ARM_ERRATA_430973=y
+CONFIG_ARM_ERRATA_720789=y
+CONFIG_ARM_ERRATA_754322=y
+CONFIG_ARM_ERRATA_754327=y
+CONFIG_ARM_ERRATA_764369=y
+CONFIG_ARM_ERRATA_775420=y
+CONFIG_ARM_ERRATA_798181=y
+CONFIG_SMP=y
+CONFIG_MCPM=y
+CONFIG_HIGHMEM=y
+CONFIG_FORCE_MAX_ZONEORDER=12
+CONFIG_SECCOMP=y
+# CONFIG_ATAGS is not set
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_ARM_APPENDED_DTB=y
+CONFIG_ARM_ATAG_DTB_COMPAT=y
+CONFIG_VFP=y
+CONFIG_NEON=y
+CONFIG_KERNEL_MODE_NEON=y
+CONFIG_ARM_CRYPTO=y
+CONFIG_MODULES=y
+CONFIG_MODULE_FORCE_LOAD=y
+CONFIG_MODULE_UNLOAD=y
+CONFIG_MODVERSIONS=y
+CONFIG_PARTITION_ADVANCED=y
+CONFIG_CMDLINE_PARTITION=y
+CONFIG_CMA=y
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_CAN=y
+CONFIG_CAN_M_CAN=y
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+CONFIG_DMA_CMA=y
+CONFIG_CMA_SIZE_MBYTES=128
+CONFIG_SIMPLE_PM_BUS=y
+CONFIG_MTD=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_BLOCK=y
+CONFIG_MTD_M25P80=y
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_STM32_FMC2=y
+CONFIG_MTD_SPI_NOR=y
+# CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is not set
+CONFIG_MTD_UBI=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_SIZE=65536
+CONFIG_SRAM=y
+CONFIG_EEPROM_AT24=y
+CONFIG_NETDEVICES=y
+CONFIG_VIRTIO_NET=y
+CONFIG_KS8851=y
+CONFIG_SMSC911X=y
+CONFIG_STMMAC_ETH=y
+CONFIG_DWMAC_DWC_QOS_ETH=y
+CONFIG_MDIO_BITBANG=y
+CONFIG_INPUT_JOYDEV=y
+CONFIG_INPUT_EVDEV=y
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_TOUCHSCREEN_EDT_FT5X06=y
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_STPMIC1_ONKEY=y
+CONFIG_SERIAL_STM32=y
+CONFIG_SERIAL_STM32_CONSOLE=y
+CONFIG_SERIAL_DEV_BUS=y
+CONFIG_HW_RANDOM=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_MUX=y
+CONFIG_I2C_STM32F7=y
+CONFIG_SPI=y
+CONFIG_SPI_STM32=y
+CONFIG_SPI_STM32_QSPI=y
+CONFIG_PINCTRL_SINGLE=y
+CONFIG_PINCTRL_STMFX=y
+CONFIG_POWER_RESET=y
+CONFIG_POWER_RESET_GPIO=y
+CONFIG_POWER_RESET_GPIO_RESTART=y
+CONFIG_POWER_RESET_SYSCON=y
+CONFIG_POWER_RESET_SYSCON_POWEROFF=y
+CONFIG_SYSCON_REBOOT_MODE=y
+CONFIG_WATCHDOG=y
+CONFIG_STPMIC1_WATCHDOG=y
+CONFIG_MFD_STM32_LPTIMER=y
+CONFIG_MFD_STPMIC1=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_REGULATOR_STM32_VREFBUF=y
+CONFIG_REGULATOR_STM32_PWR=y
+CONFIG_REGULATOR_STPMIC1=y
+CONFIG_DRM=y
+CONFIG_DRM_STM=y
+CONFIG_DRM_STM_DSI=y
+CONFIG_DRM_PANEL_ORISETECH_OTM8009A=y
+CONFIG_DRM_SII902X=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+# CONFIG_BACKLIGHT_GENERIC is not set
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_SOUND=y
+CONFIG_SND=y
+CONFIG_SND_DYNAMIC_MINORS=y
+CONFIG_USB=y
+CONFIG_USB_OTG=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_PLATFORM=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_HCD_PLATFORM=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_HCD_PLATFORM=y
+CONFIG_USB_DWC2=y
+CONFIG_USB_CHIPIDEA=y
+CONFIG_USB_CHIPIDEA_HOST=y
+CONFIG_USB_ISP1760=y
+CONFIG_USB_HSIC_USB3503=y
+CONFIG_USB_GPIO_VBUS=y
+CONFIG_USB_ISP1301=y
+CONFIG_USB_ULPI=y
+CONFIG_TYPEC=y
+CONFIG_TYPEC_STUSB=y
+CONFIG_MMC=y
+CONFIG_MMC_BLOCK_MINORS=16
+CONFIG_MMC_ARMMMCI=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MMC_DW=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_PWM=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_STM32=y
+CONFIG_DMADEVICES=y
+CONFIG_STM32_DMA=y
+CONFIG_STM32_DMAMUX=y
+CONFIG_STM32_MDMA=y
+CONFIG_HWSPINLOCK=y
+CONFIG_HWSPINLOCK_STM32=y
+CONFIG_STM32_IPCC=y
+CONFIG_REMOTEPROC=y
+CONFIG_STM32_RPROC=y
+CONFIG_RPMSG_VIRTIO=y
+CONFIG_RPMSG_TTY=y
+CONFIG_IIO=y
+CONFIG_IIO_SW_TRIGGER=y
+CONFIG_SD_ADC_MODULATOR=y
+CONFIG_STM32_ADC_CORE=y
+CONFIG_STM32_ADC=y
+CONFIG_STM32_ADC_TEMP=y
+CONFIG_STM32_DFSDM_ADC=y
+CONFIG_STM32_LPTIMER_CNT=y
+CONFIG_STM32_DAC=y
+CONFIG_IIO_HRTIMER_TRIGGER=y
+CONFIG_IIO_STM32_LPTIMER_TRIGGER=y
+CONFIG_PWM=y
+CONFIG_PWM_STM32=y
+CONFIG_PWM_STM32_LP=y
+CONFIG_PHY_STM32_USBPHYC=y
+CONFIG_NVMEM_STM32_ROMEM=y
+CONFIG_EXT4_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_TMPFS=y
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_PRINTK_TIME=y
diff --git a/board/stmicroelectronics/stm32mp157-dk/overlay/boot/extlinux/extlinux.conf b/board/stmicroelectronics/stm32mp157-dk/overlay/boot/extlinux/extlinux.conf
new file mode 100644
index 0000000000..325f3fc30e
--- /dev/null
+++ b/board/stmicroelectronics/stm32mp157-dk/overlay/boot/extlinux/extlinux.conf
@@ -0,0 +1,4 @@
+label stm32mp15-buildroot
+  kernel /boot/zImage
+  devicetree /boot/stm32mp157c-dk2.dtb
+  append root=/dev/mmcblk0p4 rootwait
diff --git a/board/stmicroelectronics/stm32mp157-dk/readme.txt b/board/stmicroelectronics/stm32mp157-dk/readme.txt
new file mode 100644
index 0000000000..ac2061a234
--- /dev/null
+++ b/board/stmicroelectronics/stm32mp157-dk/readme.txt
@@ -0,0 +1,38 @@
+STM32MP157 Discovery Kit
+
+Intro
+=====
+
+This configuration supports the STM32MP157 Discovery Kit 2 (DK2)
+platform:
+
+  https://www.st.com/en/evaluation-tools/stm32mp157c-dk2.html
+
+How to build
+============
+
+ $ make stm32mp157_dk_defconfig
+ $ make
+
+How to write the microSD card
+=============================
+
+Once the build process is finished you will have an image called
+"sdcard.img" in the output/images/ directory.
+
+Copy the bootable "sdcard.img" onto an microSD card with "dd":
+
+  $ sudo dd if=output/images/sdcard.img of=/dev/sdX
+
+Boot the board
+==============
+
+ (1) Insert the microSD card in connector CN15
+
+ (2) Plug a micro-USB cable in connector CN11 and run your serial
+     communication program on /dev/ttyACM0.
+
+ (3) Plug a USB-C cable in CN6 to power-up the board.
+
+ (4) The system will start, with the console on UART, but also visible
+     on the screen.
diff --git a/board/stmicroelectronics/stm32mp157-dk/uboot-fragment.config b/board/stmicroelectronics/stm32mp157-dk/uboot-fragment.config
new file mode 100644
index 0000000000..a278ce9e23
--- /dev/null
+++ b/board/stmicroelectronics/stm32mp157-dk/uboot-fragment.config
@@ -0,0 +1 @@
+# CONFIG_STM32MP_WATCHDOG is not set
diff --git a/configs/stm32mp157_dk_defconfig b/configs/stm32mp157_dk_defconfig
new file mode 100644
index 0000000000..b238730f81
--- /dev/null
+++ b/configs/stm32mp157_dk_defconfig
@@ -0,0 +1,30 @@
+BR2_arm=y
+BR2_cortex_a7=y
+BR2_ROOTFS_OVERLAY="board/stmicroelectronics/stm32mp157-dk/overlay/"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/stm32mp157-dk/genimage.cfg"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
+BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,STMicroelectronics,linux,v4.19-stm32mp-r1.2)/linux-v4.19-stm32mp-r1.2.tar.gz"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32mp157-dk/linux.config"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32mp157c-dk2"
+BR2_LINUX_KERNEL_INSTALL_TARGET=y
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="120M"
+# BR2_TARGET_ROOTFS_TAR is not set
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_GIT=y
+BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://github.com/STMicroelectronics/u-boot.git"
+BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="v2018.11-stm32mp-r2.1"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32mp15_basic"
+BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/stmicroelectronics/stm32mp157-dk/uboot-fragment.config"
+# BR2_TARGET_UBOOT_FORMAT_BIN is not set
+BR2_TARGET_UBOOT_FORMAT_IMG=y
+BR2_TARGET_UBOOT_SPL=y
+BR2_TARGET_UBOOT_SPL_NAME="spl/u-boot-spl.stm32"
+BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=stm32mp157c-dk2"
+BR2_PACKAGE_HOST_GENIMAGE=y
-- 
2.20.1

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

end of thread, other threads:[~2019-04-24  9:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-24  9:39 [Buildroot] [PATCH 0/4] Add defconfig for STM32MP157 Discovery Kit Thomas Petazzoni
2019-04-24  9:39 ` [Buildroot] [PATCH 1/4] package/genimage: bump version Thomas Petazzoni
2019-04-24  9:39 ` [Buildroot] [PATCH 2/4] package/genimage: add patch to support bootable flag in GPT tables Thomas Petazzoni
2019-04-24  9:39 ` [Buildroot] [PATCH 3/4] boot/uboot: add option to pass custom variables to U-Boot build Thomas Petazzoni
2019-04-24  9:39 ` [Buildroot] [PATCH 4/4] configs/stm32mp157_dk: new defconfig Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.