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,127 @@
menuconfig BR2_TARGET_AT91BOOTSTRAP3
bool "AT91 Bootstrap 3+"
depends on BR2_arm926t || BR2_cortex_a5 || BR2_cortex_a7
help
AT91Bootstrap is a first level bootloader for the Atmel AT91
devices. It integrates algorithms for:
- Device initialization such as clock configuration, PIO
settings...
- Peripheral drivers such as PIO, PMC or SDRAMC...
- Physical media algorithm such as DataFlash, NandFlash, NOR
Flash...
https://www.at91.com/linux4sam/bin/view/Linux4SAM/AT91Bootstrap
if BR2_TARGET_AT91BOOTSTRAP3
choice
prompt "AT91 Bootstrap 3+ version"
config BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION
bool "4.0.0"
config BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION_3X
bool "3.10.3"
config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT
bool "Custom Git repository"
help
This option allows Buildroot to get the AT91 Bootstrap 3
source code from a Git repository.
config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_SVN
bool "Custom SVN repository"
help
This option allows Buildroot to get the AT91 Bootstrap 3
source code from a Subversion repository
config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL
bool "Custom tarball"
endchoice
config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION
string "URL of custom AT91Bootstrap tarball"
depends on BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL
if BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT || BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_SVN
config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL
string "URL of custom repository"
config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION
string "Custom repository version"
help
Revision to use in the typical format used by Git or SVN
E.G. a sha id, a tag, branch, ..
endif
config BR2_TARGET_AT91BOOTSTRAP3_VERSION
string
default "v4.0.0" if BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION
default "v3.10.3" if BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION_3X
default BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION \
if BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT || BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_SVN
default "custom" if BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL
config BR2_TARGET_AT91BOOTSTRAP3_LICENSE_FILES
string "AT91Bootstrap3 license files" if BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT || \
BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_SVN || \
BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL
default "" if BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION_3X
default "LICENSES/MIT.txt"
help
A space-separated list of license files related to the
AT91Bootstrap3 package.
config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_PATCH_DIR
string "custom patch dir"
help
If your board requires custom patches, add the path to the
directory containing the patches here. The patches must be
named at91bootstrap3-<something>.patch.
Most users may leave this empty
#
# Configuration selection
#
choice
prompt "AT91 Bootstrap 3 configuration"
default BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG
config BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG
bool "Using a defconfig"
config BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG
bool "Using a custom config file"
endchoice
config BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG
string "Defconfig name"
depends on BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG
help
Name of the at91bootstrap3 defconfig file to use, without the
trailing _defconfig. The defconfig is located at
board/<processor>/<board>_defconfig in the at91bootstrap3
tree.
config BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE
string "Configuration file path"
depends on BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG
help
Path to the at91bootstrap3 configuration file
config BR2_TARGET_AT91BOOTSTRAP3_NEEDS_PYTHON3
bool "needs host-python3"
help
Enable this option if the at91bootstrap build process needs
Python 3.x to be available on the host. This is needed in
some at91bootstrap configurations to use NAND/PMECC Python
scripts.
endif # BR2_TARGET_AT91BOOTSTRAP3

View File

@@ -0,0 +1,4 @@
# Locally calculated
sha256 b6ae5bcaacc5a949f400182e036ae053049638444a3ba8b1dd154ec5f7898d8e at91bootstrap3-v3.10.3.tar.gz
sha256 08c5b95df28be7f2e0439fb2b77fe27524f97c499850641e4540c07ea0b2c25d at91bootstrap3-v4.0.0.tar.gz
sha256 5a3809b1c2ba13b7242572322951311c584419f1f8516f665d6c06f0668d78de LICENSES/MIT.txt

View File

@@ -0,0 +1,110 @@
################################################################################
#
# at91bootstrap3
#
################################################################################
AT91BOOTSTRAP3_VERSION = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_VERSION))
ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL),y)
AT91BOOTSTRAP3_TARBALL = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION))
AT91BOOTSTRAP3_SITE = $(patsubst %/,%,$(dir $(AT91BOOTSTRAP3_TARBALL)))
AT91BOOTSTRAP3_SOURCE = $(notdir $(AT91BOOTSTRAP3_TARBALL))
BR_NO_CHECK_HASH_FOR += $(AT91BOOTSTRAP3_SOURCE)
else ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT),y)
AT91BOOTSTRAP3_SITE = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL))
AT91BOOTSTRAP3_SITE_METHOD = git
BR_NO_CHECK_HASH_FOR += $(AT91BOOTSTRAP3_SOURCE)
else ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_SVN),y)
AT91BOOTSTRAP3_SITE = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL))
AT91BOOTSTRAP3_SITE_METHOD = svn
BR_NO_CHECK_HASH_FOR += $(AT91BOOTSTRAP3_SOURCE)
else
AT91BOOTSTRAP3_SITE = $(call github,linux4sam,at91bootstrap,$(AT91BOOTSTRAP3_VERSION))
endif
ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION),y)
AT91BOOTSTRAP3_LICENSE = MIT
else ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_LATEST_VERSION_3X),y)
AT91BOOTSTRAP3_LICENSE = Atmel License
endif
AT91BOOTSTRAP3_LICENSE_FILES = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_LICENSE_FILES))
AT91BOOTSTRAP3_CPE_ID_VENDOR = linux4sam
AT91BOOTSTRAP3_CPE_ID_PRODUCT = at91bootstrap
AT91BOOTSTRAP3_INSTALL_IMAGES = YES
AT91BOOTSTRAP3_INSTALL_TARGET = NO
ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_NEEDS_PYTHON3),y)
AT91BOOTSTRAP3_DEPENDENCIES += host-python3
endif
AT91BOOTSTRAP3_CUSTOM_PATCH_DIR = \
$(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_PATCH_DIR))
AT91BOOTSTRAP3_MAKE_OPTS = CROSS_COMPILE=$(TARGET_CROSS) DESTDIR=$(BINARIES_DIR)
ifneq ($(AT91BOOTSTRAP3_CUSTOM_PATCH_DIR),)
define AT91BOOTSTRAP3_APPLY_CUSTOM_PATCHES
$(APPLY_PATCHES) $(@D) $(AT91BOOTSTRAP3_CUSTOM_PATCH_DIR) \*.patch
endef
AT91BOOTSTRAP3_POST_PATCH_HOOKS += AT91BOOTSTRAP3_APPLY_CUSTOM_PATCHES
endif
define AT91BOOTSTRAP3_BUILD_CMDS
$(MAKE) $(AT91BOOTSTRAP3_MAKE_OPTS) -C $(@D)
endef
define AT91BOOTSTRAP3_INSTALL_IMAGES_CMDS
cp $(wildcard $(@D)/build/binaries/*.bin $(@D)/binaries/*.bin) $(BINARIES_DIR)
endef
ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG),y)
AT91BOOTSTRAP3_KCONFIG_DEFCONFIG = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG))_defconfig
else ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG),y)
AT91BOOTSTRAP3_KCONFIG_FILE = $(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE))
endif
AT91BOOTSTRAP3_KCONFIG_EDITORS = menuconfig xconfig gconfig
AT91BOOTSTRAP3_KCONFIG_OPTS = $(AT91BOOTSTRAP3_MAKE_OPTS)
# Checks to give errors that the user can understand
# Must be before we call to kconfig-package
ifeq ($(BR_BUILDING),y)
ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_DEFCONFIG),y)
# We must use the user-supplied kconfig value, because
# AT91BOOTSTRAP3_KCONFIG_DEFCONFIG will at least contain
# the trailing _defconfig
ifeq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG)),)
$(error No at91bootstrap3 defconfig name specified, check your BR2_TARGET_AT91BOOTSTRAP3_DEFCONFIG setting)
endif
endif
ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_USE_CUSTOM_CONFIG),y)
ifeq ($(AT91BOOTSTRAP3_KCONFIG_FILE),)
$(error No at91bootstrap3 configuration file specified, check your BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_CONFIG_FILE setting)
endif
endif
ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_GIT),y)
ifeq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL)),)
$(error No custom at91bootstrap3 repository URL specified. Check your BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_URL setting)
endif
ifeq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION)),)
$(error No custom at91bootstrap3 repository version specified. Check your BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_REPO_VERSION setting)
endif
endif
ifeq ($(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL),y)
ifeq ($(call qstrip,$(BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION)),)
$(error No custom AT91Bootstrap3 tarball specified. Check your BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION setting)
endif # qstrip BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL_LOCATION
endif # BR2_TARGET_AT91BOOTSTRAP3_CUSTOM_TARBALL
endif # BR_BUILDING
$(eval $(kconfig-package))

View File

@@ -0,0 +1,47 @@
From 908c65678867565a934ea5a967bfe7e204d1ccaf Mon Sep 17 00:00:00 2001
From: Edgar Bonet <bonet@grenoble.cnrs.fr>
Date: Wed, 25 Jun 2025 11:13:43 +0200
Subject: [PATCH] include/types.h: conditionally define bool, false and true
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
include/types.h typedefs ‘bool’ and macro-defines ‘false’ and ‘true’.
However, since C23, these are predefine keywords. As C23 is the default
C dialect for GCC 15, building with this compiler fails with:
include/types.h:23:23: error: ‘bool’ cannot be defined via ‘typedef’
23 | typedef unsigned char bool;
| ^~~~
include/types.h:23:23: note: ‘bool’ is a keyword with ‘-std=c23’ onwards
Fix this build failure by only defining ‘bool’, ‘false’ and ‘true’ on C
dialects older than C23.
Upstream: https://github.com/linux4sam/at91bootstrap/pull/188
[Edgar: backport to v3.10.3]
Signed-off-by: Edgar Bonet <bonet@grenoble.cnrs.fr>
---
include/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/types.h b/include/types.h
index 1246a4df..2c1a41cf 100644
--- a/include/types.h
+++ b/include/types.h
@@ -42,8 +42,11 @@ typedef signed long long s64;
typedef unsigned long size_t;
typedef signed long ssize_t;
+/* bool, false and true are predefined since C23. */
+#if __STDC_VERSION__ < 202311L
typedef unsigned char bool;
#define false 0U
#define true 1U
+#endif
#endif /* TYPES_H_ */
--
2.43.0

View File

@@ -0,0 +1,46 @@
From 4aab60e634d588dffbd3154fd0cfce78272b750a Mon Sep 17 00:00:00 2001
From: Edgar Bonet <bonet@grenoble.cnrs.fr>
Date: Wed, 25 Jun 2025 11:13:43 +0200
Subject: [PATCH] include/types.h: conditionally define bool, false and true
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
include/types.h typedefs ‘bool’ and macro-defines ‘false’ and ‘true’.
However, since C23, these are predefine keywords. As C23 is the default
C dialect for GCC 15, building with this compiler fails with:
include/types.h:23:23: error: ‘bool’ cannot be defined via ‘typedef’
23 | typedef unsigned char bool;
| ^~~~
include/types.h:23:23: note: ‘bool’ is a keyword with ‘-std=c23’ onwards
Fix this build failure by only defining ‘bool’, ‘false’ and ‘true’ on C
dialects older than C23.
Upstream: https://github.com/linux4sam/at91bootstrap/pull/188
Signed-off-by: Edgar Bonet <bonet@grenoble.cnrs.fr>
---
include/types.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/include/types.h b/include/types.h
index 950b1a46..0ad9ae61 100644
--- a/include/types.h
+++ b/include/types.h
@@ -20,8 +20,11 @@ typedef signed long long s64;
typedef unsigned long size_t;
typedef signed long ssize_t;
+/* bool, false and true are predefined since C23. */
+#if __STDC_VERSION__ < 202311L
typedef unsigned char bool;
#define false 0U
#define true 1U
+#endif
#endif /* TYPES_H_ */
--
2.43.0