Skip to contentSkip to conversation

configs/stm32mp157c_odyssey: new defconfig

PATCH Superseded [email protected] 2 participants 3 messages Aug 2, 2021 – Aug 20, 2021 Arm STM32

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v3 cover configs/stm32mp157c_odyssey: new defconfig

From: Simon Doppler <[email protected]>

Hi Yann, Hi all,

Thanks for your feedback on v2.

Now that upstream has fixed the SDMMC CD pin, I backported the patch as you suggested.

This is the only change since v2.

Regards

Simon Doppler

Simon Doppler (1):
configs/stm32mp157c_odyssey: new defconfig

 DEVELOPERS                                    |   4 +
 board/seeed/stm32mp157c-odyssey/genimage.cfg  |  22 +++
 board/seeed/stm32mp157c-odyssey/linux.config  | 182 ++++++++++++++++++
 .../overlay/boot/extlinux/extlinux.conf       |   4 +
 ...-fix-stm32mp157c-odyssey-card-detect.patch |  36 ++++
 configs/stm32mp157c_odyssey_defconfig         |  31 +++
 6 files changed, 279 insertions(+)
 create mode 100644 board/seeed/stm32mp157c-odyssey/genimage.cfg
 create mode 100644 board/seeed/stm32mp157c-odyssey/linux.config
 create mode 100644 board/seeed/stm32mp157c-odyssey/overlay/boot/extlinux/extlinux.conf
 create mode 100644 board/seeed/stm32mp157c-odyssey/patches/linux/5.10.1/0001-ARM-dts-stm32-fix-stm32mp157c-odyssey-card-detect.patch
 create mode 100644 configs/stm32mp157c_odyssey_defconfig

--
2.30.2

_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot

#1 lore raw

PATCH v3 1/1 configs/stm32mp157c_odyssey: new defconfig

From: Simon Doppler <[email protected]>

STM32MP157C-Odyssey reference:
https://wiki.seeedstudio.com/ODYSSEY-STM32MP157C/

---
 DEVELOPERS                                    |   4 +
 board/seeed/stm32mp157c-odyssey/genimage.cfg  |  22 +++
 board/seeed/stm32mp157c-odyssey/linux.config  | 182 ++++++++++++++++++
 .../overlay/boot/extlinux/extlinux.conf       |   4 +
 ...-fix-stm32mp157c-odyssey-card-detect.patch |  36 ++++
 configs/stm32mp157c_odyssey_defconfig         |  31 +++
 6 files changed, 279 insertions(+)
 create mode 100644 board/seeed/stm32mp157c-odyssey/genimage.cfg
 create mode 100644 board/seeed/stm32mp157c-odyssey/linux.config
 create mode 100644 board/seeed/stm32mp157c-odyssey/overlay/boot/extlinux/extlinux.conf
 create mode 100644 board/seeed/stm32mp157c-odyssey/patches/linux/5.10.1/0001-ARM-dts-stm32-fix-stm32mp157c-odyssey-card-detect.patch
 create mode 100644 configs/stm32mp157c_odyssey_defconfig
DEVELOPERS +4 -0
index 869f66f028..7f3727a381 100644
@@ -2498,6 +2498,10 @@ F:	package/xscreensaver/
 F:	package/zmqpp/
 F:	package/zyre/
 
+N:	Simon Doppler <[email protected]>
+F:	board/seeed/
+F:	configs/stm32mp157c_odyssey_defconfig
+
 N:	Spenser Gilliland <[email protected]>
 F:	arch/Config.in.microblaze
 F:	package/a10disp/
board/seeed/stm32mp157c-odyssey/genimage.cfg new file +22 -0
new file mode 100644
index 0000000000..170dedc254
@@ -0,0 +1,22 @@
+image sdcard.img {
+	hdimage {
+		gpt = "true"
+	}
+
+	partition fsbl1 {
+		image = "tf-a-stm32mp157c-odyssey.stm32"
+	}
+
+	partition fsbl2 {
+		image = "tf-a-stm32mp157c-odyssey.stm32"
+	}
+
+	partition ssbl {
+		image = "u-boot.stm32"
+	}
+
+	partition rootfs {
+		image = "rootfs.ext4"
+		bootable = "yes"
+	}
+}
board/seeed/stm32mp157c-odyssey/linux.config new file +182 -0

182 lines not on this page · raw message

board/seeed/stm32mp157c-odyssey/overlay/boot/extlinux/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..b5795415eb
@@ -0,0 +1,4 @@
+label stm32mp157c-odyssey-buildroot
+  kernel /boot/zImage
+  devicetree /boot/stm32mp157c-odyssey.dtb
+  append root=/dev/mmcblk0p4 rootwait
board/seeed/stm32mp157c-odyssey/patches/linux/5.10.1/0001-ARM-dts-stm32-fix-stm32mp157c-odyssey-card-detect.patch new file +36 -0
new file mode 100644
index 0000000000..cb2e75006a
@@ -0,0 +1,36 @@
+From 0171b07373cc8c2815ca5fa79a7308fdefa54ca4 Mon Sep 17 00:00:00 2001
+From: Grzegorz Szymaszek <[email protected]>
+Date: Sat, 10 Apr 2021 21:35:21 +0200
+Subject: [PATCH] ARM: dts: stm32: fix stm32mp157c-odyssey card detect pin
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The microSD card detect pin is physically connected to the MPU pin PI3.
+The Device Tree configuration of the card detect pin was wrong—it was
+set to pin PB7 instead. If such configuration was used, the kernel would
+hang on “Waiting for root device” when booting from a microSD card.
+
+Signed-off-by: Grzegorz Szymaszek <[email protected]>
+Signed-off-by: Alexandre Torgue <[email protected]>
+Backported from: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/arch/arm/boot/dts/stm32mp157c-odyssey.dts?id=0171b07373cc8c2815ca5fa79a7308fdefa54ca4
+---
+ arch/arm/boot/dts/stm32mp157c-odyssey.dts | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/arm/boot/dts/stm32mp157c-odyssey.dts b/arch/arm/boot/dts/stm32mp157c-odyssey.dts
+index a7ffec8f1516..be1dd5e9e744 100644
+--- a/arch/arm/boot/dts/stm32mp157c-odyssey.dts
++++ b/arch/arm/boot/dts/stm32mp157c-odyssey.dts
+@@ -64,7 +64,7 @@ &sdmmc1 {
+ 	pinctrl-0 = <&sdmmc1_b4_pins_a>;
+ 	pinctrl-1 = <&sdmmc1_b4_od_pins_a>;
+ 	pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>;
+-	cd-gpios = <&gpiob 7 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
++	cd-gpios = <&gpioi 3 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+ 	disable-wp;
+ 	st,neg-edge;
+ 	bus-width = <4>;
+--
+2.30.2
+
configs/stm32mp157c_odyssey_defconfig new file +31 -0
new file mode 100644
index 0000000000..078ff74923
@@ -0,0 +1,31 @@
+BR2_arm=y
+BR2_cortex_a7=y
+BR2_GLOBAL_PATCH_DIR="board/seeed/stm32mp157c-odyssey/patches"
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_10=y
+BR2_ROOTFS_OVERLAY="board/seeed/stm32mp157c-odyssey/overlay/"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/seeed/stm32mp157c-odyssey/genimage.cfg"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.10.1"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/seeed/stm32mp157c-odyssey/linux.config"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32mp157c-odyssey"
+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_ARM_TRUSTED_FIRMWARE=y
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="stm32mp1"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="STM32MP_SDMMC=1 AARCH32_SP=sp_min DTB_FILE_NAME=stm32mp157c-odyssey.dtb"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_IMAGES="*.stm32"
+BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC=y
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32mp15_trusted"
+BR2_TARGET_UBOOT_NEEDS_DTC=y
+# BR2_TARGET_UBOOT_FORMAT_BIN is not set
+BR2_TARGET_UBOOT_FORMAT_STM32=y
+BR2_TARGET_UBOOT_CUSTOM_MAKEOPTS="DEVICE_TREE=stm32mp157c-odyssey"
+BR2_PACKAGE_HOST_GENIMAGE=y

--
2.30.2

_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot

#2 lore raw

Hello Simon,

Quoted 6 lines · On Mon, 02 Aug 2021 20:20:57 +0000 [email protected] wrote:

From: Simon Doppler <[email protected]>

STM32MP157C-Odyssey reference:
https://wiki.seeedstudio.com/ODYSSEY-STM32MP157C/

It all looks very good to me. The only last missing bit is a board/seeed/stm32mp157c-odyssey/readme.txt that briefly describes how to use this defconfig. See board/stmicroelectronics/stm32mp157c-dk2/readme.txt for an example.

With this added, your defconfig will be ready to be merged in Buildroot.

Thanks a lot!

Thomas

Signature · 7 lines
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/buildroot