A generic flashing and verification script draft (will be edited over time):
#!/usr/bin/env bash
#
# Authors:
# Jarkko Sakkinen <jarkko.sakkinen@tuni.fi>
set -e
if [ $# -ne 2 ]; then
echo "`basename $0` <payload> <block device>"
exit 1
fi
PAYLOAD=`realpath $1`
SIZE=`wc -c $1 | cut -d' ' -f1`
START="2048"
END="$((START + (SIZE >> 9) + 1))"
parted --script $2 mklabel gpt
parted --script $2 mkpart primary fat32 ${START}s ${END}s
PARTITION="${2}1"
if [ ! -b $PARTITION ]; then
echo "Invalid partition"
exit 1
fi
echo "Payload: $PAYLOAD"
echo "Partition: $PARTITION"
DD_OPTIONS="count=$((END - START)) bs=512 status=progress conv=sync"
dd if="$PAYLOAD" of="$PARTITION" $DD_OPTIONS
sync
echo "Payload MD5: `dd if="$PAYLOAD" $DD_OPTIONS 2> /dev/null | md5sum`"
echo "Partition MD5: `dd if="$PARTITION" $DD_OPTIONS 2> /dev/null | md5sum`"
#flashing #firmware #image #riscv #CVA6 #Keystone #EFI #note
OK cool:
$ sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
#
# You can verify the status of security fixes using the `pro fix` command.
# E.g., a recent Ruby vulnerability can be checked with: `pro fix USN-6219-1`
# For more detail see: https://ubuntu.com/security/notices/USN-6219-1
#
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ pro fix
usage: pro fix <CVE-yyyy-nnnn+>|<USN-nnnn-d+> [flags]
the following arguments are required: security_issue
Now it is possible to emulate both TPM1 and TPM2 with TIS and CRB interfaces:
commit 993b0e9dceebc11e38b3156069b7e4fa5cf20abc (HEAD -> linux-6.5.y, origin/linux-6.5.y)
Author: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
Date: Sun Aug 20 15:15:23 2023 +0000
configs/qemu_x86_64: add --tpm-crb and --tpm1 to start-qemu.sh
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
Two common #GNU #make patterns I tend to use often with #Buildroot:
time ( make &> build.txt; )time ( make 2>&1 | tee build.txt; )