configs/stm32f429_disco: fix kernel bootup
The 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"), update 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.
Remove upstream patch.
For better binary size optimization gcc LTO is turned on.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Acked-by: Christophe Priouzeau <christophe.priouzeau@foss.st.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
parent
b235a2cffc
commit
c85312affd
@ -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"
|
||||
|
120
board/stmicroelectronics/stm32f429-disco/linux.config
Normal file
120
board/stmicroelectronics/stm32f429-disco/linux.config
Normal file
@ -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 set
|
@ -1,32 +0,0 @@
|
||||
From ded9afa688184b3240a92c2b8f114c545a09bc3f Mon Sep 17 00:00:00 2001
|
||||
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
||||
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 <thomas.petazzoni@free-electrons.com>
|
||||
---
|
||||
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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user