uboot-bcm4908: add BCM4912 build
[openwrt/staging/noltari.git] / package / boot / uboot-bcm4908 / patches / 200-configs-bcm94908-unset-CONFIG_SPL.patch
1 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal@milecki.pl>
2 Date: Fri, 4 Mar 2022 09:21:32 +0100
3 Subject: [PATCH] configs: bcm94908: unset CONFIG_SPL
4 MIME-Version: 1.0
5 Content-Type: text/plain; charset=UTF-8
6 Content-Transfer-Encoding: 8bit
7
8 Compiling SPL is always tricky as it needs to fit limited resources.
9 Fortunately in most cases there is no need to replace SPL or TPL while
10 flashing a new firmware.
11
12 Compiling SPL for BCM4908 seems to fail with non-Broadcom toolchain:
13 aarch64-openwrt-linux-musl-ld.bfd: u-boot-spl section `.u_boot_list' will not fit in region `.sram'
14 aarch64-openwrt-linux-musl-ld.bfd: section .bss VMA [00000000822b9000,00000000822b93ef] overlaps section .u_boot_list VMA [00000000822b8f60,00000000822b9a87]
15 aarch64-openwrt-linux-musl-ld.bfd: region `.sram' overflowed by 2696 bytes
16
17 It also requires hashtable.h which has to be generated using some
18 Broadcom's custom perl script that isn't integrated as this point.
19
20 For now just disable SPL and use only last-stage U-Boot that must be
21 shipped with every firmware.
22
23 Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
24 ---
25 configs/bcm94908_defconfig | 2 +-
26 configs/bcm94912_defconfig | 2 +-
27 2 files changed, 2 insertions(+), 2 deletions(-)
28
29 --- a/configs/bcm94908_defconfig
30 +++ b/configs/bcm94908_defconfig
31 @@ -21,7 +21,7 @@ CONFIG_SPL_SERIAL_SUPPORT=y
32 CONFIG_TPL_LIBCOMMON_SUPPORT=y
33 CONFIG_TPL_LIBGENERIC_SUPPORT=y
34 CONFIG_NR_DRAM_BANKS=1
35 -CONFIG_SPL=y
36 +# CONFIG_SPL is not set
37 CONFIG_SPL_LIBDISK_SUPPORT=y
38 CONFIG_ENV_VARS_UBOOT_CONFIG=y
39 CONFIG_TPL_SYS_MALLOC_F_LEN=0x11000
40 --- a/configs/bcm94912_defconfig
41 +++ b/configs/bcm94912_defconfig
42 @@ -22,7 +22,7 @@ CONFIG_TPL_LIBCOMMON_SUPPORT=y
43 CONFIG_TPL_LIBGENERIC_SUPPORT=y
44 CONFIG_SPL_SYS_MALLOC_F_LEN=0x2000
45 CONFIG_NR_DRAM_BANKS=2
46 -CONFIG_SPL=y
47 +# CONFIG_SPL is not set
48 CONFIG_SPL_LIBDISK_SUPPORT=y
49 CONFIG_ENV_VARS_UBOOT_CONFIG=y
50 CONFIG_TPL_SYS_MALLOC_F_LEN=0x10000