feat: Display system info in log (#42)
This commit is contained in:
parent
cc34dec418
commit
914a4995cc
3 changed files with 6 additions and 2 deletions
|
@ -5,6 +5,7 @@ set -Eeuo pipefail
|
||||||
: "${BIOS:=""}" # Bios file
|
: "${BIOS:=""}" # Bios file
|
||||||
|
|
||||||
BOOT_OPTS=""
|
BOOT_OPTS=""
|
||||||
|
BOOT_DESC=""
|
||||||
SECURE=",secure=off"
|
SECURE=",secure=off"
|
||||||
DIR="/usr/share/qemu"
|
DIR="/usr/share/qemu"
|
||||||
|
|
||||||
|
@ -15,6 +16,7 @@ case "${BOOT_MODE,,}" in
|
||||||
;;
|
;;
|
||||||
secure)
|
secure)
|
||||||
SECURE=",secure=on"
|
SECURE=",secure=on"
|
||||||
|
BOOT_DESC=" securely"
|
||||||
ROM="AAVMF_CODE.secboot.fd"
|
ROM="AAVMF_CODE.secboot.fd"
|
||||||
VARS="AAVMF_VARS.fd"
|
VARS="AAVMF_VARS.fd"
|
||||||
;;
|
;;
|
||||||
|
@ -24,6 +26,7 @@ case "${BOOT_MODE,,}" in
|
||||||
;;
|
;;
|
||||||
windows_secure)
|
windows_secure)
|
||||||
SECURE=",secure=on"
|
SECURE=",secure=on"
|
||||||
|
BOOT_DESC=" securely"
|
||||||
ROM="AAVMF_CODE.ms.fd"
|
ROM="AAVMF_CODE.ms.fd"
|
||||||
VARS="AAVMF_VARS.ms.fd"
|
VARS="AAVMF_VARS.ms.fd"
|
||||||
;;
|
;;
|
||||||
|
|
|
@ -17,7 +17,7 @@ cd /run
|
||||||
|
|
||||||
trap - ERR
|
trap - ERR
|
||||||
|
|
||||||
info "Booting image using $VERS..."
|
info "Booting image${BOOT_DESC} on ${CPU} using QEMU v${VERS} with kernel $(uname -r)..."
|
||||||
|
|
||||||
[[ "$DEBUG" == [Yy1]* ]] && set -x
|
[[ "$DEBUG" == [Yy1]* ]] && set -x
|
||||||
exec qemu-system-aarch64 ${ARGS:+ $ARGS}
|
exec qemu-system-aarch64 ${ARGS:+ $ARGS}
|
||||||
|
|
|
@ -44,7 +44,8 @@ HOST=$(hostname -s)
|
||||||
KERNEL=$(uname -r | cut -b 1)
|
KERNEL=$(uname -r | cut -b 1)
|
||||||
MINOR=$(uname -r | cut -d '.' -f2)
|
MINOR=$(uname -r | cut -d '.' -f2)
|
||||||
ARCH=$(dpkg --print-architecture)
|
ARCH=$(dpkg --print-architecture)
|
||||||
VERS=$(qemu-system-aarch64 --version | head -n 1 | cut -d '(' -f 1)
|
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
|
# Check system
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue