From 12e3547f5af9c3da3360c3d547e16a76291a8b59 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 3 May 2021 16:48:53 -0400 Subject: ARM: mvebu: a38x: Correct mismatched bound warnings With gcc-11 we see: drivers/ddr/marvell/a38x/ddr3_debug.c:672:47: error: argument 2 of type 'u32[5]' {aka 'unsigned int[5]'} with mismatched bound [-Werror=array-parameter=] 672 | int ddr3_tip_read_adll_value(u32 dev_num, u32 pup_values[MAX_INTERFACE_NUM * MAX_BUS_NUM], | ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from drivers/ddr/marvell/a38x/ddr3_training_ip_engine.h:10, from drivers/ddr/marvell/a38x/ddr3_init.h:17, from drivers/ddr/marvell/a38x/ddr3_debug.c:6: drivers/ddr/marvell/a38x/ddr3_training_ip_flow.h:116:47: note: previously declared as 'u32[]' {aka 'unsigned int[]'} And similar warnings. Correct these by updating the prototype. Remove the prototype for ddr3_tip_read_pup_value as it is unused. Signed-off-by: Tom Rini --- drivers/ddr/marvell/a38x/ddr3_training_ip_flow.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/ddr/marvell/a38x/ddr3_training_ip_flow.h b/drivers/ddr/marvell/a38x/ddr3_training_ip_flow.h index ab152cb455..55832a5540 100644 --- a/drivers/ddr/marvell/a38x/ddr3_training_ip_flow.h +++ b/drivers/ddr/marvell/a38x/ddr3_training_ip_flow.h @@ -8,6 +8,7 @@ #include "ddr3_training_ip.h" #include "ddr3_training_ip_db.h" +#include "mv_ddr_plat.h" #define KILLER_PATTERN_LENGTH 32 #define EXT_ACCESS_BURST_LENGTH 8 @@ -112,9 +113,12 @@ int ddr3_tip_configure_odpg(u32 dev_num, enum hws_access_type access_type, int ddr3_tip_write_mrs_cmd(u32 dev_num, u32 *cs_mask_arr, enum mr_number mr_num, u32 data, u32 mask); int ddr3_tip_write_cs_result(u32 dev_num, u32 offset); int ddr3_tip_reset_fifo_ptr(u32 dev_num); -int ddr3_tip_read_pup_value(u32 dev_num, u32 pup_values[], int reg_addr, u32 mask); -int ddr3_tip_read_adll_value(u32 dev_num, u32 pup_values[], u32 reg_addr, u32 mask); -int ddr3_tip_write_adll_value(u32 dev_num, u32 pup_values[], u32 reg_addr); +int ddr3_tip_read_adll_value(u32 dev_num, + u32 pup_values[MAX_INTERFACE_NUM * MAX_BUS_NUM], + u32 reg_addr, u32 mask); +int ddr3_tip_write_adll_value(u32 dev_num, + u32 pup_values[MAX_INTERFACE_NUM * MAX_BUS_NUM], + u32 reg_addr); int ddr3_tip_tune_training_params(u32 dev_num, struct tune_train_params *params); #endif /* _DDR3_TRAINING_IP_FLOW_H_ */ -- cgit v1.2.1 From 8627db79cab3805a493f7454100dcb968ac67862 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 3 May 2021 16:48:54 -0400 Subject: freescale: Drop unnecessary cpld_data_t non-typedef In some board cpld.h files the definition of the cpld_data struct not-quite makes a typedef for cpld_data_t. This problem is caught with gcc-11 as a multiple definition error. As there are no users of this non-typedef, fix this by not declaring it one to begin with. Cc: Priyanka Jain Cc: Shengzhou Liu Signed-off-by: Tom Rini --- board/freescale/t102xrdb/cpld.h | 2 +- board/freescale/t104xrdb/cpld.h | 3 +-- board/freescale/t208xrdb/cpld.h | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/board/freescale/t102xrdb/cpld.h b/board/freescale/t102xrdb/cpld.h index c05f536806..bd40cc319a 100644 --- a/board/freescale/t102xrdb/cpld.h +++ b/board/freescale/t102xrdb/cpld.h @@ -21,7 +21,7 @@ struct cpld_data { u8 boot_override; /* 0x18 - Boot override register */ u8 boot_config1; /* 0x19 - Boot config override register*/ u8 boot_config2; /* 0x1A - Boot config override register*/ -} cpld_data_t; +}; /* Pointer to the CPLD register set */ diff --git a/board/freescale/t104xrdb/cpld.h b/board/freescale/t104xrdb/cpld.h index a816aef10a..769883f946 100644 --- a/board/freescale/t104xrdb/cpld.h +++ b/board/freescale/t104xrdb/cpld.h @@ -30,8 +30,7 @@ struct cpld_data { u8 boot_override; /* 0x18 - Boot override register */ u8 boot_config1; /* 0x19 - Boot config override register*/ u8 boot_config2; /* 0x1A - Boot config override register*/ -} cpld_data_t; - +}; /* Pointer to the CPLD register set */ diff --git a/board/freescale/t208xrdb/cpld.h b/board/freescale/t208xrdb/cpld.h index bd6c203742..a623b1811f 100644 --- a/board/freescale/t208xrdb/cpld.h +++ b/board/freescale/t208xrdb/cpld.h @@ -21,7 +21,7 @@ struct cpld_data { u8 boot_or; /* 0x16 - Boot config override register */ u8 boot_cfg1; /* 0x17 - Boot configuration register 1 */ u8 boot_cfg2; /* 0x18 - Boot configuration register 2 */ -} cpld_data_t; +}; u8 cpld_read(unsigned int reg); void cpld_write(unsigned int reg, u8 value); -- cgit v1.2.1 From 265724cb22d5317eac626e6e773c53e4a0134170 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 3 May 2021 16:48:55 -0400 Subject: eb_cpu5282: Declare diplay_width / display_height as externs The board code here references the display_width / display_height variables set in the video driver, declare these as externs as gcc-11 will notice and lead to a multiple definition error. Signed-off-by: Tom Rini --- board/BuS/eb_cpu5282/eb_cpu5282.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/board/BuS/eb_cpu5282/eb_cpu5282.c b/board/BuS/eb_cpu5282/eb_cpu5282.c index 153ed0e963..144a08922b 100644 --- a/board/BuS/eb_cpu5282/eb_cpu5282.c +++ b/board/BuS/eb_cpu5282/eb_cpu5282.c @@ -22,8 +22,8 @@ DECLARE_GLOBAL_DATA_PTR; #if IS_ENABLED(CONFIG_VIDEO_VCXK) -unsigned long display_width; -unsigned long display_height; +extern unsigned long display_width; +extern unsigned long display_height; #endif /*---------------------------------------------------------------------------*/ -- cgit v1.2.1 From 5503435838f946697e78b9564a45595380a66dff Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 3 May 2021 16:48:56 -0400 Subject: pinctrl: mscc: Fix multiple definition error With gcc-11 we get a multiple errors here as the declarations for mscc_pinctrl_ops and mscc_gpio_ops are missing an extern. CC: Gregory CLEMENT Cc: Lars Povlsen Cc: Horatiu Vultur Signed-off-by: Tom Rini Reviewed-by: Horatiu Vultur Reviewed-by: Daniel Schwierzeck --- drivers/pinctrl/mscc/mscc-common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/mscc/mscc-common.h b/drivers/pinctrl/mscc/mscc-common.h index 3c5c1faf84..49c84a9f41 100644 --- a/drivers/pinctrl/mscc/mscc-common.h +++ b/drivers/pinctrl/mscc/mscc-common.h @@ -61,6 +61,6 @@ int mscc_pinctrl_probe(struct udevice *dev, int num_func, const struct mscc_pin_data *mscc_pins, int num_pins, char * const *function_names, const unsigned long *mscc_gpios); -const struct pinctrl_ops mscc_pinctrl_ops; +extern const struct pinctrl_ops mscc_pinctrl_ops; -const struct dm_gpio_ops mscc_gpio_ops; +extern const struct dm_gpio_ops mscc_gpio_ops; -- cgit v1.2.1 From c48b781581f6c3b24cb40241e90296b0e7f7a30f Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 3 May 2021 16:48:57 -0400 Subject: Makefile: Disable gcc-10.0 introduced warnings Follow what the Linux Kernel does here and disable the 'zero-length-bounds', 'array-bounds' and 'stringop-overflow' warnings here. This brings in commits 5c45de21a2223, 44720996e2d79 and 5a76021c2eff7 from the Linux Kernel. Signed-off-by: Tom Rini --- Makefile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Makefile b/Makefile index 2ab9c53192..d9473fb572 100644 --- a/Makefile +++ b/Makefile @@ -712,6 +712,10 @@ KBUILD_CFLAGS += $(call cc-option,-fno-delete-null-pointer-checks) # disable stringop warnings in gcc 8+ KBUILD_CFLAGS += $(call cc-disable-warning, stringop-truncation) +KBUILD_CFLAGS += $(call cc-disable-warning, zero-length-bounds) +KBUILD_CFLAGS += $(call cc-disable-warning, array-bounds) +KBUILD_CFLAGS += $(call cc-disable-warning, stringop-overflow) + # Enabled with W=2, disabled by default as noisy KBUILD_CFLAGS += $(call cc-disable-warning, maybe-uninitialized) -- cgit v1.2.1 From cb80ff20f2c8392f19248418f9a19a0474661860 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 3 May 2021 16:48:58 -0400 Subject: bootstage: Eliminate when not enabled When we do not have bootstage enabled, rather than include an empty dummy function, we just don't reference it. This saves us space in some tight builds. This also shows a few cases where show_boot_progress was incorrectly guarded before. Cc: Simon Glass Signed-off-by: Tom Rini --- arch/x86/cpu/cpu.c | 2 ++ board/Seagate/dockstar/dockstar.c | 2 ++ board/Seagate/goflexhome/goflexhome.c | 2 ++ board/bosch/shc/board.c | 6 +++--- board/buffalo/lsxl/lsxl.c | 2 +- board/k+p/kp_imx53/kp_imx53.c | 2 ++ board/st/stv0991/stv0991.c | 2 +- common/init/board_init.c | 2 ++ common/spl/spl.c | 2 ++ include/bootstage.h | 4 +++- 10 files changed, 20 insertions(+), 6 deletions(-) diff --git a/arch/x86/cpu/cpu.c b/arch/x86/cpu/cpu.c index 9c4edfcbfd..01dece5769 100644 --- a/arch/x86/cpu/cpu.c +++ b/arch/x86/cpu/cpu.c @@ -178,10 +178,12 @@ int default_print_cpuinfo(void) return 0; } +#if CONFIG_IS_ENABLED(BOOTSTAGE) void show_boot_progress(int val) { outb(val, POST_PORT); } +#endif #if !defined(CONFIG_SYS_COREBOOT) && !defined(CONFIG_EFI_STUB) /* diff --git a/board/Seagate/dockstar/dockstar.c b/board/Seagate/dockstar/dockstar.c index 380e37be55..fb69193158 100644 --- a/board/Seagate/dockstar/dockstar.c +++ b/board/Seagate/dockstar/dockstar.c @@ -140,6 +140,7 @@ void reset_phy(void) } #endif /* CONFIG_RESET_PHY_R */ +#if CONFIG_IS_ENABLED(BOOTSTAGE) #define GREEN_LED (1 << 14) #define ORANGE_LED (1 << 15) #define BOTH_LEDS (GREEN_LED | ORANGE_LED) @@ -169,3 +170,4 @@ void show_boot_progress(int val) break; } } +#endif diff --git a/board/Seagate/goflexhome/goflexhome.c b/board/Seagate/goflexhome/goflexhome.c index 4c19fa7195..af8cab7bdc 100644 --- a/board/Seagate/goflexhome/goflexhome.c +++ b/board/Seagate/goflexhome/goflexhome.c @@ -142,6 +142,7 @@ void reset_phy(void) } #endif /* CONFIG_RESET_PHY_R */ +#if CONFIG_IS_ENABLED(BOOTSTAGE) #define GREEN_LED (1 << 14) #define ORANGE_LED (1 << 15) #define BOTH_LEDS (GREEN_LED | ORANGE_LED) @@ -175,3 +176,4 @@ void show_boot_progress(int val) break; } } +#endif diff --git a/board/bosch/shc/board.c b/board/bosch/shc/board.c index 86356e3875..13fd25e407 100644 --- a/board/bosch/shc/board.c +++ b/board/bosch/shc/board.c @@ -188,7 +188,7 @@ static void __maybe_unused leds_set_booting(void) /* * Function to set the LEDs in the state "Bootloader error" */ -static void leds_set_failure(int state) +static void __maybe_unused leds_set_failure(int state) { #if defined(CONFIG_B_SAMPLE) /* Turn all blue and green LEDs off */ @@ -479,7 +479,7 @@ int board_eth_init(struct bd_info *bis) } #endif -#ifdef CONFIG_SHOW_BOOT_PROGRESS +#if CONFIG_IS_ENABLED(BOOTSTAGE) static void bosch_check_reset_pin(void) { if (readl(GPIO1_BASE + OMAP_GPIO_IRQSTATUS_SET_0) & RESET_MASK) { @@ -525,9 +525,9 @@ void show_boot_progress(int val) break; } } +#endif void arch_preboot_os(void) { leds_set_finish(); } -#endif diff --git a/board/buffalo/lsxl/lsxl.c b/board/buffalo/lsxl/lsxl.c index 34be601fdd..738b6bc25c 100644 --- a/board/buffalo/lsxl/lsxl.c +++ b/board/buffalo/lsxl/lsxl.c @@ -271,7 +271,7 @@ int misc_init_r(void) } #endif -#ifdef CONFIG_SHOW_BOOT_PROGRESS +#if CONFIG_IS_ENABLED(BOOTSTAGE) void show_boot_progress(int progress) { if (progress > 0) diff --git a/board/k+p/kp_imx53/kp_imx53.c b/board/k+p/kp_imx53/kp_imx53.c index cc8118b4ad..7c3a695cb2 100644 --- a/board/k+p/kp_imx53/kp_imx53.c +++ b/board/k+p/kp_imx53/kp_imx53.c @@ -155,6 +155,7 @@ int board_late_init(void) return ret; } +#if CONFIG_IS_ENABLED(BOOTSTAGE) #define GPIO_DR 0x0 #define GPIO_GDIR 0x4 #define GPIO_ALT1 0x1 @@ -203,3 +204,4 @@ void show_boot_progress(int status) gpio_direction_output(LED_RED, 1); } } +#endif diff --git a/board/st/stv0991/stv0991.c b/board/st/stv0991/stv0991.c index 3b0de82db2..57ca9f659c 100644 --- a/board/st/stv0991/stv0991.c +++ b/board/st/stv0991/stv0991.c @@ -37,7 +37,7 @@ U_BOOT_DRVINFO(stv09911_serials) = { }; #endif -#ifdef CONFIG_SHOW_BOOT_PROGRESS +#if CONFIG_IS_ENABLED(BOOTSTAGE) void show_boot_progress(int progress) { printf("%i\n", progress); diff --git a/common/init/board_init.c b/common/init/board_init.c index 3f183ee113..0965b96fa3 100644 --- a/common/init/board_init.c +++ b/common/init/board_init.c @@ -166,7 +166,9 @@ void board_init_f_init_reserve(ulong base) board_init_f_init_stack_protection(); } +#if CONFIG_IS_ENABLED(BOOTSTAGE) /* * Board-specific Platform code can reimplement show_boot_progress () if needed */ __weak void show_boot_progress(int val) {} +#endif diff --git a/common/spl/spl.c b/common/spl/spl.c index a0a608fd77..eba77cace6 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -58,10 +58,12 @@ binman_sym_declare(ulong, spl, size); /* Define board data structure */ static struct bd_info bdata __attribute__ ((section(".data"))); +#if CONFIG_IS_ENABLED(BOOTSTAGE) /* * Board-specific Platform code can reimplement show_boot_progress () if needed */ __weak void show_boot_progress(int val) {} +#endif #if defined(CONFIG_SPL_OS_BOOT) || CONFIG_IS_ENABLED(HANDOFF) || \ defined(CONFIG_SPL_ATF) diff --git a/include/bootstage.h b/include/bootstage.h index 00c85fb86a..f837a387c8 100644 --- a/include/bootstage.h +++ b/include/bootstage.h @@ -11,6 +11,8 @@ #ifndef _BOOTSTAGE_H #define _BOOTSTAGE_H +#include + /* Flags for each bootstage record */ enum bootstage_flags { BOOTSTAGEF_ERROR = 1 << 0, /* Error record */ @@ -218,7 +220,7 @@ enum bootstage_id { */ ulong timer_get_boot_us(void); -#if defined(USE_HOSTCC) +#if defined(USE_HOSTCC) || !CONFIG_IS_ENABLED(BOOTSTAGE) #define show_boot_progress(val) do {} while (0) #else /** -- cgit v1.2.1 From cfa5189811e29e4a24ed41a814e2feb41e79b52e Mon Sep 17 00:00:00 2001 From: Bin Meng Date: Wed, 7 Jul 2021 15:36:26 +0800 Subject: x86: Drop _X86EMU_env definition when CONFIG_BIOSEMU is used With x86 we can execute an option ROM either natively or using the x86 emulator (if enabled with CONFIG_BIOSEMU). Both of these share the _X86EMU_env variable, with the native code using it to hold register state during interrupt processing. At present, in 32-bit U-Boot, the variable is declared twice, once in common code and once in code only compiled with CONFIG_BIOSEMU. With GCC 11 this causes a 'multiple definitions' error on boards with CONFIG_BIOSEMU. Drop the emulator definition when CONFIG_BIOSEMU is used. Signed-off-by: Bin Meng --- arch/x86/lib/bios.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/lib/bios.c b/arch/x86/lib/bios.c index fbdc3b04e3..98cc05de2e 100644 --- a/arch/x86/lib/bios.c +++ b/arch/x86/lib/bios.c @@ -23,7 +23,9 @@ static int (*int_handler[256])(void); /* to have a common register file for interrupt handlers */ +#ifndef CONFIG_BIOSEMU X86EMU_sysEnv _X86EMU_env; +#endif asmlinkage void (*realmode_call)(u32 addr, u32 eax, u32 ebx, u32 ecx, u32 edx, u32 esi, u32 edi); -- cgit v1.2.1 From 7bb1cc3bb9d6fca5f285db4df2299c3b80aa8c4a Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Fri, 2 Jul 2021 10:41:58 -0400 Subject: Azure/GitLab: Move to gcc-11.1.0 and LLVM-11 - Move to gcc-11.1.0 builds from kernel.org for supported platforms and LLVM-11 for those tests. - As Heinrich has noted, the RISC-V platform specification has a profile OS-A for running rich operating systems like Linux and BSD. This profile requires 64bit and UEFI conforming to the EBBR. Only the 'embedded' profile may use 32bit. Given this, drop grub for 32bit RISC-V as it no longer compiles with gcc-11.1 and upstream is unlikely to fix it: https://www.mail-archive.com/grub-devel@gnu.org/msg30736.html - Update to grub-2.06 release to address other issues of building with gcc-11.1. - Update to newer Xtensa (gcc-9.2.0) and ARC (gcc-10.2) toolchains Cc: Heinrich Schuchardt Cc: Bin Meng Cc: Simon Glass Cc: Rick Chen Signed-off-by: Tom Rini Reviewed-by: Bin Meng --- .azure-pipelines.yml | 3 +- .gitlab-ci.yml | 3 +- tools/docker/Dockerfile | 85 ++++++++++++++++++++----------------------------- 3 files changed, 36 insertions(+), 55 deletions(-) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 06c4a2ffd0..48a7b024f6 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -2,7 +2,7 @@ variables: windows_vm: vs2017-win2016 ubuntu_vm: ubuntu-18.04 macos_vm: macOS-10.15 - ci_runner_image: trini/u-boot-gitlab-ci-runner:focal-20210609-01Jul2021 + ci_runner_image: trini/u-boot-gitlab-ci-runner:focal-20210609-06Jul2021 # Add '-u 0' options for Azure pipelines, otherwise we get "permission # denied" error when it tries to "useradd -m -u 1001 vsts_azpcontainer", # since our $(ci_runner_image) user is not root. @@ -300,7 +300,6 @@ jobs: cp ~/grub_x86.efi ${UBOOT_TRAVIS_BUILD_DIR}/ cp ~/grub_x64.efi ${UBOOT_TRAVIS_BUILD_DIR}/ cp /opt/grub/grubriscv64.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_riscv64.efi - cp /opt/grub/grubriscv32.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_riscv32.efi cp /opt/grub/grubaa64.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_arm64.efi cp /opt/grub/grubarm.efi ${UBOOT_TRAVIS_BUILD_DIR}/grub_arm.efi virtualenv -p /usr/bin/python3 /tmp/venv diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 94c7333056..86026a15f9 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ # Grab our configured image. The source for this is found at: # https://source.denx.de/u-boot/gitlab-ci-runner -image: trini/u-boot-gitlab-ci-runner:focal-20210609-01Jul2021 +image: trini/u-boot-gitlab-ci-runner:focal-20210609-06Jul2021 # We run some tests in different order, to catch some failures quicker. stages: @@ -38,7 +38,6 @@ stages: - cp ~/grub_x86.efi $UBOOT_TRAVIS_BUILD_DIR/ - cp ~/grub_x64.efi $UBOOT_TRAVIS_BUILD_DIR/ - cp /opt/grub/grubriscv64.efi $UBOOT_TRAVIS_BUILD_DIR/grub_riscv64.efi - - cp /opt/grub/grubriscv32.efi $UBOOT_TRAVIS_BUILD_DIR/grub_riscv32.efi - cp /opt/grub/grubaa64.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm64.efi - cp /opt/grub/grubarm.efi $UBOOT_TRAVIS_BUILD_DIR/grub_arm.efi - virtualenv -p /usr/bin/python3 /tmp/venv diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile index de0c6cee8c..ced4457ab2 100644 --- a/tools/docker/Dockerfile +++ b/tools/docker/Dockerfile @@ -12,24 +12,23 @@ ENV DEBIAN_FRONTEND=noninteractive # Add LLVM repository RUN apt-get update && apt-get install -y gnupg2 wget xz-utils && rm -rf /var/lib/apt/lists/* RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - -RUN echo deb http://apt.llvm.org/focal/ llvm-toolchain-focal-10 main | tee /etc/apt/sources.list.d/llvm.list +RUN echo deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main | tee /etc/apt/sources.list.d/llvm.list -# Manually install the kernel.org "Crosstool" based toolchains for gcc-7.3 -RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/9.2.0/x86_64-gcc-9.2.0-nolibc-aarch64-linux.tar.xz | tar -C /opt -xJ -RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/9.2.0/x86_64-gcc-9.2.0-nolibc-arm-linux-gnueabi.tar.xz | tar -C /opt -xJ -RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/9.2.0/x86_64-gcc-9.2.0-nolibc-i386-linux.tar.xz | tar -C /opt -xJ -RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/9.2.0/x86_64-gcc-9.2.0-nolibc-m68k-linux.tar.xz | tar -C /opt -xJ -RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/9.2.0/x86_64-gcc-9.2.0-nolibc-mips-linux.tar.xz | tar -C /opt -xJ -RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/9.2.0/x86_64-gcc-9.2.0-nolibc-microblaze-linux.tar.xz | tar -C /opt -xJ -RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/9.2.0/x86_64-gcc-9.2.0-nolibc-nios2-linux.tar.xz | tar -C /opt -xJ -RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/9.2.0/x86_64-gcc-9.2.0-nolibc-powerpc-linux.tar.xz | tar -C /opt -xJ -RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/9.2.0/x86_64-gcc-9.2.0-nolibc-riscv32-linux.tar.xz | tar -C /opt -xJ -RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/9.2.0/x86_64-gcc-9.2.0-nolibc-riscv64-linux.tar.xz | tar -C /opt -xJ -RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/9.2.0/x86_64-gcc-9.2.0-nolibc-sh2-linux.tar.xz | tar -C /opt -xJ +# Manually install the kernel.org "Crosstool" based toolchains for gcc-11.1.0 +RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/11.1.0/x86_64-gcc-11.1.0-nolibc-aarch64-linux.tar.xz | tar -C /opt -xJ +RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/11.1.0/x86_64-gcc-11.1.0-nolibc-arm-linux-gnueabi.tar.xz | tar -C /opt -xJ +RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/11.1.0/x86_64-gcc-11.1.0-nolibc-i386-linux.tar.xz | tar -C /opt -xJ +RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/11.1.0/x86_64-gcc-11.1.0-nolibc-m68k-linux.tar.xz | tar -C /opt -xJ +RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/11.1.0/x86_64-gcc-11.1.0-nolibc-mips-linux.tar.xz | tar -C /opt -xJ +RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/11.1.0/x86_64-gcc-11.1.0-nolibc-microblaze-linux.tar.xz | tar -C /opt -xJ +RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/11.1.0/x86_64-gcc-11.1.0-nolibc-nios2-linux.tar.xz | tar -C /opt -xJ +RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/11.1.0/x86_64-gcc-11.1.0-nolibc-powerpc-linux.tar.xz | tar -C /opt -xJ +RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/11.1.0/x86_64-gcc-11.1.0-nolibc-riscv64-linux.tar.xz | tar -C /opt -xJ +RUN wget -O - https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/11.1.0/x86_64-gcc-11.1.0-nolibc-sh2-linux.tar.xz | tar -C /opt -xJ # Manually install other toolchains -RUN wget -O - https://github.com/foss-xtensa/toolchain/releases/download/2018.02/x86_64-2018.02-xtensa-dc233c-elf.tar.gz | tar -C /opt -xz -RUN wget -O - https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2019.09-release/arc_gnu_2019.09_prebuilt_uclibc_le_archs_linux_install.tar.gz | tar --no-same-owner -C /opt -xz +RUN wget -O - https://github.com/foss-xtensa/toolchain/releases/download/2020.07/x86_64-2020.07-xtensa-dc233c-elf.tar.gz | tar -C /opt -xz +RUN wget -O - https://github.com/foss-for-synopsys-dwc-arc-processors/toolchain/releases/download/arc-2021.03-release/arc_gnu_2021.03_prebuilt_uclibc_le_archs_linux_install.tar.gz | tar --no-same-owner -C /opt -xz RUN wget -O - https://github.com/vincentzwc/prebuilt-nds32-toolchain/releases/download/20180521/nds32le-linux-glibc-v3-upstream.tar.gz | tar -C /opt -xz # Update and install things from apt now @@ -98,15 +97,13 @@ RUN apt-get update && apt-get install -y \ util-linux \ uuid-dev \ virtualenv \ + xxd \ zip \ && rm -rf /var/lib/apt/lists/* # Make kernels readable for libguestfs tools to work correctly RUN chmod +r /boot/vmlinu* -# Manually install libmpfr4 for the toolchains -RUN wget http://mirrors.kernel.org/ubuntu/pool/main/m/mpfr4/libmpfr4_3.1.4-1_amd64.deb && dpkg -i libmpfr4_3.1.4-1_amd64.deb && rm libmpfr4_3.1.4-1_amd64.deb - # Manually install a new enough version of sbsigntools (must be v0.9.4 or later) RUN git clone https://git.kernel.org/pub/scm/linux/kernel/git/jejb/sbsigntools.git /tmp/sbsigntools && \ cd /tmp/sbsigntools && \ @@ -120,16 +117,16 @@ RUN git clone https://git.kernel.org/pub/scm/linux/kernel/git/jejb/sbsigntools.g # Build GRUB UEFI targets for ARM & RISC-V, 32-bit and 64-bit RUN git clone git://git.savannah.gnu.org/grub.git /tmp/grub && \ cd /tmp/grub && \ - git checkout grub-2.04 && \ + git checkout grub-2.06 && \ ./bootstrap && \ mkdir -p /opt/grub && \ ./configure --target=aarch64 --with-platform=efi \ CC=gcc \ - TARGET_CC=/opt/gcc-9.2.0-nolibc/aarch64-linux/bin/aarch64-linux-gcc \ - TARGET_OBJCOPY=/opt/gcc-9.2.0-nolibc/aarch64-linux/bin/aarch64-linux-objcopy \ - TARGET_STRIP=/opt/gcc-9.2.0-nolibc/aarch64-linux/bin/aarch64-linux-strip \ - TARGET_NM=/opt/gcc-9.2.0-nolibc/aarch64-linux/bin/aarch64-linux-nm \ - TARGET_RANLIB=/opt/gcc-9.2.0-nolibc/aarch64-linux/bin/aarch64-linux-ranlib && \ + TARGET_CC=/opt/gcc-11.1.0-nolibc/aarch64-linux/bin/aarch64-linux-gcc \ + TARGET_OBJCOPY=/opt/gcc-11.1.0-nolibc/aarch64-linux/bin/aarch64-linux-objcopy \ + TARGET_STRIP=/opt/gcc-11.1.0-nolibc/aarch64-linux/bin/aarch64-linux-strip \ + TARGET_NM=/opt/gcc-11.1.0-nolibc/aarch64-linux/bin/aarch64-linux-nm \ + TARGET_RANLIB=/opt/gcc-11.1.0-nolibc/aarch64-linux/bin/aarch64-linux-ranlib && \ make && \ ./grub-mkimage -O arm64-efi -o /opt/grub/grubaa64.efi --prefix= -d \ grub-core cat chain configfile echo efinet ext2 fat halt help linux \ @@ -139,11 +136,11 @@ RUN git clone git://git.savannah.gnu.org/grub.git /tmp/grub && \ make clean && \ ./configure --target=arm --with-platform=efi \ CC=gcc \ - TARGET_CC=/opt/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-gcc \ - TARGET_OBJCOPY=/opt/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-objcopy \ - TARGET_STRIP=/opt/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-strip \ - TARGET_NM=/opt/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-nm \ - TARGET_RANLIB=/opt/gcc-9.2.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ranlib && \ + TARGET_CC=/opt/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-gcc \ + TARGET_OBJCOPY=/opt/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-objcopy \ + TARGET_STRIP=/opt/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-strip \ + TARGET_NM=/opt/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-nm \ + TARGET_RANLIB=/opt/gcc-11.1.0-nolibc/arm-linux-gnueabi/bin/arm-linux-gnueabi-ranlib && \ make && \ ./grub-mkimage -O arm-efi -o /opt/grub/grubarm.efi --prefix= -d \ grub-core cat chain configfile echo efinet ext2 fat halt help linux \ @@ -153,31 +150,17 @@ RUN git clone git://git.savannah.gnu.org/grub.git /tmp/grub && \ make clean && \ ./configure --target=riscv64 --with-platform=efi \ CC=gcc \ - TARGET_CC=/opt/gcc-9.2.0-nolibc/riscv64-linux/bin/riscv64-linux-gcc \ - TARGET_OBJCOPY=/opt/gcc-9.2.0-nolibc/riscv64-linux/bin/riscv64-linux-objcopy \ - TARGET_STRIP=/opt/gcc-9.2.0-nolibc/riscv64-linux/bin/riscv64-linux-strip \ - TARGET_NM=/opt/gcc-9.2.0-nolibc/riscv64-linux/bin/riscv64-linux-nm \ - TARGET_RANLIB=/opt/gcc-9.2.0-nolibc/riscv64-linux/bin/riscv64-linux-ranlib && \ + TARGET_CC=/opt/gcc-11.1.0-nolibc/riscv64-linux/bin/riscv64-linux-gcc \ + TARGET_OBJCOPY=/opt/gcc-11.1.0-nolibc/riscv64-linux/bin/riscv64-linux-objcopy \ + TARGET_STRIP=/opt/gcc-11.1.0-nolibc/riscv64-linux/bin/riscv64-linux-strip \ + TARGET_NM=/opt/gcc-11.1.0-nolibc/riscv64-linux/bin/riscv64-linux-nm \ + TARGET_RANLIB=/opt/gcc-11.1.0-nolibc/riscv64-linux/bin/riscv64-linux-ranlib && \ make && \ ./grub-mkimage -O riscv64-efi -o /opt/grub/grubriscv64.efi --prefix= -d \ grub-core cat chain configfile echo efinet ext2 fat halt help linux \ lsefisystab loadenv lvm minicmd normal part_msdos part_gpt reboot \ search search_fs_file search_fs_uuid search_label serial sleep test \ true && \ - make clean && \ - ./configure --target=riscv32 --with-platform=efi \ - CC=gcc \ - TARGET_CC=/opt/gcc-9.2.0-nolibc/riscv32-linux/bin/riscv32-linux-gcc \ - TARGET_OBJCOPY=/opt/gcc-9.2.0-nolibc/riscv32-linux/bin/riscv32-linux-objcopy \ - TARGET_STRIP=/opt/gcc-9.2.0-nolibc/riscv32-linux/bin/riscv32-linux-strip \ - TARGET_NM=/opt/gcc-9.2.0-nolibc/riscv32-linux/bin/riscv32-linux-nm \ - TARGET_RANLIB=/opt/gcc-9.2.0-nolibc/riscv32-linux/bin/riscv32-linux-ranlib && \ - make && \ - ./grub-mkimage -O riscv32-efi -o /opt/grub/grubriscv32.efi --prefix= -d \ - grub-core cat chain configfile echo efinet ext2 fat halt help linux \ - lsefisystab loadenv lvm minicmd normal part_msdos part_gpt reboot \ - search search_fs_file search_fs_uuid search_label serial sleep test \ - true && \ rm -rf /tmp/grub RUN git clone git://git.qemu.org/qemu.git /tmp/qemu && \ @@ -195,9 +178,9 @@ USER uboot:uboot # Create the buildman config file RUN /bin/echo -e "[toolchain]\nroot = /usr" > ~/.buildman -RUN /bin/echo -e "kernelorg = /opt/gcc-9.2.0-nolibc/*" >> ~/.buildman -RUN /bin/echo -e "arc = /opt/arc_gnu_2019.09_prebuilt_uclibc_le_archs_linux_install" >> ~/.buildman -RUN /bin/echo -e "\n[toolchain-prefix]\nxtensa = /opt/2018.02/xtensa-dc233c-elf/bin/xtensa-dc233c-elf-" >> ~/.buildman; +RUN /bin/echo -e "kernelorg = /opt/gcc-11.1.0-nolibc/*" >> ~/.buildman +RUN /bin/echo -e "arc = /opt/arc_gnu_2021.03_prebuilt_uclibc_le_archs_linux_install" >> ~/.buildman +RUN /bin/echo -e "\n[toolchain-prefix]\nxtensa = /opt/2020.07/xtensa-dc233c-elf/bin/xtensa-dc233c-elf-" >> ~/.buildman; RUN /bin/echo -e "\nnds32 = /opt/nds32le-linux-glibc-v3-upstream/bin/nds32le-linux-" >> ~/.buildman; RUN /bin/echo -e "\n[toolchain-alias]\nsh = sh2" >> ~/.buildman RUN /bin/echo -e "\nriscv = riscv64" >> ~/.buildman -- cgit v1.2.1