mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-14 23:39:33 +02:00
minor code cleanup in shell scripts
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -87,7 +87,7 @@ build_targets()
|
||||
[ $# -gt 0 ] && target1="${1}"
|
||||
[ "${target1}" = "utils" ] && [ "${project}" = "coreboot" ] && \
|
||||
shift 1
|
||||
targets=$(listitems "${cfgsdir}") || \
|
||||
targets=$(items "${cfgsdir}") || \
|
||||
err "Cannot get options for ${cfgsdir}"
|
||||
[ $# -gt 0 ] && targets=$@
|
||||
|
||||
@@ -173,15 +173,14 @@ handle_src_tree()
|
||||
fi
|
||||
|
||||
[ "${target1}" = "utils" ] && [ "${project}" = "coreboot" ] && return 0
|
||||
[ "$project" != "coreboot" ] && [ "$project" != "u-boot" ] && return 0
|
||||
|
||||
# u-boot and coreboot are both compiled with coreboot's crossgcc
|
||||
if [ "${project}" = "coreboot" ] || [ "${project}" = "u-boot" ]; then
|
||||
[ ! -z ${mode} ] || check_cross_compiler || \
|
||||
err "handle_src_tree ${project}/${target}: crossgcc"
|
||||
cbfstool="cbutils/${tree}/cbfstool"
|
||||
[ -f "${cbfstool}" ] || \
|
||||
x_ ./update project trees -b coreboot utils "${tree}"
|
||||
fi
|
||||
[ ! -z ${mode} ] || check_cross_compiler || \
|
||||
err "handle_src_tree ${project}/${target}: crossgcc"
|
||||
cbfstool="cbutils/${tree}/cbfstool"
|
||||
[ -f "${cbfstool}" ] && return 0
|
||||
x_ ./update project trees -b coreboot utils "${tree}"
|
||||
}
|
||||
|
||||
# set up cross-compiler (coreboot crossgcc) for u-boot and coreboot
|
||||
@@ -279,6 +278,7 @@ run_make_command()
|
||||
x_ printf "%s\n" "${version%%-*}" >"${codedir}/.coreboot-version"
|
||||
|
||||
x_ make ${mode} -j$(nproc) -C "${codedir}"
|
||||
|
||||
[ "${mode}" != "clean" ] && return 0
|
||||
make -C "${codedir}" distclean 2>/dev/null || :
|
||||
}
|
||||
|
||||
Vendored
+3
-5
@@ -63,9 +63,8 @@ build_dependencies()
|
||||
x_ ./update project trees -b uefitool
|
||||
[ -f "${kbc1126_ec_dump}" ] || \
|
||||
x_ make -C "${cbdir}/util/kbc1126"
|
||||
if [ ! -f "${cbfstool}" ] || [ ! -f "${ifdtool}" ]; then
|
||||
x_ ./update project trees -b coreboot utils default
|
||||
fi
|
||||
[ -f "${cbfstool}" ] && [ -f "${ifdtool}" ] && return 0
|
||||
x_ ./update project trees -b coreboot utils default
|
||||
}
|
||||
|
||||
download_vendorfiles()
|
||||
@@ -85,8 +84,7 @@ download_vendorfiles()
|
||||
"${E6400_VGA_DL_url_bkup}" "${E6400_VGA_DL_hash}" \
|
||||
"${CONFIG_VGA_BIOS_FILE}"
|
||||
[ -z "${CONFIG_HAVE_MRC}" ] && return 0
|
||||
fetch "mrc" "${MRC_url}" "${MRC_url_bkup}" "${MRC_hash}" \
|
||||
"${CONFIG_MRC_FILE}"
|
||||
fetch "mrc" "$MRC_url" "$MRC_url_bkup" "$MRC_hash" "$CONFIG_MRC_FILE"
|
||||
}
|
||||
|
||||
fetch()
|
||||
|
||||
Vendored
+1
-1
@@ -15,7 +15,7 @@ main()
|
||||
{
|
||||
[ $# -lt 1 ] && err "No options specified."
|
||||
[ "${1}" = "listboards" ] && \
|
||||
listitems config/coreboot && exit 0
|
||||
items config/coreboot && exit 0
|
||||
|
||||
archive="${1}"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user