kumquat-buildroot/board/stmicroelectronics/stm32f429-disco/flash.sh

27 lines
849 B
Bash
Raw Normal View History

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>
2016-04-15 23:02:19 +02:00
#!/bin/bash
OUTPUT_DIR=$1
BOARD_NAME=${2:-stm32f429discovery}
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>
2016-04-15 23:02:19 +02:00
if ! test -d "${OUTPUT_DIR}" ; then
echo "ERROR: no output directory specified."
echo "Usage: $0 OUTPUT_DIR BOARD_NAME"
echo ""
echo "Arguments:"
echo " OUTPUT_DIR The Buildroot output directory."
echo " BOARD_NAME One of the available boards among:"
echo " stm32f429discovery, stm32f429disc1"
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>
2016-04-15 23:02:19 +02:00
exit 1
fi
${OUTPUT_DIR}/host/bin/openocd -f board/${BOARD_NAME}.cfg \
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>
2016-04-15 23:02:19 +02:00
-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"