rom.sh: new file, to replace script/roms
stub it from the trees script. the way it works now,
there is less code in the build system.
./build roms
this is no longer a thing
./build roms serprog
this is also no longer a thing. instead, do:
./update trees -b coreboot targetnamehere
./update trees -b pico-serprog
./update trees -b stm32-vserprog
the old commands still works, which causes the new
commands to run
coreboot roms now appear in elf/, not bin/, as before,
but those images now contain payloads.
NOTE: to contradict the above: ./build roms is no
longer a thing, in that it's now deprecated, but
backward compatibility is present for now. it will
be removed in a future release.
./build roms list also still works! it will do:
./update trees -b coreboot list
also:
./update trees -b grub list
this is now possible too
if a target "list" is provided, for multi-tree sources,
the targets are shown.
there is another difference: seagrub roms are now seagrub_,
instead of seabios_withgrub.
seabios-only roms are no longer provided, where grub is also
enabled; only seagrub is used. the user can easily remove
the bootorder file, if they want seabios to not try grub first.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-07-06 22:36:13 +00:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
# Copyright (c) 2014-2016,2020-2021,2023-2024 Leah Rowe <leah@libreboot.org>
|
|
|
|
# Copyright (c) 2021-2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
|
|
|
|
# Copyright (c) 2022 Caleb La Grange <thonkpeasant@protonmail.com>
|
|
|
|
# Copyright (c) 2022-2023 Alper Nebi Yasak <alpernebiyasak@gmail.com>
|
|
|
|
# Copyright (c) 2023 Riku Viitanen <riku.viitanen@protonmail.com>
|
|
|
|
|
|
|
|
mkserprog()
|
|
|
|
{
|
trees: support -d (dry run) for custom build logic
-d does the same as -b, except for actually building
anything! in effect, it does the same as -f (fetch)
except that the resulting variable assignments will
not be recursive (as with -f).
if -d is passed, configuration is still loaded, defconfig
files are still cycled through, and more importantly:
helper functions are still processed.
the grub, serprog and coreboot helper functions have
been modified to return early (zero status) if -d is
passed.
example usage:
./update trees -d coreboot x230_12mb
this would download the files, NOT build coreboot, and
NOT build the payloads.
there is one additional benefit to doing it this way:
the utils command has been removed, e.g.
./update trees -b coreboot utils default
the equivalent is now:
./update trees -d coreboot default
the overall effect of this change is that the trees script
no longer contains any project-specific logic, except for
the crossgcc build logic.
it does include some config/data mkhelper files at the top,
for serprog and coreboot, so that those variables defined in
those files can be global, but another solution to mitigate
that will also be implemented in a future commit.
the purpose of this and other revisions (in the final push
to complete lbmk audit 6 / cbmk audit 2) is to generalise as
much logic as possible, removing various ugly hacks.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-07-09 00:31:25 +00:00
|
|
|
[ "$_f" = "-d" ] && return 0 # dry run
|
rom.sh: new file, to replace script/roms
stub it from the trees script. the way it works now,
there is less code in the build system.
./build roms
this is no longer a thing
./build roms serprog
this is also no longer a thing. instead, do:
./update trees -b coreboot targetnamehere
./update trees -b pico-serprog
./update trees -b stm32-vserprog
the old commands still works, which causes the new
commands to run
coreboot roms now appear in elf/, not bin/, as before,
but those images now contain payloads.
NOTE: to contradict the above: ./build roms is no
longer a thing, in that it's now deprecated, but
backward compatibility is present for now. it will
be removed in a future release.
./build roms list also still works! it will do:
./update trees -b coreboot list
also:
./update trees -b grub list
this is now possible too
if a target "list" is provided, for multi-tree sources,
the targets are shown.
there is another difference: seagrub roms are now seagrub_,
instead of seabios_withgrub.
seabios-only roms are no longer provided, where grub is also
enabled; only seagrub is used. the user can easily remove
the bootorder file, if they want seabios to not try grub first.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-07-06 22:36:13 +00:00
|
|
|
basename -as .h "$serdir/"*.h > "$TMPDIR/ser" || $err "!mk $1 $TMPDIR"
|
|
|
|
|
|
|
|
while read -r sertarget; do
|
|
|
|
[ "$1" = "rp2040" ] && x_ cmake -DPICO_BOARD="$sertarget" \
|
|
|
|
-DPICO_SDK_PATH="$picosdk" -B "$sersrc/build" "$sersrc" \
|
|
|
|
&& x_ cmake --build "$sersrc/build"
|
|
|
|
[ "$1" = "stm32" ] && x_ make -C "$sersrc" \
|
|
|
|
libopencm3-just-make BOARD=$sertarget && x_ make -C \
|
|
|
|
"$sersrc" BOARD=$sertarget; x_ mkdir -p "bin/serprog_$1"
|
|
|
|
x_ mv "$serx" "bin/serprog_$1/serprog_$sertarget.${serx##*.}"
|
|
|
|
done < "$TMPDIR/ser"
|
|
|
|
|
|
|
|
[ "$XBMK_RELEASE" = "y" ] && mkrom_tarball "bin/serprog_$1"; return 0
|
|
|
|
}
|
|
|
|
|
2024-09-25 22:59:52 +00:00
|
|
|
copyps1bios()
|
|
|
|
{
|
|
|
|
x_ rm -Rf bin/playstation
|
|
|
|
x_ mkdir -p bin/playstation
|
|
|
|
x_ cp src/pcsx-redux/src/mips/openbios/openbios.bin bin/playstation
|
rom.sh: support making pcsx-redux bios release
I also checked the copyright declarations in the
directory src/mips/openbios where the PCSX-Redux BIOS
is, gleaning all the copyright years: 2019-2024 at this
time.
The years will be updated as and when PCSX-Redux is
updated in lbmk. Their BIOS is under MIT so I made lbmk
generate an appropriate COPYING file alongside the binary,
containing:
Copyright (c) 2019-2024 PCSX-Redux authors
Along with the actual text of the MIT license. With all
of this, the PCSX-Redux BIOS can now be included in
Libreboot releases.
No actual tarball is created. The release script in lbmk
simply copies the bin/ directory to ../roms
I'm leaving the PCSX-Redux BIOS release uncompressed,
because, and this will sound patronising because that is
my precise intention: Windows users don't know how to do
anything. If I provide a tarball to Windows users, they
won't know what to do. Libreboot releases always go on rsync
mirrors, which also have HTTP servers with indexing enabled,
for browsing release files.
I mention Windows users, because most people who use the PCSX
Redux BIOS will probably use it on a PlayStation emulator, and
most emulator users are on Windows. I can't really be bothered
to provide it as a .zip archive, and it's only 512kb, so just
provide it uncompressed in Libreboot releases!
Releases were already possible under this scheme, so this
patch really just adds the COPYING file. It's simply a courtesy
to the PCSX-Redux developers, providing proper credit to them.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-10-08 12:18:20 +00:00
|
|
|
|
|
|
|
printf "MIT License\n\nCopyright (c) 2019-2024 PCSX-Redux authors\n\n" \
|
|
|
|
> bin/playstation/COPYING.txt || $err "!pcsx-redux copyright"
|
|
|
|
cat config/snippet/mit >>bin/playstation/COPYING.txt || $err "!pcsx MIT"
|
2024-09-25 22:59:52 +00:00
|
|
|
}
|
|
|
|
|
rom.sh: new file, to replace script/roms
stub it from the trees script. the way it works now,
there is less code in the build system.
./build roms
this is no longer a thing
./build roms serprog
this is also no longer a thing. instead, do:
./update trees -b coreboot targetnamehere
./update trees -b pico-serprog
./update trees -b stm32-vserprog
the old commands still works, which causes the new
commands to run
coreboot roms now appear in elf/, not bin/, as before,
but those images now contain payloads.
NOTE: to contradict the above: ./build roms is no
longer a thing, in that it's now deprecated, but
backward compatibility is present for now. it will
be removed in a future release.
./build roms list also still works! it will do:
./update trees -b coreboot list
also:
./update trees -b grub list
this is now possible too
if a target "list" is provided, for multi-tree sources,
the targets are shown.
there is another difference: seagrub roms are now seagrub_,
instead of seabios_withgrub.
seabios-only roms are no longer provided, where grub is also
enabled; only seagrub is used. the user can easily remove
the bootorder file, if they want seabios to not try grub first.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-07-06 22:36:13 +00:00
|
|
|
mkpayload_grub()
|
|
|
|
{
|
|
|
|
eval `setvars "" grub_modules grub_install_modules`
|
2024-07-10 19:38:36 +00:00
|
|
|
$dry eval `setcfg "$grubdata/module/$tree"`
|
2024-07-26 14:24:00 +00:00
|
|
|
$dry x_ rm -f "$srcdir/grub.elf"; $dry \
|
|
|
|
"$srcdir/grub-mkstandalone" --grub-mkimage="$srcdir/grub-mkimage" \
|
2024-07-10 21:14:39 +00:00
|
|
|
-O i386-coreboot -o "$srcdir/grub.elf" -d "${srcdir}/grub-core/" \
|
rom.sh: new file, to replace script/roms
stub it from the trees script. the way it works now,
there is less code in the build system.
./build roms
this is no longer a thing
./build roms serprog
this is also no longer a thing. instead, do:
./update trees -b coreboot targetnamehere
./update trees -b pico-serprog
./update trees -b stm32-vserprog
the old commands still works, which causes the new
commands to run
coreboot roms now appear in elf/, not bin/, as before,
but those images now contain payloads.
NOTE: to contradict the above: ./build roms is no
longer a thing, in that it's now deprecated, but
backward compatibility is present for now. it will
be removed in a future release.
./build roms list also still works! it will do:
./update trees -b coreboot list
also:
./update trees -b grub list
this is now possible too
if a target "list" is provided, for multi-tree sources,
the targets are shown.
there is another difference: seagrub roms are now seagrub_,
instead of seabios_withgrub.
seabios-only roms are no longer provided, where grub is also
enabled; only seagrub is used. the user can easily remove
the bootorder file, if they want seabios to not try grub first.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-07-06 22:36:13 +00:00
|
|
|
--fonts= --themes= --locales= --modules="$grub_modules" \
|
|
|
|
--install-modules="$grub_install_modules" \
|
2024-07-10 21:14:39 +00:00
|
|
|
"/boot/grub/grub_default.cfg=${srcdir}/.config" \
|
rom.sh: new file, to replace script/roms
stub it from the trees script. the way it works now,
there is less code in the build system.
./build roms
this is no longer a thing
./build roms serprog
this is also no longer a thing. instead, do:
./update trees -b coreboot targetnamehere
./update trees -b pico-serprog
./update trees -b stm32-vserprog
the old commands still works, which causes the new
commands to run
coreboot roms now appear in elf/, not bin/, as before,
but those images now contain payloads.
NOTE: to contradict the above: ./build roms is no
longer a thing, in that it's now deprecated, but
backward compatibility is present for now. it will
be removed in a future release.
./build roms list also still works! it will do:
./update trees -b coreboot list
also:
./update trees -b grub list
this is now possible too
if a target "list" is provided, for multi-tree sources,
the targets are shown.
there is another difference: seagrub roms are now seagrub_,
instead of seabios_withgrub.
seabios-only roms are no longer provided, where grub is also
enabled; only seagrub is used. the user can easily remove
the bootorder file, if they want seabios to not try grub first.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-07-06 22:36:13 +00:00
|
|
|
"/boot/grub/grub.cfg=$grubdata/memdisk.cfg" \
|
|
|
|
"/background.png=$grubdata/background/background1280x800.png" || \
|
|
|
|
$err "$tree: cannot build grub.elf"; return 0
|
|
|
|
}
|
|
|
|
|
2024-07-09 02:09:49 +00:00
|
|
|
mkvendorfiles()
|
|
|
|
{
|
2024-07-21 06:39:47 +00:00
|
|
|
[ -z "$mode" ] && $dry cook_coreboot_config
|
2024-07-10 19:38:36 +00:00
|
|
|
check_coreboot_utils "$tree"
|
2024-07-10 21:14:39 +00:00
|
|
|
printf "%s\n" "${version%%-*}" > "$srcdir/.coreboot-version" || \
|
|
|
|
$err "!mk $srcdir .coreboot-version"
|
2024-07-09 02:09:49 +00:00
|
|
|
}
|
|
|
|
|
2024-07-21 06:39:47 +00:00
|
|
|
cook_coreboot_config()
|
|
|
|
{
|
|
|
|
[ -f "$srcdir/.config" ] || return 0
|
|
|
|
printf "CONFIG_CCACHE=y\n" >> "$srcdir/.config" || \
|
|
|
|
$err "$srcdir/.config: Could not enable ccache"
|
|
|
|
make -C "$srcdir" oldconfig || $err "Could not cook $srcdir/.config"; :
|
|
|
|
}
|
|
|
|
|
trees: support -d (dry run) for custom build logic
-d does the same as -b, except for actually building
anything! in effect, it does the same as -f (fetch)
except that the resulting variable assignments will
not be recursive (as with -f).
if -d is passed, configuration is still loaded, defconfig
files are still cycled through, and more importantly:
helper functions are still processed.
the grub, serprog and coreboot helper functions have
been modified to return early (zero status) if -d is
passed.
example usage:
./update trees -d coreboot x230_12mb
this would download the files, NOT build coreboot, and
NOT build the payloads.
there is one additional benefit to doing it this way:
the utils command has been removed, e.g.
./update trees -b coreboot utils default
the equivalent is now:
./update trees -d coreboot default
the overall effect of this change is that the trees script
no longer contains any project-specific logic, except for
the crossgcc build logic.
it does include some config/data mkhelper files at the top,
for serprog and coreboot, so that those variables defined in
those files can be global, but another solution to mitigate
that will also be implemented in a future commit.
the purpose of this and other revisions (in the final push
to complete lbmk audit 6 / cbmk audit 2) is to generalise as
much logic as possible, removing various ugly hacks.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-07-09 00:31:25 +00:00
|
|
|
check_coreboot_utils()
|
|
|
|
{
|
|
|
|
for util in cbfstool ifdtool; do
|
2024-07-22 18:34:19 +00:00
|
|
|
[ "$badhash" = "y" ] && x_ rm -f "elf/$util/$1/$util"
|
2024-07-10 01:04:25 +00:00
|
|
|
e "elf/$util/$1/$util" f && continue
|
2024-07-10 00:37:27 +00:00
|
|
|
|
trees: support -d (dry run) for custom build logic
-d does the same as -b, except for actually building
anything! in effect, it does the same as -f (fetch)
except that the resulting variable assignments will
not be recursive (as with -f).
if -d is passed, configuration is still loaded, defconfig
files are still cycled through, and more importantly:
helper functions are still processed.
the grub, serprog and coreboot helper functions have
been modified to return early (zero status) if -d is
passed.
example usage:
./update trees -d coreboot x230_12mb
this would download the files, NOT build coreboot, and
NOT build the payloads.
there is one additional benefit to doing it this way:
the utils command has been removed, e.g.
./update trees -b coreboot utils default
the equivalent is now:
./update trees -d coreboot default
the overall effect of this change is that the trees script
no longer contains any project-specific logic, except for
the crossgcc build logic.
it does include some config/data mkhelper files at the top,
for serprog and coreboot, so that those variables defined in
those files can be global, but another solution to mitigate
that will also be implemented in a future commit.
the purpose of this and other revisions (in the final push
to complete lbmk audit 6 / cbmk audit 2) is to generalise as
much logic as possible, removing various ugly hacks.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-07-09 00:31:25 +00:00
|
|
|
utilelfdir="elf/$util/$1"
|
|
|
|
utilsrcdir="src/coreboot/$1/util/$util"
|
|
|
|
|
|
|
|
utilmode="" && [ -n "$mode" ] && utilmode="clean"
|
|
|
|
x_ make -C "$utilsrcdir" $utilmode -j$XBMK_THREADS $makeargs
|
|
|
|
[ -z "$mode" ] && [ ! -f "$utilelfdir/$util" ] && \
|
|
|
|
x_ mkdir -p "$utilelfdir" && \
|
|
|
|
x_ cp "$utilsrcdir/$util" "elf/$util/$1"
|
|
|
|
[ -z "$mode" ] || x_ rm -Rf "$utilelfdir"; continue
|
|
|
|
done; return 0
|
|
|
|
}
|
|
|
|
|
rom.sh: new file, to replace script/roms
stub it from the trees script. the way it works now,
there is less code in the build system.
./build roms
this is no longer a thing
./build roms serprog
this is also no longer a thing. instead, do:
./update trees -b coreboot targetnamehere
./update trees -b pico-serprog
./update trees -b stm32-vserprog
the old commands still works, which causes the new
commands to run
coreboot roms now appear in elf/, not bin/, as before,
but those images now contain payloads.
NOTE: to contradict the above: ./build roms is no
longer a thing, in that it's now deprecated, but
backward compatibility is present for now. it will
be removed in a future release.
./build roms list also still works! it will do:
./update trees -b coreboot list
also:
./update trees -b grub list
this is now possible too
if a target "list" is provided, for multi-tree sources,
the targets are shown.
there is another difference: seagrub roms are now seagrub_,
instead of seabios_withgrub.
seabios-only roms are no longer provided, where grub is also
enabled; only seagrub is used. the user can easily remove
the bootorder file, if they want seabios to not try grub first.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-07-06 22:36:13 +00:00
|
|
|
mkcorebootbin()
|
|
|
|
{
|
|
|
|
[ "$target" = "$tree" ] && return 0
|
|
|
|
|
2024-07-22 17:40:42 +00:00
|
|
|
tmprom="$TMPDIR/coreboot.rom"
|
2024-07-26 14:24:00 +00:00
|
|
|
$dry x_ cp "$srcdir/build/coreboot.rom" "$tmprom"
|
2024-07-22 17:40:42 +00:00
|
|
|
|
rom.sh: new file, to replace script/roms
stub it from the trees script. the way it works now,
there is less code in the build system.
./build roms
this is no longer a thing
./build roms serprog
this is also no longer a thing. instead, do:
./update trees -b coreboot targetnamehere
./update trees -b pico-serprog
./update trees -b stm32-vserprog
the old commands still works, which causes the new
commands to run
coreboot roms now appear in elf/, not bin/, as before,
but those images now contain payloads.
NOTE: to contradict the above: ./build roms is no
longer a thing, in that it's now deprecated, but
backward compatibility is present for now. it will
be removed in a future release.
./build roms list also still works! it will do:
./update trees -b coreboot list
also:
./update trees -b grub list
this is now possible too
if a target "list" is provided, for multi-tree sources,
the targets are shown.
there is another difference: seagrub roms are now seagrub_,
instead of seabios_withgrub.
seabios-only roms are no longer provided, where grub is also
enabled; only seagrub is used. the user can easily remove
the bootorder file, if they want seabios to not try grub first.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-07-06 22:36:13 +00:00
|
|
|
initmode="${defconfig##*/}"; displaymode="${initmode##*_}"
|
|
|
|
initmode="${initmode%%_*}"
|
|
|
|
[ -n "$displaymode" ] && displaymode="_$displaymode"
|
|
|
|
cbfstool="elf/cbfstool/$tree/cbfstool"
|
|
|
|
|
|
|
|
[ -n "$uboot_config" ] || uboot_config="default"
|
|
|
|
[ "$payload_uboot" = "y" ] || payload_seabios="y"
|
|
|
|
[ "$payload_grub" = "y" ] && payload_seabios="y"
|
|
|
|
[ "$payload_seabios" = "y" ] && [ "$payload_uboot" = "y" ] && \
|
2024-07-10 19:38:36 +00:00
|
|
|
$dry $err "$target: U-Boot and SeaBIOS/GRUB are both enabled."
|
rom.sh: new file, to replace script/roms
stub it from the trees script. the way it works now,
there is less code in the build system.
./build roms
this is no longer a thing
./build roms serprog
this is also no longer a thing. instead, do:
./update trees -b coreboot targetnamehere
./update trees -b pico-serprog
./update trees -b stm32-vserprog
the old commands still works, which causes the new
commands to run
coreboot roms now appear in elf/, not bin/, as before,
but those images now contain payloads.
NOTE: to contradict the above: ./build roms is no
longer a thing, in that it's now deprecated, but
backward compatibility is present for now. it will
be removed in a future release.
./build roms list also still works! it will do:
./update trees -b coreboot list
also:
./update trees -b grub list
this is now possible too
if a target "list" is provided, for multi-tree sources,
the targets are shown.
there is another difference: seagrub roms are now seagrub_,
instead of seabios_withgrub.
seabios-only roms are no longer provided, where grub is also
enabled; only seagrub is used. the user can easily remove
the bootorder file, if they want seabios to not try grub first.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-07-06 22:36:13 +00:00
|
|
|
|
|
|
|
[ -z "$grub_scan_disk" ] && grub_scan_disk="nvme ahci ata"
|
|
|
|
|
|
|
|
[ -n "$grubtree" ] || grubtree="default"
|
|
|
|
grubelf="elf/grub/$grubtree/payload/grub.elf"
|
|
|
|
|
|
|
|
[ "$payload_memtest" = "y" ] || payload_memtest="n"
|
|
|
|
[ "$(uname -m)" = "x86_64" ] || payload_memtest="n"
|
2024-07-26 14:24:00 +00:00
|
|
|
if $dry grep "CONFIG_PAYLOAD_NONE=y" "$defconfig"; then
|
2024-07-17 18:06:53 +00:00
|
|
|
[ "$payload_seabios" = "y" ] && pname="seabios" && \
|
|
|
|
$dry add_seabios
|
|
|
|
[ "$payload_uboot" = "y" ] && pname="uboot" && $dry add_uboot
|
|
|
|
else
|
2024-07-26 14:24:00 +00:00
|
|
|
pname="custom" && $dry cprom; :
|
2024-07-22 08:11:53 +00:00
|
|
|
fi; :
|
rom.sh: new file, to replace script/roms
stub it from the trees script. the way it works now,
there is less code in the build system.
./build roms
this is no longer a thing
./build roms serprog
this is also no longer a thing. instead, do:
./update trees -b coreboot targetnamehere
./update trees -b pico-serprog
./update trees -b stm32-vserprog
the old commands still works, which causes the new
commands to run
coreboot roms now appear in elf/, not bin/, as before,
but those images now contain payloads.
NOTE: to contradict the above: ./build roms is no
longer a thing, in that it's now deprecated, but
backward compatibility is present for now. it will
be removed in a future release.
./build roms list also still works! it will do:
./update trees -b coreboot list
also:
./update trees -b grub list
this is now possible too
if a target "list" is provided, for multi-tree sources,
the targets are shown.
there is another difference: seagrub roms are now seagrub_,
instead of seabios_withgrub.
seabios-only roms are no longer provided, where grub is also
enabled; only seagrub is used. the user can easily remove
the bootorder file, if they want seabios to not try grub first.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-07-06 22:36:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
add_seabios()
|
|
|
|
{
|
|
|
|
_seabioself="elf/seabios/default/$initmode/bios.bin.elf"
|
|
|
|
|
2024-10-27 19:29:26 +00:00
|
|
|
cbfs "$tmprom" "$_seabioself" "fallback/payload"
|
rom.sh: new file, to replace script/roms
stub it from the trees script. the way it works now,
there is less code in the build system.
./build roms
this is no longer a thing
./build roms serprog
this is also no longer a thing. instead, do:
./update trees -b coreboot targetnamehere
./update trees -b pico-serprog
./update trees -b stm32-vserprog
the old commands still works, which causes the new
commands to run
coreboot roms now appear in elf/, not bin/, as before,
but those images now contain payloads.
NOTE: to contradict the above: ./build roms is no
longer a thing, in that it's now deprecated, but
backward compatibility is present for now. it will
be removed in a future release.
./build roms list also still works! it will do:
./update trees -b coreboot list
also:
./update trees -b grub list
this is now possible too
if a target "list" is provided, for multi-tree sources,
the targets are shown.
there is another difference: seagrub roms are now seagrub_,
instead of seabios_withgrub.
seabios-only roms are no longer provided, where grub is also
enabled; only seagrub is used. the user can easily remove
the bootorder file, if they want seabios to not try grub first.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-07-06 22:36:13 +00:00
|
|
|
x_ "$cbfstool" "$tmprom" add-int -i 3000 -n etc/ps2-keyboard-spinup
|
|
|
|
|
|
|
|
_z="2"; [ "$initmode" = "vgarom" ] && _z="0"
|
|
|
|
x_ "$cbfstool" "$tmprom" add-int -i $_z -n etc/pci-optionrom-exec
|
|
|
|
x_ "$cbfstool" "$tmprom" add-int -i 0 -n etc/optionroms-checksum
|
|
|
|
[ "$initmode" = "libgfxinit" ] && \
|
|
|
|
cbfs "$tmprom" "$seavgabiosrom" vgaroms/seavgabios.bin raw
|
|
|
|
|
|
|
|
[ "$payload_memtest" = "y" ] && cbfs "$tmprom" \
|
|
|
|
"elf/memtest86plus/memtest.bin" img/memtest
|
|
|
|
|
2024-07-22 17:47:38 +00:00
|
|
|
[ "$payload_grub" = "y" ] && add_grub
|
|
|
|
|
2024-10-27 19:29:26 +00:00
|
|
|
cprom && [ "$payload_grub" = "y" ] && pname="seagrub" && mkseagrub; :
|
rom.sh: new file, to replace script/roms
stub it from the trees script. the way it works now,
there is less code in the build system.
./build roms
this is no longer a thing
./build roms serprog
this is also no longer a thing. instead, do:
./update trees -b coreboot targetnamehere
./update trees -b pico-serprog
./update trees -b stm32-vserprog
the old commands still works, which causes the new
commands to run
coreboot roms now appear in elf/, not bin/, as before,
but those images now contain payloads.
NOTE: to contradict the above: ./build roms is no
longer a thing, in that it's now deprecated, but
backward compatibility is present for now. it will
be removed in a future release.
./build roms list also still works! it will do:
./update trees -b coreboot list
also:
./update trees -b grub list
this is now possible too
if a target "list" is provided, for multi-tree sources,
the targets are shown.
there is another difference: seagrub roms are now seagrub_,
instead of seabios_withgrub.
seabios-only roms are no longer provided, where grub is also
enabled; only seagrub is used. the user can easily remove
the bootorder file, if they want seabios to not try grub first.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-07-06 22:36:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
add_grub()
|
|
|
|
{
|
2024-10-27 19:29:26 +00:00
|
|
|
cbfs "$tmprom" "$grubelf" "img/grub2"
|
rom.sh: new file, to replace script/roms
stub it from the trees script. the way it works now,
there is less code in the build system.
./build roms
this is no longer a thing
./build roms serprog
this is also no longer a thing. instead, do:
./update trees -b coreboot targetnamehere
./update trees -b pico-serprog
./update trees -b stm32-vserprog
the old commands still works, which causes the new
commands to run
coreboot roms now appear in elf/, not bin/, as before,
but those images now contain payloads.
NOTE: to contradict the above: ./build roms is no
longer a thing, in that it's now deprecated, but
backward compatibility is present for now. it will
be removed in a future release.
./build roms list also still works! it will do:
./update trees -b coreboot list
also:
./update trees -b grub list
this is now possible too
if a target "list" is provided, for multi-tree sources,
the targets are shown.
there is another difference: seagrub roms are now seagrub_,
instead of seabios_withgrub.
seabios-only roms are no longer provided, where grub is also
enabled; only seagrub is used. the user can easily remove
the bootorder file, if they want seabios to not try grub first.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-07-06 22:36:13 +00:00
|
|
|
printf "set grub_scan_disk=\"%s\"\n" "$grub_scan_disk" \
|
|
|
|
> "$TMPDIR/tmpcfg" || $err "$target: !insert scandisk"
|
|
|
|
cbfs "$tmprom" "$TMPDIR/tmpcfg" scan.cfg raw
|
2024-07-22 17:47:38 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
mkseagrub()
|
|
|
|
{
|
rom.sh: new file, to replace script/roms
stub it from the trees script. the way it works now,
there is less code in the build system.
./build roms
this is no longer a thing
./build roms serprog
this is also no longer a thing. instead, do:
./update trees -b coreboot targetnamehere
./update trees -b pico-serprog
./update trees -b stm32-vserprog
the old commands still works, which causes the new
commands to run
coreboot roms now appear in elf/, not bin/, as before,
but those images now contain payloads.
NOTE: to contradict the above: ./build roms is no
longer a thing, in that it's now deprecated, but
backward compatibility is present for now. it will
be removed in a future release.
./build roms list also still works! it will do:
./update trees -b coreboot list
also:
./update trees -b grub list
this is now possible too
if a target "list" is provided, for multi-tree sources,
the targets are shown.
there is another difference: seagrub roms are now seagrub_,
instead of seabios_withgrub.
seabios-only roms are no longer provided, where grub is also
enabled; only seagrub is used. the user can easily remove
the bootorder file, if they want seabios to not try grub first.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-07-06 22:36:13 +00:00
|
|
|
cbfs "$tmprom" "$grubdata/bootorder" bootorder raw
|
2024-07-22 08:11:53 +00:00
|
|
|
for keymap in config/data/grub/keymap/*.gkb; do
|
2024-07-26 14:24:00 +00:00
|
|
|
[ -f "$keymap" ] && cprom "${keymap##*/}"; :
|
|
|
|
done; :
|
rom.sh: new file, to replace script/roms
stub it from the trees script. the way it works now,
there is less code in the build system.
./build roms
this is no longer a thing
./build roms serprog
this is also no longer a thing. instead, do:
./update trees -b coreboot targetnamehere
./update trees -b pico-serprog
./update trees -b stm32-vserprog
the old commands still works, which causes the new
commands to run
coreboot roms now appear in elf/, not bin/, as before,
but those images now contain payloads.
NOTE: to contradict the above: ./build roms is no
longer a thing, in that it's now deprecated, but
backward compatibility is present for now. it will
be removed in a future release.
./build roms list also still works! it will do:
./update trees -b coreboot list
also:
./update trees -b grub list
this is now possible too
if a target "list" is provided, for multi-tree sources,
the targets are shown.
there is another difference: seagrub roms are now seagrub_,
instead of seabios_withgrub.
seabios-only roms are no longer provided, where grub is also
enabled; only seagrub is used. the user can easily remove
the bootorder file, if they want seabios to not try grub first.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-07-06 22:36:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
add_uboot()
|
|
|
|
{
|
|
|
|
ubdir="elf/u-boot/$target/$uboot_config"
|
|
|
|
ubootelf="$ubdir/u-boot.elf" && [ ! -f "$ubootelf" ] && \
|
|
|
|
ubootelf="$ubdir/u-boot"
|
|
|
|
[ -f "$ubootelf" ] || $err "cb/$target: Can't find u-boot"
|
|
|
|
|
2024-07-22 08:11:53 +00:00
|
|
|
cbfs "$tmprom" "$ubootelf" "fallback/payload"; cprom
|
|
|
|
}
|
|
|
|
|
|
|
|
cprom()
|
|
|
|
{
|
|
|
|
newrom="bin/$target/${pname}_${target}_$initmode$displaymode.rom"
|
2024-07-26 14:24:00 +00:00
|
|
|
[ $# -gt 0 ] && newrom="${newrom%.rom}_${1%.gkb}.rom"
|
2024-07-22 08:11:53 +00:00
|
|
|
|
|
|
|
x_ mkdir -p "bin/$target"
|
|
|
|
x_ cp "$tmprom" "$newrom" && [ $# -gt 0 ] && \
|
2024-07-26 14:24:00 +00:00
|
|
|
cbfs "$newrom" "config/data/grub/keymap/$1" keymap.gkb raw; :
|
rom.sh: new file, to replace script/roms
stub it from the trees script. the way it works now,
there is less code in the build system.
./build roms
this is no longer a thing
./build roms serprog
this is also no longer a thing. instead, do:
./update trees -b coreboot targetnamehere
./update trees -b pico-serprog
./update trees -b stm32-vserprog
the old commands still works, which causes the new
commands to run
coreboot roms now appear in elf/, not bin/, as before,
but those images now contain payloads.
NOTE: to contradict the above: ./build roms is no
longer a thing, in that it's now deprecated, but
backward compatibility is present for now. it will
be removed in a future release.
./build roms list also still works! it will do:
./update trees -b coreboot list
also:
./update trees -b grub list
this is now possible too
if a target "list" is provided, for multi-tree sources,
the targets are shown.
there is another difference: seagrub roms are now seagrub_,
instead of seabios_withgrub.
seabios-only roms are no longer provided, where grub is also
enabled; only seagrub is used. the user can easily remove
the bootorder file, if they want seabios to not try grub first.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-07-06 22:36:13 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
mkcoreboottar()
|
|
|
|
{
|
2024-07-08 01:21:52 +00:00
|
|
|
[ "$target" = "$tree" ] && return 0; [ "$XBMK_RELEASE" = "y" ] && \
|
2024-07-26 14:24:00 +00:00
|
|
|
[ "$release" != "n" ] && $dry mkrom_tarball "bin/$target"; :
|
rom.sh: new file, to replace script/roms
stub it from the trees script. the way it works now,
there is less code in the build system.
./build roms
this is no longer a thing
./build roms serprog
this is also no longer a thing. instead, do:
./update trees -b coreboot targetnamehere
./update trees -b pico-serprog
./update trees -b stm32-vserprog
the old commands still works, which causes the new
commands to run
coreboot roms now appear in elf/, not bin/, as before,
but those images now contain payloads.
NOTE: to contradict the above: ./build roms is no
longer a thing, in that it's now deprecated, but
backward compatibility is present for now. it will
be removed in a future release.
./build roms list also still works! it will do:
./update trees -b coreboot list
also:
./update trees -b grub list
this is now possible too
if a target "list" is provided, for multi-tree sources,
the targets are shown.
there is another difference: seagrub roms are now seagrub_,
instead of seabios_withgrub.
seabios-only roms are no longer provided, where grub is also
enabled; only seagrub is used. the user can easily remove
the bootorder file, if they want seabios to not try grub first.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2024-07-06 22:36:13 +00:00
|
|
|
}
|