summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package/afboot-stm32/Makefile25
-rw-r--r--package/afboot-stm32/patches/patch-Makefile23
-rw-r--r--target/arm/systems/st-stm32f4291
3 files changed, 49 insertions, 0 deletions
diff --git a/package/afboot-stm32/Makefile b/package/afboot-stm32/Makefile
new file mode 100644
index 000000000..3cd774eb0
--- /dev/null
+++ b/package/afboot-stm32/Makefile
@@ -0,0 +1,25 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+
+PKG_NAME:= afboot-stm32
+PKG_VERSION:= f7f109f0c6f65534ae50f9243a7356c5002a9b87
+PKG_RELEASE:= 1
+PKG_DESCR:= bootloader for stm32 devices
+PKG_SECTION:= base/boot
+PKG_SITES:= https://github.com/mcoquelin-stm32/afboot-stm32.git
+
+PKG_SYSTEM_DEPENDS:= st-stm32f429
+
+include $(ADK_TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,AFBOOT_STM32,afboot-stm32,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
+
+CONFIG_STYLE:= manual
+INSTALL_STYLE:= manual
+
+afboot-stm32-install:
+ $(CP) $(WRKBUILD)/stm32f429i-disco.bin $(FW_DIR)
+
+include $(ADK_TOPDIR)/mk/pkg-bottom.mk
diff --git a/package/afboot-stm32/patches/patch-Makefile b/package/afboot-stm32/patches/patch-Makefile
new file mode 100644
index 000000000..98ea48693
--- /dev/null
+++ b/package/afboot-stm32/patches/patch-Makefile
@@ -0,0 +1,23 @@
+--- afboot-stm32-f7f109f0c6f65534ae50f9243a7356c5002a9b87.orig/Makefile 2016-04-24 20:35:00.000000000 +0200
++++ afboot-stm32-f7f109f0c6f65534ae50f9243a7356c5002a9b87/Makefile 2016-04-24 20:36:36.000000000 +0200
+@@ -1,14 +1,15 @@
+ CROSS_COMPILE ?= arm-none-eabi-
+
+-CC = $(CROSS_COMPILE)gcc
+-LD = $(CROSS_COMPILE)ld
+-OBJCOPY = $(CROSS_COMPILE)objcopy
+-OBJDUMP = $(CROSS_COMPILE)objdump
++CC ?= $(CROSS_COMPILE)gcc
++LD ?= $(CROSS_COMPILE)ld
++OBJCOPY ?= $(CROSS_COMPILE)objcopy
++OBJDUMP ?= $(CROSS_COMPILE)objdump
+ SIZE = $(CROSS_COMPILE)size
+ GDB = $(CROSS_COMPILE)gdb
+ OPENOCD = openocd
+
+-CFLAGS := -mthumb -mcpu=cortex-m4
++CFLAGS ?=
++CFLAGS += -mthumb -mcpu=cortex-m4
+ CFLAGS += -ffunction-sections -fdata-sections
+ CFLAGS += -Os -std=gnu99 -Wall
+ LINKERFLAGS := -nostartfiles --gc-sections
diff --git a/target/arm/systems/st-stm32f429 b/target/arm/systems/st-stm32f429
index 389e5b74d..8954c9a26 100644
--- a/target/arm/systems/st-stm32f429
+++ b/target/arm/systems/st-stm32f429
@@ -6,6 +6,7 @@ config ADK_TARGET_SYSTEM_ST_STM32F429
select ADK_TARGET_UCLINUX
select ADK_TARGET_KERNEL_XIPIMAGE
select ADK_HOST_BUILD_OPENOCD
+ select ADK_PACKAGE_AFBOOT_STM32
help
STMicroelectronics STM32F429