mirror of
https://git.savannah.gnu.org/git/gnuboot.git
synced 2025-01-06 16:27:40 +01:00
Adrien 'neox' Bourmault
b7e7b5a257
A bug has been introduced in
a202dce646
("images: remove 'libgfxinit' from the image names.")
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:
Creating new ROM image: bin/[...]/seabios_kgpe-d16-[...].rom
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).
GNUtoo confirmed by bisecting that the commit cited above was indeed responsible
of the bug and also that the error message above was specific to this issue.
This commit fixes this bug by setting variables to hold the actual payload
location (making future changes easier), in the relevant files.
Tested-by: Adrien 'neox' Bourmault <neox@gnu.org>
Signed-off-by: Adrien 'neox' Bourmault <neox@gnu.org>
GNUtoo: Added "Created new ROM image" log, made it fit,
improved source code comment.
Acked-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
65 lines
2 KiB
Bash
Executable file
65 lines
2 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
|
|
# helper script: builds SeaBIOS source code
|
|
#
|
|
# Copyright (C) 2020, 2021 Leah Rowe <info@minifree.org>
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
#
|
|
|
|
[ "x${DEBUG+set}" = 'xset' ] && set -v
|
|
set -u -e
|
|
|
|
# Build SeaBIOS
|
|
# ---------------------------------------------------------------------
|
|
|
|
# seabios.elf and seavgabios.bin are reused by
|
|
# resources/packages/roms_helper/boot, and their path is also
|
|
# hardcoded, in the same way, in the same variable names, so if you
|
|
# modify the variables below also keep
|
|
# resources/packages/roms_helper/boot in sync.
|
|
seabiosrom="../payload/seabios/seabios.elf"
|
|
seavgabiosrom="../payload/seabios/seavgabios.bin"
|
|
|
|
printf "Building SeaBIOS payloads and SeaVGABIOS\n"
|
|
|
|
[ ! -d "payload/" ] && mkdir -p payload/
|
|
[ ! -d "payload/seabios" ] && mkdir -p payload/seabios/
|
|
|
|
rm -f payload/seabios/*
|
|
|
|
if [ ! -d "seabios/" ]; then
|
|
./download seabios
|
|
fi
|
|
|
|
cd seabios/
|
|
|
|
# for libgfxinit setup:
|
|
[[ -f Makefile ]] && make distclean
|
|
cp ../resources/seabios/config/libgfxinit .config
|
|
make silentoldconfig -j$(nproc)
|
|
make -j$(nproc)
|
|
mv out/bios.bin.elf ${seabiosrom}
|
|
mv out/vgabios.bin ${seavgabiosrom}
|
|
rm .config
|
|
|
|
# clean it again. gotta keep it clean!
|
|
[[ -f Makefile ]] && make distclean
|
|
|
|
printf "Done! SeaBIOS files are in payload/seabios/\n\n"
|
|
|
|
# done. go back to main directory
|
|
cd ../
|
|
|
|
# ------------------- DONE ----------------------
|