mirror of
https://git.savannah.gnu.org/git/gnuboot.git
synced 2025-01-06 16:27:40 +01:00
Denis 'GNUtoo' Carikli
6fa9af30ad
The seabios_grubfirst images provides the same functionality than the GRUB images, but instead of having GRUB being loaded directly by Coreboot, Coreboot loads SeaBIOS which then loads GRUB. These images probably exist to enable end users to try it to workaround potential compatibility issues between the OS and GRUB with the GRUB image as we have a BIOS implementation being loaded. While this looks useful, it also makes things more complicated: - It increase the number of images to choose from, and it's complicated to explain the difference between grub and seabios_grubfirst to end users. For instance for the "x200_8mb", users need to choose between 2 GPU modes (corebootfb, or txtmode) and 12 keyboard layouts. So having to choose between 2 payloads instead of 3 with one difference that is hard to understand makes things easier. - It makes testing more complicated as we have one more payload to test and we also need to make sure to always differenciate both images in bug reports, documentation, etc. And if issues arise from this change in the future, we could work with upstream to fix them and/or replace the grub images with 'seabios_grubfirst' while keeping the 'grub' name to avoid complicating things by having two main payloads with identical features. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> neox: fixed typos in commit message Acked-by: Adrien 'neox' Bourmault <neox@gnu.org>
211 lines
5.4 KiB
Bash
Executable file
211 lines
5.4 KiB
Bash
Executable file
#!/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/>.
|
|
|
|
. resources/scripts/misc/sysexits.sh
|
|
|
|
topdir="$(realpath "$(dirname "$(dirname "$(dirname "$(dirname "$0")")")")")"
|
|
|
|
progname="resources/packages/tests/test-release"
|
|
rev="$("${topdir}"/resources/git/git describe --tags HEAD)"
|
|
|
|
usage()
|
|
{
|
|
progname="$1"
|
|
|
|
printf "Usage: %s [options]\n\n" "${progname}"
|
|
printf "Available options:\n"
|
|
printf "\t-h, --help\n"
|
|
printf "\t\tDisplay this help and exit.\n"
|
|
}
|
|
|
|
test_file()
|
|
{
|
|
path="$1"
|
|
|
|
test -f "${path}" ; ret=$?
|
|
|
|
if [ ${ret} -eq 0 ] ; then
|
|
echo "[ OK ] ${path}"
|
|
else
|
|
echo "[ !! ] ${path} is missing"
|
|
exit ${ret}
|
|
fi
|
|
}
|
|
|
|
test_qemu_rom_archive()
|
|
{
|
|
target="qemu-pc_2mb"
|
|
dir="release"
|
|
|
|
keyboard_layouts=" \
|
|
colemak \
|
|
deqwertz \
|
|
esqwerty \
|
|
frazerty \
|
|
frdvbepo \
|
|
itqwerty \
|
|
svenska \
|
|
trqwerty \
|
|
ukdvorak \
|
|
ukqwerty \
|
|
usdvorak \
|
|
usqwerty \
|
|
"
|
|
|
|
archive_files=""
|
|
for kb in ${keyboard_layouts} ; do
|
|
cbfb="libgfxinit_corebootfb"
|
|
txtmode="libgfxinit_txtmode"
|
|
|
|
archive_files="${archive_files} \
|
|
${target}/grub_${target}_${cbfb}_${kb}.rom \
|
|
${target}/grub_${target}_${txtmode}_${kb}.rom \
|
|
${target}/seabios_withgrub_${target}_${cbfb}_${kb}.rom \
|
|
${target}/seabios_withgrub_${target}_${txtmode}_${kb}.rom \
|
|
"
|
|
done
|
|
|
|
archive_files="${archive_files} qemu-pc_2mb/version"
|
|
archive_files="${archive_files} qemu-pc_2mb/versiondate"
|
|
archive_files="${archive_files} qemu-pc_2mb/projectname"
|
|
|
|
archive="${dir}"/roms/gnuboot-"${rev}"_"${target}".tar.xz
|
|
|
|
for path in $(tar tf "${archive}" | grep -v '/$') ; do
|
|
found=0
|
|
for archive_file in ${archive_files} ; do
|
|
if [ "${path}" = "${archive_file}" ] ; then
|
|
found=1
|
|
fi
|
|
done
|
|
|
|
if [ $found -eq 0 ] ; then
|
|
echo "[ !! ] $path"
|
|
fi
|
|
done
|
|
}
|
|
|
|
test_release_dir()
|
|
{
|
|
dir="release"
|
|
|
|
targets="\
|
|
d510mo \
|
|
d510mo_16mb \
|
|
d945gclf \
|
|
d945gclf_16mb \
|
|
g43t-am3 \
|
|
g43t-am3_16mb \
|
|
ga-g41m-es2l \
|
|
kcma-d8-rdimm_16mb \
|
|
kcma-d8-rdimm_2mb \
|
|
kcma-d8-udimm_16mb \
|
|
kcma-d8-udimm_2mb \
|
|
kfsn4-dre_1mb \
|
|
kfsn4-dre_2mb \
|
|
kgpe-d16-rdimm_16mb \
|
|
kgpe-d16-rdimm_2mb \
|
|
kgpe-d16-udimm_16mb \
|
|
kgpe-d16-udimm_2mb \
|
|
macbook11 \
|
|
macbook11_16mb \
|
|
macbook21 \
|
|
macbook21_16mb \
|
|
qemu-pc_2mb \
|
|
r400_16mb \
|
|
r400_4mb \
|
|
r400_8mb \
|
|
r500_4mb \
|
|
t400_16mb \
|
|
t400_4mb \
|
|
t400_8mb \
|
|
t500_16mb \
|
|
t500_4mb \
|
|
t500_8mb \
|
|
t60_16mb_intelgpu \
|
|
t60_intelgpu \
|
|
w500_16mb \
|
|
w500_4mb \
|
|
w500_8mb \
|
|
x200_16mb \
|
|
x200_4mb \
|
|
x200_8mb \
|
|
x301_16mb \
|
|
x301_4mb \
|
|
x301_8mb \
|
|
x60 \
|
|
x60_16mb \
|
|
"
|
|
|
|
release_files=""
|
|
|
|
for target in ${targets} ; do
|
|
archive_path="${dir}"/roms/gnuboot-"${rev}"_"${target}".tar.xz
|
|
release_files="${release_files}"" ""${archive_path}"
|
|
done
|
|
|
|
release_files="${release_files}"" ""${dir}"/gnuboot-"${rev}"_src.tar.xz
|
|
|
|
release_files="${release_files}"" ""${dir}"/gnuboot-source-"${rev}".bundle
|
|
|
|
release_files="${release_files}"" ""${dir}"/untitled-"${rev}".bundle
|
|
|
|
release_files="${release_files}"" ""${dir}"/gnuboot-website-"${rev}".tar.gz
|
|
|
|
release_files="${release_files}"" ""${dir}"/i945-thinkpads-install/i945-thinkpads-install-utilities-deb-pack.deb
|
|
release_files="${release_files}"" ""${dir}"/i945-thinkpads-install/packages_src.tar
|
|
release_files="${release_files}"" ""${dir}"/i945-thinkpads-install/gnuboot_src.tar
|
|
release_files="${release_files}"" ""${dir}"/i945-thinkpads-install/i945-thinkpads-install-utilities-tarball-pack.tar.gz
|
|
|
|
for path in ${release_files} ; do
|
|
test_file "${path}"
|
|
done
|
|
|
|
missing_in_release_files=0
|
|
while IFS= read -r -d '' path ; do
|
|
found=0
|
|
for release_file in ${release_files} ; do
|
|
if [ "${path}" = "${release_file}" ] ; then
|
|
found=1
|
|
fi
|
|
done
|
|
|
|
if [ $found -eq 0 ] ; then
|
|
echo "[ !! ] $path missing in \${release_files}"
|
|
missing_in_release_files=$(expr $missing_in_release_files + 1)
|
|
fi
|
|
done < <(find "${dir}" -type f -print0)
|
|
|
|
if [ ${missing_in_release_files} -gt 0 ] ; then
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
test_release()
|
|
{
|
|
test_release_dir
|
|
test_qemu_rom_archive
|
|
}
|
|
|
|
if [ $# -eq 1 ] && { [ "$1" = "-h" ] || [ "$1" == "--help" ] ;} ; then
|
|
usage "${progname}"
|
|
exit 0
|
|
elif [ $# -eq 0 ] ; then
|
|
test_release
|
|
else
|
|
usage "${progname}"
|
|
exit ${EX_USAGE}
|
|
fi
|