fix: CPU detection (#697)

This commit is contained in:
Kroese 2024-04-22 16:48:41 +02:00 committed by GitHub
parent ac78cc7dc5
commit dd76c60e2a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -18,7 +18,7 @@ cd /run
trap - ERR
info "Booting ${APP} on a ${HOST_CPU} using QEMU v${VERS} with kernel $(uname -r)..."
info "Booting ${APP} on a ${CPU} using QEMU v${VERS} with kernel $(uname -r)..."
[[ "$DEBUG" == [Yy1]* ]] && echo "Arguments: $ARGS" && echo
if [[ "$CONSOLE" == [Yy]* ]]; then

View File

@ -43,6 +43,7 @@ KERNEL=$(uname -r | cut -b 1)
MINOR=$(uname -r | cut -d '.' -f2)
ARCH=$(dpkg --print-architecture)
VERS=$(qemu-system-x86_64 --version | head -n 1 | cut -d '(' -f 1 | awk '{ print $NF }')
CPU=$(lscpu | grep 'Model name' | cut -f 2 -d ":" | awk '{$1=$1}1' | sed 's# @.*##g' | sed s/"(R)"//g | sed 's/[^[:alnum:] ]\+/ /g' | sed 's/ */ /g')
# Check system