build/boot/roms: don't create empty bin/ directory
also: only return zero status if rom images were succesfully built, and print a list of each rom image directory based on what was actually compiled, rather than just saying that the rom images are stored under bin/ Signed-off-by: Leah Rowe <leah@libreboot.org>btrfsvols
parent
c62a423909
commit
ea7fae97bd
|
@ -35,6 +35,7 @@ read projectname < projectname
|
||||||
opts=""
|
opts=""
|
||||||
boards=
|
boards=
|
||||||
firstoption=""
|
firstoption=""
|
||||||
|
targets=""
|
||||||
|
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
|
@ -68,14 +69,19 @@ main()
|
||||||
if [ "${firstoption}" = "all" ]; then
|
if [ "${firstoption}" = "all" ]; then
|
||||||
for target in $(./build command options config/coreboot); do
|
for target in $(./build command options config/coreboot); do
|
||||||
buildrom "${target}" || err "build/roms (1): error"
|
buildrom "${target}" || err "build/roms (1): error"
|
||||||
|
[ -d "bin/${target}" ] && targets="${target} ${targets}"
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
for board in ${boards}; do
|
for board in ${boards}; do
|
||||||
buildrom "${board}" || err "build/roms (2): error"
|
buildrom "${board}" || err "build/roms (2): error"
|
||||||
|
[ -d "bin/${board}" ] && targets="${board} ${targets}"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
[ -z "${targets}" ] && err "No ROM images were compiled."
|
||||||
printf "\n\nDone! Your ROMs are in bin/\n\n"
|
printf "\n\nYour ROM images are available in these directories:\n"
|
||||||
|
for x in ${targets}; do
|
||||||
|
printf "* bin/%s\n" "${x}"
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
usage()
|
usage()
|
||||||
|
|
|
@ -186,8 +186,6 @@ build_dependencies()
|
||||||
./handle make file -b ${memtest_bin%/*} || \
|
./handle make file -b ${memtest_bin%/*} || \
|
||||||
err "cannot build memtest86+"
|
err "cannot build memtest86+"
|
||||||
|
|
||||||
[ -d "${romdir}/" ] || mkdir -p "${romdir}/" || \
|
|
||||||
err "cannot create rom directory: \"${romdir}\""
|
|
||||||
rm -f "${romdir}"/* || err "cannot: rm -f \"${romdir}\"/*"
|
rm -f "${romdir}"/* || err "cannot: rm -f \"${romdir}\"/*"
|
||||||
|
|
||||||
build_dependency_grub
|
build_dependency_grub
|
||||||
|
@ -529,6 +527,9 @@ moverom() {
|
||||||
|
|
||||||
printf "\nCreating new ROM image: %s\n" "${newrompath}"
|
printf "\nCreating new ROM image: %s\n" "${newrompath}"
|
||||||
|
|
||||||
|
[ -d "${newrompath%/*}" ] || mkdir -p "${newrompath%/*}/" || \
|
||||||
|
err "moverom: cannot create rom directory: \"${newrompath%/*}\""
|
||||||
|
|
||||||
[ "${blobs_required}" = "n" ] && \
|
[ "${blobs_required}" = "n" ] && \
|
||||||
newrompath="${newrompath%.rom}_noblobs.rom"
|
newrompath="${newrompath%.rom}_noblobs.rom"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue