Add support for STM32F469-DISCO & STM32F469-DISCO boards
v2 cover Add support for STM32F469-DISCO & STM32F469-DISCO boards
After this set is applied and you have the correct toolchain installed it should be trivial to configure, build and flash the; bootloader, DTB and kernel (with CPIO rootfs attached) to the board(s).
Lee Jones (15):
boot: Add new bootloader afboot-stm32
boards: stm32f469-disco: Add kernel patch to provide top compatible
string
boards: stm32f469-disco: Add kernel patch to provide top compatible
string
boards: stm32f469-disco: Add kernel patch to provide DTS file
boards: stm32f469-disco: Add kernel patch to provide DTS file
boards: stm32f469-disco: Add kernel patch to set RAM address to 0
boards: stm32f469-disco: Add kernel patch to set RAM address to 0
boards: stm32f469-disco: Add OpenOCD patch to supply a new config
boards: stm32f469-disco: Add OpenOCD patch to support on-board flash
chip
boards: stm32f469-disco: Add a helper script to flash images
boards: stm32f429-disco: Add a readme.txt
boards: stm32f429-disco: Add a helper script to flash images
boards: stm32f469-disco: Add a readme.txt
configs: Add a tested working STM32F469-DISCO defconfig
configs: Add a tested working STM32F429-DISCO defconfig
.../stm32/stm32f429-disco/flash.sh | 12 +++ .../stm32/stm32f429-disco/readme.txt | 10 ++ .../stm32/stm32f469-disco/flash.sh | 12 +++ .../linux/0001-kernel-add-top-compatible.patch | 25 +++++ .../patches/linux/0002-kernel-new-dts-file.patch | 112 +++++++++++++++++++++ .../linux/0003-kernel-config-frag-ram.patch | 28 ++++++ .../patches/openocd/0.9.0/0001-add-config.patch | 37 +++++++ .../patches/openocd/0.9.0/0002-flash-nor.patch | 37 +++++++ .../stm32/stm32f469-disco/readme.txt | 10 ++ boot/Config.in | 1 + boot/afboot-stm32/Config.in | 6 ++ boot/afboot-stm32/afboot-stm32.hash | 2 + boot/afboot-stm32/afboot-stm32.mk | 18 ++++ configs/stm32f429_disco_defconfig | 16 +++ configs/stm32f469_disco_defconfig | 18 ++++ 15 files changed, 344 insertions(+) create mode 100755 board/stmicroelectronics/stm32/stm32f429-disco/flash.sh create mode 100644 board/stmicroelectronics/stm32/stm32f429-disco/readme.txt create mode 100755 board/stmicroelectronics/stm32/stm32f469-disco/flash.sh create mode 100644 board/stmicroelectronics/stm32/stm32f469-disco/patches/linux/0001-kernel-add-top-compatible.patch create mode 100644 board/stmicroelectronics/stm32/stm32f469-disco/patches/linux/0002-kernel-new-dts-file.patch create mode 100644 board/stmicroelectronics/stm32/stm32f469-disco/patches/linux/0003-kernel-config-frag-ram.patch create mode 100644 board/stmicroelectronics/stm32/stm32f469-disco/patches/openocd/0.9.0/0001-add-config.patch create mode 100644 board/stmicroelectronics/stm32/stm32f469-disco/patches/openocd/0.9.0/0002-flash-nor.patch create mode 100644 board/stmicroelectronics/stm32/stm32f469-disco/readme.txt create mode 100644 boot/afboot-stm32/Config.in create mode 100644 boot/afboot-stm32/afboot-stm32.hash create mode 100644 boot/afboot-stm32/afboot-stm32.mk create mode 100644 configs/stm32f429_disco_defconfig create mode 100644 configs/stm32f469_disco_defconfig
Signature · 1 line
1.9.1
PATCH v2 1/15 boot: Add new bootloader afboot-stm32
This is a _very_ small bootloader for STM32 platforms.
At submission afboot-stm32 supports the following boards:
stm32429i-eval
stm32746g-eval
stm32f429i-disco
stm32f469i-disco
--- boot/Config.in | 1 + boot/afboot-stm32/Config.in | 6 ++++++ boot/afboot-stm32/afboot-stm32.hash | 2 ++ boot/afboot-stm32/afboot-stm32.mk | 18 ++++++++++++++++++ 4 files changed, 27 insertions(+) create mode 100644 boot/afboot-stm32/Config.in create mode 100644 boot/afboot-stm32/afboot-stm32.hash create mode 100644 boot/afboot-stm32/afboot-stm32.mk
boot/Config.in +1 -0
@@ -1,5 +1,6 @@ menu "Bootloaders" +source "boot/afboot-stm32/Config.in" source "boot/at91bootstrap/Config.in" source "boot/at91bootstrap3/Config.in" source "boot/at91dataflashboot/Config.in"
boot/afboot-stm32/Config.in new file +6 -0
@@ -0,0 +1,6 @@ +config BR2_TARGET_AFBOOT_STM32 + bool "afboot-stm32" + help + afboot-stm32 is a very small bootloader for STM32 platforms + + https://github.com/mcoquelin-stm32/afboot-stm32
boot/afboot-stm32/afboot-stm32.hash new file +2 -0
@@ -0,0 +1,2 @@ +# Locally calculated +sha256 dbd715c8b99f7d266f74a04707a4dac76b75b31321f24dee5256a6348260530c afboot-stm32-v0.1.tar.gz
boot/afboot-stm32/afboot-stm32.mk new file +18 -0
@@ -0,0 +1,18 @@ +################################################################################ +# +# afboot-stm32 +# +################################################################################ + +AFBOOT_STM32_VERSION = v0.1 +AFBOOT_STM32_SITE = $(call github,mcoquelin-stm32,afboot-stm32,$(AFBOOT_STM32_VERSION)) + +define AFBOOT_STM32_BUILD_CMDS + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) all +endef + +define AFBOOT_STM32_INSTALL_TARGET_CMDS + $(INSTALL) -m 0755 $(@D)/stm32*.bin $(BINARIES_DIR) +endef + +$(eval $(generic-package))
Signature · 1 line
1.9.1
PATCH v2 1/15 boot: Add new bootloader afboot-stm32
Dear Lee Jones,
boot/afboot-stm32/Config.in line 2
Quoted 8 lines · Lee Jones
boot/afboot-stm32/Config.in new file +2
-0@@ -0,0 +1,6 @@ +config BR2_TARGET_AFBOOT_STM32 + bool "afboot-stm32"
In the previous review, forgot to mention that you should add a:
depends on BR2_arm
here.
Other than that:
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/15 boot: Add new bootloader afboot-stm32
In reply to Lee JonesLee,
Quoted 10 lines · Lee Jones
This is a _very_ small bootloader for STM32 platforms.
At submission afboot-stm32 supports the following boards:
stm32429i-eval
stm32746g-eval
stm32f429i-disco
stm32f469i-discoSigned-off-by Lee Jones <[email protected]>
Quoted 9 lines
--- boot/Config.in | 1 + boot/afboot-stm32/Config.in | 6 ++++++ boot/afboot-stm32/afboot-stm32.hash | 2 ++ boot/afboot-stm32/afboot-stm32.mk | 18 ++++++++++++++++++ 4 files changed, 27 insertions(+) create mode 100644 boot/afboot-stm32/Config.in create mode 100644 boot/afboot-stm32/afboot-stm32.hash create mode 100644 boot/afboot-stm32/afboot-stm32.mk
I've applied to next, after doing the following changes:
- Changed the commit title to "afboot-stm32: new package", which is our standard for package additions.
- Added the "depends on BR2_arm" dependency.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 2/15 boards: stm32f469-disco: Add kernel patch to provide top compatible string
In reply to Lee JonesAt the time of submission, the Mainline kernel does not currently support the STM32f469. This patch ensures the correct DTB will be matched on boot.
--- .../kernel/0001-kernel-add-top-compatible.patch | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 board/stmicroelectronics/stm32/stm32f469-disco/patches/kernel/0001-kernel-add-top-compatible.patch
board/stmicroelectronics/stm32/stm32f469-disco/patches/kernel/0001-kernel-add-top-compatible.patch new file +25 -0
@@ -0,0 +1,25 @@ +From 6bd8bae3dd0631f8d23e63617dca289f162e6840 Mon Sep 17 00:00:00 2001 +From: Lee Jones <[email protected]> +Date: Tue, 16 Feb 2016 14:04:17 +0000 +Subject: [PATCH 3/3] ARM: stm32: Identify a new board - STM32F469 + +Signed-off-by: Lee Jones <[email protected]> +--- + arch/arm/mach-stm32/board-dt.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/arm/mach-stm32/board-dt.c b/arch/arm/mach-stm32/board-dt.c +index f2ad772..ceee477 100644 +--- a/arch/arm/mach-stm32/board-dt.c ++++ b/arch/arm/mach-stm32/board-dt.c +@@ -10,6 +10,7 @@ + + static const char *const stm32_compat[] __initconst = { + "st,stm32f429", ++ "st,stm32f469", + NULL + }; + +-- +1.9.1 +
Signature · 1 line
1.9.1
PATCH v2 3/15 boards: stm32f469-disco: Add kernel patch to provide top compatible string
In reply to Lee JonesAt the time of submission, the Mainline kernel does not currently support the STM32f469. This patch ensures the correct DTB will be matched on boot.
---
.../patches/{kernel => linux}/0001-kernel-add-top-compatible.patch | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename board/stmicroelectronics/stm32/stm32f469-disco/patches/{kernel => linux}/0001-kernel-add-top-compatible.patch (100%)board/stmicroelectronics/stm32/stm32f469-disco/patches/linux/0001-kernel-add-top-compatible.patch renamed from board/stmicroelectronics/stm32/stm32f469-disco/patches/kernel/0001-kernel-add-top-compatible.patch +0 -0
Signature · 1 line
1.9.1
PATCH v2 4/15 boards: stm32f469-disco: Add kernel patch to provide DTS file
In reply to Lee JonesAt the time of submission, the Mainline kernel does not currently support the STM32f469. This patch adds a new DTS file which contains some critical information to ensure a clean, visible boot.
--- .../patches/kernel/0002-kernel-new-dts-file.patch | 112 +++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 board/stmicroelectronics/stm32/stm32f469-disco/patches/kernel/0002-kernel-new-dts-file.patch
board/stmicroelectronics/stm32/stm32f469-disco/patches/kernel/0002-kernel-new-dts-file.patch new file +112 -0
@@ -0,0 +1,112 @@ +From a898629f21b86f2560041109f64d01d20087deae Mon Sep 17 00:00:00 2001 +From: Lee Jones <[email protected]> +Date: Tue, 16 Feb 2016 13:53:47 +0000 +Subject: [PATCH 1/3] ARM: stm32: Supply a DTS file for the STM32F469 Discovery + board + +It's pretty similar to the STM32F429, but there are some +subtle changes required to boot successfully. + +Signed-off-by: Lee Jones <[email protected]> +--- + arch/arm/boot/dts/Makefile | 1 + + arch/arm/boot/dts/stm32f469-disco.dts | 75 +++++++++++++++++++++++++++++++++++ + 2 files changed, 76 insertions(+) + create mode 100644 arch/arm/boot/dts/stm32f469-disco.dts + +diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile +index 30bbc37..c9d8023 100644 +--- a/arch/arm/boot/dts/Makefile ++++ b/arch/arm/boot/dts/Makefile +@@ -583,6 +583,7 @@ dtb-$(CONFIG_ARCH_STI) += \ + stih418-b2199.dtb + dtb-$(CONFIG_ARCH_STM32)+= \ + stm32f429-disco.dtb \ ++ stm32f469-disco.dtb \ + stm32429i-eval.dtb + dtb-$(CONFIG_MACH_SUN4I) += \ + sun4i-a10-a1000.dtb \ +diff --git a/arch/arm/boot/dts/stm32f469-disco.dts b/arch/arm/boot/dts/stm32f469-disco.dts +new file mode 100644 +index 0000000..e911af8 +--- /dev/null ++++ b/arch/arm/boot/dts/stm32f469-disco.dts +@@ -0,0 +1,75 @@ ++/* ++ * Copyright 2016 - Lee Jones <[email protected]> ++ * ++ * This file is dual-licensed: you can use it either under the terms ++ * of the GPL or the X11 license, at your option. Note that this dual ++ * licensing only applies to this file, and not this project as a ++ * whole. ++ * ++ * a) This file is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This file is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public ++ * License along with this file; if not, write to the Free ++ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, ++ * MA 02110-1301 USA ++ * ++ * Or, alternatively, ++ * ++ * b) Permission is hereby granted, free of charge, to any person ++ * obtaining a copy of this software and associated documentation ++ * files (the "Software"), to deal in the Software without ++ * restriction, including without limitation the rights to use, ++ * copy, modify, merge, publish, distribute, sublicense, and/or ++ * sell copies of the Software, and to permit persons to whom the ++ * Software is furnished to do so, subject to the following ++ * conditions: ++ * ++ * The above copyright notice and this permission notice shall be ++ * included in all copies or substantial portions of the Software. ++ * ++ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ++ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ++ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ++ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT ++ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, ++ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING ++ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR ++ * OTHER DEALINGS IN THE SOFTWARE. ++ */ ++ ++/dts-v1/; ++#include "stm32f429.dtsi" ++ ++/ { ++ model = "STMicroelectronics STM32F469i-DISCO board"; ++ compatible = "st,stm32f469i-disco", "st,stm32f469"; ++ ++ chosen { ++ bootargs = "root=/dev/ram rdinit=/linuxrc"; ++ stdout-path = "serial0:115200n8"; ++ }; ++ ++ memory { ++ reg = <0x00000000 0x800000>; ++ }; ++ ++ aliases { ++ serial0 = &usart3; ++ }; ++}; ++ ++&clk_hse { ++ clock-frequency = <8000000>; ++}; ++ ++&usart3 { ++ status = "okay"; ++}; +-- +1.9.1 +
Signature · 1 line
1.9.1
PATCH v2 5/15 boards: stm32f469-disco: Add kernel patch to provide DTS file
In reply to Lee JonesAt the time of submission, the Mainline kernel does not currently support the STM32f469. This patch adds a new DTS file which contains some critical information to ensure a clean, visible boot.
---
.../patches/{kernel => linux}/0002-kernel-new-dts-file.patch | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename board/stmicroelectronics/stm32/stm32f469-disco/patches/{kernel => linux}/0002-kernel-new-dts-file.patch (100%)board/stmicroelectronics/stm32/stm32f469-disco/patches/linux/0002-kernel-new-dts-file.patch renamed from board/stmicroelectronics/stm32/stm32f469-disco/patches/kernel/0002-kernel-new-dts-file.patch +0 -0
Signature · 1 line
1.9.1
PATCH v2 6/15 boards: stm32f469-disco: Add kernel patch to set RAM address to 0
In reply to Lee JonesAt the time of submission, the Mainline kernel does not currently support the STM32f469. This patch adds a new config fragment which we can use to adjust the start of RAM address to 0.
--- .../kernel/0003-kernel-config-frag-ram.patch | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 board/stmicroelectronics/stm32/stm32f469-disco/patches/kernel/0003-kernel-config-frag-ram.patch
board/stmicroelectronics/stm32/stm32f469-disco/patches/kernel/0003-kernel-config-frag-ram.patch new file +28 -0
@@ -0,0 +1,28 @@ +From 4cb65563325bee1886329b97ce3e2b0b90106bdd Mon Sep 17 00:00:00 2001 +From: Lee Jones <[email protected]> +Date: Tue, 16 Feb 2016 13:56:13 +0000 +Subject: [PATCH 2/3] ARM: configs: Add new config fragment to change RAM start + point + +Rather than duplicate a defconfig for each difference +between platforms, we can choose to pick a basic defconfig and +manipulate it at run-time using config fragments. Here we're +adding a new fragment to over-ride the RAM start point to 0x0. + +Cc: Arnd Bergmann <[email protected]> +Signed-off-by: Lee Jones <[email protected]> +--- + arch/arm/configs/dram_0x00000000.config | 1 + + 1 file changed, 1 insertion(+) + create mode 100644 arch/arm/configs/dram_0x00000000.config + +diff --git a/arch/arm/configs/dram_0x00000000.config b/arch/arm/configs/dram_0x00000000.config +new file mode 100644 +index 0000000..db96dcb +--- /dev/null ++++ b/arch/arm/configs/dram_0x00000000.config +@@ -0,0 +1 @@ ++CONFIG_DRAM_BASE=0x00000000 +-- +1.9.1 +
Signature · 1 line
1.9.1
PATCH v2 7/15 boards: stm32f469-disco: Add kernel patch to set RAM address to 0
In reply to Lee JonesAt the time of submission, the Mainline kernel does not currently support the STM32f469. This patch adds a new config fragment which we can use to adjust the start of RAM address to 0.
---
.../patches/{kernel => linux}/0003-kernel-config-frag-ram.patch | 0
1 file changed, 0 insertions(+), 0 deletions(-)
rename board/stmicroelectronics/stm32/stm32f469-disco/patches/{kernel => linux}/0003-kernel-config-frag-ram.patch (100%)board/stmicroelectronics/stm32/stm32f469-disco/patches/linux/0003-kernel-config-frag-ram.patch renamed from board/stmicroelectronics/stm32/stm32f469-disco/patches/kernel/0003-kernel-config-frag-ram.patch +0 -0
Signature · 1 line
1.9.1
PATCH v2 8/15 boards: stm32f469-disco: Add OpenOCD patch to supply a new config
In reply to Lee JonesAt the time of submission, OpenOCD does not support the STM32f469. This patch adds a new configuration file which provides some board specifics required to correctly handle the stm32f469-disco dev board.
--- .../patches/openocd/0.9.0/0001-add-config.patch | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 board/stmicroelectronics/stm32/stm32f469-disco/patches/openocd/0.9.0/0001-add-config.patch
board/stmicroelectronics/stm32/stm32f469-disco/patches/openocd/0.9.0/0001-add-config.patch new file +37 -0
@@ -0,0 +1,37 @@ +From 26045588f462476cee356d15a24944d6c26befb4 Mon Sep 17 00:00:00 2001 +From: Maxime Coquelin <[email protected]> +Date: Sat, 24 Oct 2015 00:13:38 +0200 +Subject: [PATCH 1/1] tcl: add STM32F469 discovery board config + +Change-Id: Iad7ee06330b3259ea0ce0d174dfdade6785913eb +Signed-off-by: Maxime Coquelin <[email protected]> +Reviewed-on: http://openocd.zylin.com/3043 +Tested-by: jenkins +Reviewed-by: Antonio Borneo <[email protected]> +Reviewed-by: Freddie Chopin <[email protected]> +--- + tcl/board/stm32f469discovery.cfg | 12 ++++++++++++ + 1 file changed, 12 insertions(+) + create mode 100644 tcl/board/stm32f469discovery.cfg + +diff --git a/tcl/board/stm32f469discovery.cfg b/tcl/board/stm32f469discovery.cfg +new file mode 100644 +index 0000000..eecfe33 +--- /dev/null ++++ b/tcl/board/stm32f469discovery.cfg +@@ -0,0 +1,12 @@ ++# ++# This is an STM32F469 discovery board with a single STM32F469NI chip. ++# http://www.st.com/web/catalog/tools/FM116/CL1620/SC959/SS1532/LN1848/PF262395 ++# ++ ++source [find interface/stlink-v2-1.cfg] ++ ++transport select hla_swd ++ ++source [find target/stm32f4x.cfg] ++ ++reset_config srst_only +-- +1.9.1 +
Signature · 1 line
1.9.1
PATCH v2 9/15 boards: stm32f469-disco: Add OpenOCD patch to support on-board flash chip
In reply to Lee JonesAt the time of submission, OpenOCD does not support the STM32f469. This patch adds support for the STM32F469-DISCO's on-board flash chip. Without this patch there is no way to flash the board.
--- .../patches/openocd/0.9.0/0002-flash-nor.patch | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 board/stmicroelectronics/stm32/stm32f469-disco/patches/openocd/0.9.0/0002-flash-nor.patch
board/stmicroelectronics/stm32/stm32f469-disco/patches/openocd/0.9.0/0002-flash-nor.patch new file +37 -0
@@ -0,0 +1,37 @@ +From 3e219648c80a27f0519003f3b088cbb846e255d8 Mon Sep 17 00:00:00 2001 +From: Maxime Coquelin <[email protected]> +Date: Sat, 24 Oct 2015 00:03:54 +0200 +Subject: [PATCH 1/1] flash/nor/stm32f2x: Add STM32F469 part + +Change-Id: I4e13ceb0ba954dc2fea059ddeef10109be938c9c +Signed-off-by: Maxime Coquelin <[email protected]> +Reviewed-on: http://openocd.zylin.com/3042 +Tested-by: jenkins +Reviewed-by: Freddie Chopin <[email protected]> +--- + src/flash/nor/stm32f2x.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/flash/nor/stm32f2x.c b/src/flash/nor/stm32f2x.c +index 2130444..89fc75d 100644 +--- a/src/flash/nor/stm32f2x.c ++++ b/src/flash/nor/stm32f2x.c +@@ -790,6 +790,7 @@ static int stm32x_probe(struct flash_bank *bank) + max_flash_size_in_kb = 1024; + break; + case 0x419: ++ case 0x434: + max_flash_size_in_kb = 2048; + break; + case 0x423: +@@ -952,6 +953,7 @@ static int get_stm32x_info(struct flash_bank *bank, char *buf, int buf_size) + + case 0x413: + case 0x419: ++ case 0x434: + device_str = "STM32F4xx"; + + switch (rev_id) { +-- +1.9.1 +
Signature · 1 line
1.9.1
PATCH v2 10/15 boards: stm32f469-disco: Add a helper script to flash images
In reply to Lee JonesOnce each of the; bootloader, kernel, host utilities and rootfs have been successfully built and packaged, the user run this helper script to flash the relevant images onto the board.
--- board/stmicroelectronics/stm32/stm32f469-disco/flash.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 board/stmicroelectronics/stm32/stm32f469-disco/flash.sh
board/stmicroelectronics/stm32/stm32f469-disco/flash.sh new file +12 -0
@@ -0,0 +1,12 @@ +#!/bin/bash + +output/host/usr/bin/openocd -f board/stm32f469discovery.cfg \ + -c "init" \ + -c "reset init" \ + -c "flash probe 0" \ + -c "flash info 0" \ + -c "flash write_image erase $BINARIES_DIR/stm32f469i-disco.bin 0x08000000" \ + -c "flash write_image erase $BINARIES_DIR/stm32f469-disco.dtb 0x08004000" \ + -c "flash write_image erase $BINARIES_DIR/xipImage 0x08008000" \ + -c "reset run" \ + -c "shutdown"
Signature · 1 line
1.9.1
PATCH v2 11/15 boards: stm32f429-disco: Add a readme.txt
In reply to Lee JonesAs a starting point we show users how to build and flash their boards.
--- board/stmicroelectronics/stm32/stm32f429-disco/readme.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 board/stmicroelectronics/stm32/stm32f429-disco/readme.txt
board/stmicroelectronics/stm32/stm32f429-disco/readme.txt new file +10 -0
@@ -0,0 +1,10 @@ +Building +======== + + make stm32f429_disco_defconfig + make + +Flashing +======== + + board/stmicroelectronics/stm32/stm32f429-disco/flash.sh
Signature · 1 line
1.9.1
PATCH v2 12/15 boards: stm32f429-disco: Add a helper script to flash images
In reply to Lee JonesOnce each of the; bootloader, kernel, host utilities and rootfs have been successfully built and packaged, the user run this helper script to flash the relevant images onto the board.
--- board/stmicroelectronics/stm32/stm32f429-disco/flash.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 board/stmicroelectronics/stm32/stm32f429-disco/flash.sh
board/stmicroelectronics/stm32/stm32f429-disco/flash.sh new file +12 -0
@@ -0,0 +1,12 @@ +#!/bin/bash + +output/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 $BINARIES_DIR/stm32f429i-disco.bin 0x08000000" \ + -c "flash write_image erase $BINARIES_DIR/stm32f429-disco.dtb 0x08004000" \ + -c "flash write_image erase $BINARIES_DIR/xipImage 0x08008000" \ + -c "reset run" \ + -c "shutdown"
Signature · 1 line
1.9.1
PATCH v2 13/15 boards: stm32f469-disco: Add a readme.txt
In reply to Lee JonesAs a starting point we show users how to build and flash their boards.
--- board/stmicroelectronics/stm32/stm32f469-disco/readme.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 board/stmicroelectronics/stm32/stm32f469-disco/readme.txt
board/stmicroelectronics/stm32/stm32f469-disco/readme.txt new file +10 -0
@@ -0,0 +1,10 @@ +Building +======== + + make stm32f469_disco_defconfig + make + +Flashing +======== + + board/stmicroelectronics/stm32/stm32f429-disco/flash.sh
Signature · 1 line
1.9.1
PATCH v2 14/15 configs: Add a tested working STM32F469-DISCO defconfig
In reply to Lee JonesUnfortunately, the toolchain built with Buildroot does not currently support this platform. Thus, the tested-working one is being referenced instead. Once the Buildroot toolchain works, this will be swapped out.
--- configs/stm32f469_disco_defconfig | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 configs/stm32f469_disco_defconfig
configs/stm32f469_disco_defconfig new file +18 -0
@@ -0,0 +1,18 @@ +BR2_arm=y +BR2_cortex_m3=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_TARGET_ROOTFS_INITRAMFS=y +BR2_GLOBAL_PATCH_DIR="board/stmicroelectronics/stm32/stm32f469-disco/patches/" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_LATEST_VERSION=y +BR2_LINUX_KERNEL_USE_DEFCONFIG=y +BR2_LINUX_KERNEL_DEFCONFIG="stm32" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="$(LINUX_DIR)/arch/arm/configs/dram_0x00000000.config" +BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y +BR2_LINUX_KERNEL_GZIP=y +BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="xipImage" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_USE_INTREE_DTS=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32f469-disco" +BR2_TARGET_AFBOOT_STM32=y +BR2_PACKAGE_HOST_OPENOCD=y
Signature · 1 line
1.9.1
PATCH v2 15/15 configs: Add a tested working STM32F429-DISCO defconfig
In reply to Lee JonesUnfortunately, the toolchain built with Buildroot does not currently support this platform. Thus, the tested-working one is being referenced instead. Once the Buildroot toolchain works, this will be swapped out.
You'll notice, in contrast to the STM32F469, there aren't any patch directories required for this board. That's because it is well supported in each of the upstream repos, and has been for some time.
--- configs/stm32f429_disco_defconfig | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 configs/stm32f429_disco_defconfig
configs/stm32f429_disco_defconfig new file +16 -0
@@ -0,0 +1,16 @@ +BR2_arm=y +BR2_cortex_m3=y +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_TARGET_ROOTFS_INITRAMFS=y +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_LATEST_VERSION=y +BR2_LINUX_KERNEL_USE_DEFCONFIG=y +BR2_LINUX_KERNEL_DEFCONFIG="stm32" +BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y +BR2_LINUX_KERNEL_GZIP=y +BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="xipImage" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_USE_INTREE_DTS=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="stm32f429-disco" +BR2_TARGET_AFBOOT_STM32=y +BR2_PACKAGE_HOST_OPENOCD=y
Signature · 1 line
1.9.1
v2 cover Add support for STM32F469-DISCO & STM32F469-DISCO boards
In reply to Lee JonesLee,
Quoted 10 lines · Lee Jones
boot: Add new bootloader afboot-stm32
boards: stm32f469-disco: Add kernel patch to provide top compatible
string
boards: stm32f469-disco: Add kernel patch to provide top compatible
string
boards: stm32f469-disco: Add kernel patch to provide DTS file
boards: stm32f469-disco: Add kernel patch to provide DTS file
boards: stm32f469-disco: Add kernel patch to set RAM address to 0
boards: stm32f469-disco: Add kernel patch to set RAM address to 0
boards: stm32f469-disco: Add OpenOCD patch to supply a new config
Quoted 8 lines
boards: stm32f469-disco: Add OpenOCD patch to support on-board flash
chip
boards: stm32f469-disco: Add a helper script to flash images
boards: stm32f429-disco: Add a readme.txt
boards: stm32f429-disco: Add a helper script to flash images
boards: stm32f469-disco: Add a readme.txt
configs: Add a tested working STM32F469-DISCO defconfig
configs: Add a tested working STM32F429-DISCO defconfig
There are waaaaaaaay too many patches here.
There should be only three patches:
1/ One adding afboot-stm32
2/ One adding the stm32f429 defconfig
3/ One adding the stm32f469 defconfig
Splitting further than that is really unnecessary. You are even adding a file in PATCH 2, to simply move it in PATCH 3. Ditto with PATCH 4/5 and 6/7!
Could you rework the patch series to merge things a bit?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com