configs/stm32f429_disco: fix kernel bootup
v2 cover configs/stm32f429_disco: fix kernel bootup
Inspired by Arnout Vandecappelle's review of the kernel bootup fix patch for the stm32f429-disco board I created this series which required the afboot bootloader update and the kernel bootup fix for the stm32f469_disco_xip_defconfig configuration. I therefore renamed the configurations of the stm32f429 and stm32f469 boards to make them more explicit.
Dario Binacchi (4):
configs/stm32f469_xip_disco: fix kernel bootup boot/afboot-stm32: upgrade version configs/stm32f429_disco: fix kernel bootup configs/stm32f4{2|6}9_*_defconfig: rename configurations
.../stm32f429-disco/flash.sh | 2 +-
.../stm32f429-disco/linux.config | 120 ++++++++++++++++++
...sco-don-t-force-init-in-chosen-boota.patch | 32 -----
.../stm32f469-disco/{flash.sh => flash_sd.sh} | 0
.../stm32f469-disco/flash_xip.sh | 2 +-
.../{linux.fragment => linux-sd.fragment} | 0
.../stm32f469-disco/linux-xip.config | 8 +-
...32f469-i-Update-kernel-start-address.patch | 56 --------
...fault-dram-address-without-remapping.patch | 38 ------
.../stm32f469-disco/readme.txt | 4 +-
.../stm32f469-disco/readme_xip.txt | 2 +-
boot/afboot-stm32/Config.in | 32 +++++
boot/afboot-stm32/afboot-stm32.hash | 2 +-
boot/afboot-stm32/afboot-stm32.mk | 18 ++-
...efconfig => stm32f429_disco_xip_defconfig} | 11 +-
...defconfig => stm32f469_disco_sd_defconfig} | 2 +-
configs/stm32f469_disco_xip_defconfig | 4 +-
17 files changed, 187 insertions(+), 146 deletions(-)
create mode 100644 board/stmicroelectronics/stm32f429-disco/linux.config
delete mode 100644 board/stmicroelectronics/stm32f429-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patch
rename board/stmicroelectronics/stm32f469-disco/{flash.sh => flash_sd.sh} (100%)
mode change 100644 => 100755 board/stmicroelectronics/stm32f469-disco/flash_xip.sh
rename board/stmicroelectronics/stm32f469-disco/{linux.fragment => linux-sd.fragment} (100%)
delete mode 100644 board/stmicroelectronics/stm32f469-disco/patches/afboot-stm32/0001-stm32f469-i-Update-kernel-start-address.patch
delete mode 100644 board/stmicroelectronics/stm32f469-disco/patches/linux/0001-Use-default-dram-address-without-remapping.patch
rename configs/{stm32f429_disco_defconfig => stm32f429_disco_xip_defconfig} (63%)
rename configs/{stm32f469_disco_defconfig => stm32f469_disco_sd_defconfig} (97%)Signature · 6 lines
2.17.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH RESEND v2 1/4 configs/stm32f469_xip_disco: fix kernel bootup
Testing this configuration on the stm32f469-disco board failed. Removing the changes on the DRAM I got a bootable image. I also changed the kernel load address from 0x8010000 to 0x800C000 to allocate more space to the kernel since 32kB for the device tree is enough.
--- .../stm32f469-disco/flash_xip.sh | 2 +- .../stm32f469-disco/linux-xip.config | 8 +-- ...32f469-i-Update-kernel-start-address.patch | 56 ------------------- ...69i-disco-change-kernel-load-address.patch | 26 +++++++++ ...fault-dram-address-without-remapping.patch | 38 ------------- configs/stm32f469_disco_xip_defconfig | 1 + 6 files changed, 32 insertions(+), 99 deletions(-) mode change 100644 => 100755 board/stmicroelectronics/stm32f469-disco/flash_xip.sh delete mode 100644 board/stmicroelectronics/stm32f469-disco/patches/afboot-stm32/0001-stm32f469-i-Update-kernel-start-address.patch create mode 100644 board/stmicroelectronics/stm32f469-disco/patches/afboot-stm32/0001-stm32f469i-disco-change-kernel-load-address.patch delete mode 100644 board/stmicroelectronics/stm32f469-disco/patches/linux/0001-Use-default-dram-address-without-remapping.patch
board/stmicroelectronics/stm32f469-disco/flash_xip.sh +1 -1
@@ -15,6 +15,6 @@ ${OUTPUT_DIR}/host/bin/openocd -f board/stm32f469discovery.cfg \ -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 0x08010000" \ + -c "flash write_image erase ${OUTPUT_DIR}/images/xipImage 0x0800C000" \ -c "reset run" \ -c "shutdown"
board/stmicroelectronics/stm32f469-disco/linux-xip.config +4 -4
@@ -18,7 +18,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_MULTIUSER is not set # CONFIG_SYSFS_SYSCALL is not set # CONFIG_FHANDLE is not set -# CONFIG_POSIX_TIMERS is not set +CONFIG_POSIX_TIMERS=y # CONFIG_BUG is not set # CONFIG_BASE_FULL is not set # CONFIG_FUTEX is not set
@@ -47,12 +47,12 @@ CONFIG_ARCH_STM32=y CONFIG_CPU_V7M_NUM_IRQ=240 # CONFIG_ARM_DMA_MEM_BUFFERABLE is not set CONFIG_SET_MEM_PARAM=y -CONFIG_DRAM_BASE=0xc0000000 -CONFIG_DRAM_SIZE=0x01000000 +CONFIG_DRAM_BASE=0x00000000 +CONFIG_DRAM_SIZE=0x00800000 CONFIG_HZ_1000=y # CONFIG_ATAGS is not set CONFIG_XIP_KERNEL=y -CONFIG_XIP_PHYS_ADDR=0x08010000 +CONFIG_XIP_PHYS_ADDR=0x0800C000 CONFIG_XIP_DEFLATED_DATA=y # CONFIG_SUSPEND is not set # CONFIG_STACKPROTECTOR is not set
board/stmicroelectronics/stm32f469-disco/patches/afboot-stm32/0001-stm32f469-i-Update-kernel-start-address.patch deleted +0 -56
56 lines not on this page · raw message
board/stmicroelectronics/stm32f469-disco/patches/afboot-stm32/0001-stm32f469i-disco-change-kernel-load-address.patch new file +26 -0
@@ -0,0 +1,26 @@ +From d87969f72671cab5a88ba6e2418e43d0fa267d6f Mon Sep 17 00:00:00 2001 +From: Dario Binacchi <[email protected]> +Date: Sat, 13 Nov 2021 15:46:32 +0100 +Subject: [PATCH] stm32f469i-disco: change kernel load address + +Signed-off-by: Dario Binacchi <[email protected]> +--- + stm32f469i-disco.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/stm32f469i-disco.c b/stm32f469i-disco.c +index 2da1f4b..3aacb12 100644 +--- a/stm32f469i-disco.c ++++ b/stm32f469i-disco.c +@@ -85,7 +85,7 @@ static void fmc_wait_busy(void) + + void start_kernel(void) + { +- void (*kernel)(uint32_t reserved, uint32_t mach, uint32_t dt) = (void (*)(uint32_t, uint32_t, uint32_t))(0x08008000 | 1); ++ void (*kernel)(uint32_t reserved, uint32_t mach, uint32_t dt) = (void (*)(uint32_t, uint32_t, uint32_t))(0x0800C000 | 1); + + kernel(0, ~0UL, 0x08004000); + } +-- +2.17.1 +
board/stmicroelectronics/stm32f469-disco/patches/linux/0001-Use-default-dram-address-without-remapping.patch deleted +0 -38
@@ -1,38 +0,0 @@ -From 8ccf9f625d00138d86fb7d70f3efd58a8fb4d7ff Mon Sep 17 00:00:00 2001 -From: Yauheni Saldatsenka <[email protected]> -Date: Mon, 23 Aug 2021 02:54:22 +0300 -Subject: [PATCH] Use default dram address without remapping - -Signed-off-by: Yauheni Saldatsenka <[email protected]> ---- - arch/arm/boot/dts/stm32f469-disco.dts | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/arch/arm/boot/dts/stm32f469-disco.dts b/arch/arm/boot/dts/stm32f469-disco.dts -index 2e1b3bbbe4b5..06845614a19a 100644 ---- a/arch/arm/boot/dts/stm32f469-disco.dts -+++ b/arch/arm/boot/dts/stm32f469-disco.dts -@@ -60,9 +60,9 @@ chosen { - stdout-path = "serial0:115200n8"; - }; - -- memory@00000000 { -+ memory@c0000000 { - device_type = "memory"; -- reg = <0x00000000 0x1000000>; -+ reg = <0xc0000000 0x1000000>; - }; - - aliases { -@@ -84,7 +84,7 @@ vdd_dsi: vdd-dsi { - }; - - soc { -- dma-ranges = <0xc0000000 0x0 0x10000000>; -+ dma-ranges = <0xc0000000 0xc0000000 0x10000000>; - }; - - leds { --- -2.32.0 -
configs/stm32f469_disco_xip_defconfig +1 -0
@@ -3,6 +3,7 @@ BR2_cortex_m4=y BR2_GLOBAL_PATCH_DIR="board/stmicroelectronics/stm32f469-disco/patches" # BR2_UCLIBC_INSTALL_UTILS is not set BR2_GCC_ENABLE_LTO=y +BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32f469-disco/linux-xip.config"
Signature · 6 lines
2.17.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [RESEND PATCH v2, 1/4] configs/stm32f469_xip_disco: fix kernel bootup
Quoted 213 lines · Dario Binacchi
Testing this configuration on the stm32f469-disco board failed. Removing the changes on the DRAM I got a bootable image. I also changed the kernel load address from
0x8010000to0x800C000to allocate more space to the kernel since 32kB for the device tree is enough.Signed-off-by Dario Binacchi <[email protected]--- .../stm32f469-disco/flash_xip.sh | 2 +- .../stm32f469-disco/linux-xip.config | 8 +-- ...32f469-i-Update-kernel-start-address.patch | 56 ------------------- ...69i-disco-change-kernel-load-address.patch | 26 +++++++++ ...fault-dram-address-without-remapping.patch | 38 ------------- configs/stm32f469_disco_xip_defconfig | 1 + 6 files changed, 32 insertions(+), 99 deletions(-)mode change 100644 => 100755
board/stmicroelectronics/stm32f469-disco/flash_xip.sh
delete mode 100644board/stmicroelectronics/stm32f469-disco/patches/afboot-stm32/0001-stm32f469-i-Update-kernel-start-address.patchcreate mode 100644board/stmicroelectronics/stm32f469-disco/patches/afboot-stm32/0001-stm32f469i-disco-change-kernel-load-address.patchdelete mode 100644board/stmicroelectronics/stm32f469-disco/patches/linux/0001-Use-default-dram-address-without-remapping.patchboard/stmicroelectronics/stm32f469-disco/flash_xip.sh +1
-1@@ -15,6 +15,6 @@ ${OUTPUT_DIR}/host/bin/openocd -f board/stm32f469discovery.cfg \ -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 0x08010000" \ + -c "flash write_image erase ${OUTPUT_DIR}/images/xipImage 0x0800C000" \ -c "reset run" \ -c "shutdown"board/stmicroelectronics/stm32f469-disco/linux-xip.config +4
-4@@ -18,7 +18,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_MULTIUSER is not set # CONFIG_SYSFS_SYSCALL is not set # CONFIG_FHANDLE is not set -# CONFIG_POSIX_TIMERS is not set +CONFIG_POSIX_TIMERS=y # CONFIG_BUG is not set # CONFIG_BASE_FULL is not set # CONFIG_FUTEX is not set@@ -47,12 +47,12 @@ CONFIG_ARCH_STM32=y CONFIG_CPU_V7M_NUM_IRQ=240 # CONFIG_ARM_DMA_MEM_BUFFERABLE is not set CONFIG_SET_MEM_PARAM=y -CONFIG_DRAM_BASE=0xc0000000 -CONFIG_DRAM_SIZE=0x01000000 +CONFIG_DRAM_BASE=0x00000000 +CONFIG_DRAM_SIZE=0x00800000 CONFIG_HZ_1000=y # CONFIG_ATAGS is not set CONFIG_XIP_KERNEL=y -CONFIG_XIP_PHYS_ADDR=0x08010000 +CONFIG_XIP_PHYS_ADDR=0x0800C000 CONFIG_XIP_DEFLATED_DATA=y # CONFIG_SUSPEND is not set # CONFIG_STACKPROTECTOR is not setboard/stmicroelectronics/stm32f469-disco/patches/afboot-stm32/0001-stm32f469-i-Update-kernel-start-address.patch deleted +0
-56@@ -1,56 +0,0 @@ -From fe5f3a86d07e378baeeddc1dfecd0686d83aa42f Mon Sep 17 00:00:00 2001 -From: Yauheni Saldatsenka <[email protected]> -Date: Sat, 14 Aug 2021 18:54:51 +0300 -Subject: [PATCH] stm32f469-i: Update kernel start address - -As of GNU/Linux v5.12 kernel device tree binary grows above 0x08008000 -and overwrites kernel binary -Therefore this commit moves kernel to the next flash bank - -Signed-off-by: Yauheni Saldatsenka <[email protected]> ---- - stm32f469i-disco.c | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -diff --git a/stm32f469i-disco.c b/stm32f469i-disco.c -index 2da1f4b..46fc06a 100644 ---- a/stm32f469i-disco.c -+++ b/stm32f469i-disco.c -@@ -6,6 +6,7 @@ - #include "gpio.h" - #include "mpu.h" - -+#define KERNEL_ADDR 0x08010000 - #define CONFIG_HSE_HZ 8000000 - #define CONFIG_PLL_M 8 - #define CONFIG_PLL_N 360 -@@ -85,7 +86,7 @@ static void fmc_wait_busy(void) - - void start_kernel(void) - { -- void (*kernel)(uint32_t reserved, uint32_t mach, uint32_t dt) = (void (*)(uint32_t, uint32_t, uint32_t))(0x08008000 | 1); -+ void (*kernel)(uint32_t reserved, uint32_t mach, uint32_t dt) = (void (*)(uint32_t, uint32_t, uint32_t))(KERNEL_ADDR | 1); - - kernel(0, ~0UL, 0x08004000); - } -@@ -102,7 +103,7 @@ int main(void) - volatile uint32_t *SYSCFG_MEMRMP = (void *)(SYSCFG_BASE + 0x00); - int i; - -- mpu_config(0x0); -+ mpu_config(0xc0000000); - - if (*FLASH_CR & FLASH_CR_LOCK) { - *FLASH_KEYR = 0x45670123; -@@ -195,8 +196,6 @@ int main(void) - usart_setup(usart_base, 45000000); - usart_putch(usart_base, '.'); - -- *SYSCFG_MEMRMP = 0x4; -- - start_kernel(); - - return 0; --- -2.32.0 -board/stmicroelectronics/stm32f469-disco/patches/afboot-stm32/0001-stm32f469i-disco-change-kernel-load-address.patch new file +26
-0@@ -0,0 +1,26 @@ +From d87969f72671cab5a88ba6e2418e43d0fa267d6f Mon Sep 17 00:00:00 2001 +From: Dario Binacchi <[email protected]> +Date: Sat, 13 Nov 2021 15:46:32 +0100 +Subject: [PATCH] stm32f469i-disco: change kernel load address + +Signed-off-by: Dario Binacchi <[email protected]> +--- + stm32f469i-disco.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/stm32f469i-disco.c b/stm32f469i-disco.c +index 2da1f4b..3aacb12 100644 +--- a/stm32f469i-disco.c ++++ b/stm32f469i-disco.c +@@ -85,7 +85,7 @@ static void fmc_wait_busy(void) + + void start_kernel(void) + { +- void (*kernel)(uint32_t reserved, uint32_t mach, uint32_t dt) = (void (*)(uint32_t, uint32_t, uint32_t))(0x08008000 | 1); ++ void (*kernel)(uint32_t reserved, uint32_t mach, uint32_t dt) = (void (*)(uint32_t, uint32_t, uint32_t))(0x0800C000 | 1); + + kernel(0, ~0UL, 0x08004000); + } +-- +2.17.1 +board/stmicroelectronics/stm32f469-disco/patches/linux/0001-Use-default-dram-address-without-remapping.patch deleted +0
-38@@ -1,38 +0,0 @@ -From 8ccf9f625d00138d86fb7d70f3efd58a8fb4d7ff Mon Sep 17 00:00:00 2001 -From: Yauheni Saldatsenka <[email protected]> -Date: Mon, 23 Aug 2021 02:54:22 +0300 -Subject: [PATCH] Use default dram address without remapping - -Signed-off-by: Yauheni Saldatsenka <[email protected]> ---- - arch/arm/boot/dts/stm32f469-disco.dts | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/arch/arm/boot/dts/stm32f469-disco.dts b/arch/arm/boot/dts/stm32f469-disco.dts -index 2e1b3bbbe4b5..06845614a19a 100644 ---- a/arch/arm/boot/dts/stm32f469-disco.dts -+++ b/arch/arm/boot/dts/stm32f469-disco.dts -@@ -60,9 +60,9 @@ chosen { - stdout-path = "serial0:115200n8"; - }; - -- memory@00000000 { -+ memory@c0000000 { - device_type = "memory"; -- reg = <0x00000000 0x1000000>; -+ reg = <0xc0000000 0x1000000>; - }; - - aliases { -@@ -84,7 +84,7 @@ vdd_dsi: vdd-dsi { - }; - - soc { -- dma-ranges = <0xc0000000 0x0 0x10000000>; -+ dma-ranges = <0xc0000000 0xc0000000 0x10000000>; - }; - - leds { --- -2.32.0 -configs/stm32f469_disco_xip_defconfig +1
-0@@ -3,6 +3,7 @@ BR2_cortex_m4=y BR2_GLOBAL_PATCH_DIR="board/stmicroelectronics/stm32f469-disco/patches" # BR2_UCLIBC_INSTALL_UTILS is not set BR2_GCC_ENABLE_LTO=y +BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32f469-disco/linux-xip.config"
Signature · 9 lines
Best regards / Cordialement, Christophe Priouzeau | Tel: +33 244027320 STMicroelectronics ST online: www.st.com<http://www.st.com/> _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Arnout Vandecappelle
AppliedRe: [Buildroot] [RESEND PATCH v2, 1/4] configs/stm32f469_xip_disco: fix kernel bootup
In reply to Dario Binacchi via buildrootQuoted 4 lines · Dario Binacchi
Testing this configuration on the stm32f469-disco board failed. Removing the changes on the DRAM I got a bootable image. I also changed the kernel load address from
0x8010000to0x800C000to allocate more space to the kernel since 32kB for the device tree is enough.
Applied to master, thanks.
I rewrote the commit message quite heavily.
Please in the future: if someone Acks a first version of your patch, include
that Ack in later version of the patch.
Quoted 3 lines
Signed-off-by Dario Binacchi <[email protected]>---
Please also in v2 and later of a patch, keep a history in the patch itself,
below the --- line i.e. here.
Regards,
Arnout
Quoted 199 lines
.../stm32f469-disco/flash_xip.sh | 2 +- .../stm32f469-disco/linux-xip.config | 8 +-- ...32f469-i-Update-kernel-start-address.patch | 56 ------------------- ...69i-disco-change-kernel-load-address.patch | 26 +++++++++ ...fault-dram-address-without-remapping.patch | 38 ------------- configs/stm32f469_disco_xip_defconfig | 1 + 6 files changed, 32 insertions(+), 99 deletions(-)mode change 100644 => 100755
board/stmicroelectronics/stm32f469-disco/flash_xip.sh
delete mode 100644board/stmicroelectronics/stm32f469-disco/patches/afboot-stm32/0001-stm32f469-i-Update-kernel-start-address.patchcreate mode 100644board/stmicroelectronics/stm32f469-disco/patches/afboot-stm32/0001-stm32f469i-disco-change-kernel-load-address.patchdelete mode 100644board/stmicroelectronics/stm32f469-disco/patches/linux/0001-Use-default-dram-address-without-remapping.patchboard/stmicroelectronics/stm32f469-disco/flash_xip.sh +1
-1@@ -15,6 +15,6 @@ ${OUTPUT_DIR}/host/bin/openocd -f board/stm32f469discovery.cfg \ -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 0x08010000" \ + -c "flash write_image erase ${OUTPUT_DIR}/images/xipImage 0x0800C000" \ -c "reset run" \ -c "shutdown"board/stmicroelectronics/stm32f469-disco/linux-xip.config +4
-4@@ -18,7 +18,7 @@ CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_MULTIUSER is not set # CONFIG_SYSFS_SYSCALL is not set # CONFIG_FHANDLE is not set -# CONFIG_POSIX_TIMERS is not set +CONFIG_POSIX_TIMERS=y # CONFIG_BUG is not set # CONFIG_BASE_FULL is not set # CONFIG_FUTEX is not set@@ -47,12 +47,12 @@ CONFIG_ARCH_STM32=y CONFIG_CPU_V7M_NUM_IRQ=240 # CONFIG_ARM_DMA_MEM_BUFFERABLE is not set CONFIG_SET_MEM_PARAM=y -CONFIG_DRAM_BASE=0xc0000000 -CONFIG_DRAM_SIZE=0x01000000 +CONFIG_DRAM_BASE=0x00000000 +CONFIG_DRAM_SIZE=0x00800000 CONFIG_HZ_1000=y # CONFIG_ATAGS is not set CONFIG_XIP_KERNEL=y -CONFIG_XIP_PHYS_ADDR=0x08010000 +CONFIG_XIP_PHYS_ADDR=0x0800C000 CONFIG_XIP_DEFLATED_DATA=y # CONFIG_SUSPEND is not set # CONFIG_STACKPROTECTOR is not setboard/stmicroelectronics/stm32f469-disco/patches/afboot-stm32/0001-stm32f469-i-Update-kernel-start-address.patch deleted +0
-56@@ -1,56 +0,0 @@ -From fe5f3a86d07e378baeeddc1dfecd0686d83aa42f Mon Sep 17 00:00:00 2001 -From: Yauheni Saldatsenka <[email protected]> -Date: Sat, 14 Aug 2021 18:54:51 +0300 -Subject: [PATCH] stm32f469-i: Update kernel start address - -As of GNU/Linux v5.12 kernel device tree binary grows above 0x08008000 -and overwrites kernel binary -Therefore this commit moves kernel to the next flash bank - -Signed-off-by: Yauheni Saldatsenka <[email protected]> ---- - stm32f469i-disco.c | 7 +++---- - 1 file changed, 3 insertions(+), 4 deletions(-) - -diff --git a/stm32f469i-disco.c b/stm32f469i-disco.c -index 2da1f4b..46fc06a 100644 ---- a/stm32f469i-disco.c -+++ b/stm32f469i-disco.c -@@ -6,6 +6,7 @@ - #include "gpio.h" - #include "mpu.h" - -+#define KERNEL_ADDR 0x08010000 - #define CONFIG_HSE_HZ 8000000 - #define CONFIG_PLL_M 8 - #define CONFIG_PLL_N 360 -@@ -85,7 +86,7 @@ static void fmc_wait_busy(void) - - void start_kernel(void) - { -- void (*kernel)(uint32_t reserved, uint32_t mach, uint32_t dt) = (void (*)(uint32_t, uint32_t, uint32_t))(0x08008000 | 1); -+ void (*kernel)(uint32_t reserved, uint32_t mach, uint32_t dt) = (void (*)(uint32_t, uint32_t, uint32_t))(KERNEL_ADDR | 1); - - kernel(0, ~0UL, 0x08004000); - } -@@ -102,7 +103,7 @@ int main(void) - volatile uint32_t *SYSCFG_MEMRMP = (void *)(SYSCFG_BASE + 0x00); - int i; - -- mpu_config(0x0); -+ mpu_config(0xc0000000); - - if (*FLASH_CR & FLASH_CR_LOCK) { - *FLASH_KEYR = 0x45670123; -@@ -195,8 +196,6 @@ int main(void) - usart_setup(usart_base, 45000000); - usart_putch(usart_base, '.'); - -- *SYSCFG_MEMRMP = 0x4; -- - start_kernel(); - - return 0; --- -2.32.0 -board/stmicroelectronics/stm32f469-disco/patches/afboot-stm32/0001-stm32f469i-disco-change-kernel-load-address.patch new file +26
-0@@ -0,0 +1,26 @@ +From d87969f72671cab5a88ba6e2418e43d0fa267d6f Mon Sep 17 00:00:00 2001 +From: Dario Binacchi <[email protected]> +Date: Sat, 13 Nov 2021 15:46:32 +0100 +Subject: [PATCH] stm32f469i-disco: change kernel load address + +Signed-off-by: Dario Binacchi <[email protected]> +--- + stm32f469i-disco.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/stm32f469i-disco.c b/stm32f469i-disco.c +index 2da1f4b..3aacb12 100644 +--- a/stm32f469i-disco.c ++++ b/stm32f469i-disco.c +@@ -85,7 +85,7 @@ static void fmc_wait_busy(void) + + void start_kernel(void) + { +- void (*kernel)(uint32_t reserved, uint32_t mach, uint32_t dt) = (void (*)(uint32_t, uint32_t, uint32_t))(0x08008000 | 1); ++ void (*kernel)(uint32_t reserved, uint32_t mach, uint32_t dt) = (void (*)(uint32_t, uint32_t, uint32_t))(0x0800C000 | 1); + + kernel(0, ~0UL, 0x08004000); + } +-- +2.17.1 +board/stmicroelectronics/stm32f469-disco/patches/linux/0001-Use-default-dram-address-without-remapping.patch deleted +0
-38@@ -1,38 +0,0 @@ -From 8ccf9f625d00138d86fb7d70f3efd58a8fb4d7ff Mon Sep 17 00:00:00 2001 -From: Yauheni Saldatsenka <[email protected]> -Date: Mon, 23 Aug 2021 02:54:22 +0300 -Subject: [PATCH] Use default dram address without remapping - -Signed-off-by: Yauheni Saldatsenka <[email protected]> ---- - arch/arm/boot/dts/stm32f469-disco.dts | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/arch/arm/boot/dts/stm32f469-disco.dts b/arch/arm/boot/dts/stm32f469-disco.dts -index 2e1b3bbbe4b5..06845614a19a 100644 ---- a/arch/arm/boot/dts/stm32f469-disco.dts -+++ b/arch/arm/boot/dts/stm32f469-disco.dts -@@ -60,9 +60,9 @@ chosen { - stdout-path = "serial0:115200n8"; - }; - -- memory@00000000 { -+ memory@c0000000 { - device_type = "memory"; -- reg = <0x00000000 0x1000000>; -+ reg = <0xc0000000 0x1000000>; - }; - - aliases { -@@ -84,7 +84,7 @@ vdd_dsi: vdd-dsi { - }; - - soc { -- dma-ranges = <0xc0000000 0x0 0x10000000>; -+ dma-ranges = <0xc0000000 0xc0000000 0x10000000>; - }; - - leds { --- -2.32.0 -configs/stm32f469_disco_xip_defconfig +0
-0
configs/stm32f469_disco_xip_defconfig BR2_cortex_m4=y · line 9
Quoted 7 lines
configs/stm32f469_disco_xip_defconfig +1
-0@@ -3,6 +3,7 @@ BR2_cortex_m4=y BR2_GLOBAL_PATCH_DIR="board/stmicroelectronics/stm32f469-disco/patches" # BR2_UCLIBC_INSTALL_UTILS is not set BR2_GCC_ENABLE_LTO=y +BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32f469-disco/linux-xip.config"
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH RESEND v2 2/4 boot/afboot-stm32: upgrade version
In reply to Dario Binacchi via buildrootNewer versions of the kernel generate device trees that are not storable in a single 16kB sector. In these cases the kernel load address must be changed.
The commit 2e499dcff3ef ("Add possibility to use custom kernel load address") adds the possibility to override the default (0x08008000) kernel load address.
This also required changes to the stm32f429_disco_defconfig and stm32f469_disco_xip_defconfig configurations.
--- ...69i-disco-change-kernel-load-address.patch | 26 --------------- boot/afboot-stm32/Config.in | 32 +++++++++++++++++++ boot/afboot-stm32/afboot-stm32.hash | 2 +- boot/afboot-stm32/afboot-stm32.mk | 18 ++++++++--- configs/stm32f429_disco_defconfig | 1 + configs/stm32f469_disco_xip_defconfig | 3 +- 6 files changed, 50 insertions(+), 32 deletions(-) delete mode 100644 board/stmicroelectronics/stm32f469-disco/patches/afboot-stm32/0001-stm32f469i-disco-change-kernel-load-address.patch
board/stmicroelectronics/stm32f469-disco/patches/afboot-stm32/0001-stm32f469i-disco-change-kernel-load-address.patch deleted +0 -26
@@ -1,26 +0,0 @@ -From d87969f72671cab5a88ba6e2418e43d0fa267d6f Mon Sep 17 00:00:00 2001 -From: Dario Binacchi <[email protected]> -Date: Sat, 13 Nov 2021 15:46:32 +0100 -Subject: [PATCH] stm32f469i-disco: change kernel load address - -Signed-off-by: Dario Binacchi <[email protected]> ---- - stm32f469i-disco.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/stm32f469i-disco.c b/stm32f469i-disco.c -index 2da1f4b..3aacb12 100644 ---- a/stm32f469i-disco.c -+++ b/stm32f469i-disco.c -@@ -85,7 +85,7 @@ static void fmc_wait_busy(void) - - void start_kernel(void) - { -- void (*kernel)(uint32_t reserved, uint32_t mach, uint32_t dt) = (void (*)(uint32_t, uint32_t, uint32_t))(0x08008000 | 1); -+ void (*kernel)(uint32_t reserved, uint32_t mach, uint32_t dt) = (void (*)(uint32_t, uint32_t, uint32_t))(0x0800C000 | 1); - - kernel(0, ~0UL, 0x08004000); - } --- -2.17.1 -
boot/afboot-stm32/Config.in +32 -0
@@ -5,3 +5,35 @@ config BR2_TARGET_AFBOOT_STM32 afboot-stm32 is a very small bootloader for STM32 platforms https://github.com/mcoquelin-stm32/afboot-stm32 + +if BR2_TARGET_AFBOOT_STM32 + +choice + prompt "Board type" + help + Select the proper stm32 board type. + +config BR2_TARGET_AFBOOT_STM32_F429_DISCO + bool "stm32f429-disco" + +config BR2_TARGET_AFBOOT_STM32_F469_DISCO + bool "stm32f469-disco" + +endchoice + +config BR2_TARGET_AFBOOT_STM32_KERNEL_ADDR + hex "Kernel load address" + default "0x08008000" + help + This is the physical address in your flash memory the kernel will + be linked for and stored to. This address is dependent on your own + flash usage. + +config BR2_TARGET_AFBOOT_STM32_DTB_ADDR + hex "Device-tree load address" + default "0x08004000" + help + This is the physical address in your flash memory the device-tree + will be stored to. This address is dependent on your own flash usage. + +endif
boot/afboot-stm32/afboot-stm32.hash +1 -1
@@ -1,2 +1,2 @@ # Locally calculated -sha256 9b37b661bd3091ceb5d8dc5a56a2dfc02ae9ebc0c63dad3c4289c9d6b3d3ec89 afboot-stm32-0.2.tar.gz +sha256 132f9817e615131856892cbe3df1502cdcd0700a12a48aa6bae8acfd5f093b42 afboot-stm32-3566acd582e5536fb60864281788a30f5527df2d-br1.tar.gz
boot/afboot-stm32/afboot-stm32.mk +14 -4
@@ -4,17 +4,27 @@ # ################################################################################ -AFBOOT_STM32_VERSION = 0.2 -AFBOOT_STM32_SITE = $(call github,mcoquelin-stm32,afboot-stm32,v$(AFBOOT_STM32_VERSION)) +AFBOOT_STM32_VERSION = 3566acd582e5536fb60864281788a30f5527df2d +AFBOOT_STM32_SITE = https://github.com/mcoquelin-stm32/afboot-stm32.git +AFBOOT_STM32_SITE_METHOD = git AFBOOT_STM32_INSTALL_IMAGES = YES AFBOOT_STM32_INSTALL_TARGET = NO +ifeq ($(BR2_TARGET_AFBOOT_STM32_F429_DISCO),y) +AFBOOT_STM32_BOARD=stm32f429i-disco +else +AFBOOT_STM32_BOARD=stm32f469i-disco +endif + define AFBOOT_STM32_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CROSS_COMPILE=$(TARGET_CROSS) all + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CROSS_COMPILE=$(TARGET_CROSS) \ + $(AFBOOT_STM32_BOARD) \ + KERNEL_ADDR=$(BR2_TARGET_AFBOOT_STM32_KERNEL_ADDR) \ + DTB_ADDR=$(BR2_TARGET_AFBOOT_STM32_DTB_ADDR) endef define AFBOOT_STM32_INSTALL_IMAGES_CMDS - $(INSTALL) -m 0755 -t $(BINARIES_DIR) -D $(@D)/stm32*.bin + $(INSTALL) -m 0755 -t $(BINARIES_DIR) -D $(@D)/$(AFBOOT_STM32_BOARD).bin endef $(eval $(generic-package))
configs/stm32f429_disco_defconfig +1 -0
@@ -15,4 +15,5 @@ BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" BR2_TARGET_ROOTFS_INITRAMFS=y # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_AFBOOT_STM32=y +BR2_TARGET_AFBOOT_STM32_KERNEL_ADDR=0x0800C000 BR2_PACKAGE_HOST_OPENOCD=y
configs/stm32f469_disco_xip_defconfig +2 -1
@@ -1,6 +1,5 @@ BR2_arm=y BR2_cortex_m4=y -BR2_GLOBAL_PATCH_DIR="board/stmicroelectronics/stm32f469-disco/patches" # BR2_UCLIBC_INSTALL_UTILS is not set BR2_GCC_ENABLE_LTO=y BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh"
@@ -16,4 +15,6 @@ BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" BR2_TARGET_ROOTFS_INITRAMFS=y # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_AFBOOT_STM32=y +BR2_TARGET_AFBOOT_STM32_F469_DISCO=y +BR2_TARGET_AFBOOT_STM32_KERNEL_ADDR=0x0800C000 BR2_PACKAGE_HOST_OPENOCD=y
Signature · 6 lines
2.17.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [RESEND PATCH v2, 2/4] boot/afboot-stm32: upgrade version
Quoted 166 lines · Dario Binacchi
Newer versions of the kernel generate device trees that are not storable in a single 16kB sector. In these cases the kernel load address must be changed.
The commit2e499dcff3ef("Add possibility to use custom kernel load address") adds the possibility to override the default (0x08008000) kernel load address.This also required changes to the
stm32f429_disco_defconfigandstm32f469_disco_xip_defconfigconfigurations.Signed-off-by Dario Binacchi <[email protected]>--- ...69i-disco-change-kernel-load-address.patch | 26 --------------- boot/afboot-stm32/Config.in | 32 +++++++++++++++++++ boot/afboot-stm32/afboot-stm32.hash | 2 +- boot/afboot-stm32/afboot-stm32.mk | 18 ++++++++--- configs/stm32f429_disco_defconfig | 1 + configs/stm32f469_disco_xip_defconfig | 3 +- 6 files changed, 50 insertions(+), 32 deletions(-)delete mode 100644
board/stmicroelectronics/stm32f469-disco/patches/afboot-stm32/0001-stm32f469i-disco-change-kernel-load-address.patchboard/stmicroelectronics/stm32f469-disco/patches/afboot-stm32/0001-stm32f469i-disco-change-kernel-load-address.patch deleted +0
-26@@ -1,26 +0,0 @@ -From d87969f72671cab5a88ba6e2418e43d0fa267d6f Mon Sep 17 00:00:00 2001 -From: Dario Binacchi <[email protected]> -Date: Sat, 13 Nov 2021 15:46:32 +0100 -Subject: [PATCH] stm32f469i-disco: change kernel load address - -Signed-off-by: Dario Binacchi <[email protected]> ---- - stm32f469i-disco.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/stm32f469i-disco.c b/stm32f469i-disco.c -index 2da1f4b..3aacb12 100644 ---- a/stm32f469i-disco.c -+++ b/stm32f469i-disco.c -@@ -85,7 +85,7 @@ static void fmc_wait_busy(void) - - void start_kernel(void) - { -- void (*kernel)(uint32_t reserved, uint32_t mach, uint32_t dt) = (void (*)(uint32_t, uint32_t, uint32_t))(0x08008000 | 1); -+ void (*kernel)(uint32_t reserved, uint32_t mach, uint32_t dt) = (void (*)(uint32_t, uint32_t, uint32_t))(0x0800C000 | 1); - - kernel(0, ~0UL, 0x08004000); - } --- -2.17.1 -boot/afboot-stm32/Config.in +32
-0@@ -5,3 +5,35 @@ config BR2_TARGET_AFBOOT_STM32 afboot-stm32 is a very small bootloader for STM32 platforms https://github.com/mcoquelin-stm32/afboot-stm32 + +if BR2_TARGET_AFBOOT_STM32 + +choice + prompt "Board type" + help + Select the proper stm32 board type. + +config BR2_TARGET_AFBOOT_STM32_F429_DISCO + bool "stm32f429-disco" + +config BR2_TARGET_AFBOOT_STM32_F469_DISCO + bool "stm32f469-disco" + +endchoice + +config BR2_TARGET_AFBOOT_STM32_KERNEL_ADDR + hex "Kernel load address" + default "0x08008000" + help + This is the physical address in your flash memory the kernel will + be linked for and stored to. This address is dependent on your own + flash usage. + +config BR2_TARGET_AFBOOT_STM32_DTB_ADDR + hex "Device-tree load address" + default "0x08004000" + help + This is the physical address in your flash memory the device-tree + will be stored to. This address is dependent on your own flash usage. + +endifboot/afboot-stm32/afboot-stm32.hash +1
-1@@ -1,2 +1,2 @@ # Locally calculated -sha256 9b37b661bd3091ceb5d8dc5a56a2dfc02ae9ebc0c63dad3c4289c9d6b3d3ec89 afboot-stm32-0.2.tar.gz +sha256 132f9817e615131856892cbe3df1502cdcd0700a12a48aa6bae8acfd5f093b42 afboot-stm32-3566acd582e5536fb60864281788a30f5527df2d-br1.tar.gzboot/afboot-stm32/afboot-stm32.mk +14
-4@@ -4,17 +4,27 @@ # ################################################################################ -AFBOOT_STM32_VERSION = 0.2 -AFBOOT_STM32_SITE = $(call github,mcoquelin-stm32,afboot-stm32,v$(AFBOOT_STM32_VERSION)) +AFBOOT_STM32_VERSION = 3566acd582e5536fb60864281788a30f5527df2d +AFBOOT_STM32_SITE = https://github.com/mcoquelin-stm32/afboot-stm32.git +AFBOOT_STM32_SITE_METHOD = git AFBOOT_STM32_INSTALL_IMAGES = YES AFBOOT_STM32_INSTALL_TARGET = NO +ifeq ($(BR2_TARGET_AFBOOT_STM32_F429_DISCO),y) +AFBOOT_STM32_BOARD=stm32f429i-disco +else +AFBOOT_STM32_BOARD=stm32f469i-disco +endif + define AFBOOT_STM32_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CROSS_COMPILE=$(TARGET_CROSS) all + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CROSS_COMPILE=$(TARGET_CROSS) \ + $(AFBOOT_STM32_BOARD) \ + KERNEL_ADDR=$(BR2_TARGET_AFBOOT_STM32_KERNEL_ADDR) \ + DTB_ADDR=$(BR2_TARGET_AFBOOT_STM32_DTB_ADDR) endef define AFBOOT_STM32_INSTALL_IMAGES_CMDS - $(INSTALL) -m 0755 -t $(BINARIES_DIR) -D $(@D)/stm32*.bin + $(INSTALL) -m 0755 -t $(BINARIES_DIR) -D $(@D)/$(AFBOOT_STM32_BOARD).bin endef $(eval $(generic-package))configs/stm32f429_disco_defconfig +1
-0@@ -15,4 +15,5 @@ BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" BR2_TARGET_ROOTFS_INITRAMFS=y # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_AFBOOT_STM32=y +BR2_TARGET_AFBOOT_STM32_KERNEL_ADDR=0x0800C000 BR2_PACKAGE_HOST_OPENOCD=yconfigs/stm32f469_disco_xip_defconfig +2
-1@@ -1,6 +1,5 @@ BR2_arm=y BR2_cortex_m4=y -BR2_GLOBAL_PATCH_DIR="board/stmicroelectronics/stm32f469-disco/patches" # BR2_UCLIBC_INSTALL_UTILS is not set BR2_GCC_ENABLE_LTO=y BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh"@@ -16,4 +15,6 @@ BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" BR2_TARGET_ROOTFS_INITRAMFS=y # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_AFBOOT_STM32=y +BR2_TARGET_AFBOOT_STM32_F469_DISCO=y +BR2_TARGET_AFBOOT_STM32_KERNEL_ADDR=0x0800C000 BR2_PACKAGE_HOST_OPENOCD=y
Signature · 9 lines
Best regards / Cordialement, Christophe Priouzeau | Tel: +33 244027320 STMicroelectronics ST online: www.st.com<http://www.st.com/> _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [RESEND PATCH v2, 2/4] boot/afboot-stm32: upgrade version
In reply to Dario Binacchi via buildrootQuoted 9 lines · Dario Binacchi
Newer versions of the kernel generate device trees that are not storable in a single 16kB sector. In these cases the kernel load address must be changed.
The commit2e499dcff3ef("Add possibility to use custom kernel load address") adds the possibility to override the default (0x08008000) kernel load address.This also required changes to the
stm32f429_disco_defconfigandstm32f469_disco_xip_defconfigconfigurations.
I heavily rewrote the commit message again.
Quoted 1 line
Signed-off-by Dario Binacchi <[email protected]>
[snip]
Quoted 11 lines
boot/afboot-stm32/Config.in +3
-0@@ -5,3 +5,35 @@ config BR2_TARGET_AFBOOT_STM32 afboot-stm32 is a very small bootloader for STM32 platforms https://github.com/mcoquelin-stm32/afboot-stm32 + +if BR2_TARGET_AFBOOT_STM32 +
boot/afboot-stm32/Config.in config BR2_TARGET_AFBOOT_STM32 · line 20
Quoted 10 lines
boot/afboot-stm32/Config.in +10
-0+choice + prompt "Board type" + help + Select the proper stm32 board type. + +config BR2_TARGET_AFBOOT_STM32_F429_DISCO + bool "stm32f429-disco" + +config BR2_TARGET_AFBOOT_STM32_F469_DISCO + bool "stm32f469-disco"
I see no reason to add these config options. Building all boards hardly has an
effect on build time. Also, it makes it a lot more complicated to add more boards (e.g. by patching afboot-stm32).
So I removed this and reverted to 'make all'.
Quoted 32 lines
boot/afboot-stm32/Config.in +19
-0+ +endchoice + +config BR2_TARGET_AFBOOT_STM32_KERNEL_ADDR + hex "Kernel load address" + default "0x08008000" + help + This is the physical address in your flash memory the kernel will + be linked for and stored to. This address is dependent on your own + flash usage. + +config BR2_TARGET_AFBOOT_STM32_DTB_ADDR + hex "Device-tree load address" + default "0x08004000" + help + This is the physical address in your flash memory the device-tree + will be stored to. This address is dependent on your own flash usage. + +endifboot/afboot-stm32/afboot-stm32.hash +1
-1@@ -1,2 +1,2 @@ # Locally calculated -sha256 9b37b661bd3091ceb5d8dc5a56a2dfc02ae9ebc0c63dad3c4289c9d6b3d3ec89 afboot-stm32-0.2.tar.gz +sha256 132f9817e615131856892cbe3df1502cdcd0700a12a48aa6bae8acfd5f093b42 afboot-stm32-3566acd582e5536fb60864281788a30f5527df2d-br1.tar.gzboot/afboot-stm32/afboot-stm32.mk +0
-0
boot/afboot-stm32/afboot-stm32.mk line 8
Quoted 7 lines
boot/afboot-stm32/afboot-stm32.mk +2
-2@@ -4,17 +4,27 @@ # ################################################################################ -AFBOOT_STM32_VERSION = 0.2 -AFBOOT_STM32_SITE = $(call github,mcoquelin-stm32,afboot-stm32,v$(AFBOOT_STM32_VERSION)) +AFBOOT_STM32_VERSION = 3566acd582e5536fb60864281788a30f5527df2d +AFBOOT_STM32_SITE = https://github.com/mcoquelin-stm32/afboot-stm32.git
There's no reason at all to switch to git download, you can download a tarball
from a commit hash as well.
I made all those changes and applied to master. Please double-check if it i
still correct.
Regards,
Arnout
Quoted 47 lines
boot/afboot-stm32/afboot-stm32.mk +12
-2+AFBOOT_STM32_SITE_METHOD = git AFBOOT_STM32_INSTALL_IMAGES = YES AFBOOT_STM32_INSTALL_TARGET = NO +ifeq ($(BR2_TARGET_AFBOOT_STM32_F429_DISCO),y) +AFBOOT_STM32_BOARD=stm32f429i-disco +else +AFBOOT_STM32_BOARD=stm32f469i-disco +endif + define AFBOOT_STM32_BUILD_CMDS - $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CROSS_COMPILE=$(TARGET_CROSS) all + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) CROSS_COMPILE=$(TARGET_CROSS) \ + $(AFBOOT_STM32_BOARD) \ + KERNEL_ADDR=$(BR2_TARGET_AFBOOT_STM32_KERNEL_ADDR) \ + DTB_ADDR=$(BR2_TARGET_AFBOOT_STM32_DTB_ADDR) endef define AFBOOT_STM32_INSTALL_IMAGES_CMDS - $(INSTALL) -m 0755 -t $(BINARIES_DIR) -D $(@D)/stm32*.bin + $(INSTALL) -m 0755 -t $(BINARIES_DIR) -D $(@D)/$(AFBOOT_STM32_BOARD).bin endef $(eval $(generic-package))configs/stm32f429_disco_defconfig +1
-0@@ -15,4 +15,5 @@ BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" BR2_TARGET_ROOTFS_INITRAMFS=y # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_AFBOOT_STM32=y +BR2_TARGET_AFBOOT_STM32_KERNEL_ADDR=0x0800C000 BR2_PACKAGE_HOST_OPENOCD=yconfigs/stm32f469_disco_xip_defconfig +0
-1@@ -1,6 +1,5 @@ BR2_arm=y BR2_cortex_m4=y -BR2_GLOBAL_PATCH_DIR="board/stmicroelectronics/stm32f469-disco/patches" # BR2_UCLIBC_INSTALL_UTILS is not set BR2_GCC_ENABLE_LTO=y BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh"
configs/stm32f469_disco_xip_defconfig BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" · line 20
Quoted 6 lines
configs/stm32f469_disco_xip_defconfig +2
-0@@ -16,4 +15,6 @@ BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox-minimal.config" BR2_TARGET_ROOTFS_INITRAMFS=y # BR2_TARGET_ROOTFS_TAR is not set BR2_TARGET_AFBOOT_STM32=y +BR2_TARGET_AFBOOT_STM32_F469_DISCO=y +BR2_TARGET_AFBOOT_STM32_KERNEL_ADDR=0x0800C000 BR2_PACKAGE_HOST_OPENOCD=y
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH RESEND v2 3/4 configs/stm32f429_disco: fix kernel bootup
In reply to Dario Binacchi via buildrootThe kernel generated by the configuration for the STM32f429-discovery board is buggy:
Fixes:
Unhandled exception: IPSR = 00000006 LR = fffffff1
CPU: 0 PID: 1 Comm: init Not tainted 4.11.0 #2 Hardware name: STM32 (Device Tree Support) task: 9041a000 task.stack: 907c0000 PC is at ret_fast_syscall+0x2/0x4a LR is at tty_ioctl+0x1ad/0x75c pc : [<0800d942>] lr : [<080c2e05>] psr: 4000000b sp : 907c1fa8 ip : 0000001c fp : 905961a2 r10: 00000000 r9 : 907c0000 r8 : 0800dae0 r7 : 00000036 r6 : 905e7e60 r5 : 00000000 r4 : 905e7ebc r3 : 00000000 r2 : 00000000 r1 : 00000000 r0 : 00000000 xPSR: 4000000b CPU: 0 PID: 1 Comm: init Not tainted 4.11.0 #2 Hardware name: STM32 (Device Tree Support) [<0800fbf9>] (unwind_backtrace) from [<0800f05b>] (show_stack+0xb/0xc) [<0800f05b>] (show_stack) from [<0800f553>] (__invalid_entry+0x4b/0x4c)
Inspired by commit a3e3d9c198 ("configs/stm32f469_disco_xip_defconfig:
alternative defconfig for XIP") I updated the stm32f429_disco_defconfig configuration to use a newer kernel. Current setup kernel + rootfs fits in 1.6MB on-chip flash memory.
The kernel has been moved to new flash bank due to growth of dtb size.
For better binary size optimization gcc LTO is turned on.
--- .../stm32f429-disco/flash.sh | 2 +- .../stm32f429-disco/linux.config | 120 ++++++++++++++++++ ...sco-don-t-force-init-in-chosen-boota.patch | 32 ----- configs/stm32f429_disco_defconfig | 10 +- 4 files changed, 127 insertions(+), 37 deletions(-) create mode 100644 board/stmicroelectronics/stm32f429-disco/linux.config delete mode 100644 board/stmicroelectronics/stm32f429-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patch
board/stmicroelectronics/stm32f429-disco/flash.sh +1 -1
@@ -21,6 +21,6 @@ ${OUTPUT_DIR}/host/bin/openocd -f board/${BOARD_NAME}.cfg \ -c "flash info 0" \ -c "flash write_image erase ${OUTPUT_DIR}/images/stm32f429i-disco.bin 0x08000000" \ -c "flash write_image erase ${OUTPUT_DIR}/images/stm32f429-disco.dtb 0x08004000" \ - -c "flash write_image erase ${OUTPUT_DIR}/images/xipImage 0x08008000" \ + -c "flash write_image erase ${OUTPUT_DIR}/images/xipImage 0x0800C000" \ -c "reset run" \ -c "shutdown"
board/stmicroelectronics/stm32f429-disco/linux.config new file +120 -0
120 lines not on this page · raw message
board/stmicroelectronics/stm32f429-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patch deleted +0 -32
@@ -1,32 +0,0 @@ -From ded9afa688184b3240a92c2b8f114c545a09bc3f Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni <[email protected]> -Date: Sat, 12 Mar 2016 23:14:41 +0100 -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]> ---- - arch/arm/boot/dts/stm32f429-disco.dts | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm/boot/dts/stm32f429-disco.dts b/arch/arm/boot/dts/stm32f429-disco.dts -index f0b731d..2bae81c 100644 ---- a/arch/arm/boot/dts/stm32f429-disco.dts -+++ b/arch/arm/boot/dts/stm32f429-disco.dts -@@ -53,7 +53,7 @@ - compatible = "st,stm32f429i-disco", "st,stm32f429"; - - chosen { -- bootargs = "root=/dev/ram rdinit=/linuxrc"; -+ bootargs = "root=/dev/ram"; - stdout-path = "serial0:115200n8"; - }; - --- -2.6.4 -
configs/stm32f429_disco_defconfig +6 -4
@@ -1,12 +1,14 @@ 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_KERNEL_HEADERS_5_15=y +# BR2_UCLIBC_INSTALL_UTILS is not set +BR2_GCC_ENABLE_LTO=y 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" -BR2_LINUX_KERNEL_DEFCONFIG="stm32" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32f429-disco/linux.config" BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="xipImage" BR2_LINUX_KERNEL_DTS_SUPPORT=y
Signature · 6 lines
2.17.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 240 lines · Dario Binacchi
The kernel generated by the configuration for the STM32f429-discovery board is buggy:
Fixes:
Unhandled exception: IPSR = 00000006 LR =fffffff1CPU: 0 PID: 1 Comm: init Not tainted 4.11.0 #2 Hardware name: STM32 (Device Tree Support) task: 9041a000 task.stack: 907c0000 PC is at ret_fast_syscall+0x2/0x4a LR is at tty_ioctl+0x1ad/0x75c pc : [<0800d942>] lr : [<080c2e05>] psr: 4000000b sp : 907c1fa8 ip : 0000001c fp : 905961a2 r10: 00000000 r9 : 907c0000 r8 : 0800dae0 r7 : 00000036 r6 : 905e7e60 r5 : 00000000 r4 : 905e7ebc r3 : 00000000 r2 : 00000000 r1 : 00000000 r0 : 00000000 xPSR: 4000000b CPU: 0 PID: 1 Comm: init Not tainted 4.11.0 #2 Hardware name: STM32 (Device Tree Support) [<0800fbf9>] (unwind_backtrace) from [<0800f05b>] (show_stack+0xb/0xc) [<0800f05b>] (show_stack) from [<0800f553>] (__invalid_entry+0x4b/0x4c)Inspired by commit
a3e3d9c198("configs/stm32f469_disco_xip_defconfig:
alternative defconfig for XIP") I updated thestm32f429_disco_defconfigconfiguration to use a newer kernel. Current setup kernel + rootfs fits in 1.6MB on-chip flash memory.The kernel has been moved to new flash bank due to growth of dtb size.
For better binary size optimization gcc LTO is turned on.
Signed-off-by Dario Binacchi <[email protected]>--- .../stm32f429-disco/flash.sh | 2 +- .../stm32f429-disco/linux.config | 120 ++++++++++++++++++ ...sco-don-t-force-init-in-chosen-boota.patch | 32 ----- configs/stm32f429_disco_defconfig | 10 +- 4 files changed, 127 insertions(+), 37 deletions(-)create mode 100644
board/stmicroelectronics/stm32f429-disco/linux.config
delete mode 100644board/stmicroelectronics/stm32f429-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patchboard/stmicroelectronics/stm32f429-disco/flash.sh +1
-1@@ -21,6 +21,6 @@ ${OUTPUT_DIR}/host/bin/openocd -f board/${BOARD_NAME}.cfg \ -c "flash info 0" \ -c "flash write_image erase ${OUTPUT_DIR}/images/stm32f429i-disco.bin 0x08000000" \ -c "flash write_image erase ${OUTPUT_DIR}/images/stm32f429-disco.dtb 0x08004000" \ - -c "flash write_image erase ${OUTPUT_DIR}/images/xipImage 0x08008000" \ + -c "flash write_image erase ${OUTPUT_DIR}/images/xipImage 0x0800C000" \ -c "reset run" \ -c "shutdown"board/stmicroelectronics/stm32f429-disco/linux.config new file +120
-0@@ -0,0 +1,120 @@ +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_KERNEL_XZ=y +CONFIG_NO_HZ_IDLE=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_PREEMPT=y +CONFIG_LOG_BUF_SHIFT=12 +CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=10 +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="${BR_BINARIES_DIR}/rootfs.cpio" +# CONFIG_RD_GZIP is not set +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_LZMA is not set +# CONFIG_RD_XZ is not set +# CONFIG_RD_LZO is not set +# CONFIG_RD_LZ4 is not set +# CONFIG_RD_ZSTD is not set +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +# CONFIG_MULTIUSER is not set +# CONFIG_SYSFS_SYSCALL is not set +# CONFIG_FHANDLE is not set +CONFIG_POSIX_TIMERS=y +CONFIG_BUG=y +# CONFIG_BASE_FULL is not set +# CONFIG_FUTEX is not set +# CONFIG_EPOLL is not set +# CONFIG_SIGNALFD is not set +# CONFIG_TIMERFD is not set +# CONFIG_EVENTFD is not set +# CONFIG_AIO is not set +# CONFIG_IO_URING is not set +# CONFIG_ADVISE_SYSCALLS is not set +# CONFIG_MEMBARRIER is not set +# CONFIG_KALLSYMS is not set +CONFIG_KCMP=y +# CONFIG_RSEQ is not set +CONFIG_EMBEDDED=y +# CONFIG_VM_EVENT_COUNTERS is not set +# CONFIG_COMPAT_BRK is not set +CONFIG_SLOB=y +# CONFIG_SLAB_MERGE_DEFAULT is not set +# CONFIG_MMU is not set +CONFIG_ARCH_STM32=y +# CONFIG_MACH_STM32F469 is not set +# CONFIG_MACH_STM32F746 is not set +# CONFIG_MACH_STM32F769 is not set +# CONFIG_MACH_STM32H743 is not set +CONFIG_CPU_V7M_NUM_IRQ=240 +# CONFIG_ARM_DMA_MEM_BUFFERABLE is not set +CONFIG_SET_MEM_PARAM=y +CONFIG_DRAM_BASE=0x90000000 +CONFIG_DRAM_SIZE=0x00800000 +CONFIG_HZ_1000=y +# CONFIG_ATAGS is not set +CONFIG_XIP_KERNEL=y +CONFIG_XIP_PHYS_ADDR=0x0800C000 +CONFIG_XIP_DEFLATED_DATA=y +# CONFIG_SUSPEND is not set +# CONFIG_STACKPROTECTOR is not set +# CONFIG_COMPAT_32BIT_TIME is not set +# CONFIG_GCC_PLUGINS is not set +# CONFIG_BLOCK is not set +CONFIG_BINFMT_FLAT=y +CONFIG_BINFMT_SHARED_FLAT=y +# CONFIG_COREDUMP is not set +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +# CONFIG_STANDALONE is not set +# CONFIG_PREVENT_FIRMWARE_BUILD is not set +# CONFIG_FW_LOADER is not set +# CONFIG_ALLOW_DEV_COREDUMP is not set +CONFIG_EEPROM_93CX6=y +# CONFIG_INPUT is not set +# CONFIG_VT is not set +# CONFIG_UNIX98_PTYS is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_LDISC_AUTOLOAD is not set +CONFIG_SERIAL_STM32=y +CONFIG_SERIAL_STM32_CONSOLE=y +# CONFIG_DEVMEM is not set +# CONFIG_HWMON is not set +CONFIG_WATCHDOG=y +CONFIG_MFD_STM32_TIMERS=y +# CONFIG_USB_SUPPORT is not set +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=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_SYNC_FILE=y +# CONFIG_VIRTIO_MENU is not set +# CONFIG_VHOST_MENU is not set +CONFIG_IIO=y +CONFIG_IIO_BUFFER=y +CONFIG_IIO_TRIGGERED_BUFFER=y +CONFIG_IIO_STM32_TIMER_TRIGGER=y +# CONFIG_FILE_LOCKING is not set +# CONFIG_DNOTIFY is not set +# CONFIG_INOTIFY_USER is not set +# CONFIG_PROC_SYSCTL is not set +CONFIG_CONFIGFS_FS=y +# CONFIG_MISC_FILESYSTEMS is not set +CONFIG_NLS=y +CONFIG_PRINTK_TIME=y +CONFIG_CONSOLE_LOGLEVEL_DEFAULT=15 +CONFIG_CONSOLE_LOGLEVEL_QUIET=15 +CONFIG_MESSAGE_LOGLEVEL_DEFAULT=7 +# CONFIG_SYMBOLIC_ERRNAME is not set +CONFIG_DEBUG_INFO=y +# CONFIG_SECTION_MISMATCH_WARN_ONLY is not set +CONFIG_DEBUG_FS=y +# CONFIG_DEBUG_MISC is not set +# CONFIG_SCHED_DEBUG is not set +# CONFIG_RCU_TRACE is not set +# CONFIG_RUNTIME_TESTING_MENU is not setboard/stmicroelectronics/stm32f429-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patch deleted +0
-32@@ -1,32 +0,0 @@ -From ded9afa688184b3240a92c2b8f114c545a09bc3f Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni <[email protected]> -Date: Sat, 12 Mar 2016 23:14:41 +0100 -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]> ---- - arch/arm/boot/dts/stm32f429-disco.dts | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm/boot/dts/stm32f429-disco.dts b/arch/arm/boot/dts/stm32f429-disco.dts -index f0b731d..2bae81c 100644 ---- a/arch/arm/boot/dts/stm32f429-disco.dts -+++ b/arch/arm/boot/dts/stm32f429-disco.dts -@@ -53,7 +53,7 @@ - compatible = "st,stm32f429i-disco", "st,stm32f429"; - - chosen { -- bootargs = "root=/dev/ram rdinit=/linuxrc"; -+ bootargs = "root=/dev/ram"; - stdout-path = "serial0:115200n8"; - }; - --- -2.6.4 -configs/stm32f429_disco_defconfig +6
-4@@ -1,12 +1,14 @@ 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_KERNEL_HEADERS_5_15=y +# BR2_UCLIBC_INSTALL_UTILS is not set +BR2_GCC_ENABLE_LTO=y 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" -BR2_LINUX_KERNEL_DEFCONFIG="stm32" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32f429-disco/linux.config" BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="xipImage" BR2_LINUX_KERNEL_DTS_SUPPORT=y
Signature · 9 lines
Best regards / Cordialement, Christophe Priouzeau | Tel: +33 244027320 STMicroelectronics ST online: www.st.com<http://www.st.com/> _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Arnout Vandecappelle
AppliedQuoted 26 lines · Dario Binacchi
The kernel generated by the configuration for the STM32f429-discovery board is buggy:
Fixes:
Unhandled exception: IPSR = 00000006 LR =fffffff1CPU: 0 PID: 1 Comm: init Not tainted 4.11.0 #2 Hardware name: STM32 (Device Tree Support) task: 9041a000 task.stack: 907c0000 PC is at ret_fast_syscall+0x2/0x4a LR is at tty_ioctl+0x1ad/0x75c pc : [<0800d942>] lr : [<080c2e05>] psr: 4000000b sp : 907c1fa8 ip : 0000001c fp : 905961a2 r10: 00000000 r9 : 907c0000 r8 : 0800dae0 r7 : 00000036 r6 : 905e7e60 r5 : 00000000 r4 : 905e7ebc r3 : 00000000 r2 : 00000000 r1 : 00000000 r0 : 00000000 xPSR: 4000000b CPU: 0 PID: 1 Comm: init Not tainted 4.11.0 #2 Hardware name: STM32 (Device Tree Support) [<0800fbf9>] (unwind_backtrace) from [<0800f05b>] (show_stack+0xb/0xc) [<0800f05b>] (show_stack) from [<0800f553>] (__invalid_entry+0x4b/0x4c)Inspired by commit
a3e3d9c198("configs/stm32f469_disco_xip_defconfig:
alternative defconfig for XIP") I updated thestm32f429_disco_defconfigconfiguration to use a newer kernel. Current setup kernel + rootfs fits in 1.6MB on-chip flash memory.
Quoted 5 lines
The kernel has been moved to new flash bank due to growth of dtb size.
For better binary size optimization gcc LTO is turned on.
Signed-off-by Dario Binacchi <[email protected]>
Applied to master, thanks.
Regards,
Arnout
Quoted 199 lines
--- .../stm32f429-disco/flash.sh | 2 +- .../stm32f429-disco/linux.config | 120 ++++++++++++++++++ ...sco-don-t-force-init-in-chosen-boota.patch | 32 ----- configs/stm32f429_disco_defconfig | 10 +- 4 files changed, 127 insertions(+), 37 deletions(-)create mode 100644
board/stmicroelectronics/stm32f429-disco/linux.config
delete mode 100644board/stmicroelectronics/stm32f429-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patchboard/stmicroelectronics/stm32f429-disco/flash.sh +1
-1@@ -21,6 +21,6 @@ ${OUTPUT_DIR}/host/bin/openocd -f board/${BOARD_NAME}.cfg \ -c "flash info 0" \ -c "flash write_image erase ${OUTPUT_DIR}/images/stm32f429i-disco.bin 0x08000000" \ -c "flash write_image erase ${OUTPUT_DIR}/images/stm32f429-disco.dtb 0x08004000" \ - -c "flash write_image erase ${OUTPUT_DIR}/images/xipImage 0x08008000" \ + -c "flash write_image erase ${OUTPUT_DIR}/images/xipImage 0x0800C000" \ -c "reset run" \ -c "shutdown"board/stmicroelectronics/stm32f429-disco/linux.config new file +120
-0@@ -0,0 +1,120 @@ +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_KERNEL_XZ=y +CONFIG_NO_HZ_IDLE=y +CONFIG_HIGH_RES_TIMERS=y +CONFIG_PREEMPT=y +CONFIG_LOG_BUF_SHIFT=12 +CONFIG_PRINTK_SAFE_LOG_BUF_SHIFT=10 +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="${BR_BINARIES_DIR}/rootfs.cpio" +# CONFIG_RD_GZIP is not set +# CONFIG_RD_BZIP2 is not set +# CONFIG_RD_LZMA is not set +# CONFIG_RD_XZ is not set +# CONFIG_RD_LZO is not set +# CONFIG_RD_LZ4 is not set +# CONFIG_RD_ZSTD is not set +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +# CONFIG_MULTIUSER is not set +# CONFIG_SYSFS_SYSCALL is not set +# CONFIG_FHANDLE is not set +CONFIG_POSIX_TIMERS=y +CONFIG_BUG=y +# CONFIG_BASE_FULL is not set +# CONFIG_FUTEX is not set +# CONFIG_EPOLL is not set +# CONFIG_SIGNALFD is not set +# CONFIG_TIMERFD is not set +# CONFIG_EVENTFD is not set +# CONFIG_AIO is not set +# CONFIG_IO_URING is not set +# CONFIG_ADVISE_SYSCALLS is not set +# CONFIG_MEMBARRIER is not set +# CONFIG_KALLSYMS is not set +CONFIG_KCMP=y +# CONFIG_RSEQ is not set +CONFIG_EMBEDDED=y +# CONFIG_VM_EVENT_COUNTERS is not set +# CONFIG_COMPAT_BRK is not set +CONFIG_SLOB=y +# CONFIG_SLAB_MERGE_DEFAULT is not set +# CONFIG_MMU is not set +CONFIG_ARCH_STM32=y +# CONFIG_MACH_STM32F469 is not set +# CONFIG_MACH_STM32F746 is not set +# CONFIG_MACH_STM32F769 is not set +# CONFIG_MACH_STM32H743 is not set +CONFIG_CPU_V7M_NUM_IRQ=240 +# CONFIG_ARM_DMA_MEM_BUFFERABLE is not set +CONFIG_SET_MEM_PARAM=y +CONFIG_DRAM_BASE=0x90000000 +CONFIG_DRAM_SIZE=0x00800000 +CONFIG_HZ_1000=y +# CONFIG_ATAGS is not set +CONFIG_XIP_KERNEL=y +CONFIG_XIP_PHYS_ADDR=0x0800C000 +CONFIG_XIP_DEFLATED_DATA=y +# CONFIG_SUSPEND is not set +# CONFIG_STACKPROTECTOR is not set +# CONFIG_COMPAT_32BIT_TIME is not set +# CONFIG_GCC_PLUGINS is not set +# CONFIG_BLOCK is not set +CONFIG_BINFMT_FLAT=y +CONFIG_BINFMT_SHARED_FLAT=y +# CONFIG_COREDUMP is not set +CONFIG_DEVTMPFS=y +CONFIG_DEVTMPFS_MOUNT=y +# CONFIG_STANDALONE is not set +# CONFIG_PREVENT_FIRMWARE_BUILD is not set +# CONFIG_FW_LOADER is not set +# CONFIG_ALLOW_DEV_COREDUMP is not set +CONFIG_EEPROM_93CX6=y +# CONFIG_INPUT is not set +# CONFIG_VT is not set +# CONFIG_UNIX98_PTYS is not set +# CONFIG_LEGACY_PTYS is not set +# CONFIG_LDISC_AUTOLOAD is not set +CONFIG_SERIAL_STM32=y +CONFIG_SERIAL_STM32_CONSOLE=y +# CONFIG_DEVMEM is not set +# CONFIG_HWMON is not set +CONFIG_WATCHDOG=y +CONFIG_MFD_STM32_TIMERS=y +# CONFIG_USB_SUPPORT is not set +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +CONFIG_LEDS_GPIO=y +CONFIG_LEDS_TRIGGERS=y +CONFIG_LEDS_TRIGGER_HEARTBEAT=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_SYNC_FILE=y +# CONFIG_VIRTIO_MENU is not set +# CONFIG_VHOST_MENU is not set +CONFIG_IIO=y +CONFIG_IIO_BUFFER=y +CONFIG_IIO_TRIGGERED_BUFFER=y +CONFIG_IIO_STM32_TIMER_TRIGGER=y +# CONFIG_FILE_LOCKING is not set +# CONFIG_DNOTIFY is not set +# CONFIG_INOTIFY_USER is not set +# CONFIG_PROC_SYSCTL is not set +CONFIG_CONFIGFS_FS=y +# CONFIG_MISC_FILESYSTEMS is not set +CONFIG_NLS=y +CONFIG_PRINTK_TIME=y +CONFIG_CONSOLE_LOGLEVEL_DEFAULT=15 +CONFIG_CONSOLE_LOGLEVEL_QUIET=15 +CONFIG_MESSAGE_LOGLEVEL_DEFAULT=7 +# CONFIG_SYMBOLIC_ERRNAME is not set +CONFIG_DEBUG_INFO=y +# CONFIG_SECTION_MISMATCH_WARN_ONLY is not set +CONFIG_DEBUG_FS=y +# CONFIG_DEBUG_MISC is not set +# CONFIG_SCHED_DEBUG is not set +# CONFIG_RCU_TRACE is not set +# CONFIG_RUNTIME_TESTING_MENU is not setboard/stmicroelectronics/stm32f429-disco/patches/linux/0001-ARM-stm32f249-disco-don-t-force-init-in-chosen-boota.patch deleted +0
-32@@ -1,32 +0,0 @@ -From ded9afa688184b3240a92c2b8f114c545a09bc3f Mon Sep 17 00:00:00 2001 -From: Thomas Petazzoni <[email protected]> -Date: Sat, 12 Mar 2016 23:14:41 +0100 -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]> ---- - arch/arm/boot/dts/stm32f429-disco.dts | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm/boot/dts/stm32f429-disco.dts b/arch/arm/boot/dts/stm32f429-disco.dts -index f0b731d..2bae81c 100644 ---- a/arch/arm/boot/dts/stm32f429-disco.dts -+++ b/arch/arm/boot/dts/stm32f429-disco.dts -@@ -53,7 +53,7 @@ - compatible = "st,stm32f429i-disco", "st,stm32f429"; - - chosen { -- bootargs = "root=/dev/ram rdinit=/linuxrc"; -+ bootargs = "root=/dev/ram"; - stdout-path = "serial0:115200n8"; - }; - --- -2.6.4 -configs/stm32f429_disco_defconfig +3
-2@@ -1,12 +1,14 @@ 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_KERNEL_HEADERS_5_15=y +# BR2_UCLIBC_INSTALL_UTILS is not set +BR2_GCC_ENABLE_LTO=y BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/common/stm32f4xx/stm32-post-build.sh"
configs/stm32f429_disco_defconfig line 14
Quoted 10 lines
configs/stm32f429_disco_defconfig +3
-2BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y -BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.11" -BR2_LINUX_KERNEL_DEFCONFIG="stm32" +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.15" +BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y +BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/stmicroelectronics/stm32f429-disco/linux.config" BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="xipImage" BR2_LINUX_KERNEL_DTS_SUPPORT=y
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH RESEND v2 4/4 configs/stm32f4{2|6}9_*_defconfig: rename configurations
In reply to Dario Binacchi via buildrootThe name of the configurations are now more explicit. As a result, the readme files have also been changed.
---
.../stm32f469-disco/{flash.sh => flash_sd.sh} | 0
.../stm32f469-disco/{linux.fragment => linux-sd.fragment} | 0
board/stmicroelectronics/stm32f469-disco/readme.txt | 4 ++--
board/stmicroelectronics/stm32f469-disco/readme_xip.txt | 2 +-
...tm32f429_disco_defconfig => stm32f429_disco_xip_defconfig} | 0
...stm32f469_disco_defconfig => stm32f469_disco_sd_defconfig} | 2 +-
6 files changed, 4 insertions(+), 4 deletions(-)
rename board/stmicroelectronics/stm32f469-disco/{flash.sh => flash_sd.sh} (100%)
rename board/stmicroelectronics/stm32f469-disco/{linux.fragment => linux-sd.fragment} (100%)
rename configs/{stm32f429_disco_defconfig => stm32f429_disco_xip_defconfig} (100%)
rename configs/{stm32f469_disco_defconfig => stm32f469_disco_sd_defconfig} (97%)board/stmicroelectronics/stm32f469-disco/flash_sd.sh renamed from board/stmicroelectronics/stm32f469-disco/flash.sh +0 -0
board/stmicroelectronics/stm32f469-disco/linux-sd.fragment renamed from board/stmicroelectronics/stm32f469-disco/linux.fragment +0 -0
board/stmicroelectronics/stm32f469-disco/readme.txt +2 -2
@@ -7,13 +7,13 @@ configuration for the STM32F469 Discovery evaluation platform. Building -------- - make stm32f469_disco_defconfig + make stm32f469_disco_sd_defconfig make Flashing -------- - ./board/stmicroelectronics/stm32f469-disco/flash.sh output/ + ./board/stmicroelectronics/stm32f469-disco/flash_sd.sh output/ It will flash the U-boot bootloader.
board/stmicroelectronics/stm32f469-disco/readme_xip.txt +1 -1
@@ -19,6 +19,6 @@ Building Flashing -------- - ./board/stmicroelectronics/stm32f469-disco/flash.sh output/ + ./board/stmicroelectronics/stm32f469-disco/flash_xip.sh output/ It will flash binary to internal flash memory.
configs/stm32f429_disco_xip_defconfig renamed from configs/stm32f429_disco_defconfig +0 -0
configs/stm32f469_disco_sd_defconfig renamed from configs/stm32f469_disco_defconfig +1 -1
@@ -8,7 +8,7 @@ BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.14.12" BR2_LINUX_KERNEL_DEFCONFIG="stm32" -BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0x00000000.config board/stmicroelectronics/stm32f469-disco/linux.fragment" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0x00000000.config board/stmicroelectronics/stm32f469-disco/linux-sd.fragment" BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="zImage" BR2_LINUX_KERNEL_DTS_SUPPORT=y
Signature · 6 lines
2.17.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [RESEND PATCH v2, 4/4] configs/stm32f4{2|6}9_*_defconfig: rename configurations
Quoted 78 lines · Dario Binacchi
The name of the configurations are now more explicit. As a result, the readme files have also been changed.
Signed-off-by Dario Binacchi <[email protected]>--- .../stm32f469-disco/{flash.sh => flash_sd.sh} | 0 .../stm32f469-disco/{linux.fragment => linux-sd.fragment} | 0 board/stmicroelectronics/stm32f469-disco/readme.txt | 4 ++-- board/stmicroelectronics/stm32f469-disco/readme_xip.txt | 2 +- ...tm32f429_disco_defconfig => stm32f429_disco_xip_defconfig} | 0 ...stm32f469_disco_defconfig => stm32f469_disco_sd_defconfig} | 2 +- 6 files changed, 4 insertions(+), 4 deletions(-)rename
board/stmicroelectronics/stm32f469-disco/{flash.sh=>flash_sd.sh} (100%) rename board/stmicroelectronics/stm32f469-disco/{linux.fragment => linux-sd.fragment} (100%) rename configs/{stm32f429_disco_defconfig =>stm32f429_disco_xip_defconfig} (100%) rename configs/{stm32f469_disco_defconfig =>stm32f469_disco_sd_defconfig} (97%)board/stmicroelectronics/stm32f469-disco/flash_sd.sh renamed from board/stmicroelectronics/stm32f469-disco/flash.sh +0
-0board/stmicroelectronics/stm32f469-disco/linux-sd.fragment renamed from board/stmicroelectronics/stm32f469-disco/linux.fragment +0
-0board/stmicroelectronics/stm32f469-disco/readme.txt +2
-2@@ -7,13 +7,13 @@ configuration for the STM32F469 Discovery evaluation platform. Building -------- - make stm32f469_disco_defconfig + make stm32f469_disco_sd_defconfig make Flashing -------- - ./board/stmicroelectronics/stm32f469-disco/flash.sh output/ + ./board/stmicroelectronics/stm32f469-disco/flash_sd.sh output/ It will flash the U-boot bootloader.board/stmicroelectronics/stm32f469-disco/readme_xip.txt +1
-1@@ -19,6 +19,6 @@ Building Flashing -------- - ./board/stmicroelectronics/stm32f469-disco/flash.sh output/ + ./board/stmicroelectronics/stm32f469-disco/flash_xip.sh output/ It will flash binary to internal flash memory.configs/stm32f429_disco_xip_defconfig renamed from configs/stm32f429_disco_defconfig +0
-0configs/stm32f469_disco_sd_defconfig renamed from configs/stm32f469_disco_defconfig +1
-1@@ -8,7 +8,7 @@ BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.14.12" BR2_LINUX_KERNEL_DEFCONFIG="stm32" -BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0x00000000.config board/stmicroelectronics/stm32f469-disco/linux.fragment" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0x00000000.config board/stmicroelectronics/stm32f469-disco/linux-sd.fragment" BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="zImage" BR2_LINUX_KERNEL_DTS_SUPPORT=y
Signature · 9 lines
Best regards / Cordialement, Christophe Priouzeau | Tel: +33 244027320 STMicroelectronics ST online: www.st.com<http://www.st.com/> _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Arnout Vandecappelle
AppliedRe: [Buildroot] [RESEND PATCH v2, 4/4] configs/stm32f4{2|6}9_*_defconfig: rename configurations
In reply to Dario Binacchi via buildrootQuoted 4 lines · Dario Binacchi
The name of the configurations are now more explicit. As a result, the readme files have also been changed.
Signed-off-by Dario Binacchi <[email protected]>
Applied to master, thanks.
Regards,
Arnout
Quoted 66 lines
--- .../stm32f469-disco/{flash.sh => flash_sd.sh} | 0 .../stm32f469-disco/{linux.fragment => linux-sd.fragment} | 0 board/stmicroelectronics/stm32f469-disco/readme.txt | 4 ++-- board/stmicroelectronics/stm32f469-disco/readme_xip.txt | 2 +- ...tm32f429_disco_defconfig => stm32f429_disco_xip_defconfig} | 0 ...stm32f469_disco_defconfig => stm32f469_disco_sd_defconfig} | 2 +- 6 files changed, 4 insertions(+), 4 deletions(-)rename
board/stmicroelectronics/stm32f469-disco/{flash.sh=>flash_sd.sh} (100%) rename board/stmicroelectronics/stm32f469-disco/{linux.fragment => linux-sd.fragment} (100%) rename configs/{stm32f429_disco_defconfig =>stm32f429_disco_xip_defconfig} (100%) rename configs/{stm32f469_disco_defconfig =>stm32f469_disco_sd_defconfig} (97%)board/stmicroelectronics/stm32f469-disco/flash_sd.sh renamed from board/stmicroelectronics/stm32f469-disco/flash.sh +0
-0board/stmicroelectronics/stm32f469-disco/linux-sd.fragment renamed from board/stmicroelectronics/stm32f469-disco/linux.fragment +0
-0board/stmicroelectronics/stm32f469-disco/readme.txt +2
-2@@ -7,13 +7,13 @@ configuration for the STM32F469 Discovery evaluation platform. Building -------- - make stm32f469_disco_defconfig + make stm32f469_disco_sd_defconfig make Flashing -------- - ./board/stmicroelectronics/stm32f469-disco/flash.sh output/ + ./board/stmicroelectronics/stm32f469-disco/flash_sd.sh output/ It will flash the U-boot bootloader.board/stmicroelectronics/stm32f469-disco/readme_xip.txt +1
-1@@ -19,6 +19,6 @@ Building Flashing -------- - ./board/stmicroelectronics/stm32f469-disco/flash.sh output/ + ./board/stmicroelectronics/stm32f469-disco/flash_xip.sh output/ It will flash binary to internal flash memory.configs/stm32f429_disco_xip_defconfig renamed from configs/stm32f429_disco_defconfig +0
-0configs/stm32f469_disco_sd_defconfig renamed from configs/stm32f469_disco_defconfig +0
-0
configs/stm32f469_disco_sd_defconfig BR2_LINUX_KERNEL=y · line 14
Quoted 8 lines
configs/stm32f469_disco_sd_defconfig renamed from configs/stm32f469_disco_defconfig +1
-1@@ -8,7 +8,7 @@ BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.14.12" BR2_LINUX_KERNEL_DEFCONFIG="stm32" -BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0x00000000.config board/stmicroelectronics/stm32f469-disco/linux.fragment" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0x00000000.config board/stmicroelectronics/stm32f469-disco/linux-sd.fragment" BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="zImage" BR2_LINUX_KERNEL_DTS_SUPPORT=y
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot