From 4bb6f26b05450777d14aa96e10783066c2503dc2 Mon Sep 17 00:00:00 2001 From: John Klug Date: Wed, 11 Nov 2020 16:17:52 -0600 Subject: Add new BSP submodule for Atmel Processors. --- .../files/Creating-symlink-to-binary.patch | 30 +++++++++++ .../files/Remove-standard-includes.patch | 59 ++++++++++++++++++++++ 2 files changed, 89 insertions(+) create mode 100644 recipes-bsp/at91bootstrap/files/Creating-symlink-to-binary.patch create mode 100644 recipes-bsp/at91bootstrap/files/Remove-standard-includes.patch (limited to 'recipes-bsp/at91bootstrap/files') diff --git a/recipes-bsp/at91bootstrap/files/Creating-symlink-to-binary.patch b/recipes-bsp/at91bootstrap/files/Creating-symlink-to-binary.patch new file mode 100644 index 0000000..7103d60 --- /dev/null +++ b/recipes-bsp/at91bootstrap/files/Creating-symlink-to-binary.patch @@ -0,0 +1,30 @@ +From 35f4ab2ed71cd3fc13ccf14525e7de2c27348c61 Mon Sep 17 00:00:00 2001 +From: Mathieu Anquetin +Date: Fri, 13 Dec 2013 10:20:03 +0100 +Subject: [PATCH 2/2] Creating symlink to binary + +Since the name of the flashable image is config-dependant, we create a +symlink to this file to have a standard name to the last built flashable +image. + +Signed-off-by: Mathieu Anquetin +Acked-by: Nicolas Ferre +--- + Makefile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Makefile b/Makefile +index 0b1cae6..11062f0 100644 +--- a/Makefile ++++ b/Makefile +@@ -287,6 +287,7 @@ $(AT91BOOTSTRAP): $(OBJS) + @$(LD) $(LDFLAGS) -n -o $(BINDIR)/$(BOOT_NAME).elf $(OBJS) + # @$(OBJCOPY) --strip-debug --strip-unneeded $(BINDIR)/$(BOOT_NAME).elf -O binary $(BINDIR)/$(BOOT_NAME).bin + @$(OBJCOPY) --strip-all $(BINDIR)/$(BOOT_NAME).elf -O binary $@ ++ @ln -sf $(BOOT_NAME).bin ${BINDIR}/${SYMLINK} + + %.o : %.c .config + @echo " CC "$< +-- +1.8.2.2 + diff --git a/recipes-bsp/at91bootstrap/files/Remove-standard-includes.patch b/recipes-bsp/at91bootstrap/files/Remove-standard-includes.patch new file mode 100644 index 0000000..01fa9d4 --- /dev/null +++ b/recipes-bsp/at91bootstrap/files/Remove-standard-includes.patch @@ -0,0 +1,59 @@ +From b1e85d514d24edf45bbb8a6b647238d00194f369 Mon Sep 17 00:00:00 2001 +From: Mathieu Anquetin +Date: Thu, 12 Dec 2013 11:57:27 +0100 +Subject: [PATCH 1/2] Remove standard includes + +These includes are not needed and fail the build when using a custom +built toolchain from OpenEmbedded. + +Signed-off-by: Mathieu Anquetin +Acked-by: Nicolas Ferre +--- + Makefile | 4 +++- + driver/debug.c | 1 - + driver/flash.c | 2 -- + 3 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/Makefile b/Makefile +index 03dd9df..0b1cae6 100644 +--- a/Makefile ++++ b/Makefile +@@ -211,7 +211,9 @@ OBJS:= $(SOBJS-y) $(COBJS-y) + INCL=board/$(BOARDNAME) + GC_SECTIONS=--gc-sections + +-CPPFLAGS=-ffunction-sections -g -Os -Wall \ ++NOSTDINC_FLAGS=-nostdinc -isystem $(shell $(CC) -print-file-name=include) ++ ++CPPFLAGS=$(NOSTDINC_FLAGS) -ffunction-sections -g -Os -Wall \ + -fno-stack-protector -fno-common \ + -I$(INCL) -Iinclude -Ifs/include \ + -DAT91BOOTSTRAP_VERSION=\"$(VERSION)$(REV)$(SCMINFO)\" -DCOMPILE_TIME="\"$(DATE)\"" +diff --git a/driver/debug.c b/driver/debug.c +index 9f83e4b..352c34f 100644 +--- a/driver/debug.c ++++ b/driver/debug.c +@@ -27,7 +27,6 @@ + */ + #include "usart.h" + #include "debug.h" +-#include + #include + + #define MAX_BUFFER 128 +diff --git a/driver/flash.c b/driver/flash.c +index 11615c7..ebc5d5a 100644 +--- a/driver/flash.c ++++ b/driver/flash.c +@@ -26,8 +26,6 @@ + #include "../include/part.h" + #include "../include/main.h" + #include "../include/flash.h" +-#include +- + + int load_norflash(unsigned int img_addr, + unsigned int img_size, +-- +1.8.2.2 + -- cgit v1.2.3