Initial Commit

- initial default booting image
This commit is contained in:
2026-11-06 20:45:42 +01:00
commit b8783708ae
15201 changed files with 602532 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
From 4e2c99b1197633704ce249413d86da28d21e1d8b Mon Sep 17 00:00:00 2001
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Date: Tue, 16 Dec 2025 14:58:28 +0100
Subject: [PATCH] Enforce correct -march option
Buildroot uses a normal ARM compiler to build the AM33X CM3 firmware
(which runs on a Cortex-M3 processor), but Buildroot will have a
default -march value that doesn't necessarily match the one needed for
Cortex-M3, leading to build failures (gcc complains that the
-mcpu=cortex-m3 option being passed is not compatible with the
selected -march).
Fix this by explicitly indicating -march=armv7-m.
Upstream: N/A Buildroot specific
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 3fd9f23d4969..3f27be4dff4f 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ SRCDIR = src
BINDIR = bin
INCLUDES = $(SRCDIR)/include
-CFLAGS =-mcpu=cortex-m3 -mthumb -nostdlib -ffreestanding -Wall -Wundef \
+CFLAGS =-march=armv7-m -mcpu=cortex-m3 -mthumb -nostdlib -ffreestanding -Wall -Wundef \
-Werror-implicit-function-declaration -Wstrict-prototypes \
-Wdeclaration-after-statement -fno-delete-null-pointer-checks \
-Wempty-body -fno-strict-overflow -g -I$(INCLUDES) -O2 -MD
--
2.43.0

View File

@@ -0,0 +1,38 @@
From ba71b50bef042ed404759a8d48bef1f779cec6d6 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Tue, 16 Dec 2025 15:02:28 +0100
Subject: [PATCH] Makefile: unconditionally disable SSP
Though -nostdlib is passed in $(CFLAGS), -fno-stack-protector must also be
passed to avoid linking errors related to undefined references to
'__stack_chk_guard' and '__stack_chk_fail' if toolchain enforces
-fstack-protector.
Fixes:
- http://autobuild.buildroot.net/results/3a3a21f3c35ea025e9b93e09c2454aed0ad31034
Upstream: N/A Buildroot specific
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 3f27be4dff4f..52423507f50b 100644
--- a/Makefile
+++ b/Makefile
@@ -16,7 +16,8 @@ INCLUDES = $(SRCDIR)/include
CFLAGS =-march=armv7-m -mcpu=cortex-m3 -mthumb -nostdlib -ffreestanding -Wall -Wundef \
-Werror-implicit-function-declaration -Wstrict-prototypes \
-Wdeclaration-after-statement -fno-delete-null-pointer-checks \
- -Wempty-body -fno-strict-overflow -g -I$(INCLUDES) -O2 -MD
+ -Wempty-body -fno-strict-overflow -fno-stack-protector \
+ -g -I$(INCLUDES) -O2 -MD
LDFLAGS =-nostartfiles -fno-exceptions -Tfirmware.ld
EXECUTABLE=am335x-pm-firmware.elf
--
2.43.0

View File

@@ -0,0 +1,36 @@
From 8d86dd4b141da8d4d4dc0002b5588389b4412df8 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Tue, 16 Dec 2025 15:03:55 +0100
Subject: [PATCH] Makefile: unconditionally disable PIE
Though -nostdlib is passed in $(CFLAGS), -fno-pie must also be passed to
avoid linking errors related to overlapping sections if toolchain
enforces PIE.
Fixes:
- http://autobuild.buildroot.org/results/418a40b995e91bc66e692dfbc4b0521db3fa5fbb
Upstream: N/A Buildroot specific
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 52423507f50b..9146a8b6a7da 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ CFLAGS =-march=armv7-m -mcpu=cortex-m3 -mthumb -nostdlib -ffreestanding -Wall -W
-Werror-implicit-function-declaration -Wstrict-prototypes \
-Wdeclaration-after-statement -fno-delete-null-pointer-checks \
-Wempty-body -fno-strict-overflow -fno-stack-protector \
- -g -I$(INCLUDES) -O2 -MD
+ -fno-pie -g -I$(INCLUDES) -O2 -MD
LDFLAGS =-nostartfiles -fno-exceptions -Tfirmware.ld
EXECUTABLE=am335x-pm-firmware.elf
--
2.43.0

View File

@@ -0,0 +1,44 @@
From bce00a9036fb0fc4d7735cd2c386b4932b915d97 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Date: Tue, 16 Dec 2025 15:09:15 +0100
Subject: [PATCH] Makefile: add -fno-builtin
Build with gcc 10 fails on:
/srv/storage/autobuild/run/instance-2/output-1/host/lib/gcc/arm-buildroot-linux-gnueabihf/10.2.0/../../../../arm-buildroot-linux-gnueabihf/bin/ld: src/foundation/startup.o: in function `reset_handler':
/srv/storage/autobuild/run/instance-2/output-1/build/am33x-cm3-11107db2f1e9e58ee75d4fe9cc38423c9a6e4365/src/foundation/startup.c:177: undefined reference to `memcpy'
This is due to the fact that gcc 10 replaces the following statement by
a memcpy call:
*puldest++ = *pulsrc++;
To fix this build failure, add -fno-builtin
Fixes:
- http://autobuild.buildroot.org/results/a991e6efa012df518ff1bb35017ad2c96c8feedc
Upstream: N/A Buildroot specific
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Kory Maincent <kory.maincent@bootlin.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 9146a8b6a7da..b4869c494593 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ CFLAGS =-march=armv7-m -mcpu=cortex-m3 -mthumb -nostdlib -ffreestanding -Wall -W
-Werror-implicit-function-declaration -Wstrict-prototypes \
-Wdeclaration-after-statement -fno-delete-null-pointer-checks \
-Wempty-body -fno-strict-overflow -fno-stack-protector \
- -fno-pie -g -I$(INCLUDES) -O2 -MD
+ -fno-pie -fno-builtin -g -I$(INCLUDES) -O2 -MD
LDFLAGS =-nostartfiles -fno-exceptions -Tfirmware.ld
EXECUTABLE=am335x-pm-firmware.elf
--
2.43.0

View File

@@ -0,0 +1,8 @@
config BR2_PACKAGE_AM33X_CM3
bool "am33x-cm3"
depends on BR2_arm # only relevant for TI am335x
depends on BR2_BINFMT_ELF # assumes the compiler builds ELF file
help
Cortex-M3 binary blob for suspend-resume on am335x
http://arago-project.org/git/projects/am33x-cm3.git

View File

@@ -0,0 +1,3 @@
# Locally computed
sha256 b6020ce5fee52e8df6cf8e045c75064021760dd04e2923ad0e4bdd6e18ebaa49 am33x-cm3-fb484c5e54f2e31cf0a338d2927a06a2870bcc2c-git4.tar.gz
sha256 e136e6949a1d3ca144374375af8b9387faa11d2eee7debff8cf22ca8fe7bf7e9 License.txt

View File

@@ -0,0 +1,27 @@
################################################################################
#
# am33x-cm3
#
################################################################################
# This should correspond to version 0x192
AM33X_CM3_VERSION = fb484c5e54f2e31cf0a338d2927a06a2870bcc2c
AM33X_CM3_SITE = https://git.ti.com/git/processor-firmware/ti-amx3-cm3-pm-firmware.git
AM33X_CM3_SITE_METHOD = git
AM33X_CM3_LICENSE = TI Publicly Available Software License
AM33X_CM3_LICENSE_FILES = License.txt
# The build command below will use the standard cross-compiler (normally
# build for Cortex-A8, to build the FW for the Cortex-M3.
define AM33X_CM3_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) CC="$(TARGET_CC)" CROSS_COMPILE="$(TARGET_CROSS)" -C $(@D) all
endef
define AM33X_CM3_INSTALL_TARGET_CMDS
$(INSTALL) -m 0644 -D $(@D)/bin/am335x-pm-firmware.elf \
$(TARGET_DIR)/lib/firmware/am335x-pm-firmware.elf
$(INSTALL) -m 0644 -D $(@D)/bin/*-scale-data.bin \
$(TARGET_DIR)/lib/firmware/
endef
$(eval $(generic-package))