Add support for --update-checksums in early bootstrap

This allows creating *.checksums files instead of checking against
them when UPDATE_CHECKSUMS is set to True in bootstrap.cfg.

The checksums are also copied to /usr/src so they can be accessed
easily after the bootstrap completes.
This commit is contained in:
Dor Askayo 2022-05-20 17:55:35 +03:00
parent 18fa642100
commit 653f31b59f
14 changed files with 187 additions and 20 deletions

View file

@ -314,6 +314,27 @@ cp include/sys/ucontext.h ${incdir}/sys/ucontext.h
cp include/sys/user.h ${incdir}/sys/user.h
cp include/sys/wait.h ${incdir}/sys/wait.h
# Checksums
cd ../..
sha256sum -c ${pkg}.checksums
# Checksums
if match x${UPDATE_CHECKSUMS} xTrue; then
sha256sum -o ${pkg}.checksums \
/usr/bin/mes \
/usr/bin/mes-m2 \
/usr/bin/mescc.scm \
/usr/lib/x86-mes/crt1.s \
/usr/lib/x86-mes/crt1.o \
/usr/lib/x86-mes/x86.M1 \
/usr/lib/x86-mes/libmescc.s \
/usr/lib/x86-mes/libc+tcc.s \
/usr/lib/x86-mes/libc.s \
/usr/lib/x86-mes/libmescc.a \
/usr/lib/x86-mes/libc+tcc.a \
/usr/lib/x86-mes/libc.a \
/usr/lib/linux/x86-mes/elf32-header.hex2 \
/usr/lib/linux/x86-mes/elf32-footer-single-main.hex2
cp ${pkg}.checksums ${srcdir}
else
sha256sum -c ${pkg}.checksums
fi