diff options
Diffstat (limited to 'config/submodule/coreboot')
62 files changed, 385 insertions, 481 deletions
diff --git a/config/submodule/coreboot/coreboot413/module.list b/config/submodule/coreboot/coreboot413/module.list deleted file mode 100644 index 08e76de0..00000000 --- a/config/submodule/coreboot/coreboot413/module.list +++ /dev/null @@ -1 +0,0 @@ -3rdparty/vboot diff --git a/config/submodule/coreboot/coreboot413/vboot/module.cfg b/config/submodule/coreboot/coreboot413/vboot/module.cfg deleted file mode 100644 index 34656ba9..00000000 --- a/config/submodule/coreboot/coreboot413/vboot/module.cfg +++ /dev/null @@ -1,3 +0,0 @@ -subrepo="https://review.coreboot.org/vboot.git" -subrepo_bkup="https://github.com/coreboot/vboot" -subhash="4c523ed10f25de872ac0513ebd6ca53d3970b9de" diff --git a/config/submodule/coreboot/default/acpica-unix-20230628.tar.gz/module.cfg b/config/submodule/coreboot/default/acpica-unix-20230628.tar.gz/module.cfg deleted file mode 100644 index 6dde459a..00000000 --- a/config/submodule/coreboot/default/acpica-unix-20230628.tar.gz/module.cfg +++ /dev/null @@ -1,3 +0,0 @@ -subfile="https://www.mirrorservice.org/sites/libreboot.org/release/misc/acpica/acpica-unix-20230628.tar.gz" -subfile_bkup="https://mirror.math.princeton.edu/pub/libreboot/misc/acpica/acpica-unix-20230628.tar.gz" -subhash="d726e69ebd8b8110690e3aff8d1919b43b0a2185efdeb9131ea8d89d321ca3a318a89c721ea740ae366f31ed3d1c11c2906f8807ee8a190e6f67fe5b2023cea4" diff --git a/config/submodule/coreboot/default/acpica-unix-20251212.tar.gz/module.cfg b/config/submodule/coreboot/default/acpica-unix-20251212.tar.gz/module.cfg new file mode 100644 index 00000000..0ef86b38 --- /dev/null +++ b/config/submodule/coreboot/default/acpica-unix-20251212.tar.gz/module.cfg @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-3.0-or-later + +subcurl="https://www.mirrorservice.org/sites/libreboot.org/release/misc/acpica/acpica-unix-20251212.tar.gz" +subcurl_bkup="https://mirror.math.princeton.edu/pub/libreboot/misc/acpica/acpica-unix-20251212.tar.gz" +subhash="fcb2de18917d463ae0229bcaf37528366084cbf669e02acf7862ff4488a40ddcf24499410549a209b13e944249512e32454a3dbf039193bac6d8b012971ad69d" diff --git a/config/submodule/coreboot/default/arm-trusted-firmware/module.cfg b/config/submodule/coreboot/default/arm-trusted-firmware/module.cfg index d7864542..08331cf5 100644 --- a/config/submodule/coreboot/default/arm-trusted-firmware/module.cfg +++ b/config/submodule/coreboot/default/arm-trusted-firmware/module.cfg @@ -1,3 +1,5 @@ -subrepo="https://review.coreboot.org/arm-trusted-firmware.git" -subrepo_bkup="https://github.com/coreboot/arm-trusted-firmware" -subhash="c5b8de86c8838d08d5d8c9d67c7a432817ee62b8" +# SPDX-License-Identifier: GPL-3.0-or-later + +subgit="https://review.coreboot.org/arm-trusted-firmware.git" +subgit_bkup="https://github.com/coreboot/arm-trusted-firmware" +subhash="b5eaba47efc5e4e3029086d5c25eee0e8dbb0129" diff --git a/config/submodule/coreboot/default/binutils-2.42.tar.xz/module.cfg b/config/submodule/coreboot/default/binutils-2.42.tar.xz/module.cfg deleted file mode 100644 index 370a52ec..00000000 --- a/config/submodule/coreboot/default/binutils-2.42.tar.xz/module.cfg +++ /dev/null @@ -1,3 +0,0 @@ -subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/binutils/binutils-2.42.tar.xz" -subfile_bkup="https://ftp.nluug.nl/pub/gnu/binutils/binutils-2.42.tar.xz" -subhash="155f3ba14cd220102f4f29a4f1e5cfee3c48aa03b74603460d05afb73c70d6657a9d87eee6eb88bf13203fe6f31177a5c9addc04384e956e7da8069c8ecd20a6" diff --git a/config/submodule/coreboot/default/binutils-2.46.1.tar.xz/module.cfg b/config/submodule/coreboot/default/binutils-2.46.1.tar.xz/module.cfg new file mode 100644 index 00000000..f8ed7de4 --- /dev/null +++ b/config/submodule/coreboot/default/binutils-2.46.1.tar.xz/module.cfg @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-3.0-or-later + +subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/binutils/binutils-2.46.1.tar.xz" +subcurl_bkup="https://ftp.nluug.nl/pub/gnu/binutils/binutils-2.46.1.tar.xz" +subhash="a5c65e56e400ed3fb8906a995dbb93eb5bea54b16344244653d7f44ef29ceb60270da263b19d25302c37759784e14fcb4b9421b29e0e2c7f450bd99f6bb4595c" diff --git a/config/submodule/coreboot/default/cmocka/module.cfg b/config/submodule/coreboot/default/cmocka/module.cfg new file mode 100644 index 00000000..32a43066 --- /dev/null +++ b/config/submodule/coreboot/default/cmocka/module.cfg @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-3.0-or-later + +subgit="https://review.coreboot.org/cmocka.git" +subgit_bkup="https://github.com/coreboot/cmocka" +subhash="8be37372097d1aa5e03b565936db7891b6180e73" diff --git a/config/submodule/coreboot/default/cmocka/patches/0001-disable-Werror.patch b/config/submodule/coreboot/default/cmocka/patches/0001-disable-Werror.patch new file mode 100644 index 00000000..8bf8bf10 --- /dev/null +++ b/config/submodule/coreboot/default/cmocka/patches/0001-disable-Werror.patch @@ -0,0 +1,74 @@ +From 0762c4d3ad28239550f39793946c00a4866a797f Mon Sep 17 00:00:00 2001 +From: Leah Rowe <leah@libreboot.org> +Date: Mon, 21 Sep 2026 10:49:57 +0100 +Subject: [PATCH 1/1] disable -Werror + +Signed-off-by: Leah Rowe <leah@libreboot.org> +--- + .ycm_extra_conf.py | 1 - + CompilerChecks.cmake | 17 ----------------- + 2 files changed, 18 deletions(-) + +diff --git a/.ycm_extra_conf.py b/.ycm_extra_conf.py +index 8305a8b..538bc2b 100644 +--- a/.ycm_extra_conf.py ++++ b/.ycm_extra_conf.py +@@ -4,7 +4,6 @@ import ycm_core + flags = [ + '-Wall', + '-Wextra', +-'-Werror', + '-x', 'c', + '-Iinclude', + ] +diff --git a/CompilerChecks.cmake b/CompilerChecks.cmake +index e39cc1d..9ee5462 100644 +--- a/CompilerChecks.cmake ++++ b/CompilerChecks.cmake +@@ -7,14 +7,6 @@ if (UNIX) + # + # This will prevent that compiler flags are detected incorrectly. + # +- check_c_compiler_flag("-Werror" REQUIRED_FLAGS_WERROR) +- if (REQUIRED_FLAGS_WERROR) +- set(CMAKE_REQUIRED_FLAGS "-Werror") +- +- if (PICKY_DEVELOPER) +- list(APPEND SUPPORTED_COMPILER_FLAGS "-Werror") +- endif() +- endif() + + add_c_compiler_flag("-std=gnu99" SUPPORTED_COMPILER_FLAGS) + add_c_compiler_flag("-Wpedantic" SUPPORTED_COMPILER_FLAGS) +@@ -23,20 +15,12 @@ if (UNIX) + add_c_compiler_flag("-Wmissing-prototypes" SUPPORTED_COMPILER_FLAGS) + add_c_compiler_flag("-Wcast-align" SUPPORTED_COMPILER_FLAGS) + #add_c_compiler_flag("-Wcast-qual" SUPPORTED_COMPILER_FLAGS) +- add_c_compiler_flag("-Werror=address" SUPPORTED_COMPILER_FLAGS) + add_c_compiler_flag("-Wstrict-prototypes" SUPPORTED_COMPILER_FLAGS) +- add_c_compiler_flag("-Werror=strict-prototypes" SUPPORTED_COMPILER_FLAGS) + add_c_compiler_flag("-Wwrite-strings" SUPPORTED_COMPILER_FLAGS) +- add_c_compiler_flag("-Werror=write-strings" SUPPORTED_COMPILER_FLAGS) +- add_c_compiler_flag("-Werror-implicit-function-declaration" SUPPORTED_COMPILER_FLAGS) + add_c_compiler_flag("-Wpointer-arith" SUPPORTED_COMPILER_FLAGS) +- add_c_compiler_flag("-Werror=pointer-arith" SUPPORTED_COMPILER_FLAGS) + add_c_compiler_flag("-Wreturn-type" SUPPORTED_COMPILER_FLAGS) +- add_c_compiler_flag("-Werror=return-type" SUPPORTED_COMPILER_FLAGS) + add_c_compiler_flag("-Wuninitialized" SUPPORTED_COMPILER_FLAGS) +- add_c_compiler_flag("-Werror=uninitialized" SUPPORTED_COMPILER_FLAGS) + add_c_compiler_flag("-Wimplicit-fallthrough" SUPPORTED_COMPILER_FLAGS) +- add_c_compiler_flag("-Werror=strict-overflow" SUPPORTED_COMPILER_FLAGS) + add_c_compiler_flag("-Wstrict-overflow=2" SUPPORTED_COMPILER_FLAGS) + add_c_compiler_flag("-Wno-format-zero-length" SUPPORTED_COMPILER_FLAGS) + add_c_compiler_flag("-Wmissing-field-initializers" SUPPORTED_COMPILER_FLAGS) +@@ -47,7 +31,6 @@ if (UNIX) + set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Wformat") + endif() + add_c_compiler_flag("-Wformat-security" SUPPORTED_COMPILER_FLAGS) +- add_c_compiler_flag("-Werror=format-security" SUPPORTED_COMPILER_FLAGS) + + # Allow zero for a variadic macro argument + string(TOLOWER "${CMAKE_C_COMPILER_ID}" _C_COMPILER_ID) +-- +2.47.3 + diff --git a/config/submodule/coreboot/default/fsp/module.cfg b/config/submodule/coreboot/default/fsp/module.cfg new file mode 100644 index 00000000..fc238774 --- /dev/null +++ b/config/submodule/coreboot/default/fsp/module.cfg @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-3.0-or-later + +subgit="https://review.coreboot.org/fsp.git" +subgit_bkup="https://github.com/coreboot/fsp" +subhash="98426bfd958eb7397c474ff5d440dc9a1d146215" diff --git a/config/submodule/coreboot/default/fspcc36ae2b5775fa7400cb3282680afc0f6cb37a3c/module.cfg b/config/submodule/coreboot/default/fspcc36ae2b5775fa7400cb3282680afc0f6cb37a3c/module.cfg new file mode 100644 index 00000000..297e1703 --- /dev/null +++ b/config/submodule/coreboot/default/fspcc36ae2b5775fa7400cb3282680afc0f6cb37a3c/module.cfg @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-3.0-or-later + +subgit="https://review.coreboot.org/fsp.git" +subgit_bkup="https://github.com/coreboot/fsp" +subhash="cc36ae2b5775fa7400cb3282680afc0f6cb37a3c" diff --git a/config/submodule/coreboot/default/gcc-14.1.0.tar.xz/module.cfg b/config/submodule/coreboot/default/gcc-14.1.0.tar.xz/module.cfg deleted file mode 100644 index 1e4037e8..00000000 --- a/config/submodule/coreboot/default/gcc-14.1.0.tar.xz/module.cfg +++ /dev/null @@ -1,3 +0,0 @@ -subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gcc/gcc-14.1.0/gcc-14.1.0.tar.xz" -subfile_bkup="https://ftp.nluug.nl/pub/gnu/gcc/gcc-14.1.0/gcc-14.1.0.tar.xz" -subhash="e9e224f2b26646fcf038d28dfa08b94c623bc57941f99894a321d01c600f7c68aff6b8837fd25e73e540de1f8de5606e98694a62cdcdfb525ce768b3ef6879ea" diff --git a/config/submodule/coreboot/default/gcc-15.2.0.tar.xz/module.cfg b/config/submodule/coreboot/default/gcc-15.2.0.tar.xz/module.cfg new file mode 100644 index 00000000..c9dbb8b6 --- /dev/null +++ b/config/submodule/coreboot/default/gcc-15.2.0.tar.xz/module.cfg @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-3.0-or-later + +subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz" +subcurl_bkup="https://ftp.nluug.nl/pub/gnu/gcc/gcc-15.2.0/gcc-15.2.0.tar.xz" +subhash="89047a2e07bd9da265b507b516ed3635adb17491c7f4f67cf090f0bd5b3fc7f2ee6e4cc4008beef7ca884b6b71dffe2bb652b21f01a702e17b468cca2d10b2de" diff --git a/config/submodule/coreboot/default/gmp-6.3.0.tar.xz/module.cfg b/config/submodule/coreboot/default/gmp-6.3.0.tar.xz/module.cfg index fe274faf..90466fed 100644 --- a/config/submodule/coreboot/default/gmp-6.3.0.tar.xz/module.cfg +++ b/config/submodule/coreboot/default/gmp-6.3.0.tar.xz/module.cfg @@ -1,3 +1,5 @@ -subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz" -subfile_bkup="https://ftp.nluug.nl/pub/gnu/gmp/gmp-6.3.0.tar.xz" +# SPDX-License-Identifier: GPL-3.0-or-later + +subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz" +subcurl_bkup="https://ftp.nluug.nl/pub/gnu/gmp/gmp-6.3.0.tar.xz" subhash="e85a0dab5195889948a3462189f0e0598d331d3457612e2d3350799dba2e244316d256f8161df5219538eb003e4b5343f989aaa00f96321559063ed8c8f29fd2" diff --git a/config/submodule/coreboot/default/intel-microcode/module.cfg b/config/submodule/coreboot/default/intel-microcode/module.cfg index be106f7d..b5b452c4 100644 --- a/config/submodule/coreboot/default/intel-microcode/module.cfg +++ b/config/submodule/coreboot/default/intel-microcode/module.cfg @@ -1,3 +1,5 @@ -subrepo="https://review.coreboot.org/intel-microcode.git" -subrepo_bkup="https://github.com/coreboot/intel-microcode" -subhash="5278dfcf98e89098326b3eb8a85d07120a8730f8" +# SPDX-License-Identifier: GPL-3.0-or-later + +subgit="https://review.coreboot.org/intel-microcode.git" +subgit_bkup="https://github.com/coreboot/intel-microcode" +subhash="927e65c8d5a6e4ec05cc74b1778283ab2284d0c1" diff --git a/config/submodule/coreboot/default/libgfxinit/module.cfg b/config/submodule/coreboot/default/libgfxinit/module.cfg index 1ba41724..480ba0f1 100644 --- a/config/submodule/coreboot/default/libgfxinit/module.cfg +++ b/config/submodule/coreboot/default/libgfxinit/module.cfg @@ -1,3 +1,5 @@ -subrepo="https://review.coreboot.org/libgfxinit.git" -subrepo_bkup="https://github.com/coreboot/libgfxinit" -subhash="17cfc92f402493979783585b6581efbd98c0cf07" +# SPDX-License-Identifier: GPL-3.0-or-later + +subgit="https://review.coreboot.org/libgfxinit.git" +subgit_bkup="https://github.com/coreboot/libgfxinit" +subhash="6e74c703132a8b4af4354a5158f286dc8f2407ab" diff --git a/config/submodule/coreboot/default/libgfxinit/patches/0001-g45-hw-gfx-gma-plls.adb-Make-reference-clock-frequen.patch b/config/submodule/coreboot/default/libgfxinit/patches/0001-g45-hw-gfx-gma-plls.adb-Make-reference-clock-frequen.patch index 2d248941..71c34e5a 100644 --- a/config/submodule/coreboot/default/libgfxinit/patches/0001-g45-hw-gfx-gma-plls.adb-Make-reference-clock-frequen.patch +++ b/config/submodule/coreboot/default/libgfxinit/patches/0001-g45-hw-gfx-gma-plls.adb-Make-reference-clock-frequen.patch @@ -1,7 +1,7 @@ -From ba078864500de99c26b6ea7e3fdcef19bca582a7 Mon Sep 17 00:00:00 2001 +From 9be431356fce5b70875b938c3fbd6f6927031f23 Mon Sep 17 00:00:00 2001 From: Nicholas Chin <nic.c3.14@gmail.com> Date: Mon, 20 May 2024 10:10:03 -0600 -Subject: [PATCH 1/1] g45/hw-gfx-gma-plls.adb: Make reference clock frequency +Subject: [PATCH 1/2] g45/hw-gfx-gma-plls.adb: Make reference clock frequency configurable Instead of assuming a 96 MHz reference clock frequency, use the value @@ -16,7 +16,7 @@ Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com> 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/common/g45/hw-gfx-gma-plls.adb b/common/g45/hw-gfx-gma-plls.adb -index 67242f2..5e970d7 100644 +index 2b93444..38d6dec 100644 --- a/common/g45/hw-gfx-gma-plls.adb +++ b/common/g45/hw-gfx-gma-plls.adb @@ -12,6 +12,8 @@ @@ -28,15 +28,15 @@ index 67242f2..5e970d7 100644 with HW.Time; with HW.GFX.GMA.Config; with HW.GFX.GMA.Registers; -@@ -460,7 +462,7 @@ is - (Display => Port_Cfg.Display, - Target_Dotclock => Target_Clock, +@@ -490,7 +492,7 @@ is + Calculate_Clock_Parameters + (Target_Dotclock => Target_Clock, -- should be, but doesn't has to be always the same: - Reference_Clock => 96_000_000, + Reference_Clock => CB.Config.INTEL_GMA_DPLL_REF_FREQ, + Limits => Select_Limits (Port_Cfg.Display, Target_Clock), Best_Clock => Clk, Valid => Success); - else -- -2.39.2 +2.47.3 diff --git a/config/submodule/coreboot/default/libgfxinit/patches/0002-re-try-EDID-reading-when-it-fails.patch b/config/submodule/coreboot/default/libgfxinit/patches/0002-re-try-EDID-reading-when-it-fails.patch new file mode 100644 index 00000000..2cc3c0b4 --- /dev/null +++ b/config/submodule/coreboot/default/libgfxinit/patches/0002-re-try-EDID-reading-when-it-fails.patch @@ -0,0 +1,38 @@ +From 82f4346eba8fdfb0c11f19a4a0f26bd391c259b4 Mon Sep 17 00:00:00 2001 +From: Leah Rowe <leah@libreboot.org> +Date: Sun, 13 Jul 2025 15:18:53 +0100 +Subject: [PATCH 2/2] re-try EDID reading when it fails + +some video converters are a bit buggy and have to be +probed twice; linux works fine, but in these cases, +coreboot won't set up the display. + +try it twice, to mitigate, when probing the EDID + +This entire function should probably be rewritten, since +it's buggy in general. + +Signed-off-by: Leah Rowe <leah@libreboot.org> +--- + common/hw-gfx-gma-display_probing.adb | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/common/hw-gfx-gma-display_probing.adb b/common/hw-gfx-gma-display_probing.adb +index 6908055..abaa2b6 100644 +--- a/common/hw-gfx-gma-display_probing.adb ++++ b/common/hw-gfx-gma-display_probing.adb +@@ -140,6 +140,11 @@ is + Read_EDID (Raw_EDID, Port, Success); + end if; + ++ if not Success then ++ Panel.Wait_On (Config_Helpers.To_Panel (Port)); ++ Read_EDID (Raw_EDID, Port, Success); ++ end if; ++ + if Success and then + ((not Is_DVI_I (Port) or EDID.Compatible_Display + (Raw_EDID, Config_Helpers.To_Display_Type (Port))) and +-- +2.47.3 + diff --git a/config/submodule/coreboot/default/libhwbase/0001-remove-Werror.patch b/config/submodule/coreboot/default/libhwbase/0001-remove-Werror.patch new file mode 100644 index 00000000..8f0eba58 --- /dev/null +++ b/config/submodule/coreboot/default/libhwbase/0001-remove-Werror.patch @@ -0,0 +1,26 @@ +From 5453dc70cdf327e5b4228fbce34b03107936628f Mon Sep 17 00:00:00 2001 +From: Leah Rowe <leah@libreboot.org> +Date: Mon, 21 Sep 2026 10:58:18 +0100 +Subject: [PATCH 1/1] remove -Werror + +Signed-off-by: Leah Rowe <leah@libreboot.org> +--- + Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index e8d864e..9c10fb6 100644 +--- a/Makefile ++++ b/Makefile +@@ -43,7 +43,7 @@ endif + CC = $(CROSS_COMPILE)gcc + GNATBIND = $(CROSS_COMPILE)gnatbind + +-CFLAGS += -Wuninitialized -Wall -Werror ++CFLAGS += -Wuninitialized -Wall + CFLAGS += -pipe -g + CFLAGS += -Wstrict-aliasing -Wshadow + CFLAGS += -fno-common -fomit-frame-pointer +-- +2.47.3 + diff --git a/config/submodule/coreboot/default/libhwbase/module.cfg b/config/submodule/coreboot/default/libhwbase/module.cfg index 2937b8b7..bb12f0f0 100644 --- a/config/submodule/coreboot/default/libhwbase/module.cfg +++ b/config/submodule/coreboot/default/libhwbase/module.cfg @@ -1,3 +1,5 @@ -subrepo="https://review.coreboot.org/libhwbase.git" -subrepo_bkup="https://github.com/coreboot/libhwbase" -subhash="584629b9f4771b7618951cec57df2ca3af9c6981" +# SPDX-License-Identifier: GPL-3.0-or-later + +subgit="https://review.coreboot.org/libhwbase.git" +subgit_bkup="https://github.com/coreboot/libhwbase" +subhash="61f7287f18b249408a79bf9ab5e72568965cca2c" diff --git a/config/submodule/coreboot/default/module.list b/config/submodule/coreboot/default/module.list index 6f17b546..b53abf95 100644 --- a/config/submodule/coreboot/default/module.list +++ b/config/submodule/coreboot/default/module.list @@ -1,12 +1,15 @@ 3rdparty/arm-trusted-firmware +3rdparty/fsp +3rdparty/fspcc36ae2b5775fa7400cb3282680afc0f6cb37a3c 3rdparty/intel-microcode 3rdparty/libgfxinit 3rdparty/libhwbase 3rdparty/vboot -util/crossgcc/tarballs/binutils-2.42.tar.xz -util/crossgcc/tarballs/gcc-14.1.0.tar.xz +3rdparty/cmocka +util/crossgcc/tarballs/binutils-2.46.1.tar.xz +util/crossgcc/tarballs/gcc-15.2.0.tar.xz util/crossgcc/tarballs/gmp-6.3.0.tar.xz -util/crossgcc/tarballs/mpc-1.3.1.tar.gz -util/crossgcc/tarballs/mpfr-4.2.1.tar.xz -util/crossgcc/tarballs/nasm-2.16.03.tar.bz2 -util/crossgcc/tarballs/acpica-unix-20230628.tar.gz +util/crossgcc/tarballs/mpc-1.4.1.tar.xz +util/crossgcc/tarballs/mpfr-4.2.2.tar.xz +util/crossgcc/tarballs/nasm-3.02.tar.bz2 +util/crossgcc/tarballs/acpica-unix-20251212.tar.gz diff --git a/config/submodule/coreboot/default/mpc-1.3.1.tar.gz/module.cfg b/config/submodule/coreboot/default/mpc-1.3.1.tar.gz/module.cfg deleted file mode 100644 index f98b6444..00000000 --- a/config/submodule/coreboot/default/mpc-1.3.1.tar.gz/module.cfg +++ /dev/null @@ -1,3 +0,0 @@ -subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpc/mpc-1.3.1.tar.gz" -subfile_bkup="https://ftp.nluug.nl/pub/gnu/mpc/mpc-1.3.1.tar.gz" -subhash="4bab4ef6076f8c5dfdc99d810b51108ced61ea2942ba0c1c932d624360a5473df20d32b300fc76f2ba4aa2a97e1f275c9fd494a1ba9f07c4cb2ad7ceaeb1ae97" diff --git a/config/submodule/coreboot/default/mpc-1.4.1.tar.xz/module.cfg b/config/submodule/coreboot/default/mpc-1.4.1.tar.xz/module.cfg new file mode 100644 index 00000000..e5d24d32 --- /dev/null +++ b/config/submodule/coreboot/default/mpc-1.4.1.tar.xz/module.cfg @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-3.0-or-later + +subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpc/mpc-1.4.1.tar.xz" +subcurl_bkup="https://ftp.nluug.nl/pub/gnu/mpc/mpc-1.4.1.tar.xz" +subhash="cdfbe64e80e30df64dbd536e8104a6bb10471582415d5b45a1dd30eb2a312781b38389a9531243413c14e0f88866a35159b20e77900718f28c1030253a1305b9" diff --git a/config/submodule/coreboot/default/mpfr-4.2.1.tar.xz/module.cfg b/config/submodule/coreboot/default/mpfr-4.2.1.tar.xz/module.cfg deleted file mode 100644 index 3419bc30..00000000 --- a/config/submodule/coreboot/default/mpfr-4.2.1.tar.xz/module.cfg +++ /dev/null @@ -1,3 +0,0 @@ -subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpfr/mpfr-4.2.1.tar.xz" -subfile_bkup="https://ftp.nluug.nl/pub/gnu/mpfr/mpfr-4.2.1.tar.xz" -subhash="bc68c0d755d5446403644833ecbb07e37360beca45f474297b5d5c40926df1efc3e2067eecffdf253f946288bcca39ca89b0613f545d46a9e767d1d4cf358475" diff --git a/config/submodule/coreboot/default/mpfr-4.2.2.tar.xz/module.cfg b/config/submodule/coreboot/default/mpfr-4.2.2.tar.xz/module.cfg new file mode 100644 index 00000000..a1eb1e54 --- /dev/null +++ b/config/submodule/coreboot/default/mpfr-4.2.2.tar.xz/module.cfg @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-3.0-or-later + +subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpfr/mpfr-4.2.2.tar.xz" +subcurl_bkup="https://ftp.nluug.nl/pub/gnu/mpfr/mpfr-4.2.2.tar.xz" +subhash="eb9e7f51b5385fb349cc4fba3a45ffdf0dd53be6dfc74932dc01258158a10514667960c530c47dd9dfc5aa18be2bd94859d80499844c5713710581e6ac6259a9" diff --git a/config/submodule/coreboot/default/nasm-2.16.03.tar.bz2/module.cfg b/config/submodule/coreboot/default/nasm-2.16.03.tar.bz2/module.cfg deleted file mode 100644 index c98cc71f..00000000 --- a/config/submodule/coreboot/default/nasm-2.16.03.tar.bz2/module.cfg +++ /dev/null @@ -1,3 +0,0 @@ -subfile="https://www.nasm.us/pub/nasm/releasebuilds/2.16.03/nasm-2.16.03.tar.bz2" -subfile_bkup="https://www.mirrorservice.org/sites/distfiles.macports.org/nasm/nasm-2.16.03.tar.bz2" -subhash="f28445d368debdf44219cc57df33800a8c0e49186cd60836d4adfec7700d53b801d34aa9fc9bfda74169843f33a1e8b465e11292582eb968bb9c3a26f54dd172" diff --git a/config/submodule/coreboot/default/nasm-3.02.tar.bz2/module.cfg b/config/submodule/coreboot/default/nasm-3.02.tar.bz2/module.cfg new file mode 100644 index 00000000..ee016751 --- /dev/null +++ b/config/submodule/coreboot/default/nasm-3.02.tar.bz2/module.cfg @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-3.0-or-later + +subcurl="https://www.nasm.us/pub/nasm/releasebuilds/3.02/nasm-3.02.tar.bz2" +subcurl_bkup="https://www.mirrorservice.org/sites/distfiles.macports.org/nasm/nasm-3.02.tar.bz2" +subhash="a4c3ae59c32e87d9d64f96c442a1004a7f91075a71a89c4a302237bfd98fe779d45b3a7bfb2044c04f42a74ebfba0aae77dbb98e7e5dd2f27619deb4b6463fa3" diff --git a/config/submodule/coreboot/default/vboot/module.cfg b/config/submodule/coreboot/default/vboot/module.cfg index 1dc4c904..c47b5778 100644 --- a/config/submodule/coreboot/default/vboot/module.cfg +++ b/config/submodule/coreboot/default/vboot/module.cfg @@ -1,3 +1,5 @@ -subrepo="https://review.coreboot.org/vboot.git" -subrepo_bkup="https://github.com/coreboot/vboot" -subhash="4b12d392e5b12de29c582df4e717b1228e9f1594" +# SPDX-License-Identifier: GPL-3.0-or-later + +subgit="https://review.coreboot.org/vboot.git" +subgit_bkup="https://github.com/coreboot/vboot" +subhash="5c360ef458b0a013d8a6d47724bb0fffb5accbcf" diff --git a/config/submodule/coreboot/default/vboot/patches/0002-lib-cbfstool-fix-build-error-on-newer-hostcc.patch b/config/submodule/coreboot/default/vboot/patches/0002-lib-cbfstool-fix-build-error-on-newer-hostcc.patch new file mode 100644 index 00000000..6d5ba873 --- /dev/null +++ b/config/submodule/coreboot/default/vboot/patches/0002-lib-cbfstool-fix-build-error-on-newer-hostcc.patch @@ -0,0 +1,28 @@ +From efeac4de14e3ac46e9146bc6a2d2e03ca04757f1 Mon Sep 17 00:00:00 2001 +From: Leah Rowe <leah@libreboot.org> +Date: Wed, 1 Apr 2026 08:10:09 +0100 +Subject: [PATCH] lib/cbfstool: fix build error on newer hostcc + +const char being discarded. classic rookie mistake. + +Signed-off-by: Leah Rowe <leah@libreboot.org> +--- + host/lib/cbfstool.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/host/lib/cbfstool.c b/host/lib/cbfstool.c +index 9b4de49e..2a2578c0 100644 +--- a/host/lib/cbfstool.c ++++ b/host/lib/cbfstool.c +@@ -259,7 +259,7 @@ static char *extract_config_value(const char *buf, const char *config_field) + free(to_find); + + if (start) { +- char *end = strchr(start, '\n'); ++ const char *end = strchr(start, '\n'); + if (end) + return strndup(start, end - start); + } +-- +2.47.3 + diff --git a/config/submodule/coreboot/default/vboot/patches/0003-remove-Werror.patch b/config/submodule/coreboot/default/vboot/patches/0003-remove-Werror.patch new file mode 100644 index 00000000..fbc60940 --- /dev/null +++ b/config/submodule/coreboot/default/vboot/patches/0003-remove-Werror.patch @@ -0,0 +1,58 @@ +From f71d1e0981fa3a9ea8201cac97631486a90d5ce4 Mon Sep 17 00:00:00 2001 +From: Leah Rowe <leah@libreboot.org> +Date: Mon, 21 Sep 2026 11:01:00 +0100 +Subject: [PATCH 1/1] remove -Werror + +Signed-off-by: Leah Rowe <leah@libreboot.org> +--- + Android.bp | 1 - + Makefile | 6 ++---- + 2 files changed, 2 insertions(+), 5 deletions(-) + +diff --git a/Android.bp b/Android.bp +index dec72cc8..1974a1a2 100644 +--- a/Android.bp ++++ b/Android.bp +@@ -9,7 +9,6 @@ cc_defaults { + + cflags: [ + "-Wall", +- "-Werror", + "-Wstrict-prototypes", + "-Wtype-limits", + "-Wundef", +diff --git a/Makefile b/Makefile +index 67af60d4..4243a03a 100644 +--- a/Makefile ++++ b/Makefile +@@ -113,9 +113,8 @@ endif + # Provide default CC and CFLAGS for firmware builds; if you have any -D flags, + # please add them after this point (e.g., -DVBOOT_DEBUG). + DEBUG_FLAGS := $(if $(filter-out 0,${DEBUG}),-g -Og,-g -Os) +-WERROR := -Werror + FIRMWARE_FLAGS := -nostdinc -ffreestanding -fno-builtin -fno-stack-protector +-COMMON_FLAGS := -pipe ${WERROR} -Wall -Wstrict-prototypes -Wtype-limits \ ++COMMON_FLAGS := -pipe -Wall -Wstrict-prototypes -Wtype-limits \ + -Wundef -Wmissing-prototypes -Wno-trigraphs -Wredundant-decls -Wshadow \ + -Wwrite-strings -Wstrict-aliasing -Wdate-time \ + -Wint-conversion -ffunction-sections -fdata-sections \ +@@ -127,7 +126,7 @@ COMMON_FLAGS := -pipe ${WERROR} -Wall -Wstrict-prototypes -Wtype-limits \ + # returns: $(1) if compiler was successful, empty string otherwise + test_ccflag = $(shell \ + printf "$(2)\nvoid _start(void) {}\n" | \ +- $(CC) -nostdlib -Werror $(1) -xc -c - -o /dev/null \ ++ $(CC) -nostdlib $(1) -xc -c - -o /dev/null \ + >/dev/null 2>&1 && echo "$(1)") + + COMMON_FLAGS += $(call test_ccflag,-Wimplicit-fallthrough) +@@ -499,7 +498,6 @@ UTILLIB = ${BUILD}/libvboot_util.a + # Avoid build failures outside the chroot on Ubuntu 2022.04 + # e.g.: + # host/lib/host_key2.c:103:17: error: ‘RSA_free’ is deprecated: Since OpenSSL 3.0 +-# [-Werror=deprecated-declarations] + ifeq ($(OPENSSL_VERSION),3) + ${UTILLIB}: CFLAGS += -Wno-error=deprecated-declarations + endif +-- +2.47.3 + diff --git a/config/submodule/coreboot/fam15h/blobs/module.cfg b/config/submodule/coreboot/fam15h/blobs/module.cfg deleted file mode 100644 index 215caf4d..00000000 --- a/config/submodule/coreboot/fam15h/blobs/module.cfg +++ /dev/null @@ -1,3 +0,0 @@ -subrepo="https://review.coreboot.org/blobs.git" -subrepo_bkup="https://github.com/coreboot/blobs" -subhash="034b27818450428f70aa9316c8bd0d65bacd8ee8" diff --git a/config/submodule/coreboot/fam15h/gmp-6.1.2.tar.xz/module.cfg b/config/submodule/coreboot/fam15h/gmp-6.1.2.tar.xz/module.cfg deleted file mode 100644 index 7caf1845..00000000 --- a/config/submodule/coreboot/fam15h/gmp-6.1.2.tar.xz/module.cfg +++ /dev/null @@ -1,3 +0,0 @@ -subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.xz" -subfile_bkup="https://ftp.nluug.nl/pub/gnu/gmp/gmp-6.1.2.tar.xz" -subhash="9f098281c0593b76ee174b722936952671fab1dae353ce3ed436a31fe2bc9d542eca752353f6645b7077c1f395ab4fdd355c58e08e2a801368f1375690eee2c6" diff --git a/config/submodule/coreboot/fam15h/mpc-1.1.0.tar.gz/module.cfg b/config/submodule/coreboot/fam15h/mpc-1.1.0.tar.gz/module.cfg deleted file mode 100644 index 34e77772..00000000 --- a/config/submodule/coreboot/fam15h/mpc-1.1.0.tar.gz/module.cfg +++ /dev/null @@ -1,3 +0,0 @@ -subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz" -subfile_bkup="https://ftp.nluug.nl/pub/gnu/mpc/mpc-1.1.0.tar.gz" -subhash="72d657958b07c7812dc9c7cbae093118ce0e454c68a585bfb0e2fa559f1bf7c5f49b93906f580ab3f1073e5b595d23c6494d4d76b765d16dde857a18dd239628" diff --git a/config/submodule/coreboot/fam15h/mpfr-4.0.2.tar.xz/module.cfg b/config/submodule/coreboot/fam15h/mpfr-4.0.2.tar.xz/module.cfg deleted file mode 100644 index e33b1804..00000000 --- a/config/submodule/coreboot/fam15h/mpfr-4.0.2.tar.xz/module.cfg +++ /dev/null @@ -1,3 +0,0 @@ -subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpfr/mpfr-4.0.2.tar.xz" -subfile_bkup="https://ftp.nluug.nl/pub/gnu/mpfr/mpfr-4.0.2.tar.xz" -subhash="d583555d08863bf36c89b289ae26bae353d9a31f08ee3894520992d2c26e5683c4c9c193d7ad139632f71c0a476d85ea76182702a98bf08dde7b6f65a54f8b88" diff --git a/config/submodule/coreboot/fam15h/nasm-2.14.02.tar.bz2/module.cfg b/config/submodule/coreboot/fam15h/nasm-2.14.02.tar.bz2/module.cfg deleted file mode 100644 index fecb3cba..00000000 --- a/config/submodule/coreboot/fam15h/nasm-2.14.02.tar.bz2/module.cfg +++ /dev/null @@ -1,3 +0,0 @@ -subfile="https://www.nasm.us/pub/nasm/releasebuilds/2.14.02/nasm-2.14.02.tar.bz2" -subfile_bkup="https://coreboot.org/releases/crossgcc-sources/nasm-2.14.02.tar.bz2" -subhash="71e3d44736493b1a56d4230bc2e5519e858aaadde5d89a692f1472fad6755084460e36b42852707f4c862eff75d3f2c232aedcc4e61e9d9ffcc8c9ca6498292b" diff --git a/config/submodule/coreboot/fam15h/vboot/module.cfg b/config/submodule/coreboot/fam15h/vboot/module.cfg deleted file mode 100644 index 5fac75c3..00000000 --- a/config/submodule/coreboot/fam15h/vboot/module.cfg +++ /dev/null @@ -1,3 +0,0 @@ -subrepo="https://review.coreboot.org/vboot.git" -subrepo_bkup="https://github.com/coreboot/vboot" -subhash="ecdca931ae0637d1a9498f64862939bd5bb99e0b" diff --git a/config/submodule/coreboot/fam15h/vboot/patches/0001-extract_vmlinuz.c-Fix-the-bounds-check-on-vmlinuz_he.patch b/config/submodule/coreboot/fam15h/vboot/patches/0001-extract_vmlinuz.c-Fix-the-bounds-check-on-vmlinuz_he.patch deleted file mode 100644 index 1ac41de6..00000000 --- a/config/submodule/coreboot/fam15h/vboot/patches/0001-extract_vmlinuz.c-Fix-the-bounds-check-on-vmlinuz_he.patch +++ /dev/null @@ -1,178 +0,0 @@ -From 195f61375aeec9eec16604ec59f6eda2e6058cc1 Mon Sep 17 00:00:00 2001 -From: "Luke T. Shumaker" <lukeshu@lukeshu.com> -Date: Thu, 30 May 2024 14:08:33 -0600 -Subject: [PATCH 1/1] extract_vmlinuz.c: Fix the bounds check on - vmlinuz_header_{offset,size} - -The check on vmlinuz_header_offset and vmlinuz_header_size is obviously -wrong: - - if (!vmlinuz_header_size || - kpart_data + vmlinuz_header_offset + vmlinuz_header_size > - kpart_data) { - return 1; - } - -`kpart_data + some_unsigned_values` can obviously never be `> kpart_data`, -unless something has overflowed! And `vmlinuz_header_offset` hasn't even -been set yet (besides being initialized to zero)! - -GCC will deduce that if the check didn't cause the function to bail, then -vmlinuz_header_size (a uint32_t) must be "negative"; that is: in the range -[2GiB,4GiB). - -On platforms where size_t is 32-bits, this is *especially* broken. -memcpy's size argument must be in the range [0,2GiB). Because GCC has -proved that vmlinuz_header_size is higher than that, it will fail to -compile: - - host/lib/extract_vmlinuz.c:67:9: error: 'memcpy' specified bound between 2147483648 and 4294967295 exceeds maximum object size 2147483647 [-Werror=stringop-overflow=] - -So, fix the check. - -I can now say that what I suspect the original author meant to write would -be the following patch, if `vmlinuz_header_offset` were already set: - - -kpart_data + vmlinuz_header_offset + vmlinuz_header_size > kpart_data - +now + vmlinuz_header_offset + vmlinuz_header_size > kpart_size - -This hypothesis is supported by `now` not getting incremented by -`kblob_size` the way it is for the keyblock and preamble sizes. - -However, we can also see that even this "corrected" bounds check is -insufficient: it does not detect the vmlinuz_header overflowing into -kblob_data. - -OK, so let's describe the fix: - -Have a `*vmlinuz_header` pointer instead of a -`uint64_t vmlinuz_header_offset`, to be more similar to all the other -regions. With this change, the correct check becomes a simple - - vmlinuz_header + vmlinuz_header_size > kblob_data - -While we're at it, make some changes that could have helped avoid this in -the first place: - - - Add comments. - - Calculate the vmlinuz_header offset right away, instead of waiting. - - Go ahead and increment `now` by `kblob_size`, to increase regularity. - -Change-Id: I5c03e49070b6dd2e04459566ef7dd129d27736e4 ---- - host/lib/extract_vmlinuz.c | 72 +++++++++++++++++++++++++++----------- - 1 file changed, 51 insertions(+), 21 deletions(-) - -diff --git a/host/lib/extract_vmlinuz.c b/host/lib/extract_vmlinuz.c -index 4ccfcf33..d2c09443 100644 ---- a/host/lib/extract_vmlinuz.c -+++ b/host/lib/extract_vmlinuz.c -@@ -15,16 +15,44 @@ - - int ExtractVmlinuz(void *kpart_data, size_t kpart_size, - void **vmlinuz_out, size_t *vmlinuz_size) { -+ // We're going to be extracting `vmlinuz_header` and -+ // `kblob_data`, and returning the concatenation of them. -+ // -+ // kpart_data = +-[kpart_size]------------------------------------+ -+ // | | -+ // keyblock = | +-[keyblock->keyblock_size]-------------------+ | -+ // | | struct vb2_keyblock keyblock | | -+ // | | char [] ...data... | | -+ // | +---------------------------------------------+ | -+ // | | -+ // preamble = | +-[preamble->preamble_size]-------------------+ | -+ // | | struct vb2_kernel_preamble preamble | | -+ // | | char [] ...data... | | -+ // | | char [] vmlinuz_header | | -+ // | | char [] ...data... | | -+ // | +---------------------------------------------+ | -+ // | | -+ // kblob_data= | +-[preamble->body_signature.data_size]--------+ | -+ // | | char [] ...data... | | -+ // | +---------------------------------------------+ | -+ // | | -+ // +-------------------------------------------------+ -+ - size_t now = 0; -+ // The 3 sections of kpart_data. -+ struct vb2_keyblock *keyblock = NULL; - struct vb2_kernel_preamble *preamble = NULL; - uint8_t *kblob_data = NULL; - uint32_t kblob_size = 0; -+ // vmlinuz_header -+ uint8_t *vmlinuz_header = NULL; - uint32_t vmlinuz_header_size = 0; -- uint64_t vmlinuz_header_address = 0; -- uint64_t vmlinuz_header_offset = 0; -+ // The concatenated result. - void *vmlinuz = NULL; - -- struct vb2_keyblock *keyblock = (struct vb2_keyblock *)kpart_data; -+ // Isolate the 3 sections of kpart_data. -+ -+ keyblock = (struct vb2_keyblock *)kpart_data; - now += keyblock->keyblock_size; - if (now > kpart_size) - return 1; -@@ -36,37 +64,39 @@ int ExtractVmlinuz(void *kpart_data, size_t kpart_size, - - kblob_data = kpart_data + now; - kblob_size = preamble->body_signature.data_size; -- -- if (!kblob_data || (now + kblob_size) > kpart_size) -+ now += kblob_size; -+ if (now > kpart_size) - return 1; - -+ // Find `vmlinuz_header` within `preamble`. -+ - if (preamble->header_version_minor > 0) { -- vmlinuz_header_address = preamble->vmlinuz_header_address; -+ // calculate the vmlinuz_header offset from -+ // the beginning of the kpart_data. The kblob doesn't -+ // include the body_load_offset, but does include -+ // the keyblock and preamble sections. -+ size_t vmlinuz_header_offset = -+ preamble->vmlinuz_header_address - -+ preamble->body_load_address + -+ keyblock->keyblock_size + -+ preamble->preamble_size; -+ -+ vmlinuz_header = kpart_data + vmlinuz_header_offset; - vmlinuz_header_size = preamble->vmlinuz_header_size; - } - -- if (!vmlinuz_header_size || -- kpart_data + vmlinuz_header_offset + vmlinuz_header_size > -- kpart_data) { -+ if (!vmlinuz_header || -+ !vmlinuz_header_size || -+ vmlinuz_header + vmlinuz_header_size > kblob_data) { - return 1; - } - -- // calculate the vmlinuz_header offset from -- // the beginning of the kpart_data. The kblob doesn't -- // include the body_load_offset, but does include -- // the keyblock and preamble sections. -- vmlinuz_header_offset = vmlinuz_header_address - -- preamble->body_load_address + -- keyblock->keyblock_size + -- preamble->preamble_size; -+ // Concatenate and return. - - vmlinuz = malloc(vmlinuz_header_size + kblob_size); - if (vmlinuz == NULL) - return 1; -- -- memcpy(vmlinuz, kpart_data + vmlinuz_header_offset, -- vmlinuz_header_size); -- -+ memcpy(vmlinuz, vmlinuz_header, vmlinuz_header_size); - memcpy(vmlinuz + vmlinuz_header_size, kblob_data, kblob_size); - - *vmlinuz_out = vmlinuz; --- -2.45.1 - diff --git a/config/submodule/coreboot/fam15h/acpica-unix2-20190703.tar.gz/module.cfg b/config/submodule/coreboot/fam15h_15h/acpica-unix2-20190703.tar.gz/module.cfg index e839b77e..b8365f7c 100644 --- a/config/submodule/coreboot/fam15h/acpica-unix2-20190703.tar.gz/module.cfg +++ b/config/submodule/coreboot/fam15h_15h/acpica-unix2-20190703.tar.gz/module.cfg @@ -1,3 +1,5 @@ -subfile="https://www.mirrorservice.org/sites/libreboot.org/release/misc/acpica/acpica-unix2-20190703.tar.gz" -subfile_bkup="https://mirror.math.princeton.edu/pub/libreboot/misc/acpica/acpica-unix2-20190703.tar.gz" +# SPDX-License-Identifier: GPL-3.0-or-later + +subcurl="https://www.mirrorservice.org/sites/libreboot.org/release/misc/acpica/acpica-unix2-20190703.tar.gz" +subcurl_bkup="https://mirror.math.princeton.edu/pub/libreboot/misc/acpica/acpica-unix2-20190703.tar.gz" subhash="8445a6d354ce3bcbfb5159f4ec0312b1e910c0b1b2033a2300f892e4ac580abab4e3f5b4ded379f0036299359d307330511ab7053678cfd9031d7df4c365f555" diff --git a/config/submodule/coreboot/fam15h/binutils-2.32.tar.xz/module.cfg b/config/submodule/coreboot/fam15h_15h/binutils-2.32.tar.xz/module.cfg index b549e139..3f03f64e 100644 --- a/config/submodule/coreboot/fam15h/binutils-2.32.tar.xz/module.cfg +++ b/config/submodule/coreboot/fam15h_15h/binutils-2.32.tar.xz/module.cfg @@ -1,3 +1,5 @@ -subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/binutils/binutils-2.32.tar.xz" -subfile_bkup="https://ftp.nluug.nl/pub/gnu/binutils/binutils-2.32.tar.xz" +# SPDX-License-Identifier: GPL-3.0-or-later + +subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/binutils/binutils-2.32.tar.xz" +subcurl_bkup="https://ftp.nluug.nl/pub/gnu/binutils/binutils-2.32.tar.xz" subhash="d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a" diff --git a/config/submodule/coreboot/fam15h_15h/blobs/module.cfg b/config/submodule/coreboot/fam15h_15h/blobs/module.cfg new file mode 100644 index 00000000..3c34302c --- /dev/null +++ b/config/submodule/coreboot/fam15h_15h/blobs/module.cfg @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-3.0-or-later + +subgit="https://review.coreboot.org/blobs.git" +subgit_bkup="https://github.com/coreboot/blobs" +subhash="034b27818450428f70aa9316c8bd0d65bacd8ee8" diff --git a/config/submodule/coreboot/fam15h/gcc-8.3.0.tar.xz/module.cfg b/config/submodule/coreboot/fam15h_15h/gcc-8.3.0.tar.xz/module.cfg index 6ce00577..ce21c98b 100644 --- a/config/submodule/coreboot/fam15h/gcc-8.3.0.tar.xz/module.cfg +++ b/config/submodule/coreboot/fam15h_15h/gcc-8.3.0.tar.xz/module.cfg @@ -1,3 +1,5 @@ -subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gcc/gcc-8.3.0/gcc-8.3.0.tar.xz" -subfile_bkup="https://ftp.nluug.nl/pub/gnu/gcc/gcc-8.3.0/gcc-8.3.0.tar.xz" +# SPDX-License-Identifier: GPL-3.0-or-later + +subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gcc/gcc-8.3.0/gcc-8.3.0.tar.xz" +subcurl_bkup="https://ftp.nluug.nl/pub/gnu/gcc/gcc-8.3.0/gcc-8.3.0.tar.xz" subhash="1811337ae3add9680cec64968a2509d085b6dc5b6783fc1e8c295e3e47416196fd1a3ad8dfe7e10be2276b4f62c357659ce2902f239f60a8648548231b4b5802" diff --git a/config/submodule/coreboot/fam15h_15h/gmp-6.1.2.tar.xz/module.cfg b/config/submodule/coreboot/fam15h_15h/gmp-6.1.2.tar.xz/module.cfg new file mode 100644 index 00000000..a46b9b7c --- /dev/null +++ b/config/submodule/coreboot/fam15h_15h/gmp-6.1.2.tar.xz/module.cfg @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-3.0-or-later + +subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.xz" +subcurl_bkup="https://ftp.nluug.nl/pub/gnu/gmp/gmp-6.1.2.tar.xz" +subhash="9f098281c0593b76ee174b722936952671fab1dae353ce3ed436a31fe2bc9d542eca752353f6645b7077c1f395ab4fdd355c58e08e2a801368f1375690eee2c6" diff --git a/config/submodule/coreboot/fam15h/module.list b/config/submodule/coreboot/fam15h_15h/module.list index 64f09aea..00befad9 100644 --- a/config/submodule/coreboot/fam15h/module.list +++ b/config/submodule/coreboot/fam15h_15h/module.list @@ -6,4 +6,4 @@ util/crossgcc/tarballs/gcc-8.3.0.tar.xz util/crossgcc/tarballs/gmp-6.1.2.tar.xz util/crossgcc/tarballs/mpc-1.1.0.tar.gz util/crossgcc/tarballs/mpfr-4.0.2.tar.xz -util/crossgcc/tarballs/nasm-2.14.02.tar.bz2 +util/crossgcc/tarballs/nasm-2.16.03.tar.bz2 diff --git a/config/submodule/coreboot/fam15h_15h/mpc-1.1.0.tar.gz/module.cfg b/config/submodule/coreboot/fam15h_15h/mpc-1.1.0.tar.gz/module.cfg new file mode 100644 index 00000000..13a66a87 --- /dev/null +++ b/config/submodule/coreboot/fam15h_15h/mpc-1.1.0.tar.gz/module.cfg @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-3.0-or-later + +subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz" +subcurl_bkup="https://ftp.nluug.nl/pub/gnu/mpc/mpc-1.1.0.tar.gz" +subhash="72d657958b07c7812dc9c7cbae093118ce0e454c68a585bfb0e2fa559f1bf7c5f49b93906f580ab3f1073e5b595d23c6494d4d76b765d16dde857a18dd239628" diff --git a/config/submodule/coreboot/fam15h_15h/mpfr-4.0.2.tar.xz/module.cfg b/config/submodule/coreboot/fam15h_15h/mpfr-4.0.2.tar.xz/module.cfg new file mode 100644 index 00000000..f2a4f0fe --- /dev/null +++ b/config/submodule/coreboot/fam15h_15h/mpfr-4.0.2.tar.xz/module.cfg @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-3.0-or-later + +subcurl="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpfr/mpfr-4.0.2.tar.xz" +subcurl_bkup="https://ftp.nluug.nl/pub/gnu/mpfr/mpfr-4.0.2.tar.xz" +subhash="d583555d08863bf36c89b289ae26bae353d9a31f08ee3894520992d2c26e5683c4c9c193d7ad139632f71c0a476d85ea76182702a98bf08dde7b6f65a54f8b88" diff --git a/config/submodule/coreboot/next/nasm-2.16.03.tar.bz2/module.cfg b/config/submodule/coreboot/fam15h_15h/nasm-2.16.03.tar.bz2/module.cfg index c98cc71f..bc486e80 100644 --- a/config/submodule/coreboot/next/nasm-2.16.03.tar.bz2/module.cfg +++ b/config/submodule/coreboot/fam15h_15h/nasm-2.16.03.tar.bz2/module.cfg @@ -1,3 +1,5 @@ -subfile="https://www.nasm.us/pub/nasm/releasebuilds/2.16.03/nasm-2.16.03.tar.bz2" -subfile_bkup="https://www.mirrorservice.org/sites/distfiles.macports.org/nasm/nasm-2.16.03.tar.bz2" +# SPDX-License-Identifier: GPL-3.0-or-later + +subcurl="https://www.nasm.us/pub/nasm/releasebuilds/2.16.03/nasm-2.16.03.tar.bz2" +subcurl_bkup="https://www.mirrorservice.org/sites/distfiles.macports.org/nasm/nasm-2.16.03.tar.bz2" subhash="f28445d368debdf44219cc57df33800a8c0e49186cd60836d4adfec7700d53b801d34aa9fc9bfda74169843f33a1e8b465e11292582eb968bb9c3a26f54dd172" diff --git a/config/submodule/coreboot/fam15h_15h/vboot/module.cfg b/config/submodule/coreboot/fam15h_15h/vboot/module.cfg new file mode 100644 index 00000000..a3a8f21b --- /dev/null +++ b/config/submodule/coreboot/fam15h_15h/vboot/module.cfg @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-3.0-or-later + +subgit="https://review.coreboot.org/vboot.git" +subgit_bkup="https://github.com/coreboot/vboot" +subhash="ecdca931ae0637d1a9498f64862939bd5bb99e0b" diff --git a/config/submodule/coreboot/coreboot413/vboot/patches/0001-extract_vmlinuz.c-Fix-the-bounds-check-on-vmlinuz_he.patch b/config/submodule/coreboot/fam15h_15h/vboot/patches/0001-extract_vmlinuz.c-Fix-the-bounds-check-on-vmlinuz_he.patch index 1ac41de6..1ac41de6 100644 --- a/config/submodule/coreboot/coreboot413/vboot/patches/0001-extract_vmlinuz.c-Fix-the-bounds-check-on-vmlinuz_he.patch +++ b/config/submodule/coreboot/fam15h_15h/vboot/patches/0001-extract_vmlinuz.c-Fix-the-bounds-check-on-vmlinuz_he.patch diff --git a/config/submodule/coreboot/fam15h_15h/vboot/patches/0002-disable-Werror.patch b/config/submodule/coreboot/fam15h_15h/vboot/patches/0002-disable-Werror.patch new file mode 100644 index 00000000..409e9677 --- /dev/null +++ b/config/submodule/coreboot/fam15h_15h/vboot/patches/0002-disable-Werror.patch @@ -0,0 +1,28 @@ +From 539304c3c87d8415e848b6791e08ccd440be9984 Mon Sep 17 00:00:00 2001 +From: Leah Rowe <leah@libreboot.org> +Date: Mon, 21 Sep 2026 11:13:25 +0100 +Subject: [PATCH 1/1] disable Werror + +Signed-off-by: Leah Rowe <leah@libreboot.org> +--- + Makefile | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 0539e8d7..f3f6b2b9 100644 +--- a/Makefile ++++ b/Makefile +@@ -136,9 +136,8 @@ endif + # + # Flag ordering: arch, then -f, then -m, then -W + DEBUG_FLAGS := $(if ${DEBUG},-g -O0,-g -Os) +-WERROR := -Werror + FIRMWARE_FLAGS := -nostdinc -ffreestanding -fno-builtin -fno-stack-protector +-COMMON_FLAGS := -pipe ${WERROR} -Wall -Wstrict-prototypes -Wtype-limits \ ++COMMON_FLAGS := -pipe -Wall -Wstrict-prototypes -Wtype-limits \ + -Wundef -Wmissing-prototypes -Wno-trigraphs -Wredundant-decls -Wshadow \ + -Wwrite-strings -Wstrict-aliasing -Wdate-time -Wno-unknown-warning \ + -Wno-address-of-packed-member -ffunction-sections -fdata-sections \ +-- +2.47.3 + diff --git a/config/submodule/coreboot/next/acpica-unix-20230628.tar.gz/module.cfg b/config/submodule/coreboot/next/acpica-unix-20230628.tar.gz/module.cfg deleted file mode 100644 index 6dde459a..00000000 --- a/config/submodule/coreboot/next/acpica-unix-20230628.tar.gz/module.cfg +++ /dev/null @@ -1,3 +0,0 @@ -subfile="https://www.mirrorservice.org/sites/libreboot.org/release/misc/acpica/acpica-unix-20230628.tar.gz" -subfile_bkup="https://mirror.math.princeton.edu/pub/libreboot/misc/acpica/acpica-unix-20230628.tar.gz" -subhash="d726e69ebd8b8110690e3aff8d1919b43b0a2185efdeb9131ea8d89d321ca3a318a89c721ea740ae366f31ed3d1c11c2906f8807ee8a190e6f67fe5b2023cea4" diff --git a/config/submodule/coreboot/next/binutils-2.43.1.tar.xz/module.cfg b/config/submodule/coreboot/next/binutils-2.43.1.tar.xz/module.cfg deleted file mode 100644 index f3e372a4..00000000 --- a/config/submodule/coreboot/next/binutils-2.43.1.tar.xz/module.cfg +++ /dev/null @@ -1,3 +0,0 @@ -subfile="https://ftp.nluug.nl/pub/gnu/binutils/binutils-2.43.1.tar.xz" -subfile_bkup="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/binutils/binutils-2.43.1.tar.xz" -subhash="20977ad17729141a2c26d358628f44a0944b84dcfefdec2ba029c2d02f40dfc41cc91c0631044560d2bd6f9a51e1f15846b4b311befbe14f1239f14ff7d57824" diff --git a/config/submodule/coreboot/next/fsp/module.cfg b/config/submodule/coreboot/next/fsp/module.cfg deleted file mode 100644 index 2807b268..00000000 --- a/config/submodule/coreboot/next/fsp/module.cfg +++ /dev/null @@ -1,3 +0,0 @@ -subrepo="https://review.coreboot.org/fsp.git" -subrepo_bkup="https://github.com/coreboot/fsp" -subhash="d7931859bfb1f7949bb455d53b9494dd731e9642" diff --git a/config/submodule/coreboot/next/gcc-14.2.0.tar.xz/module.cfg b/config/submodule/coreboot/next/gcc-14.2.0.tar.xz/module.cfg deleted file mode 100644 index 9a4892f5..00000000 --- a/config/submodule/coreboot/next/gcc-14.2.0.tar.xz/module.cfg +++ /dev/null @@ -1,3 +0,0 @@ -subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz" -subfile_bkup="https://ftp.nluug.nl/pub/gnu/gcc/gcc-14.2.0/gcc-14.2.0.tar.xz" -subhash="932bdef0cda94bacedf452ab17f103c0cb511ff2cec55e9112fc0328cbf1d803b42595728ea7b200e0a057c03e85626f937012e49a7515bc5dd256b2bf4bc396" diff --git a/config/submodule/coreboot/next/gmp-6.3.0.tar.xz/module.cfg b/config/submodule/coreboot/next/gmp-6.3.0.tar.xz/module.cfg deleted file mode 100644 index fe274faf..00000000 --- a/config/submodule/coreboot/next/gmp-6.3.0.tar.xz/module.cfg +++ /dev/null @@ -1,3 +0,0 @@ -subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gmp/gmp-6.3.0.tar.xz" -subfile_bkup="https://ftp.nluug.nl/pub/gnu/gmp/gmp-6.3.0.tar.xz" -subhash="e85a0dab5195889948a3462189f0e0598d331d3457612e2d3350799dba2e244316d256f8161df5219538eb003e4b5343f989aaa00f96321559063ed8c8f29fd2" diff --git a/config/submodule/coreboot/next/intel-microcode/module.cfg b/config/submodule/coreboot/next/intel-microcode/module.cfg deleted file mode 100644 index 0c66e086..00000000 --- a/config/submodule/coreboot/next/intel-microcode/module.cfg +++ /dev/null @@ -1,3 +0,0 @@ -subrepo="https://review.coreboot.org/intel-microcode.git" -subrepo_bkup="https://github.com/coreboot/intel-microcode" -subhash="8ac9378a84879e81c503e09f344560b3dd7f72df" diff --git a/config/submodule/coreboot/next/libgfxinit/module.cfg b/config/submodule/coreboot/next/libgfxinit/module.cfg deleted file mode 100644 index 1ba41724..00000000 --- a/config/submodule/coreboot/next/libgfxinit/module.cfg +++ /dev/null @@ -1,3 +0,0 @@ -subrepo="https://review.coreboot.org/libgfxinit.git" -subrepo_bkup="https://github.com/coreboot/libgfxinit" -subhash="17cfc92f402493979783585b6581efbd98c0cf07" diff --git a/config/submodule/coreboot/next/libhwbase/module.cfg b/config/submodule/coreboot/next/libhwbase/module.cfg deleted file mode 100644 index 2937b8b7..00000000 --- a/config/submodule/coreboot/next/libhwbase/module.cfg +++ /dev/null @@ -1,3 +0,0 @@ -subrepo="https://review.coreboot.org/libhwbase.git" -subrepo_bkup="https://github.com/coreboot/libhwbase" -subhash="584629b9f4771b7618951cec57df2ca3af9c6981" diff --git a/config/submodule/coreboot/next/module.list b/config/submodule/coreboot/next/module.list deleted file mode 100644 index 1cc88fd6..00000000 --- a/config/submodule/coreboot/next/module.list +++ /dev/null @@ -1,12 +0,0 @@ -3rdparty/fsp -3rdparty/intel-microcode -3rdparty/libgfxinit -3rdparty/libhwbase -3rdparty/vboot -util/crossgcc/tarballs/binutils-2.43.1.tar.xz -util/crossgcc/tarballs/gcc-14.2.0.tar.xz -util/crossgcc/tarballs/gmp-6.3.0.tar.xz -util/crossgcc/tarballs/mpc-1.3.1.tar.gz -util/crossgcc/tarballs/mpfr-4.2.1.tar.xz -util/crossgcc/tarballs/nasm-2.16.03.tar.bz2 -util/crossgcc/tarballs/acpica-unix-20230628.tar.gz diff --git a/config/submodule/coreboot/next/mpc-1.3.1.tar.gz/module.cfg b/config/submodule/coreboot/next/mpc-1.3.1.tar.gz/module.cfg deleted file mode 100644 index f98b6444..00000000 --- a/config/submodule/coreboot/next/mpc-1.3.1.tar.gz/module.cfg +++ /dev/null @@ -1,3 +0,0 @@ -subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpc/mpc-1.3.1.tar.gz" -subfile_bkup="https://ftp.nluug.nl/pub/gnu/mpc/mpc-1.3.1.tar.gz" -subhash="4bab4ef6076f8c5dfdc99d810b51108ced61ea2942ba0c1c932d624360a5473df20d32b300fc76f2ba4aa2a97e1f275c9fd494a1ba9f07c4cb2ad7ceaeb1ae97" diff --git a/config/submodule/coreboot/next/mpfr-4.2.1.tar.xz/module.cfg b/config/submodule/coreboot/next/mpfr-4.2.1.tar.xz/module.cfg deleted file mode 100644 index 3419bc30..00000000 --- a/config/submodule/coreboot/next/mpfr-4.2.1.tar.xz/module.cfg +++ /dev/null @@ -1,3 +0,0 @@ -subfile="https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/mpfr/mpfr-4.2.1.tar.xz" -subfile_bkup="https://ftp.nluug.nl/pub/gnu/mpfr/mpfr-4.2.1.tar.xz" -subhash="bc68c0d755d5446403644833ecbb07e37360beca45f474297b5d5c40926df1efc3e2067eecffdf253f946288bcca39ca89b0613f545d46a9e767d1d4cf358475" diff --git a/config/submodule/coreboot/next/vboot/module.cfg b/config/submodule/coreboot/next/vboot/module.cfg deleted file mode 100644 index 917d23fa..00000000 --- a/config/submodule/coreboot/next/vboot/module.cfg +++ /dev/null @@ -1,3 +0,0 @@ -subrepo="https://review.coreboot.org/vboot.git" -subrepo_bkup="https://github.com/coreboot/vboot" -subhash="f1f70f46dc5482bb7c654e53ed58d4001e386df2" diff --git a/config/submodule/coreboot/next/vboot/patches/0001-extract_vmlinuz.c-Fix-the-bounds-check-on-vmlinuz_he.patch b/config/submodule/coreboot/next/vboot/patches/0001-extract_vmlinuz.c-Fix-the-bounds-check-on-vmlinuz_he.patch deleted file mode 100644 index 1ac41de6..00000000 --- a/config/submodule/coreboot/next/vboot/patches/0001-extract_vmlinuz.c-Fix-the-bounds-check-on-vmlinuz_he.patch +++ /dev/null @@ -1,178 +0,0 @@ -From 195f61375aeec9eec16604ec59f6eda2e6058cc1 Mon Sep 17 00:00:00 2001 -From: "Luke T. Shumaker" <lukeshu@lukeshu.com> -Date: Thu, 30 May 2024 14:08:33 -0600 -Subject: [PATCH 1/1] extract_vmlinuz.c: Fix the bounds check on - vmlinuz_header_{offset,size} - -The check on vmlinuz_header_offset and vmlinuz_header_size is obviously -wrong: - - if (!vmlinuz_header_size || - kpart_data + vmlinuz_header_offset + vmlinuz_header_size > - kpart_data) { - return 1; - } - -`kpart_data + some_unsigned_values` can obviously never be `> kpart_data`, -unless something has overflowed! And `vmlinuz_header_offset` hasn't even -been set yet (besides being initialized to zero)! - -GCC will deduce that if the check didn't cause the function to bail, then -vmlinuz_header_size (a uint32_t) must be "negative"; that is: in the range -[2GiB,4GiB). - -On platforms where size_t is 32-bits, this is *especially* broken. -memcpy's size argument must be in the range [0,2GiB). Because GCC has -proved that vmlinuz_header_size is higher than that, it will fail to -compile: - - host/lib/extract_vmlinuz.c:67:9: error: 'memcpy' specified bound between 2147483648 and 4294967295 exceeds maximum object size 2147483647 [-Werror=stringop-overflow=] - -So, fix the check. - -I can now say that what I suspect the original author meant to write would -be the following patch, if `vmlinuz_header_offset` were already set: - - -kpart_data + vmlinuz_header_offset + vmlinuz_header_size > kpart_data - +now + vmlinuz_header_offset + vmlinuz_header_size > kpart_size - -This hypothesis is supported by `now` not getting incremented by -`kblob_size` the way it is for the keyblock and preamble sizes. - -However, we can also see that even this "corrected" bounds check is -insufficient: it does not detect the vmlinuz_header overflowing into -kblob_data. - -OK, so let's describe the fix: - -Have a `*vmlinuz_header` pointer instead of a -`uint64_t vmlinuz_header_offset`, to be more similar to all the other -regions. With this change, the correct check becomes a simple - - vmlinuz_header + vmlinuz_header_size > kblob_data - -While we're at it, make some changes that could have helped avoid this in -the first place: - - - Add comments. - - Calculate the vmlinuz_header offset right away, instead of waiting. - - Go ahead and increment `now` by `kblob_size`, to increase regularity. - -Change-Id: I5c03e49070b6dd2e04459566ef7dd129d27736e4 ---- - host/lib/extract_vmlinuz.c | 72 +++++++++++++++++++++++++++----------- - 1 file changed, 51 insertions(+), 21 deletions(-) - -diff --git a/host/lib/extract_vmlinuz.c b/host/lib/extract_vmlinuz.c -index 4ccfcf33..d2c09443 100644 ---- a/host/lib/extract_vmlinuz.c -+++ b/host/lib/extract_vmlinuz.c -@@ -15,16 +15,44 @@ - - int ExtractVmlinuz(void *kpart_data, size_t kpart_size, - void **vmlinuz_out, size_t *vmlinuz_size) { -+ // We're going to be extracting `vmlinuz_header` and -+ // `kblob_data`, and returning the concatenation of them. -+ // -+ // kpart_data = +-[kpart_size]------------------------------------+ -+ // | | -+ // keyblock = | +-[keyblock->keyblock_size]-------------------+ | -+ // | | struct vb2_keyblock keyblock | | -+ // | | char [] ...data... | | -+ // | +---------------------------------------------+ | -+ // | | -+ // preamble = | +-[preamble->preamble_size]-------------------+ | -+ // | | struct vb2_kernel_preamble preamble | | -+ // | | char [] ...data... | | -+ // | | char [] vmlinuz_header | | -+ // | | char [] ...data... | | -+ // | +---------------------------------------------+ | -+ // | | -+ // kblob_data= | +-[preamble->body_signature.data_size]--------+ | -+ // | | char [] ...data... | | -+ // | +---------------------------------------------+ | -+ // | | -+ // +-------------------------------------------------+ -+ - size_t now = 0; -+ // The 3 sections of kpart_data. -+ struct vb2_keyblock *keyblock = NULL; - struct vb2_kernel_preamble *preamble = NULL; - uint8_t *kblob_data = NULL; - uint32_t kblob_size = 0; -+ // vmlinuz_header -+ uint8_t *vmlinuz_header = NULL; - uint32_t vmlinuz_header_size = 0; -- uint64_t vmlinuz_header_address = 0; -- uint64_t vmlinuz_header_offset = 0; -+ // The concatenated result. - void *vmlinuz = NULL; - -- struct vb2_keyblock *keyblock = (struct vb2_keyblock *)kpart_data; -+ // Isolate the 3 sections of kpart_data. -+ -+ keyblock = (struct vb2_keyblock *)kpart_data; - now += keyblock->keyblock_size; - if (now > kpart_size) - return 1; -@@ -36,37 +64,39 @@ int ExtractVmlinuz(void *kpart_data, size_t kpart_size, - - kblob_data = kpart_data + now; - kblob_size = preamble->body_signature.data_size; -- -- if (!kblob_data || (now + kblob_size) > kpart_size) -+ now += kblob_size; -+ if (now > kpart_size) - return 1; - -+ // Find `vmlinuz_header` within `preamble`. -+ - if (preamble->header_version_minor > 0) { -- vmlinuz_header_address = preamble->vmlinuz_header_address; -+ // calculate the vmlinuz_header offset from -+ // the beginning of the kpart_data. The kblob doesn't -+ // include the body_load_offset, but does include -+ // the keyblock and preamble sections. -+ size_t vmlinuz_header_offset = -+ preamble->vmlinuz_header_address - -+ preamble->body_load_address + -+ keyblock->keyblock_size + -+ preamble->preamble_size; -+ -+ vmlinuz_header = kpart_data + vmlinuz_header_offset; - vmlinuz_header_size = preamble->vmlinuz_header_size; - } - -- if (!vmlinuz_header_size || -- kpart_data + vmlinuz_header_offset + vmlinuz_header_size > -- kpart_data) { -+ if (!vmlinuz_header || -+ !vmlinuz_header_size || -+ vmlinuz_header + vmlinuz_header_size > kblob_data) { - return 1; - } - -- // calculate the vmlinuz_header offset from -- // the beginning of the kpart_data. The kblob doesn't -- // include the body_load_offset, but does include -- // the keyblock and preamble sections. -- vmlinuz_header_offset = vmlinuz_header_address - -- preamble->body_load_address + -- keyblock->keyblock_size + -- preamble->preamble_size; -+ // Concatenate and return. - - vmlinuz = malloc(vmlinuz_header_size + kblob_size); - if (vmlinuz == NULL) - return 1; -- -- memcpy(vmlinuz, kpart_data + vmlinuz_header_offset, -- vmlinuz_header_size); -- -+ memcpy(vmlinuz, vmlinuz_header, vmlinuz_header_size); - memcpy(vmlinuz + vmlinuz_header_size, kblob_data, kblob_size); - - *vmlinuz_out = vmlinuz; --- -2.45.1 - |
