summaryrefslogtreecommitdiff
path: root/script/build
diff options
context:
space:
mode:
Diffstat (limited to 'script/build')
-rwxr-xr-xscript/build/grub (renamed from script/build/fw/grub)2
-rwxr-xr-xscript/build/roms (renamed from script/build/fw/coreboot)48
-rwxr-xr-xscript/build/serprog (renamed from script/build/fw/serprog)4
3 files changed, 24 insertions, 30 deletions
diff --git a/script/build/fw/grub b/script/build/grub
index 66286732..ba0845d3 100755
--- a/script/build/fw/grub
+++ b/script/build/grub
@@ -23,7 +23,7 @@ main()
handle_dependencies()
{
- [ -d "src/grub" ] || x_ ./update project trees -f grub
+ [ -d "src/grub" ] || x_ ./update trees -f grub
[ -f "src/grub/grub-mkstandalone" ] || build_grub_utils
x_ mkdir -p "${elfdir}"
x_ rm -f "${elfdir}/"*
diff --git a/script/build/fw/coreboot b/script/build/roms
index 9e266ce7..2f7b93da 100755
--- a/script/build/fw/coreboot
+++ b/script/build/roms
@@ -25,15 +25,14 @@ pv="${pv} payload_seabios_withgrub payload_uboot memtest_bin"
v="romdir cbrom initmode displaymode cbcfg targetdir tree arch"
v="${v} grub_timeout ubdir vendorfiles board grub_scan_disk uboot_config"
eval "$(setvars "n" ${pv})"
-eval "$(setvars "" ${v})"
-eval "$(setvars "" boards _displaymode _payload _keyboard all targets)"
+eval "$(setvars "" ${v} boards _displaymode _payload _keyboard all targets)"
main()
{
while [ $# -gt 0 ]; do
case ${1} in
help) usage && exit 0 ;;
- list) listitems config/coreboot && exit 0 ;;
+ list) items config/coreboot && exit 0 ;;
-d) _displaymode="${2}" ;;
-p) _payload="${2}" ;;
-k) _keyboard="${2}" ;;
@@ -45,7 +44,7 @@ main()
shift 2
done
- [ "${all}" != "y" ] || boards=$(listitems config/coreboot) || \
+ [ "${all}" != "y" ] || boards=$(items config/coreboot) || \
err "Cannot generate list of boards for building"
for x in ${boards}; do
@@ -63,11 +62,7 @@ main()
printf "\nROM images available in these directories:\n"
printf "${targets}^^ ROM images available in these directories.\n\n"
- printf "WARNING!!!!!!! PLEASE READ:\n\n"
-
- printf "DO NOT flash ROM images contained under elf/, because they lack"
- printf " payloads and will BRICK your machine. Please flash ROM images"
- printf " contained under bin/ instead. YOU HAVE BEEN WARNED.\n\n"
+ printf "DO NOT flash ROM images from elf/ - please use bin/ instead.\n"
}
check_target()
@@ -133,13 +128,13 @@ prepare_target()
cbrom="${cbdir}/build/coreboot.rom"
[ -f "${cbfstool}" ] || \
- x_ ./update project trees -b coreboot utils ${tree}
+ x_ ./update trees -b coreboot utils ${tree}
build_dependency_seabios
memtest_bin="memtest86plus/build64/memtest.bin"
[ "${payload_memtest}" != "y" ] || [ -f "src/${memtest_bin}" ] || \
- x_ ./update project trees -b memtest86plus
+ x_ ./update trees -b memtest86plus
x_ rm -f "${romdir}/"*
@@ -151,13 +146,12 @@ prepare_target()
build_dependency_seabios()
{
[ "${payload_seabios}" = "y" ] || return 0
+ [ -f "${seavgabiosrom}" ] && \
+ [ -f elf/seabios/default/libgfxinit/bios.bin.elf ] && \
+ [ -f elf/seabios/default/vgarom/bios.bin.elf ] && \
+ [ -f elf/seabios/default/normal/bios.bin.elf ] && return 0
- if [ ! -f "${seavgabiosrom}" ] \
- || [ ! -f elf/seabios/default/libgfxinit/bios.bin.elf ] \
- || [ ! -f elf/seabios/default/vgarom/bios.bin.elf ] \
- || [ ! -f elf/seabios/default/normal/bios.bin.elf ]; then
- x_ ./update project trees -b seabios
- fi
+ x_ ./update trees -b seabios
}
build_dependency_grub()
@@ -177,14 +171,14 @@ build_dependency_grub()
rebuild_grub="y" && break
done
[ "${rebuild_grub}" = "y" ] || return 0
- x_ ./build fw grub
+ x_ ./build grub
}
build_dependency_uboot()
{
[ "${payload_uboot}" = "y" ] || return 0
- x_ ./update project trees -b u-boot ${board}
+ x_ ./update trees -b u-boot ${board}
ubdir="elf/u-boot/${board}/${uboot_config}"
ubootelf="${ubdir}/u-boot.elf"
[ ! -f "${ubootelf}" ] && [ -f "${ubdir}/u-boot" ] && \
@@ -221,7 +215,7 @@ build_roms()
"${cbcfg}" "${board}" "${displaymode}" "${initmode}" \
1>&2 && return 0
- x_ ./update project trees -b coreboot ${board}
+ x_ ./update trees -b coreboot ${board}
_cbrom="elf/coreboot_nopayload_DO_NOT_FLASH/${board}/${initmode}_${displaymode}"
[ "${initmode}" = "normal" ] && \
@@ -397,9 +391,9 @@ moverom() {
usage()
{
cat <<- EOF
- USAGE: ./build fw coreboot targetname
- To build *all* boards, do this: ./build fw coreboot all
- To list *all* boards, do this: ./build fw coreboot list
+ USAGE: ./build roms targetname
+ To build *all* boards, do this: ./build roms all
+ To list *all* boards, do this: ./build roms list
Optional Flags:
-d: displaymode
@@ -408,12 +402,12 @@ usage()
Example commands:
- ./build fw coreboot x60
- ./build fw coreboot x200_8mb x60
- ./build fw coreboot x60 -p grub -d corebootfb -k usqwerty
+ ./build roms x60
+ ./build roms x200_8mb x60
+ ./build roms x60 -p grub -d corebootfb -k usqwerty
possible values for 'target':
- $(listitems "config/coreboot")
+ $(items "config/coreboot")
Refer to the ${projectname} documentation for more information.
EOF
diff --git a/script/build/fw/serprog b/script/build/serprog
index eb0e5ede..43251acd 100755
--- a/script/build/fw/serprog
+++ b/script/build/serprog
@@ -22,12 +22,12 @@ main()
platform="rp2040"
boards_dir=${pico_sdk_dir}/src/boards/include/boards
[ -d "${pico_src_dir}/" ] || \
- x_ ./update project trees -f "rpi-pico-serprog"
+ x_ ./update trees -f "rpi-pico-serprog"
elif [ "${1}" = "stm32" ]; then
platform="stm32"
boards_dir=${stm32_src_dir}/boards
[ -d "${stm32_src_dir}/" ] || \
- x_ ./update project trees -f "stm32-vserprog"
+ x_ ./update trees -f "stm32-vserprog"
else
err "${usage}"
fi