Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled

This commit is contained in:
domenico
2025-06-24 14:35:53 +02:00
commit c06fb25d1f
9263 changed files with 1750214 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
From: Masahiro Yamada <yamada.masahiro@socionext.com>
Date: Mon, 26 Sep 2016 13:05:02 +0900
Subject: [PATCH] check-config: allow to complete build even with ad-hoc CONFIG
options
Currently, the check-config.sh terminates the build when unknown
ad-hoc options are detected. I think it is too much because we may
want to patch config headers locally in a build/deployment project.
So, let's relax check-config.sh to just warn even if it detects
options that are not in the whitelist. Instead, this check can be
done at the end of build, along with other checks. It will catch
more attention.
Even with this change, the Buildman tool catches new warnings,
so Tom can give NACK to new ad-hoc options.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
scripts/check-config.sh | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/scripts/check-config.sh
+++ b/scripts/check-config.sh
@@ -50,14 +50,13 @@ cat `find ${srctree} -name "Kconfig*"` |
|sort |uniq > ${ok}
comm -23 ${suspects} ${ok} >${new_adhoc}
if [ -s ${new_adhoc} ]; then
- echo >&2 "Error: You must add new CONFIG options using Kconfig"
+ echo >&2 "Warning: You must add new CONFIG options using Kconfig"
echo >&2 "The following new ad-hoc CONFIG options were detected:"
cat >&2 ${new_adhoc}
echo >&2
echo >&2 "Please add these via Kconfig instead. Find a suitable Kconfig"
echo >&2 "file and add a 'config' or 'menuconfig' option."
# Don't delete the temporary files in case they are useful
- exit 1
else
rm ${suspects} ${ok} ${new_adhoc}
fi

View File

@@ -0,0 +1,50 @@
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
Date: Fri, 4 Mar 2022 09:21:32 +0100
Subject: [PATCH] configs: bcm94908: unset CONFIG_SPL
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Compiling SPL is always tricky as it needs to fit limited resources.
Fortunately in most cases there is no need to replace SPL or TPL while
flashing a new firmware.
Compiling SPL for BCM4908 seems to fail with non-Broadcom toolchain:
aarch64-openwrt-linux-musl-ld.bfd: u-boot-spl section `.u_boot_list' will not fit in region `.sram'
aarch64-openwrt-linux-musl-ld.bfd: section .bss VMA [00000000822b9000,00000000822b93ef] overlaps section .u_boot_list VMA [00000000822b8f60,00000000822b9a87]
aarch64-openwrt-linux-musl-ld.bfd: region `.sram' overflowed by 2696 bytes
It also requires hashtable.h which has to be generated using some
Broadcom's custom perl script that isn't integrated as this point.
For now just disable SPL and use only last-stage U-Boot that must be
shipped with every firmware.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
configs/bcm94908_defconfig | 2 +-
configs/bcm94912_defconfig | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- a/configs/bcm94908_defconfig
+++ b/configs/bcm94908_defconfig
@@ -21,7 +21,7 @@ CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_TPL_LIBCOMMON_SUPPORT=y
CONFIG_TPL_LIBGENERIC_SUPPORT=y
CONFIG_NR_DRAM_BANKS=1
-CONFIG_SPL=y
+# CONFIG_SPL is not set
CONFIG_SPL_LIBDISK_SUPPORT=y
CONFIG_ENV_VARS_UBOOT_CONFIG=y
CONFIG_TPL_SYS_MALLOC_F_LEN=0x11000
--- a/configs/bcm94912_defconfig
+++ b/configs/bcm94912_defconfig
@@ -22,7 +22,7 @@ CONFIG_TPL_LIBCOMMON_SUPPORT=y
CONFIG_TPL_LIBGENERIC_SUPPORT=y
CONFIG_SPL_SYS_MALLOC_F_LEN=0x2000
CONFIG_NR_DRAM_BANKS=2
-CONFIG_SPL=y
+# CONFIG_SPL is not set
CONFIG_SPL_LIBDISK_SUPPORT=y
CONFIG_ENV_VARS_UBOOT_CONFIG=y
CONFIG_TPL_SYS_MALLOC_F_LEN=0x10000

View File

@@ -0,0 +1,67 @@
From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
Date: Fri, 4 Mar 2022 09:23:34 +0100
Subject: [PATCH] Assume TPL support for ATF when compiling U-Boot without TPL
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Broadcom's U-Boot behaviour depends on compilation time check whether
TPL was compiled with or without ATF support. There is no proper runtime
check.
When compiling just U-Boot (without SPL & TPL) there is no way to tell
if it's going to work with TPL with or without ATF support.
Modify code to blindly assume ATF support in TPL in such cases. It seems
to be always true for Broadcom and we need some assumption as we don't
deal with compiling SPL or TPL.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
---
arch/arm/mach-bcmbca/bcm4908/cpu.c | 2 +-
arch/arm/mach-bcmbca/bcm4912/cpu.c | 2 +-
board/broadcom/bcmbca/board.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
--- a/arch/arm/mach-bcmbca/bcm4908/cpu.c
+++ b/arch/arm/mach-bcmbca/bcm4908/cpu.c
@@ -138,7 +138,7 @@ int get_nr_cpus()
return nr_cpus;
}
-#if !defined(CONFIG_TPL_ATF)
+#if defined(CONFIG_TPL) && !defined(CONFIG_TPL_ATF)
void boot_secondary_cpu(unsigned long vector)
{
uint32_t cpu, nr_cpus = QUAD_CPUS;
--- a/arch/arm/mach-bcmbca/bcm4912/cpu.c
+++ b/arch/arm/mach-bcmbca/bcm4912/cpu.c
@@ -174,7 +174,7 @@ int bcmbca_get_boot_device(void)
return BOOT_DEVICE_NONE;
}
-#if !defined(CONFIG_TPL_ATF)
+#if defined(CONFIG_TPL) && !defined(CONFIG_TPL_ATF)
void boot_secondary_cpu(unsigned long vector)
{
uint32_t cpu, nr_cpus = 4;
--- a/board/broadcom/bcmbca/board.c
+++ b/board/broadcom/bcmbca/board.c
@@ -103,7 +103,7 @@ void board_spinor_init(void)
int board_init(void)
{
-#if !defined(CONFIG_TPL_ATF)
+#if defined(CONFIG_TPL) && !defined(CONFIG_TPL_ATF)
unsigned long vector;
#endif
board_sdk_init_e();
@@ -121,7 +121,7 @@ int board_init(void)
printf("$Uboot: "BUILD_TAG" $\n");
#endif
-#if !defined(CONFIG_TPL_ATF)
+#if defined(CONFIG_TPL) && !defined(CONFIG_TPL_ATF)
#if defined(CONFIG_ARM64)
vector = (unsigned long)&_start;
#else