configs/stm32f469_disco: fix kernel bootup
PATCH v2 1/1 configs/stm32f469_disco: fix kernel bootup
As described by [1], the kernel generated by the configuration for the STM32f469 Discovery board is buggy. Using a newer kernel, as suggested by [1], increases the dtb and Kernel image size. In particular, the 5.12 version of the kernel generates a dtb and a kernel image whose sum exceeds the 2 MByte of the flash module.
So I decided to replace the afboot-stm32 bootloader in the flash with U-boot to easily boot the system from sdcard without having to worry about the size of dtb, kernel and rootfs generated by the configuration.
This solution allows you to fix the kernel boot issue and makes it possible to use its future versions.
---
Changes in v2:
- Replace stm32f429 with stm32f469 in the commit header.
.../stm32f469-disco/extlinux.conf | 4 +++ .../stm32f469-disco/flash.sh | 4 +-- .../stm32f469-disco/genimage.cfg | 27 +++++++++++++++ .../stm32f469-disco/linux.fragment | 1 + ...sco-don-t-force-init-in-chosen-boota.patch | 33 ------------------- .../stm32f469-disco/post-build.sh | 4 +++ .../stm32f469-disco/readme.txt | 16 +++++++-- configs/stm32f469_disco_defconfig | 19 ++++++----- 8 files changed, 62 insertions(+), 46 deletions(-) create mode 100644 board/stmicroelectronics/stm32f469-disco/extlinux.conf create mode 100644 board/stmicroelectronics/stm32f469-disco/genimage.cfg create mode 100644 board/stmicroelectronics/stm32f469-disco/linux.fragment delete mode 100644 board/stmicroelectronics/stm32f469-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patch create mode 100755 board/stmicroelectronics/stm32f469-disco/post-build.sh
board/stmicroelectronics/stm32f469-disco/extlinux.conf new file +4 -0
@@ -0,0 +1,4 @@ +label stm32f469-disco-buildroot + kernel /zImage + devicetree /stm32f469-disco.dtb + append console=ttySTM0,115200 root=/dev/mmcblk0p2 rw rootfstype=ext2 rootwait earlyprintk consoleblank=0 ignore_loglevel
board/stmicroelectronics/stm32f469-disco/flash.sh +1 -3
@@ -13,8 +13,6 @@ ${OUTPUT_DIR}/host/bin/openocd -f board/stm32f469discovery.cfg \ -c "reset init" \ -c "flash probe 0" \ -c "flash info 0" \ - -c "flash write_image erase ${OUTPUT_DIR}/images/stm32f469i-disco.bin 0x08000000" \ - -c "flash write_image erase ${OUTPUT_DIR}/images/stm32f469-disco.dtb 0x08004000" \ - -c "flash write_image erase ${OUTPUT_DIR}/images/xipImage 0x08008000" \ + -c "flash write_image erase ${OUTPUT_DIR}/images/u-boot.bin 0x08000000" \ -c "reset run" \ -c "shutdown"
board/stmicroelectronics/stm32f469-disco/genimage.cfg new file +27 -0
@@ -0,0 +1,27 @@ +image boot.vfat { + vfat { + files = { + "zImage", + "stm32f469-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/stm32f469-disco/linux.fragment new file +1 -0
@@ -0,0 +1 @@ +# CONFIG_XIP_KERNEL is not set
board/stmicroelectronics/stm32f469-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patch deleted +0 -33
@@ -1,33 +0,0 @@ -From c8f8f33c2f0460a34c9545b01a7972a7ed2df0e9 Mon Sep 17 00:00:00 2001 -From: Christophe Priouzeau <[email protected]> -Date: Mon, 29 May 2017 13:38:16 +0200 -Subject: [PATCH] ARM: stm32f249-disco: don't force init= in /chosen/bootargs - -There is no reason to override the kernel's default init= value, as -this breaks userspace that assumes the kernel default of /init is -used. Since stm32 is often used with a minimal bootloader -(afboot-stm32) that doesn't provide any mechanism to override the DTB, -we need to adjust the kernel command line in the Device Tree source. - -Signed-off-by: Thomas Petazzoni <[email protected]> -Signed-off-by: Christophe Priouzeau <[email protected]> ---- - arch/arm/boot/dts/stm32f469-disco.dts | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm/boot/dts/stm32f469-disco.dts b/arch/arm/boot/dts/stm32f469-disco.dts -index 0dd56ef..93ee1b2 100644 ---- a/arch/arm/boot/dts/stm32f469-disco.dts -+++ b/arch/arm/boot/dts/stm32f469-disco.dts -@@ -53,7 +53,7 @@ - compatible = "st,stm32f469i-disco", "st,stm32f469"; - - chosen { -- bootargs = "root=/dev/ram rdinit=/linuxrc"; -+ bootargs = "root=/dev/ram"; - stdout-path = "serial0:115200n8"; - }; - --- -2.7.4 -
board/stmicroelectronics/stm32f469-disco/post-build.sh new file +4 -0
@@ -0,0 +1,4 @@ +#!/bin/sh +BOARD_DIR="$(dirname $0)" + +install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux/extlinux.conf
board/stmicroelectronics/stm32f469-disco/readme.txt +14 -2
@@ -15,5 +15,17 @@ Flashing ./board/stmicroelectronics/stm32f469-disco/flash.sh output/ -It will flash the minimal bootloader, the Device Tree Blob, and the -kernel image which includes the root filesystem as initramfs. +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/stm32f469-disco/genimage.cfg.
configs/stm32f469_disco_defconfig +11 -8
@@ -1,19 +1,22 @@ 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/common/stm32f4xx/stm32-post-build.sh" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh board/stmicroelectronics/stm32f469-disco/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/stm32f469-disco/genimage.cfg" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.11" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.12" BR2_LINUX_KERNEL_DEFCONFIG="stm32" -BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0x00000000.config" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0x00000000.config board/stmicroelectronics/stm32f469-disco/linux.fragment" BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y -BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="xipImage" +BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="zImage" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32f469-disco" BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" -BR2_TARGET_ROOTFS_INITRAMFS=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_SIZE="32M" # BR2_TARGET_ROOTFS_TAR is not set -BR2_TARGET_AFBOOT_STM32=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32f469-discovery" +BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_OPENOCD=y
Signature · 1 line
2.17.1
A message that is not in the archive (sent off-list or not yet received): AM0PR10MB2817F9DD331EF710AF2F4E6AE3369@AM0PR10MB2817.EURPRD10.PROD.OUTLOOK.COM
PATCH v2 1/1 configs/stm32f469_disco: fix kernel bootup
Quoted 17 lines · Christophe PRIOUZEAU
------------------------------------------------------------------------
*From:* Dario Binacchi <[email protected]>
*Sent:* Monday, June 7, 2021 6:31 PM
*To:* buildroot at buildroot.org <[email protected]> *Cc:* Christophe PRIOUZEAU <[email protected]>; Dario Binacchi <[email protected]>
*Subject:* [PATCH v2 1/1] configs/stm32f469_disco: fix kernel bootup As described by [1], the kernel generated by the configuration for the STM32f469 Discovery board is buggy. Using a newer kernel, as suggested by [1], increases the dtb and Kernel image size. In particular, the 5.12 version of the kernel generates a dtb and a kernel image whose sum exceeds the 2 MByte of the flash module.So I decided to replace the afboot-stm32 bootloader in the flash with U-boot to easily boot the system from sdcard without having to worry about the size of dtb, kernel and rootfs generated by the configuration.
Quoted 8 lines
This solution allows you to fix the kernel boot issue and makes it possible to use its future versions.
[1]
http://buildroot-busybox.2317881.n4.nabble.com/Bug-11746-New-stm32f469-didn-t-work-correctly-td219644.html
<http://buildroot-busybox.2317881.n4.nabble.com/Bug-11746-New-stm32f469-didn-t-work-correctly-td219644.html>Signed-off-by Dario Binacchi <[email protected]>
Quoted 221 lines
---
Changes in v2:
- Replace stm32f429 with stm32f469 in the commit header.?.../stm32f469-disco/extlinux.conf???????????? |? 4 +++ ?.../stm32f469-disco/flash.sh????????????????? |? 4 +-- ?.../stm32f469-disco/genimage.cfg????????????? | 27 +++++++++++++++ ?.../stm32f469-disco/linux.fragment??????????? |? 1 + ?...sco-don-t-force-init-in-chosen-boota.patch | 33 ------------------- ?.../stm32f469-disco/post-build.sh???????????? |? 4 +++ ?.../stm32f469-disco/readme.txt??????????????? | 16 +++++++-- ?configs/stm32f469_disco_defconfig???????????? | 19 ++++++-----?8 files changed, 62 insertions(+), 46 deletions(-)
?create mode 100644board/stmicroelectronics/stm32f469-disco/extlinux.conf
?create mode 100644 board/stmicroelectronics/stm32f469-disco/genimage.cfg
?create mode 100644 board/stmicroelectronics/stm32f469-disco/linux.fragment
?delete mode 100644board/stmicroelectronics/stm32f469-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patch
?create mode 100755board/stmicroelectronics/stm32f469-disco/post-build.shboard/stmicroelectronics/stm32f469-disco/extlinux.conf new file +4
-0@@ -0,0 +1,4 @@ +label stm32f469-disco-buildroot +? kernel /zImage +? devicetree /stm32f469-disco.dtb +? append console=ttySTM0,115200 root=/dev/mmcblk0p2 rw rootfstype=ext2rootwait earlyprintk consoleblank=0
ignore_loglevelboard/stmicroelectronics/stm32f469-disco/flash.sh +1
-3@@ -13,8 +13,6 @@ ${OUTPUT_DIR}/host/bin/openocd -f board/stm32f469discovery.cfg \ ?? -c "reset init" \ ?? -c "flash probe 0" \ ?? -c "flash info 0" \ -? -c "flash write_image erase ${OUTPUT_DIR}/images/stm32f469i-disco.bin 0x08000000" \ -? -c "flash write_image erase ${OUTPUT_DIR}/images/stm32f469-disco.dtb 0x08004000" \ -? -c "flash write_image erase ${OUTPUT_DIR}/images/xipImage 0x08008000" \ +? -c "flash write_image erase ${OUTPUT_DIR}/images/u-boot.bin 0x08000000" \ ?? -c "reset run" \ ?? -c "shutdown"board/stmicroelectronics/stm32f469-disco/genimage.cfg new file +27
-0@@ -0,0 +1,27 @@ +image boot.vfat { +?????? vfat { +?????????????? files = { +?????????????????????? "zImage", +?????????????????????? "stm32f469-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/stm32f469-disco/linux.fragment new file +1
-0@@ -0,0 +1 @@ +# CONFIG_XIP_KERNEL is not set(quoted diff) +0
-0
a/board/stmicroelectronics/stm32f469-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patchb/board/stmicroelectronics/stm32f469-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patchdeleted file mode 100644
index 750e477dfc..0000000000
---a/board/stmicroelectronics/stm32f469-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patch+++/dev/nullboard/stmicroelectronics/stm32f469-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patch deleted +0
-4@@ -1,33 +0,0 @@ -From c8f8f33c2f0460a34c9545b01a7972a7ed2df0e9 Mon Sep 17 00:00:00 2001 -From: Christophe Priouzeau <[email protected]> -Date: Mon, 29 May 2017 13:38:16 +0200 -Subject: [PATCH] ARM: stm32f249-disco: don't force init= in/chosen/bootargs
board/stmicroelectronics/stm32f469-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patch deleted +0
-14- -There is no reason to override the kernel's default init= value, as -this breaks userspace that assumes the kernel default of /init is -used. Since stm32 is often used with a minimal bootloader -(afboot-stm32) that doesn't provide any mechanism to override the DTB, -we need to adjust the kernel command line in the Device Tree source. - -Signed-off-by: Thomas Petazzoni <[email protected]> -Signed-off-by: Christophe Priouzeau <[email protected]> ---- - arch/arm/boot/dts/stm32f469-disco.dts | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm/boot/dts/stm32f469-disco.dts
b/arch/arm/boot/dts/stm32f469-disco.dtsboard/stmicroelectronics/stm32f469-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patch deleted +0
-15-index 0dd56ef..93ee1b2 100644 ---- a/arch/arm/boot/dts/stm32f469-disco.dts -+++ b/arch/arm/boot/dts/stm32f469-disco.dts -@@ -53,7 +53,7 @@ -??????? compatible = "st,stm32f469i-disco", "st,stm32f469"; - -??????? chosen { --????????????? bootargs = "root=/dev/ram rdinit=/linuxrc"; -+????????????? bootargs = "root=/dev/ram"; -??????????????? stdout-path = "serial0:115200n8"; -??????? }; - --- -2.7.4 -board/stmicroelectronics/stm32f469-disco/post-build.sh new file +4
-0@@ -0,0 +1,4 @@ +#!/bin/sh +BOARD_DIR="$(dirname $0)" + +install -m 0644 -D $BOARD_DIR/extlinux.conf
$BINARIES_DIR/extlinux/extlinux.confboard/stmicroelectronics/stm32f469-disco/readme.txt +14
-2@@ -15,5 +15,17 @@ Flashing ?? ./board/stmicroelectronics/stm32f469-disco/flash.sh output/ -It will flash the minimal bootloader, the Device Tree Blob, and the -kernel image which includes the root filesystem as initramfs. +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/stm32f469-disco/genimage.cfg.configs/stm32f469_disco_defconfig +1
-3@@ -1,19 +1,22 @@ ?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/common/stm32f4xx/stm32-post-build.sh" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh
board/stmicroelectronics/stm32f469-disco/post-build.sh"configs/stm32f469_disco_defconfig +2
-0+BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-cboard/stmicroelectronics/stm32f469-disco/genimage.cfg"
?BR2_LINUX_KERNEL=y ?BR2_LINUX_KERNEL_CUSTOM_VERSION=yconfigs/stm32f469_disco_defconfig +2
-2-BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.11" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.12" ?BR2_LINUX_KERNEL_DEFCONFIG="stm32" -BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0x00000000.config" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0x00000000.configboard/stmicroelectronics/stm32f469-disco/linux.fragment"
?BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=yconfigs/stm32f469_disco_defconfig +6
-3-BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="xipImage" +BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="zImage" ?BR2_LINUX_KERNEL_DTS_SUPPORT=y ?BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32f469-disco" ?BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" -BR2_TARGET_ROOTFS_INITRAMFS=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_SIZE="32M" ?# BR2_TARGET_ROOTFS_TAR is not set -BR2_TARGET_AFBOOT_STM32=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32f469-discovery" +BR2_PACKAGE_HOST_GENIMAGE=y ?BR2_PACKAGE_HOST_OPENOCD=ySignature · 4 lines
2.17.1 ST Restricted
Signature · 5 lines
Best regards / Cordialement, Christophe Priouzeau | Tel: +33 244027320 STMicroelectronics ST online: www.st.com<http://www.st.com/>
PATCH v2 1/1 configs/stm32f469_disco: fix kernel bootup
In reply to Dario BinacchiQuoted 8 lines · Dario Binacchi via buildroot
As described by [1], the kernel generated by the configuration for the STM32f469 Discovery board is buggy. Using a newer kernel, as suggested by [1], increases the dtb and Kernel image size. In particular, the 5.12 version of the kernel generates a dtb and a kernel image whose sum exceeds the 2 MByte of the flash module.
So I decided to replace the afboot-stm32 bootloader in the flash with U-boot to easily boot the system from sdcard without having to worry
This is pretty unfortunate, since this is pretty much the flagship platform for
showcasing XIP support in the kernel.
However, the current situation is broken, so *something* needs to be done.
I've experimented a bit with kernel config options but also wasn't able to
reduce it to below 2MB. The biggest improvement I got was 150K by removing keyboard and mouse support. We could probably also et below 2MB by removing the block layer, the SD card driver, and the ext4 filesystem - but then there's not much left any more...
Maybe with LTO, but that requires clang at the moment.
Therefore, applied to master, thanks, with two modifications, see below.
[snip]
configs/stm32f469_disco_defconfig line 4
Quoted 9 lines
configs/stm32f469_disco_defconfig +0
-2@@ -1,19 +1,22 @@ 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
Even though 5.12 is the default, we really need it explicitly here. Otherwise,
the next linux bump will break it.
configs/stm32f469_disco_defconfig line 8
Quoted 8 lines
configs/stm32f469_disco_defconfig +4
-2-BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh" +BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh board/stmicroelectronics/stm32f469-disco/post-build.sh" +BR2_ROOTFS_POST_IMAGE_SCRIPT="support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/stmicroelectronics/stm32f469-disco/genimage.cfg" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.11" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.12"
There's a 5.12.11 now in stable so I took that one.
Regards,
Arnout
Quoted 19 lines
configs/stm32f469_disco_defconfig +7
-4BR2_LINUX_KERNEL_DEFCONFIG="stm32" -BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0x00000000.config" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0x00000000.config board/stmicroelectronics/stm32f469-disco/linux.fragment" BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y -BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="xipImage" +BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="zImage" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32f469-disco" BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" -BR2_TARGET_ROOTFS_INITRAMFS=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_SIZE="32M" # BR2_TARGET_ROOTFS_TAR is not set -BR2_TARGET_AFBOOT_STM32=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="stm32f469-discovery" +BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_OPENOCD=y
PATCH v2 1/1 configs/stm32f469_disco: fix kernel bootup
In reply to Dario BinacchiQuoted 12 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Dario" == Dario Binacchi via buildroot <[email protected]> writes:
As described by [1], the kernel generated by the configuration for the STM32f469 Discovery board is buggy. Using a newer kernel, as suggested by [1], increases the dtb and Kernel image size. In particular, the 5.12 version of the kernel generates a dtb and a kernel image whose sum exceeds the 2 MByte of the flash module.
So I decided to replace the afboot-stm32 bootloader in the flash with U-boot to easily boot the system from sdcard without having to worry about the size of dtb, kernel and rootfs generated by the configuration.
Quoted 6 lines
This solution allows you to fix the kernel boot issue and makes it possible to use its future versions.
Signed-off-by Dario Binacchi <[email protected]>
Committed to 2021.02.x and 2021.05.x, thanks.
I notice that the defconfig doesn't pull in host dosfstools / mtools, which are needed to build the fat filesystem image, so I've sent a patch for that.
Signature · 1 line
Bye, Peter Korsgaard