summaryrefslogtreecommitdiff
path: root/script/build
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-10-06 22:59:36 +0100
committerLeah Rowe <leah@libreboot.org>2023-10-07 00:11:21 +0100
commit4e39d5a5a808b0d59c6fb3426e1d9bc0195d6b08 (patch)
tree26ccd90ebffb18c70132e6192f27bac1c4c3522c /script/build
parent965b6a7ed73f1dbd78a353c83b99a88b50c86f38 (diff)
put all src downloads under src/
build/release/src was partly re-written to accomodate this memtest86plus was patched to have a central Makefile, and lbmk modified to use that, rather than mess with build32 and build64. the central Makefile just builds both targets or cleans both targets Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/build')
-rwxr-xr-xscript/build/coreboot/grub17
-rwxr-xr-xscript/build/coreboot/utils4
-rwxr-xr-xscript/build/fw/coreboot12
-rwxr-xr-xscript/build/fw/serprog8
4 files changed, 22 insertions, 19 deletions
diff --git a/script/build/coreboot/grub b/script/build/coreboot/grub
index 7f448e24..49b8b416 100755
--- a/script/build/coreboot/grub
+++ b/script/build/coreboot/grub
@@ -5,11 +5,12 @@
[ "x${DEBUG+set}" = 'xset' ] && set -v
set -u -e
+. "include/err.sh"
+
elfdir="elf/grub"
grubcfgsdir="config/grub"
layoutdir="/boot/grub/layouts"
-. "include/err.sh"
. "${grubcfgsdir}/modules.list"
main()
@@ -21,16 +22,16 @@ main()
handle_dependencies()
{
- [ -d "grub/" ] || x_ ./update project repo grub
- [ -f "grub/grub-mkstandalone" ] || build_grub_utils
- [ -d "${elfdir}" ] || x_ mkdir -p "${elfdir}"
+ [ -d "src/grub" ] || x_ ./update project repo grub
+ [ -f "src/grub/grub-mkstandalone" ] || build_grub_utils
+ x_ mkdir -p "${elfdir}"
x_ rm -f "${elfdir}/"*
}
build_grub_utils()
{
(
- x_ cd grub/
+ x_ cd "src/grub"
[ ! -d Makefile ] || x_ make distclean
x_ ./bootstrap --gnulib-srcdir=gnulib/ --no-git
x_ ./autogen.sh
@@ -52,11 +53,11 @@ build_keymap_configs()
build_grub_payload()
{
- grub/grub-mkstandalone \
- --grub-mkimage="grub/grub-mkimage" \
+ ./src/grub/grub-mkstandalone \
+ --grub-mkimage="src/grub/grub-mkimage" \
-O i386-coreboot \
-o "${elfdir}/grub.elf" \
- -d grub/grub-core/ \
+ -d "src/grub/grub-core/" \
--fonts= --themes= --locales= \
--modules="${grub_modules}" \
--install-modules="${grub_install_modules}" \
diff --git a/script/build/coreboot/utils b/script/build/coreboot/utils
index e3d471ad..65c565bb 100755
--- a/script/build/coreboot/utils
+++ b/script/build/coreboot/utils
@@ -29,13 +29,13 @@ build_for_mainboard() {
}
buildutils() {
- [ -d "coreboot/${1}/" ] || \
+ [ -d "src/coreboot/${1}/" ] || \
x_ ./update project trees coreboot ${1}
for util in cbfstool ifdtool; do
[ -f "cbutils/${1}/${util}" ] && continue
[ -d "cbutils/${1}" ] || x_ mkdir -p "cbutils/${1}"
- utildir="coreboot/${1}/util/${util}"
+ utildir="src/coreboot/${1}/util/${util}"
x_ make distclean -C "${utildir}"
x_ make -j$(nproc) -C "${utildir}"
x_ cp "${utildir}/${util}" "cbutils/${1}"
diff --git a/script/build/fw/coreboot b/script/build/fw/coreboot
index 15430255..d7f67ad5 100755
--- a/script/build/fw/coreboot
+++ b/script/build/fw/coreboot
@@ -23,7 +23,7 @@ kmapdir="config/grub/keymap"
# Disable all payloads by default.
# target.cfg files have to specifically enable [a] payload(s)
pv="payload_grub payload_grub_withseabios payload_seabios payload_memtest"
-pv="${pv} payload_seabios_withgrub payload_uboot"
+pv="${pv} payload_seabios_withgrub payload_uboot memtest_bin"
v="romdir cbdir cbfstool cbrom initmode displaymode cbcfg targetdir tree arch"
v="${v} grub_timeout ubdir blobs_required board grub_scan_disk uboot_config"
eval "$(setvars "n" ${pv})"
@@ -122,8 +122,8 @@ check_target()
prepare_target()
{
romdir="bin/${board}"
- cbdir="coreboot/${board}"
- [ "${board}" = "${tree}" ] || cbdir="coreboot/${tree}"
+ cbdir="src/coreboot/${board}"
+ [ "${board}" = "${tree}" ] || cbdir="src/coreboot/${tree}"
cbfstool="cbutils/${tree}/cbfstool"
cbrom="${cbdir}/build/coreboot.rom"
@@ -132,8 +132,8 @@ prepare_target()
build_dependency_seabios
memtest_bin="memtest86plus/build${arch#*_}/memtest.bin"
- [ "${payload_memtest}" != "y" ] || [ -f "${memtest_bin}" ] || \
- x_ ./update project build -b ${memtest_bin%/*}
+ [ "${payload_memtest}" != "y" ] || [ -f "src/${memtest_bin}" ] || \
+ x_ ./update project build -b memtest86plus
x_ rm -f "${romdir}/"*
@@ -226,7 +226,7 @@ build_roms()
[ "${payload_memtest}" != "y" ] || \
x_ "${cbfstool}" "${cbrom}" add-payload \
- -f "${memtest_bin}" -n img/memtest -c lzma
+ -f "src/${memtest_bin}" -n img/memtest -c lzma
[ "${payload_seabios}" = "y" ] && \
build_seabios_roms
[ "${payload_grub}" != "y" ] || \
diff --git a/script/build/fw/serprog b/script/build/fw/serprog
index 0966af77..bb6952e2 100755
--- a/script/build/fw/serprog
+++ b/script/build/fw/serprog
@@ -7,10 +7,12 @@ set -u -e
. "include/err.sh"
-pico_src_dir=util-fw/rp2040/pico-serprog
-pico_sdk_dir=util-fw/rp2040/pico-sdk
+eval "$(setvars "" platform pico_sdk_dir pico_src_dir stm32_src_dir \
+ boards_dir)"
-stm32_src_dir=util-fw/stm32-vserprog
+pico_src_dir=src/pico-serprog
+pico_sdk_dir=src/pico-sdk
+stm32_src_dir=src/stm32-vserprog
usage="usage: ./build firmware serprog <rp2040|stm32> [board]"