2023-06-13 11:09:01 +00:00
|
|
|
#!/usr/bin/env sh
|
2023-09-25 01:19:30 +00:00
|
|
|
# SPDX-License-Identifier: GPL-3.0-only
|
2022-11-14 00:51:12 +00:00
|
|
|
# SPDX-FileCopyrightText: 2022 Caleb La Grange <thonkpeasant@protonmail.com>
|
2023-06-13 11:09:01 +00:00
|
|
|
# SPDX-FileCopyrightText: 2022 Ferass El Hafidi <vitali64pmemail@protonmail.com>
|
2023-09-25 01:27:26 +00:00
|
|
|
# SPDX-FileCopyrightText: 2023 Leah Rowe <leah@libreboot.org>
|
2022-11-14 00:51:12 +00:00
|
|
|
|
2023-08-23 17:56:31 +00:00
|
|
|
. "include/err.sh"
|
2023-10-06 23:57:55 +00:00
|
|
|
. "include/vendor.sh"
|
2023-09-27 20:46:20 +00:00
|
|
|
. "include/option.sh"
|
2023-05-14 04:42:59 +00:00
|
|
|
|
blobs/inject: fix checksum validation if no-ucode
on e6400_4mb, the release build scripts remove nvidia's vga
rom which is used on dgpu models. however, microcode is also
removed in separately copied rom images
the inject script was inserting vgaroms directly into these
no-microcode roms, but the microcode blob is bigger than the
vga rom, and cbfstool inserts into the first available free
spot within cbfs, so it was inserting into the spot where
cpu microcode went. this caused the rom checksum to not match
what was generated during build/release/roms being executed
the only real fix is to guarantee offsets within cbfs for all
files, by recording what offsets were used and then calculating
that during insertion
so this patch is a workaround, but fixes the issue. the workaround
is: don't insert blobs directly on no-microcode roms, instead
insert only on microcode-based roms, then re-copy those roms
and remove microcode in aptly named copies
it's a bit more convoluted, but works perfectly fine.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-09 19:05:11 +00:00
|
|
|
release_archive="n"
|
|
|
|
|
2023-05-14 04:42:59 +00:00
|
|
|
main()
|
|
|
|
{
|
2023-08-23 17:56:31 +00:00
|
|
|
[ $# -lt 1 ] && err "No options specified."
|
2023-08-27 13:14:49 +00:00
|
|
|
[ "${1}" = "listboards" ] && \
|
2023-09-27 20:46:20 +00:00
|
|
|
listitems config/coreboot && exit 0
|
2022-11-14 00:51:12 +00:00
|
|
|
|
2023-05-14 04:42:59 +00:00
|
|
|
archive="${1}"
|
|
|
|
|
|
|
|
while getopts r:b:m: option
|
|
|
|
do
|
2023-07-29 06:24:18 +00:00
|
|
|
case "${option}" in
|
2023-09-26 00:34:10 +00:00
|
|
|
r) rom=${OPTARG} ;;
|
|
|
|
b) board=${OPTARG} ;;
|
|
|
|
m) modifygbe=true
|
|
|
|
new_mac=${OPTARG} ;;
|
2023-07-29 06:24:18 +00:00
|
|
|
esac
|
2023-05-14 04:42:59 +00:00
|
|
|
done
|
2022-11-14 00:51:12 +00:00
|
|
|
|
2023-05-14 04:42:59 +00:00
|
|
|
check_board
|
|
|
|
build_dependencies
|
2023-10-06 23:57:55 +00:00
|
|
|
inject_vendorfiles
|
2023-08-16 23:43:34 +00:00
|
|
|
|
|
|
|
printf "Friendly reminder (this is *not* an error message):\n"
|
|
|
|
printf "Please always ensure that the files were inserted correctly.\n"
|
2022-11-14 00:51:12 +00:00
|
|
|
}
|
|
|
|
|
2023-05-14 04:42:59 +00:00
|
|
|
check_board()
|
|
|
|
{
|
2023-08-27 08:25:50 +00:00
|
|
|
if ! check_release "${archive}" ; then
|
2023-08-21 18:41:49 +00:00
|
|
|
[ -f "${rom}" ] || \
|
much, much stricter, more verbose error handling
lbmk is much more likely to crash now, in error conditions,
which is a boon for further auditing.
also: in "fetch", remove the downloaded program
if fail() was called.
this would also be done for gnulib, when downloading
grub, but done in such a way that gnulib goes first.
where calls to err write "ERROR" in the string, they
no longer say "ERROR" because the "err" function itself
now does that automatically.
also: listmodes/listoptions (in "lbmk") now reports an
error if no scripts and/or directories are found.
also: where a warning is given, but not an error, i've
gone through in some places and redirected the output
to stderr, not stdout
as part of error checks: running anything as root, except
for the "./build dependencies *" commands, is no longer
permitted and lbmk will throw an error
mrc downloads: debugfs output no longer redirected to /dev/null,
and stderr no longer redirected to stdout. everything is verbose.
certain non-error states are also more verbose. for example,
patch_rom in blobs/inject will now state when injection succeeds
certain actual errors(bugs) were fixed:
for example, build/release/roms now correctly prepares the blobs
hash files for a given target, containing only the files and
checksums in the list. Previously, a printf message was included.
Now, with this new code: blobutil/inject rightly verifies hashes.
doing all of this in one giant patch is cleaner
than 100 patches changing each file. even this is yet part
of a much larger audit going on in the Libreboot project.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-24 19:19:41 +00:00
|
|
|
err "check_board: \"${rom}\" is not a valid path"
|
2023-10-07 04:36:52 +00:00
|
|
|
[ -z "${rom+x}" ] && \
|
much, much stricter, more verbose error handling
lbmk is much more likely to crash now, in error conditions,
which is a boon for further auditing.
also: in "fetch", remove the downloaded program
if fail() was called.
this would also be done for gnulib, when downloading
grub, but done in such a way that gnulib goes first.
where calls to err write "ERROR" in the string, they
no longer say "ERROR" because the "err" function itself
now does that automatically.
also: listmodes/listoptions (in "lbmk") now reports an
error if no scripts and/or directories are found.
also: where a warning is given, but not an error, i've
gone through in some places and redirected the output
to stderr, not stdout
as part of error checks: running anything as root, except
for the "./build dependencies *" commands, is no longer
permitted and lbmk will throw an error
mrc downloads: debugfs output no longer redirected to /dev/null,
and stderr no longer redirected to stdout. everything is verbose.
certain non-error states are also more verbose. for example,
patch_rom in blobs/inject will now state when injection succeeds
certain actual errors(bugs) were fixed:
for example, build/release/roms now correctly prepares the blobs
hash files for a given target, containing only the files and
checksums in the list. Previously, a printf message was included.
Now, with this new code: blobutil/inject rightly verifies hashes.
doing all of this in one giant patch is cleaner
than 100 patches changing each file. even this is yet part
of a much larger audit going on in the Libreboot project.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-24 19:19:41 +00:00
|
|
|
err "check_board: no rom specified"
|
2023-08-21 18:41:49 +00:00
|
|
|
[ ! -z ${board+x} ] || \
|
much, much stricter, more verbose error handling
lbmk is much more likely to crash now, in error conditions,
which is a boon for further auditing.
also: in "fetch", remove the downloaded program
if fail() was called.
this would also be done for gnulib, when downloading
grub, but done in such a way that gnulib goes first.
where calls to err write "ERROR" in the string, they
no longer say "ERROR" because the "err" function itself
now does that automatically.
also: listmodes/listoptions (in "lbmk") now reports an
error if no scripts and/or directories are found.
also: where a warning is given, but not an error, i've
gone through in some places and redirected the output
to stderr, not stdout
as part of error checks: running anything as root, except
for the "./build dependencies *" commands, is no longer
permitted and lbmk will throw an error
mrc downloads: debugfs output no longer redirected to /dev/null,
and stderr no longer redirected to stdout. everything is verbose.
certain non-error states are also more verbose. for example,
patch_rom in blobs/inject will now state when injection succeeds
certain actual errors(bugs) were fixed:
for example, build/release/roms now correctly prepares the blobs
hash files for a given target, containing only the files and
checksums in the list. Previously, a printf message was included.
Now, with this new code: blobutil/inject rightly verifies hashes.
doing all of this in one giant patch is cleaner
than 100 patches changing each file. even this is yet part
of a much larger audit going on in the Libreboot project.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-24 19:19:41 +00:00
|
|
|
board=$(detect_board "${rom}")
|
2023-05-14 04:42:59 +00:00
|
|
|
else
|
|
|
|
release=true
|
|
|
|
releasearchive="${archive}"
|
much, much stricter, more verbose error handling
lbmk is much more likely to crash now, in error conditions,
which is a boon for further auditing.
also: in "fetch", remove the downloaded program
if fail() was called.
this would also be done for gnulib, when downloading
grub, but done in such a way that gnulib goes first.
where calls to err write "ERROR" in the string, they
no longer say "ERROR" because the "err" function itself
now does that automatically.
also: listmodes/listoptions (in "lbmk") now reports an
error if no scripts and/or directories are found.
also: where a warning is given, but not an error, i've
gone through in some places and redirected the output
to stderr, not stdout
as part of error checks: running anything as root, except
for the "./build dependencies *" commands, is no longer
permitted and lbmk will throw an error
mrc downloads: debugfs output no longer redirected to /dev/null,
and stderr no longer redirected to stdout. everything is verbose.
certain non-error states are also more verbose. for example,
patch_rom in blobs/inject will now state when injection succeeds
certain actual errors(bugs) were fixed:
for example, build/release/roms now correctly prepares the blobs
hash files for a given target, containing only the files and
checksums in the list. Previously, a printf message was included.
Now, with this new code: blobutil/inject rightly verifies hashes.
doing all of this in one giant patch is cleaner
than 100 patches changing each file. even this is yet part
of a much larger audit going on in the Libreboot project.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-24 19:19:41 +00:00
|
|
|
board=$(detect_board "${archive}")
|
2022-11-14 00:51:12 +00:00
|
|
|
fi
|
|
|
|
|
2023-05-14 04:42:59 +00:00
|
|
|
boarddir="${cbcfgsdir}/${board}"
|
2023-09-30 19:04:02 +00:00
|
|
|
[ -d "${boarddir}" ] && return 0
|
|
|
|
err "check_board: board ${board} not found"
|
2022-11-14 00:51:12 +00:00
|
|
|
}
|
|
|
|
|
2023-05-14 04:42:59 +00:00
|
|
|
check_release()
|
|
|
|
{
|
2023-08-21 18:41:49 +00:00
|
|
|
[ -f "${archive}" ] || return 1
|
|
|
|
[ "${archive##*.}" = "xz" ] || return 1
|
|
|
|
printf "%s\n" "Release archive ${archive} detected"
|
2022-11-14 00:51:12 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# This function tries to determine the board from the filename of the rom.
|
|
|
|
# It will only succeed if the filename is not changed from the build/download
|
2023-05-14 04:42:59 +00:00
|
|
|
detect_board()
|
|
|
|
{
|
2023-08-27 08:25:50 +00:00
|
|
|
path="${1}"
|
2023-04-03 00:06:46 +00:00
|
|
|
filename=$(basename ${path})
|
2022-11-14 00:51:12 +00:00
|
|
|
case ${filename} in
|
2023-07-29 06:24:18 +00:00
|
|
|
grub_*)
|
2023-08-21 18:41:49 +00:00
|
|
|
board=$(echo "${filename}" | cut -d '_' -f2-3) ;;
|
2023-07-29 06:24:18 +00:00
|
|
|
seabios_withgrub_*)
|
2023-08-21 18:41:49 +00:00
|
|
|
board=$(echo "${filename}" | cut -d '_' -f3-4) ;;
|
2023-07-29 06:24:18 +00:00
|
|
|
*.tar.xz)
|
2023-04-03 00:06:46 +00:00
|
|
|
_stripped_prefix=${filename#*_}
|
2023-08-21 18:41:49 +00:00
|
|
|
board="${_stripped_prefix%.tar.xz}" ;;
|
2023-07-29 06:24:18 +00:00
|
|
|
*)
|
2023-08-23 18:56:01 +00:00
|
|
|
err "detect_board: could not detect board type"
|
2022-11-14 00:51:12 +00:00
|
|
|
esac
|
2023-08-23 18:56:01 +00:00
|
|
|
[ -d "${boarddir}/" ] || \
|
2023-10-01 05:33:43 +00:00
|
|
|
err "detect_board: dir, ${boarddir}, doesn't exist"
|
2023-09-09 22:27:44 +00:00
|
|
|
printf "%s\n" "${board}"
|
2022-11-14 00:51:12 +00:00
|
|
|
}
|
|
|
|
|
2023-05-14 04:42:59 +00:00
|
|
|
build_dependencies()
|
|
|
|
{
|
2023-10-07 05:55:10 +00:00
|
|
|
[ -d "${cbdir}" ] || x_ ./update project trees -f coreboot default
|
2023-10-13 02:20:33 +00:00
|
|
|
if [ ! -f "${cbfstool}" ] || [ ! -f "${ifdtool}" ]; then
|
|
|
|
x_ ./update project trees -b coreboot utils default
|
|
|
|
fi
|
2023-10-06 23:57:55 +00:00
|
|
|
x_ ./update vendor download ${board}
|
2023-05-14 04:42:59 +00:00
|
|
|
}
|
2023-05-06 20:21:42 +00:00
|
|
|
|
2023-10-06 23:57:55 +00:00
|
|
|
inject_vendorfiles()
|
2023-05-14 04:42:59 +00:00
|
|
|
{
|
blobs/inject: fix checksum validation if no-ucode
on e6400_4mb, the release build scripts remove nvidia's vga
rom which is used on dgpu models. however, microcode is also
removed in separately copied rom images
the inject script was inserting vgaroms directly into these
no-microcode roms, but the microcode blob is bigger than the
vga rom, and cbfstool inserts into the first available free
spot within cbfs, so it was inserting into the spot where
cpu microcode went. this caused the rom checksum to not match
what was generated during build/release/roms being executed
the only real fix is to guarantee offsets within cbfs for all
files, by recording what offsets were used and then calculating
that during insertion
so this patch is a workaround, but fixes the issue. the workaround
is: don't insert blobs directly on no-microcode roms, instead
insert only on microcode-based roms, then re-copy those roms
and remove microcode in aptly named copies
it's a bit more convoluted, but works perfectly fine.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-09 19:05:11 +00:00
|
|
|
release_archive="n"
|
2023-10-03 11:59:35 +00:00
|
|
|
[ "${release}" != "true" ] && x_ patch_rom "${rom}" && return 0
|
|
|
|
printf "patching release file\n"
|
|
|
|
release_archive="y"
|
|
|
|
patch_release_roms
|
2023-04-03 00:06:46 +00:00
|
|
|
}
|
|
|
|
|
2023-05-14 04:42:59 +00:00
|
|
|
patch_release_roms()
|
|
|
|
{
|
2023-09-05 00:49:35 +00:00
|
|
|
_tmpdir="tmp/romdir"
|
2023-10-01 05:33:43 +00:00
|
|
|
x_ rm -Rf "${_tmpdir}"
|
|
|
|
x_ mkdir -p "${_tmpdir}"
|
|
|
|
x_ tar -xf "${releasearchive}" -C "${_tmpdir}"
|
2023-05-14 04:42:59 +00:00
|
|
|
|
2023-08-27 08:25:50 +00:00
|
|
|
for x in "${_tmpdir}"/bin/*/*.rom ; do
|
2023-09-09 22:31:20 +00:00
|
|
|
printf "patching rom: %s\n" "$x"
|
2023-10-01 05:33:43 +00:00
|
|
|
x_ patch_rom "${x}"
|
2023-04-03 00:06:46 +00:00
|
|
|
done
|
blobs/inject: fix checksum validation if no-ucode
on e6400_4mb, the release build scripts remove nvidia's vga
rom which is used on dgpu models. however, microcode is also
removed in separately copied rom images
the inject script was inserting vgaroms directly into these
no-microcode roms, but the microcode blob is bigger than the
vga rom, and cbfstool inserts into the first available free
spot within cbfs, so it was inserting into the spot where
cpu microcode went. this caused the rom checksum to not match
what was generated during build/release/roms being executed
the only real fix is to guarantee offsets within cbfs for all
files, by recording what offsets were used and then calculating
that during insertion
so this patch is a workaround, but fixes the issue. the workaround
is: don't insert blobs directly on no-microcode roms, instead
insert only on microcode-based roms, then re-copy those roms
and remove microcode in aptly named copies
it's a bit more convoluted, but works perfectly fine.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-09 19:05:11 +00:00
|
|
|
for x in "${_tmpdir}"/bin/*/*_nomicrocode.rom ; do
|
|
|
|
[ -f "${x}" ] || continue
|
|
|
|
[ -f "${x%_nomicrocode.rom}.rom" ] || continue
|
|
|
|
|
2023-10-01 05:33:43 +00:00
|
|
|
x_ cp "${x%_nomicrocode.rom}.rom" "${x}"
|
|
|
|
x_ "${cbfstool}" "${x}" remove -n cpu_microcode_blob.bin
|
blobs/inject: fix checksum validation if no-ucode
on e6400_4mb, the release build scripts remove nvidia's vga
rom which is used on dgpu models. however, microcode is also
removed in separately copied rom images
the inject script was inserting vgaroms directly into these
no-microcode roms, but the microcode blob is bigger than the
vga rom, and cbfstool inserts into the first available free
spot within cbfs, so it was inserting into the spot where
cpu microcode went. this caused the rom checksum to not match
what was generated during build/release/roms being executed
the only real fix is to guarantee offsets within cbfs for all
files, by recording what offsets were used and then calculating
that during insertion
so this patch is a workaround, but fixes the issue. the workaround
is: don't insert blobs directly on no-microcode roms, instead
insert only on microcode-based roms, then re-copy those roms
and remove microcode in aptly named copies
it's a bit more convoluted, but works perfectly fine.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-09 19:05:11 +00:00
|
|
|
done
|
2023-04-03 00:06:46 +00:00
|
|
|
|
2023-05-14 04:42:59 +00:00
|
|
|
(
|
2023-10-01 05:33:43 +00:00
|
|
|
x_ cd "${_tmpdir}/bin/"*
|
2023-09-09 15:39:26 +00:00
|
|
|
|
|
|
|
# NOTE: For compatibility with older rom releases, defer to sha1
|
2023-10-06 23:57:55 +00:00
|
|
|
sha512sum --status -c vendorhashes || \
|
|
|
|
sha1sum --status -c vendorhashes || \
|
|
|
|
sha512sum --status -c blobhashes || \
|
blobs/inject: fix checksum validation if no-ucode
on e6400_4mb, the release build scripts remove nvidia's vga
rom which is used on dgpu models. however, microcode is also
removed in separately copied rom images
the inject script was inserting vgaroms directly into these
no-microcode roms, but the microcode blob is bigger than the
vga rom, and cbfstool inserts into the first available free
spot within cbfs, so it was inserting into the spot where
cpu microcode went. this caused the rom checksum to not match
what was generated during build/release/roms being executed
the only real fix is to guarantee offsets within cbfs for all
files, by recording what offsets were used and then calculating
that during insertion
so this patch is a workaround, but fixes the issue. the workaround
is: don't insert blobs directly on no-microcode roms, instead
insert only on microcode-based roms, then re-copy those roms
and remove microcode in aptly named copies
it's a bit more convoluted, but works perfectly fine.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-09 19:05:11 +00:00
|
|
|
sha1sum --status -c blobhashes || \
|
much, much stricter, more verbose error handling
lbmk is much more likely to crash now, in error conditions,
which is a boon for further auditing.
also: in "fetch", remove the downloaded program
if fail() was called.
this would also be done for gnulib, when downloading
grub, but done in such a way that gnulib goes first.
where calls to err write "ERROR" in the string, they
no longer say "ERROR" because the "err" function itself
now does that automatically.
also: listmodes/listoptions (in "lbmk") now reports an
error if no scripts and/or directories are found.
also: where a warning is given, but not an error, i've
gone through in some places and redirected the output
to stderr, not stdout
as part of error checks: running anything as root, except
for the "./build dependencies *" commands, is no longer
permitted and lbmk will throw an error
mrc downloads: debugfs output no longer redirected to /dev/null,
and stderr no longer redirected to stdout. everything is verbose.
certain non-error states are also more verbose. for example,
patch_rom in blobs/inject will now state when injection succeeds
certain actual errors(bugs) were fixed:
for example, build/release/roms now correctly prepares the blobs
hash files for a given target, containing only the files and
checksums in the list. Previously, a printf message was included.
Now, with this new code: blobutil/inject rightly verifies hashes.
doing all of this in one giant patch is cleaner
than 100 patches changing each file. even this is yet part
of a much larger audit going on in the Libreboot project.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-24 19:19:41 +00:00
|
|
|
err "patch_release_roms: ROMs did not match expected hashes"
|
2023-04-03 00:06:46 +00:00
|
|
|
)
|
|
|
|
|
2022-11-14 00:51:12 +00:00
|
|
|
if [ "${modifygbe}" = "true" ]; then
|
2023-08-27 08:25:50 +00:00
|
|
|
for x in "${_tmpdir}"/bin/*/*.rom ; do
|
|
|
|
modify_gbe "${x}"
|
2023-04-03 00:06:46 +00:00
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2023-10-01 05:33:43 +00:00
|
|
|
[ -d bin/release ] || x_ mkdir -p bin/release
|
|
|
|
x_ mv "${_tmpdir}"/bin/* bin/release/
|
much, much stricter, more verbose error handling
lbmk is much more likely to crash now, in error conditions,
which is a boon for further auditing.
also: in "fetch", remove the downloaded program
if fail() was called.
this would also be done for gnulib, when downloading
grub, but done in such a way that gnulib goes first.
where calls to err write "ERROR" in the string, they
no longer say "ERROR" because the "err" function itself
now does that automatically.
also: listmodes/listoptions (in "lbmk") now reports an
error if no scripts and/or directories are found.
also: where a warning is given, but not an error, i've
gone through in some places and redirected the output
to stderr, not stdout
as part of error checks: running anything as root, except
for the "./build dependencies *" commands, is no longer
permitted and lbmk will throw an error
mrc downloads: debugfs output no longer redirected to /dev/null,
and stderr no longer redirected to stdout. everything is verbose.
certain non-error states are also more verbose. for example,
patch_rom in blobs/inject will now state when injection succeeds
certain actual errors(bugs) were fixed:
for example, build/release/roms now correctly prepares the blobs
hash files for a given target, containing only the files and
checksums in the list. Previously, a printf message was included.
Now, with this new code: blobutil/inject rightly verifies hashes.
doing all of this in one giant patch is cleaner
than 100 patches changing each file. even this is yet part
of a much larger audit going on in the Libreboot project.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-24 19:19:41 +00:00
|
|
|
|
|
|
|
printf "Success! Your ROMs are in bin/release\n"
|
2023-04-03 00:06:46 +00:00
|
|
|
|
2023-10-01 05:33:43 +00:00
|
|
|
x_ rm -Rf "${_tmpdir}"
|
2023-04-03 00:06:46 +00:00
|
|
|
}
|
|
|
|
|
2023-05-14 04:42:59 +00:00
|
|
|
patch_rom()
|
|
|
|
{
|
|
|
|
rom="${1}"
|
|
|
|
|
blobs/inject: fix checksum validation if no-ucode
on e6400_4mb, the release build scripts remove nvidia's vga
rom which is used on dgpu models. however, microcode is also
removed in separately copied rom images
the inject script was inserting vgaroms directly into these
no-microcode roms, but the microcode blob is bigger than the
vga rom, and cbfstool inserts into the first available free
spot within cbfs, so it was inserting into the spot where
cpu microcode went. this caused the rom checksum to not match
what was generated during build/release/roms being executed
the only real fix is to guarantee offsets within cbfs for all
files, by recording what offsets were used and then calculating
that during insertion
so this patch is a workaround, but fixes the issue. the workaround
is: don't insert blobs directly on no-microcode roms, instead
insert only on microcode-based roms, then re-copy those roms
and remove microcode in aptly named copies
it's a bit more convoluted, but works perfectly fine.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-09 19:05:11 +00:00
|
|
|
# we don't process no-microcode roms; these are
|
|
|
|
# instead re-created at the end, after re-inserting
|
|
|
|
# on roms with microcode, by copying and then removing,
|
|
|
|
# so that the hashes will match (otherwise, cbfstool
|
2023-10-06 23:57:55 +00:00
|
|
|
# may sometimes insert certain vendor files at the wrong offset)
|
blobs/inject: fix checksum validation if no-ucode
on e6400_4mb, the release build scripts remove nvidia's vga
rom which is used on dgpu models. however, microcode is also
removed in separately copied rom images
the inject script was inserting vgaroms directly into these
no-microcode roms, but the microcode blob is bigger than the
vga rom, and cbfstool inserts into the first available free
spot within cbfs, so it was inserting into the spot where
cpu microcode went. this caused the rom checksum to not match
what was generated during build/release/roms being executed
the only real fix is to guarantee offsets within cbfs for all
files, by recording what offsets were used and then calculating
that during insertion
so this patch is a workaround, but fixes the issue. the workaround
is: don't insert blobs directly on no-microcode roms, instead
insert only on microcode-based roms, then re-copy those roms
and remove microcode in aptly named copies
it's a bit more convoluted, but works perfectly fine.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-09-09 19:05:11 +00:00
|
|
|
# (unless nomicrocode is the only config provided)
|
|
|
|
[ "${rom}" != "${rom%_nomicrocode.rom}.rom" ] && \
|
|
|
|
[ -f "${rom%_nomicrocode.rom}.rom" ] && \
|
|
|
|
[ "${release_archive}" = "y" ] && return 0
|
|
|
|
|
2023-10-01 05:33:43 +00:00
|
|
|
x_ check_defconfig "${boarddir}"
|
2023-09-29 21:34:34 +00:00
|
|
|
|
2023-05-14 04:42:59 +00:00
|
|
|
set -- "${boarddir}/config/"*
|
2023-08-31 16:16:54 +00:00
|
|
|
. "${1}" 2>/dev/null
|
2023-05-14 04:42:59 +00:00
|
|
|
|
2023-08-21 18:41:49 +00:00
|
|
|
[ "$CONFIG_HAVE_MRC" = "y" ] && \
|
2023-10-06 23:57:55 +00:00
|
|
|
inject_vendorfile_intel_mrc "${rom}"
|
2023-08-21 18:41:49 +00:00
|
|
|
[ "${CONFIG_HAVE_ME_BIN}" = "y" ] && \
|
2023-10-06 23:57:55 +00:00
|
|
|
inject_vendorfile_intel_me "${rom}"
|
2023-08-21 18:41:49 +00:00
|
|
|
[ "${CONFIG_KBC1126_FIRMWARE}" = "y" ] && \
|
2023-10-06 23:57:55 +00:00
|
|
|
inject_vendorfile_hp_kbc1126_ec "${rom}"
|
2023-08-21 18:41:49 +00:00
|
|
|
[ "${CONFIG_VGA_BIOS_FILE}" != "" ] && \
|
|
|
|
[ "${CONFIG_VGA_BIOS_ID}" != "" ] && \
|
2023-10-06 23:57:55 +00:00
|
|
|
inject_vendorfile_dell_e6400_vgarom_nvidia "${rom}"
|
2023-08-21 18:41:49 +00:00
|
|
|
[ "${CONFIG_INCLUDE_SMSC_SCH5545_EC_FW}" = "y" ] && \
|
|
|
|
[ "${CONFIG_SMSC_SCH5545_EC_FW_FILE}" != "" ] && \
|
2023-10-06 23:57:55 +00:00
|
|
|
inject_vendorfile_smsc_sch5545_ec "${rom}"
|
2023-08-21 18:41:49 +00:00
|
|
|
[ "${modifygbe}" = "true" ] && ! [ "${release}" = "true" ] && \
|
2023-08-27 08:25:50 +00:00
|
|
|
modify_gbe "${rom}"
|
much, much stricter, more verbose error handling
lbmk is much more likely to crash now, in error conditions,
which is a boon for further auditing.
also: in "fetch", remove the downloaded program
if fail() was called.
this would also be done for gnulib, when downloading
grub, but done in such a way that gnulib goes first.
where calls to err write "ERROR" in the string, they
no longer say "ERROR" because the "err" function itself
now does that automatically.
also: listmodes/listoptions (in "lbmk") now reports an
error if no scripts and/or directories are found.
also: where a warning is given, but not an error, i've
gone through in some places and redirected the output
to stderr, not stdout
as part of error checks: running anything as root, except
for the "./build dependencies *" commands, is no longer
permitted and lbmk will throw an error
mrc downloads: debugfs output no longer redirected to /dev/null,
and stderr no longer redirected to stdout. everything is verbose.
certain non-error states are also more verbose. for example,
patch_rom in blobs/inject will now state when injection succeeds
certain actual errors(bugs) were fixed:
for example, build/release/roms now correctly prepares the blobs
hash files for a given target, containing only the files and
checksums in the list. Previously, a printf message was included.
Now, with this new code: blobutil/inject rightly verifies hashes.
doing all of this in one giant patch is cleaner
than 100 patches changing each file. even this is yet part
of a much larger audit going on in the Libreboot project.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-24 19:19:41 +00:00
|
|
|
|
|
|
|
printf "ROM image successfully patched: %s\n" "${rom}"
|
2023-05-14 04:42:59 +00:00
|
|
|
}
|
|
|
|
|
2023-10-06 23:57:55 +00:00
|
|
|
inject_vendorfile_intel_mrc()
|
2023-05-14 04:42:59 +00:00
|
|
|
{
|
|
|
|
rom="${1}"
|
2023-04-03 00:06:46 +00:00
|
|
|
|
2023-09-09 22:27:44 +00:00
|
|
|
printf "adding mrc\n"
|
2023-04-03 00:06:46 +00:00
|
|
|
|
2023-10-06 21:59:36 +00:00
|
|
|
# mrc.bin must be inserted at a specific offset
|
blobutil/inject: use x86 top-aligned mrc offset
the old code was specifing an absolute offset for
insertion of mrc.bin - cbfstool interprets anything
above 0x80000000 as top-aligned memory address in
x86, and anything below as an obsolute offset in
the flash, like with the old number
where a top-aligned address is provided to cbfstool,
the absolute position is calculated for the flash,
and cbfstool inserts it in the correct rom location
the benefit of this change is that the absolute
offset is now calculated automatically, which means
that the code will be correct even if the flash
size changes. for example, if 16MB flash is used
whereas 12MB is currently the default an support
haswell hardware
coreboot does not provide anything readably like
Kconfig, for extracting this value. it's baked
into the source code of coreboot, so you have to
find it. the correct location is hardcoded for
each platform, and always the same on each platform,
regardless of mainboard
2023-05-14 07:16:12 +00:00
|
|
|
|
|
|
|
# in cbfstool, -b values above 0x80000000 are interpreted as
|
|
|
|
# top-aligned x86 memory locations. this is converted into an
|
|
|
|
# absolute offset within the flash, and inserted accordingly
|
|
|
|
# at that offset into the ROM image file
|
|
|
|
|
|
|
|
# coreboot's own build system hardcodes the mrc.bin offset
|
|
|
|
# because there is only one correct location in memory, but
|
2023-10-06 21:59:36 +00:00
|
|
|
# it would be useful for us if it could be easily scanned
|
blobutil/inject: use x86 top-aligned mrc offset
the old code was specifing an absolute offset for
insertion of mrc.bin - cbfstool interprets anything
above 0x80000000 as top-aligned memory address in
x86, and anything below as an obsolute offset in
the flash, like with the old number
where a top-aligned address is provided to cbfstool,
the absolute position is calculated for the flash,
and cbfstool inserts it in the correct rom location
the benefit of this change is that the absolute
offset is now calculated automatically, which means
that the code will be correct even if the flash
size changes. for example, if 16MB flash is used
whereas 12MB is currently the default an support
haswell hardware
coreboot does not provide anything readably like
Kconfig, for extracting this value. it's baked
into the source code of coreboot, so you have to
find it. the correct location is hardcoded for
each platform, and always the same on each platform,
regardless of mainboard
2023-05-14 07:16:12 +00:00
|
|
|
# from Kconfig, with the option to change it where in practise
|
|
|
|
# it is not changed
|
|
|
|
|
|
|
|
# the hardcoded offset below is based upon reading of the coreboot
|
|
|
|
# source code, and it is *always* correct for haswell platform.
|
|
|
|
# TODO: this logic should be tweaked to handle more platforms
|
|
|
|
|
2023-10-01 05:33:43 +00:00
|
|
|
x_ "${cbfstool}" "${rom}" add -f mrc/haswell/mrc.bin -n mrc.bin \
|
|
|
|
-t mrc -b 0xfffa0000
|
2022-11-14 00:51:12 +00:00
|
|
|
}
|
|
|
|
|
2023-10-06 23:57:55 +00:00
|
|
|
inject_vendorfile_intel_me()
|
2023-05-14 04:42:59 +00:00
|
|
|
{
|
2023-09-09 22:27:44 +00:00
|
|
|
printf "adding intel me firmware\n"
|
2023-05-14 07:31:59 +00:00
|
|
|
|
2023-05-14 04:42:59 +00:00
|
|
|
rom="${1}"
|
2023-10-07 04:36:52 +00:00
|
|
|
[ -z "${CONFIG_ME_BIN_PATH}" ] && \
|
2023-10-06 23:57:55 +00:00
|
|
|
err "inject_vendorfile_intel_me: CONFIG_ME_BIN_PATH not set"
|
2023-05-14 07:31:59 +00:00
|
|
|
|
2023-10-06 21:59:36 +00:00
|
|
|
_me_location=${CONFIG_ME_BIN_PATH##*../}
|
2023-08-21 18:41:49 +00:00
|
|
|
[ ! -f "${_me_location}" ] && \
|
2023-10-06 23:57:55 +00:00
|
|
|
err "inject_vendorfile_intel_me: per CONFIG_ME_BIN_PATH: file missing"
|
2023-05-14 07:31:59 +00:00
|
|
|
|
2023-10-01 05:33:43 +00:00
|
|
|
x_ "${ifdtool}" -i me:"${_me_location}" "${rom}" -O "${rom}"
|
2023-05-14 04:42:59 +00:00
|
|
|
}
|
|
|
|
|
2023-10-06 23:57:55 +00:00
|
|
|
inject_vendorfile_hp_kbc1126_ec()
|
2023-05-14 04:42:59 +00:00
|
|
|
{
|
|
|
|
rom="${1}"
|
|
|
|
|
2023-10-06 21:59:36 +00:00
|
|
|
_ec1_location="${CONFIG_KBC1126_FW1##*../}"
|
2023-05-14 04:42:59 +00:00
|
|
|
_ec1_offset="${CONFIG_KBC1126_FW1_OFFSET}"
|
2023-10-06 21:59:36 +00:00
|
|
|
_ec2_location="${CONFIG_KBC1126_FW2##*../}"
|
2023-05-14 04:42:59 +00:00
|
|
|
_ec2_offset="${CONFIG_KBC1126_FW2_OFFSET}"
|
|
|
|
|
|
|
|
printf "adding hp kbc1126 ec firmware\n"
|
|
|
|
|
|
|
|
if [ "${_ec1_offset}" = "" ] || [ "${_ec1_offset}" = "" ]; then
|
2023-10-06 23:57:55 +00:00
|
|
|
err "inject_vendorfile_hp_kbc1126_ec: ${board}: offset not declared"
|
2023-10-03 11:59:35 +00:00
|
|
|
elif [ "${_ec1_location}" = "" ] || [ "${_ec2_location}" = "" ]; then
|
2023-10-06 23:57:55 +00:00
|
|
|
err "inject_vendorfile_hp_kbc1126_ec: ${board}: EC path not declared"
|
2023-10-03 11:59:35 +00:00
|
|
|
elif [ ! -f "${_ec1_location}" ] || [ ! -f "${_ec2_location}" ]; then
|
2023-10-06 23:57:55 +00:00
|
|
|
err "inject_vendorfile_hp_kbc1126_ec: ${board}: ecfw not downloaded"
|
2023-05-14 04:42:59 +00:00
|
|
|
fi
|
|
|
|
|
2023-10-01 05:33:43 +00:00
|
|
|
x_ "${cbfstool}" "${rom}" add -f "${_ec1_location}" -n ecfw1.bin \
|
|
|
|
-b ${_ec1_offset} -t raw
|
|
|
|
x_ "${cbfstool}" "${rom}" add -f "${_ec2_location}" -n ecfw2.bin \
|
|
|
|
-b ${_ec2_offset} -t raw
|
2023-05-14 04:42:59 +00:00
|
|
|
}
|
|
|
|
|
2023-10-06 23:57:55 +00:00
|
|
|
inject_vendorfile_dell_e6400_vgarom_nvidia()
|
2023-05-14 04:42:59 +00:00
|
|
|
{
|
|
|
|
rom="${1}"
|
|
|
|
|
2023-10-06 21:59:36 +00:00
|
|
|
_vga_location="${CONFIG_VGA_BIOS_FILE##*../}"
|
2023-05-14 04:42:59 +00:00
|
|
|
_vga_dir="${_vga_location%/*}"
|
|
|
|
_vga_filename="${_vga_location##*/}"
|
|
|
|
|
|
|
|
printf "adding pci option rom\n"
|
|
|
|
|
2023-10-01 05:33:43 +00:00
|
|
|
[ "${_vga_dir}" = "${pciromsdir}" ] || \
|
2023-10-06 23:57:55 +00:00
|
|
|
err "inject_vendorfile_dell_e6400vga: invalid pcirom dir: ${_vga_dir}"
|
2023-10-01 05:33:43 +00:00
|
|
|
[ -f "${_vga_location}" ] || \
|
2023-10-06 23:57:55 +00:00
|
|
|
err "inject_vendorfile_dell_e6400vga: ${_vga_location} doesn't exist"
|
2023-05-14 04:42:59 +00:00
|
|
|
|
2023-10-01 05:33:43 +00:00
|
|
|
x_ "${cbfstool}" "${rom}" add -f "${_vga_location}" \
|
|
|
|
-n "pci${CONFIG_VGA_BIOS_ID}.rom" -t optionrom
|
2023-05-14 04:42:59 +00:00
|
|
|
}
|
|
|
|
|
2023-10-06 23:57:55 +00:00
|
|
|
inject_vendorfile_smsc_sch5545_ec()
|
NEW BOARD: Dell Precision T1650
Very nice ivybridge board that supports ECC RAM.
NOTE: I couldn't get onboard graphics working yet, but
this was confirmed working with a graphics card (in my
case nvidia quadra k420) booted in text mode on the SeaBIOS
payload. The GRUB payload also works, when loaded from SeaBIOS.
Therefore, this is a SeaBIOS-only board (as far as first payload
is concerned), but you can pick GRUB from the menu.
You could make it "GRUB-only" in practise by setting SeaBIOS
boot order to only load GRUB, and disable the SeaBIOS menu.
We refer to this as "SeaGRUB".
I've made lbmk use biosutilities and uefiextract, to
get at the SMSC SCH5545 Environmental Control (EC) firmware.
This firmware is needed for fan control. This is automatically
downloaded and extracted, from Dell UEFI firmware updates.
As with other blobs such as Intel ME, this firmware is then
scrubbed by the release build scripts. The blobutil "inject"
script can be used to re-insert it.
Of note: there is no fixed offset, but no other blobs to
be inserted in CBFS either, so the offset when re-inserting
on release ROMs should still be the same, and thus the ROM
checksums should match, when running blobutil inject.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-11 13:50:17 +00:00
|
|
|
{
|
|
|
|
rom="${1}"
|
2023-10-06 21:59:36 +00:00
|
|
|
_sch5545ec_location="${CONFIG_SMSC_SCH5545_EC_FW_FILE##*../}"
|
2023-09-30 17:41:57 +00:00
|
|
|
[ -f "${_sch5545ec_location}" ] || \
|
2023-10-06 23:57:55 +00:00
|
|
|
err "inject_vendorfile_smsc_sch5545_ec: SCH5545 fw missing"
|
NEW BOARD: Dell Precision T1650
Very nice ivybridge board that supports ECC RAM.
NOTE: I couldn't get onboard graphics working yet, but
this was confirmed working with a graphics card (in my
case nvidia quadra k420) booted in text mode on the SeaBIOS
payload. The GRUB payload also works, when loaded from SeaBIOS.
Therefore, this is a SeaBIOS-only board (as far as first payload
is concerned), but you can pick GRUB from the menu.
You could make it "GRUB-only" in practise by setting SeaBIOS
boot order to only load GRUB, and disable the SeaBIOS menu.
We refer to this as "SeaGRUB".
I've made lbmk use biosutilities and uefiextract, to
get at the SMSC SCH5545 Environmental Control (EC) firmware.
This firmware is needed for fan control. This is automatically
downloaded and extracted, from Dell UEFI firmware updates.
As with other blobs such as Intel ME, this firmware is then
scrubbed by the release build scripts. The blobutil "inject"
script can be used to re-insert it.
Of note: there is no fixed offset, but no other blobs to
be inserted in CBFS either, so the offset when re-inserting
on release ROMs should still be the same, and thus the ROM
checksums should match, when running blobutil inject.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-11 13:50:17 +00:00
|
|
|
|
2023-10-01 05:33:43 +00:00
|
|
|
x_ "${cbfstool}" "${rom}" add -f "${_sch5545ec_location}" \
|
|
|
|
-n sch5545_ecfw.bin -t raw
|
NEW BOARD: Dell Precision T1650
Very nice ivybridge board that supports ECC RAM.
NOTE: I couldn't get onboard graphics working yet, but
this was confirmed working with a graphics card (in my
case nvidia quadra k420) booted in text mode on the SeaBIOS
payload. The GRUB payload also works, when loaded from SeaBIOS.
Therefore, this is a SeaBIOS-only board (as far as first payload
is concerned), but you can pick GRUB from the menu.
You could make it "GRUB-only" in practise by setting SeaBIOS
boot order to only load GRUB, and disable the SeaBIOS menu.
We refer to this as "SeaGRUB".
I've made lbmk use biosutilities and uefiextract, to
get at the SMSC SCH5545 Environmental Control (EC) firmware.
This firmware is needed for fan control. This is automatically
downloaded and extracted, from Dell UEFI firmware updates.
As with other blobs such as Intel ME, this firmware is then
scrubbed by the release build scripts. The blobutil "inject"
script can be used to re-insert it.
Of note: there is no fixed offset, but no other blobs to
be inserted in CBFS either, so the offset when re-inserting
on release ROMs should still be the same, and thus the ROM
checksums should match, when running blobutil inject.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-11 13:50:17 +00:00
|
|
|
}
|
|
|
|
|
2023-05-14 04:42:59 +00:00
|
|
|
modify_gbe()
|
|
|
|
{
|
|
|
|
printf "changing mac address in gbe to ${new_mac}\n"
|
2023-10-07 04:36:52 +00:00
|
|
|
[ -z "${CONFIG_GBE_BIN_PATH}" ] && \
|
much, much stricter, more verbose error handling
lbmk is much more likely to crash now, in error conditions,
which is a boon for further auditing.
also: in "fetch", remove the downloaded program
if fail() was called.
this would also be done for gnulib, when downloading
grub, but done in such a way that gnulib goes first.
where calls to err write "ERROR" in the string, they
no longer say "ERROR" because the "err" function itself
now does that automatically.
also: listmodes/listoptions (in "lbmk") now reports an
error if no scripts and/or directories are found.
also: where a warning is given, but not an error, i've
gone through in some places and redirected the output
to stderr, not stdout
as part of error checks: running anything as root, except
for the "./build dependencies *" commands, is no longer
permitted and lbmk will throw an error
mrc downloads: debugfs output no longer redirected to /dev/null,
and stderr no longer redirected to stdout. everything is verbose.
certain non-error states are also more verbose. for example,
patch_rom in blobs/inject will now state when injection succeeds
certain actual errors(bugs) were fixed:
for example, build/release/roms now correctly prepares the blobs
hash files for a given target, containing only the files and
checksums in the list. Previously, a printf message was included.
Now, with this new code: blobutil/inject rightly verifies hashes.
doing all of this in one giant patch is cleaner
than 100 patches changing each file. even this is yet part
of a much larger audit going on in the Libreboot project.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-24 19:19:41 +00:00
|
|
|
err "modify_gbe: ${board}: CONFIG_GBE_BIN_PATH not set"
|
2023-05-14 07:35:34 +00:00
|
|
|
|
2023-09-30 17:41:57 +00:00
|
|
|
rom="${1}"
|
2023-10-06 21:59:36 +00:00
|
|
|
_gbe_location=${CONFIG_GBE_BIN_PATH##*../}
|
2023-08-21 18:41:49 +00:00
|
|
|
[ -f "${_gbe_location}" ] || \
|
much, much stricter, more verbose error handling
lbmk is much more likely to crash now, in error conditions,
which is a boon for further auditing.
also: in "fetch", remove the downloaded program
if fail() was called.
this would also be done for gnulib, when downloading
grub, but done in such a way that gnulib goes first.
where calls to err write "ERROR" in the string, they
no longer say "ERROR" because the "err" function itself
now does that automatically.
also: listmodes/listoptions (in "lbmk") now reports an
error if no scripts and/or directories are found.
also: where a warning is given, but not an error, i've
gone through in some places and redirected the output
to stderr, not stdout
as part of error checks: running anything as root, except
for the "./build dependencies *" commands, is no longer
permitted and lbmk will throw an error
mrc downloads: debugfs output no longer redirected to /dev/null,
and stderr no longer redirected to stdout. everything is verbose.
certain non-error states are also more verbose. for example,
patch_rom in blobs/inject will now state when injection succeeds
certain actual errors(bugs) were fixed:
for example, build/release/roms now correctly prepares the blobs
hash files for a given target, containing only the files and
checksums in the list. Previously, a printf message was included.
Now, with this new code: blobutil/inject rightly verifies hashes.
doing all of this in one giant patch is cleaner
than 100 patches changing each file. even this is yet part
of a much larger audit going on in the Libreboot project.
Signed-off-by: Leah Rowe <leah@libreboot.org>
2023-08-24 19:19:41 +00:00
|
|
|
err "modify_gbe: CONFIG_GBE_BIN_PATH points to missing file"
|
2023-08-27 08:25:50 +00:00
|
|
|
[ -f "${nvmutil}" ] || \
|
2023-10-01 05:33:43 +00:00
|
|
|
x_ make -C util/nvmutil
|
2022-11-14 00:51:12 +00:00
|
|
|
|
2023-05-14 04:42:59 +00:00
|
|
|
_gbe_tmp=$(mktemp -t gbeXXXX.bin)
|
2023-10-01 05:33:43 +00:00
|
|
|
x_ cp "${_gbe_location}" "${_gbe_tmp}"
|
|
|
|
x_ "${nvmutil}" "${_gbe_tmp}" setmac "${new_mac}"
|
|
|
|
x_ "${ifdtool}" -i GbE:"${_gbe_tmp}" "${rom}" -O "${rom}"
|
2023-05-14 04:42:59 +00:00
|
|
|
|
2023-10-01 05:33:43 +00:00
|
|
|
x_ rm -f "${_gbe_tmp}"
|
2023-05-14 04:42:59 +00:00
|
|
|
}
|
2023-04-03 00:06:46 +00:00
|
|
|
|
2023-05-14 04:42:59 +00:00
|
|
|
usage()
|
|
|
|
{
|
|
|
|
cat <<- EOF
|
2023-10-06 23:57:55 +00:00
|
|
|
USAGE: ./update vendor inject -r [rom path] -b [boardname] -m [macaddress]
|
|
|
|
Example: ./update vendor inject -r x230_12mb.rom -b x230_12mb
|
2023-05-14 04:42:59 +00:00
|
|
|
|
|
|
|
Adding a macadress to the gbe is optional.
|
|
|
|
If the [-m] parameter is left blank, the gbe will not be touched.
|
|
|
|
|
2023-10-06 23:57:55 +00:00
|
|
|
Type './update vendor inject listboards' to get a list of valid boards
|
2023-05-14 04:42:59 +00:00
|
|
|
EOF
|
|
|
|
}
|
|
|
|
|
|
|
|
main $@
|