configs/stm32f429_disco: new configuration for STM32F429 Discovery board
This commit adds a defconfig for the STM32F429 platform, which is based on a Cortex-M4 core from ST Microelectronics. It is therefore the first noMMU ARM platform supported in Buildroot. This commit includes some files that will be common to several STM32 platforms (hence in board/stmicroelectronics) and some files that are specific to the STM32F429 (hence in board/stmicroelectronics/stm32f429-disco). More specifically, this commit adds: - A minimal Busybox configuration, which is small enough to boot without causing OOM on such small noMMU platforms. The resulting Busybox, statically linked with uClibc-ng, weights around 220 KB. For now, this file is located in board/stmicroelectronics/, but we might consider moving it to package/busybox/ in the future if needed. - A post-build script that removes the mounting of /dev/pts (not enabled in the kernel and not very useful for a system that has no network and no X), and removes the network related init script and configuration files (no network support). - A flash.sh script, to perform the right OpenOCD invocations to reflash the board. - One small kernel patch to adjust the kernel command line in the Device Tree, since it's the only way to do so. - The usual readme.txt file. Signed-off-by: Lee Jones <lee.jones@linaro.org> [Thomas: - squashed multiple patches from Lee Jones together - added the minimal Busybox configuration - added the post-build script - improved the flashing script to not hardcode the location of the output directory - add the small kernel patch - improve the readme.txt file - test on HW the resulting image, after using the internal toolchain.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
a354e3828d
commit
c8ad46a1a7
1057
board/stmicroelectronics/busybox-minimal.config
Normal file
1057
board/stmicroelectronics/busybox-minimal.config
Normal file
File diff suppressed because it is too large
Load Diff
8
board/stmicroelectronics/stm32-post-build.sh
Executable file
8
board/stmicroelectronics/stm32-post-build.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Kernel is built without devpts support
|
||||
sed -i '/^devpts/d' ${TARGET_DIR}/etc/fstab
|
||||
|
||||
# Kernel is built without network support
|
||||
rm -f ${TARGET_DIR}/etc/init.d/S40network
|
||||
rm -rf ${TARGET_DIR}/etc/network/
|
20
board/stmicroelectronics/stm32f429-disco/flash.sh
Executable file
20
board/stmicroelectronics/stm32f429-disco/flash.sh
Executable file
@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
OUTPUT_DIR=$1
|
||||
|
||||
if ! test -d "${OUTPUT_DIR}" ; then
|
||||
echo "ERROR: no output directory specified."
|
||||
echo "Usage: $0 OUTPUT_DIR"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
${OUTPUT_DIR}/host/usr/bin/openocd -f board/stm32f429discovery.cfg \
|
||||
-c "init" \
|
||||
-c "reset init" \
|
||||
-c "flash probe 0" \
|
||||
-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 "reset run" \
|
||||
-c "shutdown"
|
@ -0,0 +1,32 @@
|
||||
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
|
||||
|
30
board/stmicroelectronics/stm32f429-disco/readme.txt
Normal file
30
board/stmicroelectronics/stm32f429-disco/readme.txt
Normal file
@ -0,0 +1,30 @@
|
||||
STM32F429 Discovery
|
||||
===================
|
||||
|
||||
This tutorial describes how to use the predefined Buildroot
|
||||
configuration for the STM32F429 Discovery evaluation platform.
|
||||
|
||||
Building
|
||||
--------
|
||||
|
||||
make stm32f429_disco_defconfig
|
||||
make
|
||||
|
||||
Wire the UART
|
||||
-------------
|
||||
|
||||
Use a USB to TTL adapter, and connect:
|
||||
|
||||
- RX to PA9
|
||||
- TX to PA10
|
||||
- GND to one of the GND available on the board
|
||||
|
||||
The UART is configured at 115200.
|
||||
|
||||
Flashing
|
||||
--------
|
||||
|
||||
./board/stmicroelectronics/stm32f429-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.
|
18
configs/stm32f429_disco_defconfig
Normal file
18
configs/stm32f429_disco_defconfig
Normal file
@ -0,0 +1,18 @@
|
||||
BR2_arm=y
|
||||
BR2_cortex_m4=y
|
||||
BR2_GLOBAL_PATCH_DIR="board/stmicroelectronics/stm32f429-disco/patches/"
|
||||
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_5=y
|
||||
BR2_ROOTFS_POST_BUILD_SCRIPT="board/stmicroelectronics/stm32-post-build.sh"
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.5"
|
||||
BR2_LINUX_KERNEL_DEFCONFIG="stm32"
|
||||
BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
|
||||
BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="xipImage"
|
||||
BR2_LINUX_KERNEL_DTS_SUPPORT=y
|
||||
BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32f429-disco"
|
||||
BR2_PACKAGE_BUSYBOX_CONFIG="board/stmicroelectronics/busybox-minimal.config"
|
||||
BR2_TARGET_ROOTFS_INITRAMFS=y
|
||||
# BR2_TARGET_ROOTFS_TAR is not set
|
||||
BR2_TARGET_AFBOOT_STM32=y
|
||||
BR2_PACKAGE_HOST_OPENOCD=y
|
Loading…
Reference in New Issue
Block a user