Loading src/boot.sh +27 −6 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ set -Eeuo pipefail # Docker environment variables : "${TPM:="Y"}" # Enable TPM : "${BOOT_MODE:="legacy"}" # Boot mode SECURE="" Loading Loading @@ -56,14 +56,35 @@ if [[ "${BOOT_MODE,,}" != "legacy" ]]; then if [[ "${BOOT_MODE,,}" == "windows" ]]; then BOOT_OPTS="$BOOT_OPTS -chardev socket,id=chrtpm,path=/run/swtpm-sock" BOOT_OPTS="$BOOT_OPTS -tpmdev emulator,id=tpm0,chardev=chrtpm -device tpm-tis,tpmdev=tpm0" BOOT_OPTS="$BOOT_OPTS -global kvm-pit.lost_tick_policy=discard -global ICH9-LPC.disable_s3=1" if [[ "$TPM" == [Yy1]* ]]; then mkdir -p /dev/shm/tpm chmod 755 /dev/shm/tpm swtpm socket -t -d --tpmstate dir=/dev/shm/tpm --ctrl type=unixio,path=/run/swtpm-sock --tpm2 for (( i = 1; i < 50; i++ )); do [ -S "/run/swtpm-sock" ] && break if (( i % 10 == 0 )); then echo "Waiting for TPM socket to become available..." fi sleep 0.1 done if [ ! -S "/run/swtpm-sock" ]; then TPM="N" error "TPM socket not found? Disabling TPM support..." else BOOT_OPTS="$BOOT_OPTS -chardev socket,id=chrtpm,path=/run/swtpm-sock" BOOT_OPTS="$BOOT_OPTS -tpmdev emulator,id=tpm0,chardev=chrtpm -device tpm-tis,tpmdev=tpm0" fi fi fi fi Loading src/config.sh +0 −16 Original line number Diff line number Diff line Loading @@ -15,22 +15,6 @@ DEV_OPTS="$DEV_OPTS -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pcie.0,addr=0 ARGS="$DEF_OPTS $CPU_OPTS $RAM_OPTS $MAC_OPTS $DISPLAY_OPTS $MON_OPTS $SERIAL_OPTS $NET_OPTS $DISK_OPTS $BOOT_OPTS $DEV_OPTS $USB_OPTS $ARGUMENTS" ARGS=$(echo "$ARGS" | sed 's/\t/ /g' | tr -s ' ') if [[ "${BOOT_MODE,,}" == "windows" ]]; then for (( i = 0; i < 10; i++ )); do [ -S "/run/swtpm-sock" ] && break echo "Waiting for TPM socket to become available..." sleep 1 done if [ ! -S "/run/swtpm-sock" ]; then error "TPM socket not found?" && exit 46 fi fi if [[ "${DISPLAY,,}" == "web" ]]; then rm -f /dev/shm/msg.html rm -f /dev/shm/index.html Loading Loading
src/boot.sh +27 −6 Original line number Diff line number Diff line Loading @@ -2,7 +2,7 @@ set -Eeuo pipefail # Docker environment variables : "${TPM:="Y"}" # Enable TPM : "${BOOT_MODE:="legacy"}" # Boot mode SECURE="" Loading Loading @@ -56,14 +56,35 @@ if [[ "${BOOT_MODE,,}" != "legacy" ]]; then if [[ "${BOOT_MODE,,}" == "windows" ]]; then BOOT_OPTS="$BOOT_OPTS -chardev socket,id=chrtpm,path=/run/swtpm-sock" BOOT_OPTS="$BOOT_OPTS -tpmdev emulator,id=tpm0,chardev=chrtpm -device tpm-tis,tpmdev=tpm0" BOOT_OPTS="$BOOT_OPTS -global kvm-pit.lost_tick_policy=discard -global ICH9-LPC.disable_s3=1" if [[ "$TPM" == [Yy1]* ]]; then mkdir -p /dev/shm/tpm chmod 755 /dev/shm/tpm swtpm socket -t -d --tpmstate dir=/dev/shm/tpm --ctrl type=unixio,path=/run/swtpm-sock --tpm2 for (( i = 1; i < 50; i++ )); do [ -S "/run/swtpm-sock" ] && break if (( i % 10 == 0 )); then echo "Waiting for TPM socket to become available..." fi sleep 0.1 done if [ ! -S "/run/swtpm-sock" ]; then TPM="N" error "TPM socket not found? Disabling TPM support..." else BOOT_OPTS="$BOOT_OPTS -chardev socket,id=chrtpm,path=/run/swtpm-sock" BOOT_OPTS="$BOOT_OPTS -tpmdev emulator,id=tpm0,chardev=chrtpm -device tpm-tis,tpmdev=tpm0" fi fi fi fi Loading
src/config.sh +0 −16 Original line number Diff line number Diff line Loading @@ -15,22 +15,6 @@ DEV_OPTS="$DEV_OPTS -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pcie.0,addr=0 ARGS="$DEF_OPTS $CPU_OPTS $RAM_OPTS $MAC_OPTS $DISPLAY_OPTS $MON_OPTS $SERIAL_OPTS $NET_OPTS $DISK_OPTS $BOOT_OPTS $DEV_OPTS $USB_OPTS $ARGUMENTS" ARGS=$(echo "$ARGS" | sed 's/\t/ /g' | tr -s ' ') if [[ "${BOOT_MODE,,}" == "windows" ]]; then for (( i = 0; i < 10; i++ )); do [ -S "/run/swtpm-sock" ] && break echo "Waiting for TPM socket to become available..." sleep 1 done if [ ! -S "/run/swtpm-sock" ]; then error "TPM socket not found?" && exit 46 fi fi if [[ "${DISPLAY,,}" == "web" ]]; then rm -f /dev/shm/msg.html rm -f /dev/shm/index.html Loading