packages: roms: boot: filter out invalid computers.
For some reason, 'make release' produces the following files: - release/roms/gnuboot-lbwww-20211122-328-gafe01fb_default.tar.xz - release/roms/gnuboot-lbwww-20211122-328-gafe01fb_fam15h_rdimm.tar.xz - release/roms/gnuboot-lbwww-20211122-328-gafe01fb_fam15h_udimm.tar.xz This commit works around that issue. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
This commit is contained in:
parent
e4c2fd5eb6
commit
1611a810b4
1
Makefile
1
Makefile
|
@ -103,4 +103,5 @@ check:
|
|||
echo 'Makefile: running $@ target' >> $(LOG)
|
||||
set -o pipefail ; ./tests/lint | tee -a $(LOG)
|
||||
set -o pipefail ; ./tests/distclean | tee -a $(LOG)
|
||||
set -o pipefail ; ./tests/targets 2>&1 | tee -a $(LOG)
|
||||
@echo "[ OK ] Makefile: $@ target. See $(LOG) for the log."
|
||||
|
|
|
@ -33,6 +33,16 @@ listboards() {
|
|||
if [ ! -d "${boarddir}" ]; then continue; fi
|
||||
board="${boarddir##resources/coreboot/}"
|
||||
board="${board%/}"
|
||||
|
||||
# TODO: In GNU Boot 0.1 RC1 build the release didn't produce
|
||||
# images for the 'default', 'fam15h_rdimm' and 'fam15h_udimm'
|
||||
# 'computers'. So a bug was introduced at some point and made
|
||||
# GNU Boot build these targets. Since we didn't find the bug we
|
||||
# workaround it instead.
|
||||
if [ "${board}" = "default" ]; then continue; fi
|
||||
if [ "${board}" = "fam15h_rdimm" ]; then continue; fi
|
||||
if [ "${board}" = "fam15h_udimm" ]; then continue; fi
|
||||
|
||||
printf '%s\n' "${board##*/}"
|
||||
done
|
||||
}
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
#!/usr/bin/env bash
|
||||
#
|
||||
# Copyright (C) 2023 Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
printf "+-----------------------+\n"
|
||||
printf "| Running targets test: |\n"
|
||||
printf "+-----------------------+\n"
|
||||
|
||||
errors=0
|
||||
|
||||
report()
|
||||
{
|
||||
ret=$?
|
||||
target="$1"
|
||||
|
||||
if [ ${ret} -ne 0 ] ; then
|
||||
echo "[ OK ] ./build boot roms list: ${target} target not found."
|
||||
else
|
||||
errors=$(expr ${errors} + 1)
|
||||
echo "[ !! ] ./build boot roms list: found ${target} target."
|
||||
fi
|
||||
}
|
||||
|
||||
for target in default fam15h_rdimm fam15h_udimm ; do
|
||||
./build boot roms list | grep "^${target}\$" 2>&1 >/dev/null; \
|
||||
report "${target}"
|
||||
done
|
||||
|
||||
if [ ${errors} -gt 0 ] ; then
|
||||
exit 1
|
||||
fi
|
Loading…
Reference in New Issue