Skip to contentSkip to conversation

board/stm32mp157c-dk2/genimage.cfg: drop hardcoded rootfs partition size

PATCH New Bartosz Bilas 2 participants 9 messages Mar 21, 2020 Arm STM32

lore
Share & tools
lore
#0 lore raw

PATCH 1/6 board/stm32mp157c-dk2/genimage.cfg: drop hardcoded rootfs partition size

Let genimage to match the size of the rootfs image instead.

---
 board/stmicroelectronics/stm32mp157c-dk2/genimage.cfg | 1 -
 1 file changed, 1 deletion(-)
board/stmicroelectronics/stm32mp157c-dk2/genimage.cfg +0 -1
index 2b9e832dc9..d1ce530cc5 100644
@@ -19,6 +19,5 @@ image sdcard.img {
 		image = "rootfs.ext4"
 		partition-type = 0x83
 		bootable = "yes"
-		size = 256M
 	}
 }
Signature · 1 line
2.25.2
#1 lore raw

PATCH 2/6 configs/stm32mp157: use common genimage config file for stm32mp157 boards

It will be useful for the upcoming introducing stm32mp157a dk2 board.

---
 .../{stm32mp157c-dk2 => common/stm32mp157}/genimage.cfg         | 0
 configs/stm32mp157c_dk2_defconfig                               | 2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename board/stmicroelectronics/{stm32mp157c-dk2 => common/stm32mp157}/genimage.cfg (100%)
board/stmicroelectronics/common/stm32mp157/genimage.cfg renamed from board/stmicroelectronics/stm32mp157c-dk2/genimage.cfg +0 -0
similarity index 100%
rename from board/stmicroelectronics/stm32mp157c-dk2/genimage.cfg
rename to board/stmicroelectronics/common/stm32mp157/genimage.cfg
configs/stm32mp157c_dk2_defconfig +1 -1
index 273eda46a0..25a96fa276 100644
@@ -3,7 +3,7 @@ BR2_cortex_a7=y
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
 BR2_ROOTFS_OVERLAY="board/stmicroelectronics/stm32mp157c-dk2/overlay/"
 BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
-BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/stm32mp157c-dk2/genimage.cfg"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/common/stm32mp157/genimage.cfg"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.7"
Signature · 1 line
2.25.2
#2 lore raw

PATCH 3/6 configs/stm32mp157a_dk1: new defconfig

In reply to Bartosz Bilas

The board support package includes the following components:
- U-Boot 2020.01
- Linux 5.4.26
- Buildroot default packages

---
 .gitlab-ci.yml                                |   1 +
 DEVELOPERS                                    |   2 +
 .../stm32mp157a-dk1/linux.config              | 182 ++++++++++++++++++
 .../overlay/boot/extlinux/extlinux.conf       |   4 +
 .../stm32mp157a-dk1/readme.txt                |  38 ++++
 .../stm32mp157a-dk1/uboot-fragment.config     |   1 +
 configs/stm32mp157a_dk1_defconfig             |  32 +++
 7 files changed, 260 insertions(+)
 create mode 100644 board/stmicroelectronics/stm32mp157a-dk1/linux.config
 create mode 100644 board/stmicroelectronics/stm32mp157a-dk1/overlay/boot/extlinux/extlinux.conf
 create mode 100644 board/stmicroelectronics/stm32mp157a-dk1/readme.txt
 create mode 100644 board/stmicroelectronics/stm32mp157a-dk1/uboot-fragment.config
 create mode 100644 configs/stm32mp157a_dk1_defconfig
.gitlab-ci.yml +1 -0
index cde757681e..22448e1028 100644
@@ -320,6 +320,7 @@ solidrun_macchiatobin_marvell_defconfig: { extends: .defconfig }
 stm32f429_disco_defconfig: { extends: .defconfig }
 stm32f469_disco_defconfig: { extends: .defconfig }
 stm32mp157c_dk2_defconfig: { extends: .defconfig }
+stm32mp157a_dk1_defconfig: { extends: .defconfig }
 toradex_apalis_imx6_defconfig: { extends: .defconfig }
 ts4900_defconfig: { extends: .defconfig }
 ts5500_defconfig: { extends: .defconfig }
DEVELOPERS +2 -0
index 8c736efcca..906a478d7b 100644
@@ -278,6 +278,8 @@ F:	package/lua-ev/
 F:	package/orbit/
 
 N:	Bartosz Bilas <[email protected]>
+F:	board/stmicroelectronics/stm32mp157a-dk1/
+F:	configs/stm32mp157a_dk1_defconfig
 F:	package/python-esptool/
 F:	package/python-pyaes/
 F:	package/qt5/qt5scxml/
board/stmicroelectronics/stm32mp157a-dk1/linux.config new file +182 -0

182 lines not on this page · raw message

board/stmicroelectronics/stm32mp157a-dk1/overlay/boot/extlinux/extlinux.conf new file +4 -0
new file mode 100644
index 0000000000..437e80fdeb
@@ -0,0 +1,4 @@
+label stm32mp157a-dk1-buildroot
+  kernel /boot/zImage
+  devicetree /boot/stm32mp157a-dk1.dtb
+  append root=/dev/mmcblk0p4 rootwait
board/stmicroelectronics/stm32mp157a-dk1/readme.txt new file +38 -0
new file mode 100644
index 0000000000..060f71d5dc
@@ -0,0 +1,38 @@
+STM32MP157A Discovery Kit v1
+
+Intro
+=====
+
+This configuration supports the STM32MP157 Discovery Kit 1 (DK1)
+platform:
+
+  https://www.st.com/en/evaluation-tools/stm32mp157a-dk1.html
+
+How to build
+============
+
+ $ make stm32mp157a_dk1_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.
board/stmicroelectronics/stm32mp157a-dk1/uboot-fragment.config new file +1 -0
new file mode 100644
index 0000000000..a278ce9e23
@@ -0,0 +1 @@
+# CONFIG_STM32MP_WATCHDOG is not set
configs/stm32mp157a_dk1_defconfig new file +32 -0
new file mode 100644
index 0000000000..e9db685271
@@ -0,0 +1,32 @@
+
+BR2_arm=y
+BR2_cortex_a7=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y
+BR2_ROOTFS_OVERLAY="board/stmicroelectronics/stm32mp157a-dk1/overlay/"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/common/stm32mp157/genimage.cfg"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.26"
+BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
+BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32mp157a-dk1/linux.config"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32mp157a-dk1"
+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_EXT2_MKFS_OPTIONS="-O ^metadata_csum"
+# BR2_TARGET_ROOTFS_TAR is not set
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.1"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32mp15_basic"
+BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/stmicroelectronics/stm32mp157a-dk1/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=stm32mp157a-dk1"
+BR2_PACKAGE_HOST_GENIMAGE=y
Signature · 1 line
2.25.2
#3 lore raw

PATCH 3/6 configs/stm32mp157a_dk1: new defconfig

Hello Bartosz,

.gitlab-ci.yml solidrun_macchiatobin_marvell_defconfig: { extends: .defconfig } · line 323

Quoted 9 lines · On Sat, 21 Mar 2020 14:32:19 +0100 Bartosz Bilas <[email protected]>…
.gitlab-ci.yml +1 -0
index cde757681e..22448e1028 100644
@@ -320,6 +320,7 @@ solidrun_macchiatobin_marvell_defconfig: { extends: .defconfig }
 stm32f429_disco_defconfig: { extends: .defconfig }
 stm32f469_disco_defconfig: { extends: .defconfig }
 stm32mp157c_dk2_defconfig: { extends: .defconfig }
+stm32mp157a_dk1_defconfig: { extends: .defconfig }

You should use "make .gitlab-ci.yml" to generate this file. Indeed here, alphabetic ordering was not correct. Fixed when applying.

board/stmicroelectronics/stm32mp157a-dk1/linux.config

Quoted 5 lines
board/stmicroelectronics/stm32mp157a-dk1/linux.config new file +0 -0
new file mode 100644
index 0000000000..95c834e431

I was wondering if a common Linux configuration file would be possible, perhaps with just an extra fragment for the DK2 to enable display/WiFi support.

configs/stm32mp157a_dk1_defconfig line 1

Quoted 7 lines
configs/stm32mp157a_dk1_defconfig new file +1 -0
new file mode 100644
index 0000000000..e9db685271
@@ -0,0 +1,32 @@
+

Useless empty line here. Fixed when applying.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#4 lore raw

PATCH 3/6 configs/stm32mp157a_dk1: new defconfig

Hello Thomas,

Quoted 5 lines · Thomas Petazzoni

Hello Bartosz,

On Sat, 21 Mar 2020 14:32:19 +0100
Bartosz Bilas <[email protected]> wrote:

Quoted 11 lines

.gitlab-ci.yml solidrun_macchiatobin_marvell_defconfig: { extends: .defconfig } · line 323

Quoted 9 lines
.gitlab-ci.yml +1 -0
index cde757681e..22448e1028 100644
@@ -320,6 +320,7 @@ solidrun_macchiatobin_marvell_defconfig: { extends: .defconfig }
  stm32f429_disco_defconfig: { extends: .defconfig }
  stm32f469_disco_defconfig: { extends: .defconfig }
  stm32mp157c_dk2_defconfig: { extends: .defconfig }
+stm32mp157a_dk1_defconfig: { extends: .defconfig }

You should use "make .gitlab-ci.yml" to generate this file. Indeed here, alphabetic ordering was not correct. Fixed when applying.

I should get acquainted with make target commands because most of things I do manually. Anyway thanks for the hint.

Quoted 8 lines

board/stmicroelectronics/stm32mp157a-dk1/linux.config

Quoted 5 lines
board/stmicroelectronics/stm32mp157a-dk1/linux.config new file +0 -0
new file mode 100644
index 0000000000..95c834e431

I was wondering if a common Linux configuration file would be possible, perhaps with just an extra fragment for the DK2 to enable display/WiFi support.

I was also wondering but I've decided to leave it as it is and improve that when a good idea comes to my mind ;)

Quoted 10 lines

configs/stm32mp157a_dk1_defconfig line 1

Quoted 8 lines
configs/stm32mp157a_dk1_defconfig new file +1 -0
new file mode 100644
index 0000000000..e9db685271
@@ -0,0 +1,32 @@
+

Useless empty line here. Fixed when applying.

Quoted 3 lines

Best regards,

Thomas

Good, thanks :)

Best
Bartek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20200321/8494b105/attachment.html>

#5 lore raw

PATCH 4/6 configs/stm32mp157c_dk2: bump Linux to 5.4.26

In reply to Bartosz Bilas
---
 configs/stm32mp157c_dk2_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configs/stm32mp157c_dk2_defconfig +1 -1
index 25a96fa276..d8d6bd8e7b 100644
@@ -6,7 +6,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
 BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/common/stm32mp157/genimage.cfg"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.7"
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.26"
 BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
 BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32mp157c-dk2/linux.config"
 BR2_LINUX_KERNEL_DTS_SUPPORT=y
Signature · 1 line
2.25.2
#6 lore raw

PATCH 5/6 configs/stm32mp157c_dk2: bump U-Boot to 2020.01

In reply to Bartosz Bilas
---
 configs/stm32mp157c_dk2_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configs/stm32mp157c_dk2_defconfig +1 -1
index d8d6bd8e7b..d38fa5bab4 100644
@@ -20,7 +20,7 @@ BR2_TARGET_ROOTFS_EXT2_MKFS_OPTIONS="-O ^metadata_csum"
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
 BR2_TARGET_UBOOT_CUSTOM_VERSION=y
-BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2019.10"
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2020.01"
 BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32mp15_basic"
 BR2_TARGET_UBOOT_CONFIG_FRAGMENT_FILES="board/stmicroelectronics/stm32mp157c-dk2/uboot-fragment.config"
 # BR2_TARGET_UBOOT_FORMAT_BIN is not set
Signature · 1 line
2.25.2
#7 lore raw

PATCH 6/6 board/stmicroelectronics/stm32f4xx: move post-build script into common directory

In reply to Bartosz Bilas

Let's clean up "boards/stmicroelectronics" directory a bit to have everything in particular directories.

---
 .../{ => common/stm32f4xx}/stm32-post-build.sh                  | 0
 configs/stm32f429_disco_defconfig                               | 2 +-
 configs/stm32f469_disco_defconfig                               | 2 +-
 3 files changed, 2 insertions(+), 2 deletions(-)
 rename board/stmicroelectronics/{ => common/stm32f4xx}/stm32-post-build.sh (100%)
board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh renamed from board/stmicroelectronics/stm32-post-build.sh +0 -0
similarity index 100%
rename from board/stmicroelectronics/stm32-post-build.sh
rename to board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh
configs/stm32f429_disco_defconfig +1 -1
index 5237e9adb5..2c0641a6c5 100644
@@ -2,7 +2,7 @@ BR2_arm=y
 BR2_cortex_m4=y
 BR2_GLOBAL_PATCH_DIR="board/stmicroelectronics/stm32f429-disco/patches"
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_11=y
-BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/stm32-post-build.sh"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.11"
configs/stm32f469_disco_defconfig +1 -1
index 8b77d8c1a2..9760d51878 100644
@@ -2,7 +2,7 @@ BR2_arm=y
 BR2_cortex_m4=y
 BR2_GLOBAL_PATCH_DIR="board/stmicroelectronics/stm32f469-disco/patches"
 BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_11=y
-BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/stm32-post-build.sh"
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh"
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION=y
 BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.11"
Signature · 1 line
2.25.2
#8 lore raw

PATCH 1/6 board/stm32mp157c-dk2/genimage.cfg: drop hardcoded rootfs partition size

In reply to Bartosz Bilas
Quoted 6 lines · On Sat, 21 Mar 2020 14:32:17 +0100 Bartosz Bilas <[email protected]>…

Let genimage to match the size of the rootfs image instead.

---
 board/stmicroelectronics/stm32mp157c-dk2/genimage.cfg | 1 -
 1 file changed, 1 deletion(-)

Thanks, series applied. There were two minor issues on PATCH 3/6, I'll reply to this one specifically.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com