Skip to contentSkip to conversation

configs/stm32f769_disco_sd_defconfig: new defconfig

PATCH Applied Dario Binacchi 3 participants 5 messages Apr 23, 2023 – May 13, 2023 Arm STM32

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 configs/stm32f769_disco_sd_defconfig: new defconfig

Board support package includes the following components:
- mainline Linux kernel 5.15.108
- mainline U-Boot 2023.04
- default packages from buildroot

Note: There is a problem in u-boot display management. It should display the ST microelectronics logo but "noise" is displayed (like when running the command dd if=/dev/urandom of=/dev/fb0 in Linux). I also tried to change version (even the first version in which this feature was introduced), but without success. Despite this I decided not to disable the video management configuration to remind us that it needs to be fixed :).

---

Changes in v2:
- Replace BR2_cortex_m4 with BR2_cortex_m7
- Use Linux kernel version 5.15.108

 DEVELOPERS                                    |  2 ++
 .../stm32f769-disco/extlinux.conf             |  4 +++
 .../stm32f769-disco/flash_sd.sh               | 18 +++++++++++
 .../stm32f769-disco/genimage.cfg              | 27 ++++++++++++++++
 .../stm32f769-disco/linux-sd.fragment         |  1 +
 .../stm32f769-disco/post-build.sh             |  7 ++++
 .../stm32f769-disco/readme.txt                | 32 +++++++++++++++++++
 configs/stm32f769_disco_sd_defconfig          | 30 +++++++++++++++++
 8 files changed, 121 insertions(+)
 create mode 100644 board/stmicroelectronics/stm32f769-disco/extlinux.conf
 create mode 100755 board/stmicroelectronics/stm32f769-disco/flash_sd.sh
 create mode 100644 board/stmicroelectronics/stm32f769-disco/genimage.cfg
 create mode 100644 board/stmicroelectronics/stm32f769-disco/linux-sd.fragment
 create mode 100755 board/stmicroelectronics/stm32f769-disco/post-build.sh
 create mode 100644 board/stmicroelectronics/stm32f769-disco/readme.txt
 create mode 100644 configs/stm32f769_disco_sd_defconfig
DEVELOPERS +2 -0
index d9e95a3d0531..438d4738b307 100644
@@ -702,8 +702,10 @@ F:	package/xinetd/
 
 N:	Dario Binacchi <[email protected]>
 F:	board/bsh/
+F:	board/stmicroelectronics/stm32f769-disco/
 F:	configs/imx8mn_bsh_smm_s2_defconfig
 F:	configs/imx8mn_bsh_smm_s2_pro_defconfig
+F:	configs/stm32f769_disco_sd_defconfig
 F:	package/sscep/
 F:	package/uuu/
 
board/stmicroelectronics/stm32f769-disco/extlinux.conf new file +4 -0
new file mode 100644
index 000000000000..48483a01fc4e
@@ -0,0 +1,4 @@
+label stm32f769-disco-buildroot
+  kernel /zImage
+  devicetree /stm32f769-disco.dtb
+  append console=ttySTM0,115200 root=/dev/mmcblk0p2 rw rootfstype=ext2 rootwait earlyprintk consoleblank=0 ignore_loglevel
board/stmicroelectronics/stm32f769-disco/flash_sd.sh new file +18 -0
new file mode 100755
index 000000000000..0ff3ae7dbfb3
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+OUTPUT_DIR=$1
+
+if ! test -d "${OUTPUT_DIR}" ; then
+    echo "ERROR: no output directory specified."
+    echo "Usage: $0 OUTPUT_DIR"
+    exit 1
+fi
+
+"${OUTPUT_DIR}"/host/bin/openocd -f board/stm32f769i-disco.cfg \
+  -c "init" \
+  -c "reset init" \
+  -c "flash probe 0" \
+  -c "flash info 0" \
+  -c "flash write_image erase ${OUTPUT_DIR}/images/u-boot.bin 0x08000000" \
+  -c "reset run" \
+  -c "shutdown"
board/stmicroelectronics/stm32f769-disco/genimage.cfg new file +27 -0
new file mode 100644
index 000000000000..41f9da512489
@@ -0,0 +1,27 @@
+image boot.vfat {
+	vfat {
+		files = {
+			"zImage",
+			"stm32f769-disco.dtb",
+			"extlinux"
+		}
+	}
+
+	size = 16M
+}
+
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot {
+		partition-type = 0xC
+		image = "boot.vfat"
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext2"
+		size = 32M
+	}
+}
board/stmicroelectronics/stm32f769-disco/linux-sd.fragment new file +1 -0
new file mode 100644
index 000000000000..846229d0d468
@@ -0,0 +1 @@
+# CONFIG_XIP_KERNEL is not set
board/stmicroelectronics/stm32f769-disco/post-build.sh new file +7 -0
new file mode 100755
index 000000000000..c8cca3de8c9b
@@ -0,0 +1,7 @@
+#!/bin/sh
+BOARD_DIR="$(dirname "$0")"
+
+# Kernel is built without devpts support
+sed -i '/^devpts/d' "${TARGET_DIR}"/etc/fstab
+
+install -m 0644 -D "${BOARD_DIR}"/extlinux.conf "${BINARIES_DIR}"/extlinux/extlinux.conf
board/stmicroelectronics/stm32f769-disco/readme.txt new file +32 -0
new file mode 100644
index 000000000000..8f4f79a86138
@@ -0,0 +1,32 @@
+STM32F769 Discovery
+===================
+
+This tutorial describes how to use the predefined Buildroot
+configuration for the STM32F769 Discovery evaluation platform.
+
+Building
+--------
+
+  make stm32f769_disco_sd_defconfig
+  make
+
+Flashing
+--------
+
+  ./board/stmicroelectronics/stm32f769-disco/flash_sd.sh output/
+
+It will flash the U-boot bootloader.
+
+Creating SD card
+----------------
+
+Buildroot prepares an"sdcard.img" image in the output/images/ directory,
+ready to be dumped on a SD card. Launch the following command as root:
+
+  dd if=output/images/sdcard.img of=/dev/<your-sd-device>
+
+*** WARNING! This will destroy all the card content. Use with care! ***
+
+For details about the medium image layout and its content, see the
+definition in board/stmicroelectronics/stm32f769-disco/genimage.cfg.
+
configs/stm32f769_disco_sd_defconfig new file +30 -0
new file mode 100644
index 000000000000..2ae27fb2d852
@@ -0,0 +1,30 @@
+BR2_arm=y
+BR2_cortex_m7=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/stm32f769-disco/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/stm32f769-disco/genimage.cfg"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.108"
+BR2_LINUX_KERNEL_DEFCONFIG="stm32"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0xc0000000.config board/stmicroelectronics/stm32f769-disco/linux-sd.fragment"
+BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
+BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="zImage"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32f769-disco"
+BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config"
+# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="32M"
+# 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="2023.04"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32f769-disco"
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_PACKAGE_HOST_OPENOCD=y
Signature · 6 lines
2.32.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

Hi Dario,

Quoted 79 lines · Dario Binacchi

Board support package includes the following components:
- mainline Linux kernel 5.15.108
- mainline U-Boot 2023.04
- default packages from buildroot

Note: There is a problem in u-boot display management. It should display the ST microelectronics logo but "noise" is displayed (like when running the command dd if=/dev/urandom of=/dev/fb0 in Linux). I also tried to change version (even the first version in which this feature was introduced), but without success. Despite this I decided not to disable the video management configuration to remind us that it needs to be fixed :).

---

Changes in v2:
- Replace BR2_cortex_m4 with BR2_cortex_m7
- Use Linux kernel version 5.15.108

  DEVELOPERS                                    |  2 ++
  .../stm32f769-disco/extlinux.conf             |  4 +++
  .../stm32f769-disco/flash_sd.sh               | 18 +++++++++++
  .../stm32f769-disco/genimage.cfg              | 27 ++++++++++++++++
  .../stm32f769-disco/linux-sd.fragment         |  1 +
  .../stm32f769-disco/post-build.sh             |  7 ++++
  .../stm32f769-disco/readme.txt                | 32 +++++++++++++++++++
  configs/stm32f769_disco_sd_defconfig          | 30 +++++++++++++++++
  8 files changed, 121 insertions(+)

create mode 100644 board/stmicroelectronics/stm32f769-disco/extlinux.conf create mode 100755 board/stmicroelectronics/stm32f769-disco/flash_sd.sh create mode 100644 board/stmicroelectronics/stm32f769-disco/genimage.cfg create mode 100644 board/stmicroelectronics/stm32f769-disco/linux-sd.fragment create mode 100755 board/stmicroelectronics/stm32f769-disco/post-build.sh create mode 100644 board/stmicroelectronics/stm32f769-disco/readme.txt create mode 100644 configs/stm32f769_disco_sd_defconfig

DEVELOPERS +2 -0
index d9e95a3d0531..438d4738b307 100644
@@ -702,8 +702,10 @@ F:	package/xinetd/
 
  N:	Dario Binacchi <[email protected]>
  F:	board/bsh/
+F:	board/stmicroelectronics/stm32f769-disco/
  F:	configs/imx8mn_bsh_smm_s2_defconfig
  F:	configs/imx8mn_bsh_smm_s2_pro_defconfig
+F:	configs/stm32f769_disco_sd_defconfig
  F:	package/sscep/
  F:	package/uuu/
 
board/stmicroelectronics/stm32f769-disco/extlinux.conf new file +4 -0
new file mode 100644
index 000000000000..48483a01fc4e
@@ -0,0 +1,4 @@
+label stm32f769-disco-buildroot
+  kernel /zImage
+  devicetree /stm32f769-disco.dtb
+  append console=ttySTM0,115200 root=/dev/mmcblk0p2 rw rootfstype=ext2 rootwait earlyprintk consoleblank=0 ignore_loglevel
board/stmicroelectronics/stm32f769-disco/flash_sd.sh new file +8 -0
new file mode 100755
index 000000000000..0ff3ae7dbfb3
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+OUTPUT_DIR=$1
+
+if ! test -d "${OUTPUT_DIR}" ; then
+    echo "ERROR: no output directory specified."
+    echo "Usage: $0 OUTPUT_DIR"
+    exit 1

board/stmicroelectronics/stm32f769-disco/flash_sd.sh line 18

Quoted 10 lines
board/stmicroelectronics/stm32f769-disco/flash_sd.sh new file +10 -0
+fi
+
+"${OUTPUT_DIR}"/host/bin/openocd -f board/stm32f769i-disco.cfg \
+  -c "init" \
+  -c "reset init" \
+  -c "flash probe 0" \
+  -c "flash info 0" \
+  -c "flash write_image erase ${OUTPUT_DIR}/images/u-boot.bin 0x08000000" \
+  -c "reset run" \
+  -c "shutdown"

this script flashes the uboot rinary only, so can you please change its name to flash_uboot.sh or similar? Or if it is a uboot specific for sd-card then append a -uboot suffix.

Thank you!
Best regards

Signature · 2 lines
Giulio Benetti
CEO/CTO@Benetti Engineering sas
Quoted 117 lines
board/stmicroelectronics/stm32f769-disco/genimage.cfg new file +27 -0
new file mode 100644
index 000000000000..41f9da512489
@@ -0,0 +1,27 @@
+image boot.vfat {
+	vfat {
+		files = {
+			"zImage",
+			"stm32f769-disco.dtb",
+			"extlinux"
+		}
+	}
+
+	size = 16M
+}
+
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot {
+		partition-type = 0xC
+		image = "boot.vfat"
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext2"
+		size = 32M
+	}
+}
board/stmicroelectronics/stm32f769-disco/linux-sd.fragment new file +1 -0
new file mode 100644
index 000000000000..846229d0d468
@@ -0,0 +1 @@
+# CONFIG_XIP_KERNEL is not set
board/stmicroelectronics/stm32f769-disco/post-build.sh new file +7 -0
new file mode 100755
index 000000000000..c8cca3de8c9b
@@ -0,0 +1,7 @@
+#!/bin/sh
+BOARD_DIR="$(dirname "$0")"
+
+# Kernel is built without devpts support
+sed -i '/^devpts/d' "${TARGET_DIR}"/etc/fstab
+
+install -m 0644 -D "${BOARD_DIR}"/extlinux.conf "${BINARIES_DIR}"/extlinux/extlinux.conf
board/stmicroelectronics/stm32f769-disco/readme.txt new file +32 -0
new file mode 100644
index 000000000000..8f4f79a86138
@@ -0,0 +1,32 @@
+STM32F769 Discovery
+===================
+
+This tutorial describes how to use the predefined Buildroot
+configuration for the STM32F769 Discovery evaluation platform.
+
+Building
+--------
+
+  make stm32f769_disco_sd_defconfig
+  make
+
+Flashing
+--------
+
+  ./board/stmicroelectronics/stm32f769-disco/flash_sd.sh output/
+
+It will flash the U-boot bootloader.
+
+Creating SD card
+----------------
+
+Buildroot prepares an"sdcard.img" image in the output/images/ directory,
+ready to be dumped on a SD card. Launch the following command as root:
+
+  dd if=output/images/sdcard.img of=/dev/<your-sd-device>
+
+*** WARNING! This will destroy all the card content. Use with care! ***
+
+For details about the medium image layout and its content, see the
+definition in board/stmicroelectronics/stm32f769-disco/genimage.cfg.
+
configs/stm32f769_disco_sd_defconfig new file +20 -0
new file mode 100644
index 000000000000..2ae27fb2d852
@@ -0,0 +1,30 @@
+BR2_arm=y
+BR2_cortex_m7=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/stm32f769-disco/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/stm32f769-disco/genimage.cfg"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.108"
+BR2_LINUX_KERNEL_DEFCONFIG="stm32"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0xc0000000.config board/stmicroelectronics/stm32f769-disco/linux-sd.fragment"
+BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
+BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="zImage"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32f769-disco"
+BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config"
+# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="32M"
+# BR2_TARGET_ROOTFS_TAR is not set

configs/stm32f769_disco_sd_defconfig line 30

Quoted 10 lines
configs/stm32f769_disco_sd_defconfig new file +10 -0
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2023.04"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32f769-disco"
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_PACKAGE_HOST_OPENOCD=y

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#2 lore raw

Pardon, please drop this answer. The other stm32fxxx boards use the same script naming convention.

Sorry for the noise

Best regards

Signature · 2 lines
Giulio Benetti
CEO/CTO@Benetti Engineering sas
Quoted 97 lines · Giulio Benetti

Hi Dario,

Quoted 79 lines · Dario Binacchi

Board support package includes the following components:
- mainline Linux kernel 5.15.108
- mainline U-Boot 2023.04
- default packages from buildroot

Note: There is a problem in u-boot display management. It should display the ST microelectronics logo but "noise" is displayed (like when running the command dd if=/dev/urandom of=/dev/fb0 in Linux). I also tried to change version (even the first version in which this feature was introduced), but without success. Despite this I decided not to disable the video management configuration to remind us that it needs to be fixed :).

---

Changes in v2:
- Replace BR2_cortex_m4 with BR2_cortex_m7
- Use Linux kernel version 5.15.108

   DEVELOPERS                                    |  2 ++
   .../stm32f769-disco/extlinux.conf             |  4 +++
   .../stm32f769-disco/flash_sd.sh               | 18 +++++++++++
   .../stm32f769-disco/genimage.cfg              | 27 ++++++++++++++++
   .../stm32f769-disco/linux-sd.fragment         |  1 +
   .../stm32f769-disco/post-build.sh             |  7 ++++
   .../stm32f769-disco/readme.txt                | 32 +++++++++++++++++++
   configs/stm32f769_disco_sd_defconfig          | 30 +++++++++++++++++
   8 files changed, 121 insertions(+)

create mode 100644 board/stmicroelectronics/stm32f769-disco/extlinux.conf create mode 100755 board/stmicroelectronics/stm32f769-disco/flash_sd.sh create mode 100644 board/stmicroelectronics/stm32f769-disco/genimage.cfg create mode 100644 board/stmicroelectronics/stm32f769-disco/linux-sd.fragment create mode 100755 board/stmicroelectronics/stm32f769-disco/post-build.sh create mode 100644 board/stmicroelectronics/stm32f769-disco/readme.txt create mode 100644 configs/stm32f769_disco_sd_defconfig

DEVELOPERS +2 -0
index d9e95a3d0531..438d4738b307 100644
@@ -702,8 +702,10 @@ F:	package/xinetd/
 
   N:	Dario Binacchi <[email protected]>
   F:	board/bsh/
+F:	board/stmicroelectronics/stm32f769-disco/
   F:	configs/imx8mn_bsh_smm_s2_defconfig
   F:	configs/imx8mn_bsh_smm_s2_pro_defconfig
+F:	configs/stm32f769_disco_sd_defconfig
   F:	package/sscep/
   F:	package/uuu/
 
board/stmicroelectronics/stm32f769-disco/extlinux.conf new file +4 -0
new file mode 100644
index 000000000000..48483a01fc4e
@@ -0,0 +1,4 @@
+label stm32f769-disco-buildroot
+  kernel /zImage
+  devicetree /stm32f769-disco.dtb
+  append console=ttySTM0,115200 root=/dev/mmcblk0p2 rw rootfstype=ext2 rootwait earlyprintk consoleblank=0 ignore_loglevel
board/stmicroelectronics/stm32f769-disco/flash_sd.sh new file +8 -0
new file mode 100755
index 000000000000..0ff3ae7dbfb3
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+OUTPUT_DIR=$1
+
+if ! test -d "${OUTPUT_DIR}" ; then
+    echo "ERROR: no output directory specified."
+    echo "Usage: $0 OUTPUT_DIR"
+    exit 1

board/stmicroelectronics/stm32f769-disco/flash_sd.sh line 18

Quoted 10 lines
board/stmicroelectronics/stm32f769-disco/flash_sd.sh new file +10 -0
+fi
+
+"${OUTPUT_DIR}"/host/bin/openocd -f board/stm32f769i-disco.cfg \
+  -c "init" \
+  -c "reset init" \
+  -c "flash probe 0" \
+  -c "flash info 0" \
+  -c "flash write_image erase ${OUTPUT_DIR}/images/u-boot.bin 0x08000000" \
+  -c "reset run" \
+  -c "shutdown"

this script flashes the uboot rinary only, so can you please change its name to flash_uboot.sh or similar? Or if it is a uboot specific for sd-card then append a -uboot suffix.

Quoted 2 lines

Thank you!
Best regards

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

Reviewed-by on v2 1/1
#3 lore raw
In reply to Dario Binacchi

Hi Dario,

Quoted 13 lines · Dario Binacchi

Board support package includes the following components:
- mainline Linux kernel 5.15.108
- mainline U-Boot 2023.04
- default packages from buildroot

Note: There is a problem in u-boot display management. It should display the ST microelectronics logo but "noise" is displayed (like when running the command dd if=/dev/urandom of=/dev/fb0 in Linux). I also tried to change version (even the first version in which this feature was introduced), but without success. Despite this I decided not to disable the video management configuration to remind us that it needs to be fixed :).

Quoted 3 lines

Best regards

Signature · 2 lines
Giulio Benetti
CEO/CTO@Benetti Engineering sas
Quoted 189 lines

---

Changes in v2:
- Replace BR2_cortex_m4 with BR2_cortex_m7
- Use Linux kernel version 5.15.108

  DEVELOPERS                                    |  2 ++
  .../stm32f769-disco/extlinux.conf             |  4 +++
  .../stm32f769-disco/flash_sd.sh               | 18 +++++++++++
  .../stm32f769-disco/genimage.cfg              | 27 ++++++++++++++++
  .../stm32f769-disco/linux-sd.fragment         |  1 +
  .../stm32f769-disco/post-build.sh             |  7 ++++
  .../stm32f769-disco/readme.txt                | 32 +++++++++++++++++++
  configs/stm32f769_disco_sd_defconfig          | 30 +++++++++++++++++
  8 files changed, 121 insertions(+)

create mode 100644 board/stmicroelectronics/stm32f769-disco/extlinux.conf create mode 100755 board/stmicroelectronics/stm32f769-disco/flash_sd.sh create mode 100644 board/stmicroelectronics/stm32f769-disco/genimage.cfg create mode 100644 board/stmicroelectronics/stm32f769-disco/linux-sd.fragment create mode 100755 board/stmicroelectronics/stm32f769-disco/post-build.sh create mode 100644 board/stmicroelectronics/stm32f769-disco/readme.txt create mode 100644 configs/stm32f769_disco_sd_defconfig

DEVELOPERS +2 -0
index d9e95a3d0531..438d4738b307 100644
@@ -702,8 +702,10 @@ F:	package/xinetd/
 
  N:	Dario Binacchi <[email protected]>
  F:	board/bsh/
+F:	board/stmicroelectronics/stm32f769-disco/
  F:	configs/imx8mn_bsh_smm_s2_defconfig
  F:	configs/imx8mn_bsh_smm_s2_pro_defconfig
+F:	configs/stm32f769_disco_sd_defconfig
  F:	package/sscep/
  F:	package/uuu/
 
board/stmicroelectronics/stm32f769-disco/extlinux.conf new file +4 -0
new file mode 100644
index 000000000000..48483a01fc4e
@@ -0,0 +1,4 @@
+label stm32f769-disco-buildroot
+  kernel /zImage
+  devicetree /stm32f769-disco.dtb
+  append console=ttySTM0,115200 root=/dev/mmcblk0p2 rw rootfstype=ext2 rootwait earlyprintk consoleblank=0 ignore_loglevel
board/stmicroelectronics/stm32f769-disco/flash_sd.sh new file +18 -0
new file mode 100755
index 000000000000..0ff3ae7dbfb3
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+OUTPUT_DIR=$1
+
+if ! test -d "${OUTPUT_DIR}" ; then
+    echo "ERROR: no output directory specified."
+    echo "Usage: $0 OUTPUT_DIR"
+    exit 1
+fi
+
+"${OUTPUT_DIR}"/host/bin/openocd -f board/stm32f769i-disco.cfg \
+  -c "init" \
+  -c "reset init" \
+  -c "flash probe 0" \
+  -c "flash info 0" \
+  -c "flash write_image erase ${OUTPUT_DIR}/images/u-boot.bin 0x08000000" \
+  -c "reset run" \
+  -c "shutdown"
board/stmicroelectronics/stm32f769-disco/genimage.cfg new file +27 -0
new file mode 100644
index 000000000000..41f9da512489
@@ -0,0 +1,27 @@
+image boot.vfat {
+	vfat {
+		files = {
+			"zImage",
+			"stm32f769-disco.dtb",
+			"extlinux"
+		}
+	}
+
+	size = 16M
+}
+
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot {
+		partition-type = 0xC
+		image = "boot.vfat"
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext2"
+		size = 32M
+	}
+}
board/stmicroelectronics/stm32f769-disco/linux-sd.fragment new file +1 -0
new file mode 100644
index 000000000000..846229d0d468
@@ -0,0 +1 @@
+# CONFIG_XIP_KERNEL is not set
board/stmicroelectronics/stm32f769-disco/post-build.sh new file +7 -0
new file mode 100755
index 000000000000..c8cca3de8c9b
@@ -0,0 +1,7 @@
+#!/bin/sh
+BOARD_DIR="$(dirname "$0")"
+
+# Kernel is built without devpts support
+sed -i '/^devpts/d' "${TARGET_DIR}"/etc/fstab
+
+install -m 0644 -D "${BOARD_DIR}"/extlinux.conf "${BINARIES_DIR}"/extlinux/extlinux.conf
board/stmicroelectronics/stm32f769-disco/readme.txt new file +32 -0
new file mode 100644
index 000000000000..8f4f79a86138
@@ -0,0 +1,32 @@
+STM32F769 Discovery
+===================
+
+This tutorial describes how to use the predefined Buildroot
+configuration for the STM32F769 Discovery evaluation platform.
+
+Building
+--------
+
+  make stm32f769_disco_sd_defconfig
+  make
+
+Flashing
+--------
+
+  ./board/stmicroelectronics/stm32f769-disco/flash_sd.sh output/
+
+It will flash the U-boot bootloader.
+
+Creating SD card
+----------------
+
+Buildroot prepares an"sdcard.img" image in the output/images/ directory,
+ready to be dumped on a SD card. Launch the following command as root:
+
+  dd if=output/images/sdcard.img of=/dev/<your-sd-device>
+
+*** WARNING! This will destroy all the card content. Use with care! ***
+
+For details about the medium image layout and its content, see the
+definition in board/stmicroelectronics/stm32f769-disco/genimage.cfg.
+
configs/stm32f769_disco_sd_defconfig new file +20 -0
new file mode 100644
index 000000000000..2ae27fb2d852
@@ -0,0 +1,30 @@
+BR2_arm=y
+BR2_cortex_m7=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/stm32f769-disco/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/stm32f769-disco/genimage.cfg"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.108"
+BR2_LINUX_KERNEL_DEFCONFIG="stm32"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0xc0000000.config board/stmicroelectronics/stm32f769-disco/linux-sd.fragment"
+BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
+BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="zImage"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32f769-disco"
+BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config"
+# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="32M"
+# BR2_TARGET_ROOTFS_TAR is not set

configs/stm32f769_disco_sd_defconfig line 30

Quoted 10 lines
configs/stm32f769_disco_sd_defconfig new file +10 -0
+BR2_TARGET_UBOOT=y
+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION=y
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2023.04"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32f769-disco"
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_PACKAGE_HOST_OPENOCD=y

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#4 lore raw
In reply to Dario Binacchi

Dario, All,

On 2023-04-23 19:08 +0200, Dario Binacchi spake thusly:

Quoted 13 lines

Board support package includes the following components:
- mainline Linux kernel 5.15.108
- mainline U-Boot 2023.04
- default packages from buildroot

Note: There is a problem in u-boot display management. It should display the ST microelectronics logo but "noise" is displayed (like when running the command dd if=/dev/urandom of=/dev/fb0 in Linux). I also tried to change version (even the first version in which this feature was introduced), but without success. Despite this I decided not to disable the video management configuration to remind us that it needs to be fixed :).

Quoted 3 lines

Applied to master, thanks.

Regards,
Yann E. MORIN.

Quoted 206 lines

---

Changes in v2:
- Replace BR2_cortex_m4 with BR2_cortex_m7
- Use Linux kernel version 5.15.108

 DEVELOPERS                                    |  2 ++
 .../stm32f769-disco/extlinux.conf             |  4 +++
 .../stm32f769-disco/flash_sd.sh               | 18 +++++++++++
 .../stm32f769-disco/genimage.cfg              | 27 ++++++++++++++++
 .../stm32f769-disco/linux-sd.fragment         |  1 +
 .../stm32f769-disco/post-build.sh             |  7 ++++
 .../stm32f769-disco/readme.txt                | 32 +++++++++++++++++++
 configs/stm32f769_disco_sd_defconfig          | 30 +++++++++++++++++
 8 files changed, 121 insertions(+)
 create mode 100644 board/stmicroelectronics/stm32f769-disco/extlinux.conf
 create mode 100755 board/stmicroelectronics/stm32f769-disco/flash_sd.sh
 create mode 100644 board/stmicroelectronics/stm32f769-disco/genimage.cfg
 create mode 100644 board/stmicroelectronics/stm32f769-disco/linux-sd.fragment
 create mode 100755 board/stmicroelectronics/stm32f769-disco/post-build.sh
 create mode 100644 board/stmicroelectronics/stm32f769-disco/readme.txt
 create mode 100644 configs/stm32f769_disco_sd_defconfig
DEVELOPERS +2 -0
index d9e95a3d0531..438d4738b307 100644
@@ -702,8 +702,10 @@ F:	package/xinetd/
 
 N:	Dario Binacchi <[email protected]>
 F:	board/bsh/
+F:	board/stmicroelectronics/stm32f769-disco/
 F:	configs/imx8mn_bsh_smm_s2_defconfig
 F:	configs/imx8mn_bsh_smm_s2_pro_defconfig
+F:	configs/stm32f769_disco_sd_defconfig
 F:	package/sscep/
 F:	package/uuu/
 
board/stmicroelectronics/stm32f769-disco/extlinux.conf new file +4 -0
new file mode 100644
index 000000000000..48483a01fc4e
@@ -0,0 +1,4 @@
+label stm32f769-disco-buildroot
+  kernel /zImage
+  devicetree /stm32f769-disco.dtb
+  append console=ttySTM0,115200 root=/dev/mmcblk0p2 rw rootfstype=ext2 rootwait earlyprintk consoleblank=0 ignore_loglevel
board/stmicroelectronics/stm32f769-disco/flash_sd.sh new file +18 -0
new file mode 100755
index 000000000000..0ff3ae7dbfb3
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+OUTPUT_DIR=$1
+
+if ! test -d "${OUTPUT_DIR}" ; then
+    echo "ERROR: no output directory specified."
+    echo "Usage: $0 OUTPUT_DIR"
+    exit 1
+fi
+
+"${OUTPUT_DIR}"/host/bin/openocd -f board/stm32f769i-disco.cfg \
+  -c "init" \
+  -c "reset init" \
+  -c "flash probe 0" \
+  -c "flash info 0" \
+  -c "flash write_image erase ${OUTPUT_DIR}/images/u-boot.bin 0x08000000" \
+  -c "reset run" \
+  -c "shutdown"
board/stmicroelectronics/stm32f769-disco/genimage.cfg new file +27 -0
new file mode 100644
index 000000000000..41f9da512489
@@ -0,0 +1,27 @@
+image boot.vfat {
+	vfat {
+		files = {
+			"zImage",
+			"stm32f769-disco.dtb",
+			"extlinux"
+		}
+	}
+
+	size = 16M
+}
+
+image sdcard.img {
+	hdimage {
+	}
+
+	partition u-boot {
+		partition-type = 0xC
+		image = "boot.vfat"
+	}
+
+	partition rootfs {
+		partition-type = 0x83
+		image = "rootfs.ext2"
+		size = 32M
+	}
+}
board/stmicroelectronics/stm32f769-disco/linux-sd.fragment new file +1 -0
new file mode 100644
index 000000000000..846229d0d468
@@ -0,0 +1 @@
+# CONFIG_XIP_KERNEL is not set
board/stmicroelectronics/stm32f769-disco/post-build.sh new file +7 -0
new file mode 100755
index 000000000000..c8cca3de8c9b
@@ -0,0 +1,7 @@
+#!/bin/sh
+BOARD_DIR="$(dirname "$0")"
+
+# Kernel is built without devpts support
+sed -i '/^devpts/d' "${TARGET_DIR}"/etc/fstab
+
+install -m 0644 -D "${BOARD_DIR}"/extlinux.conf "${BINARIES_DIR}"/extlinux/extlinux.conf
board/stmicroelectronics/stm32f769-disco/readme.txt new file +32 -0
new file mode 100644
index 000000000000..8f4f79a86138
@@ -0,0 +1,32 @@
+STM32F769 Discovery
+===================
+
+This tutorial describes how to use the predefined Buildroot
+configuration for the STM32F769 Discovery evaluation platform.
+
+Building
+--------
+
+  make stm32f769_disco_sd_defconfig
+  make
+
+Flashing
+--------
+
+  ./board/stmicroelectronics/stm32f769-disco/flash_sd.sh output/
+
+It will flash the U-boot bootloader.
+
+Creating SD card
+----------------
+
+Buildroot prepares an"sdcard.img" image in the output/images/ directory,
+ready to be dumped on a SD card. Launch the following command as root:
+
+  dd if=output/images/sdcard.img of=/dev/<your-sd-device>
+
+*** WARNING! This will destroy all the card content. Use with care! ***
+
+For details about the medium image layout and its content, see the
+definition in board/stmicroelectronics/stm32f769-disco/genimage.cfg.
+
configs/stm32f769_disco_sd_defconfig new file +30 -0
new file mode 100644
index 000000000000..2ae27fb2d852
@@ -0,0 +1,30 @@
+BR2_arm=y
+BR2_cortex_m7=y
+BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_15=y
+BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/stm32f769-disco/post-build.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh"
+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/stm32f769-disco/genimage.cfg"
+BR2_LINUX_KERNEL=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION=y
+BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15.108"
+BR2_LINUX_KERNEL_DEFCONFIG="stm32"
+BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0xc0000000.config board/stmicroelectronics/stm32f769-disco/linux-sd.fragment"
+BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
+BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="zImage"
+BR2_LINUX_KERNEL_DTS_SUPPORT=y
+BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32f769-disco"
+BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config"
+# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
+BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_SIZE="32M"
+# 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="2023.04"
+BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32f769-disco"
+BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_PACKAGE_HOST_OPENOCD=y
Signature · 6 lines
2.32.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot