[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] packages: seabios: fix payload not being added to the GNU Boot i
From: |
Adrien 'neox' Bourmault |
Subject: |
[PATCH] packages: seabios: fix payload not being added to the GNU Boot image |
Date: |
Thu, 28 Nov 2024 20:16:13 +0100 |
A bug has been introduced in a202dce646307f7b0da71da4715f63981a79e9c8 where
we simplified images names without taking care of renaming the filename used as
the SeaBIOS build target.
This error was visible during the generation of the images:
payload/seabios/seabios.elf: No such file or directory
E: Could not load file 'payload/seabios/seabios.elf'.
E: Failed while operating on 'COREBOOT' region!
E: The image will be left unmodified.
The resulting image was then missing a payload entry and was then
non-functional (people would then just get a black screen without any OS loaded
from the disk).
This commit fixes this bug by setting variables to hold the actual payload
location (making future changes easier), in the relevant files. Also, this
commit removes the generation of the unused seabios_vgarom.elf image.
Signed-off-by: Adrien 'neox' Bourmault <neox@gnu.org>
---
resources/packages/roms_helper/boot | 10 +++++-----
resources/packages/seabios/payload | 16 ++++++----------
2 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/resources/packages/roms_helper/boot
b/resources/packages/roms_helper/boot
index 07121d8..35d55f4 100755
--- a/resources/packages/roms_helper/boot
+++ b/resources/packages/roms_helper/boot
@@ -135,6 +135,7 @@ fi
cbfstool="${cbdir}/util/cbfstool/cbfstool"
corebootrom="${cbdir}/build/coreboot.rom"
seavgabiosrom="payload/seabios/seavgabios.bin"
+seabiosrom="payload/seabios/seabios.elf"
if [ ! -d "${cbdir}" ]; then
./download coreboot ${cbtree}
@@ -164,8 +165,7 @@ if [ ! -f "${cbfstool}" ]; then
fi
if [ ! -f "${seavgabiosrom}" ] \
- || [ ! -f payload/seabios/seabios_libgfxinit.elf ] \
- || [ ! -f payload/seabios/seabios_vgarom.elf ]; then
+ || [ ! -f ${seabiosrom} ]; then
if [ "${payload_seabios}" = "y" ]; then
./build payload seabios
elif [ "${payload_grub}" = "y" ] \
@@ -266,7 +266,7 @@ mkCoreboot() {
printf "%s-%s\n" "$(cat projectname)" "$(cat version)" >
"${cbdir}/.coreboot-version"
(
cd "${cbdir}"
- make distclean
+ make distclean
)
cp "${cbcfgpath}" "${cbdir}"/.config
(
@@ -285,8 +285,8 @@ make_seabios_rom() {
# etc/pci-optionrom-exec will be set to 2
# etc/pci-optionrom-exec will be set to 0
- target_seabioself="payload/seabios/seabios.elf"
- target_seavgabios_rom="payload/seabios/seavgabios.bin"
+ target_seabioself="${seabiosrom}"
+ target_seavgabios_rom="${seavgabiosrom}"
tmprom=$(mktemp -t coreboot_rom.XXXXXXXXXX)
diff --git a/resources/packages/seabios/payload
b/resources/packages/seabios/payload
index 9120bff..35f54ff 100755
--- a/resources/packages/seabios/payload
+++ b/resources/packages/seabios/payload
@@ -24,6 +24,10 @@ set -u -e
# Build SeaBIOS
# ---------------------------------------------------------------------
+# This is where SeaBIOS binaries are expected to be built
+seabiosrom="../payload/seabios/seabios.elf"
+seavgabiosrom="../payload/seabios/seavgabios.bin"
+
printf "Building SeaBIOS payloads and SeaVGABIOS\n"
[ ! -d "payload/" ] && mkdir -p payload/
@@ -42,16 +46,8 @@ cd seabios/
cp ../resources/seabios/config/libgfxinit .config
make silentoldconfig -j$(nproc)
make -j$(nproc)
-mv out/bios.bin.elf ../payload/seabios/seabios_libgfxinit.elf
-mv out/vgabios.bin ../payload/seabios/seavgabios.bin
-rm .config
-
-# for vgarom setup:
-[[ -f Makefile ]] && make distclean
-cp ../resources/seabios/config/vgarom .config
-make silentoldconfig -j$(nproc)
-make -j$(nproc)
-mv out/bios.bin.elf ../payload/seabios/seabios_vgarom.elf
+mv out/bios.bin.elf ${seabiosrom}
+mv out/vgabios.bin ${seavgabiosrom}
rm .config
# clean it again. gotta keep it clean!
--
2.46.0
- [PATCH] packages: seabios: fix payload not being added to the GNU Boot image,
Adrien 'neox' Bourmault <=