summaryrefslogtreecommitdiff
path: root/script/update/release
diff options
context:
space:
mode:
authorLeah Rowe <leah@libreboot.org>2023-10-20 11:51:38 +0100
committerLeah Rowe <leah@libreboot.org>2023-10-20 12:08:36 +0100
commit1c8b2114cc8496402e77d262c4f1fde3dca6e62f (patch)
tree150801881b092cb0fe554ebf013e7f239f18aacb /script/update/release
parent54a05fc167904c97a3bcbc2aeb4afdb5ad35a379 (diff)
update/release: copy crossgcc to archive
everything downloaded, then tarballed, then built, now crossgcc is downloaded by coreboot. now extract, copy crossgcc tarballs, re-compress. TODO: simply add files to the archive, without re- compressing the whole thing. this is still more efficient than the old way: build everything, then clean and compress, making another build test on the release archive necessary; with this, there is still only one build test per release. with this, and the previous revisions dealing with submodules, the source archives should now be complete. Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'script/update/release')
-rwxr-xr-xscript/update/release57
1 files changed, 50 insertions, 7 deletions
diff --git a/script/update/release b/script/update/release
index 1875f160..32d264d3 100755
--- a/script/update/release
+++ b/script/update/release
@@ -52,13 +52,56 @@ build_release()
cd "${srcdir%/*}" || err "${_xm}: mktarball \"${srcdir}\""
mktarball "${srcdir##*/}" "${srcdir##*/}.tar.xz" || err "${_xm}: mksrc"
)
- if [ "${mode}" != "src" ]; then
- (
- cd "${srcdir}" || err "${_xm}: 2 !cd \"${srcdir}\""
- mkrom_images
- )
- fi
- rm -Rf "${srcdir}" || err "${_xm}: !rm -Rf \"${srcdir}\""
+ [ "${mode}" = "src" ] && return 0 # for src mode, xgcc tarballs are
+ # not included in the src archive
+
+ # now build roms, then copy crossgcc to src and re-compress
+ # while compressing rom images too.
+
+ (
+ cd "${srcdir}" || err "${_xm}: 2 !cd \"${srcdir}\""
+ mkrom_images
+ )
+ for _cbd in "${srcdir}/src/coreboot/"*; do
+ [ -d "${_cbd}/util/crossgcc/tarballs" ] || continue
+ _xgccdir="${vdir}/crossgcc/${_cbd##*/}"
+ mkdir -p "${_xgccdir}" || \
+ err "build_release: !mkdir -p ${_xgccdir}"
+ cp -R "${_cbd}/util/crossgcc/tarballs/"* "${_xgccdir}" || \
+ err "build_gcc: !copy xgcc ${_cbd}"
+ done
+ rm -Rf "${srcdir}" || err "build_release: !rm -Rf ${srcdir}"
+ (
+ cd "${srcdir%/*}" || err "${_xm} 2: mktarball \"${srcdir}\""
+ tar -xf "${srcdir##*/}.tar.xz" || err "!extract ${srcdir##*/}.tar.xz"
+ rm -f "${srcdir##*/}.tar.xz" || err "!rm -f ${srcdir##*/}.tar.xz"
+ )
+ for _xgcc in "${vdir}/crossgcc/"*; do
+ [ -d "${_xgcc}" ] || continue
+ mv "${_xgcc}" \
+ "${srcdir}/src/coreboot/${_xgcc##*/}/util/crossgcc/tarballs" \
+ || err "!move xgcc tarballs to ${srcdir}/xgcc/${_xgcc##*/}"
+ done
+ (
+ cd "${srcdir%/*}" || err "${_xm}: mktarball \"${srcdir}\""
+ mktarball "${srcdir##*/}" "${srcdir##*/}.tar.xz" || err "${_xm}: mksrc"
+ )
+
+ # now test the vendor insert script, using the release archive:
+ (
+ cd "${srcdir}" || err "!cd ${srcdir}"
+ for vrom in ../roms/*.tar.xz; do
+ [ -f "${vrom}" ] || continue
+ case "${vrom}" in
+ *serprog*) continue ;;
+ esac
+ ./vendor inject "${vrom}" || \
+ err "TESTFAIL: inject: ${vrom##*/}"
+ continue
+ done
+ )
+
+ rm -Rf "${srcdir}" || err "!rm -Rf ${srcdir}"
}
fetch_trees()