fix: CPU pinning for Orange Pi (#103)

This commit is contained in:
Kroese 2024-06-07 13:08:30 +02:00 committed by GitHub
parent 89e46404f5
commit 159402de8f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 2 additions and 5 deletions

View file

@ -403,7 +403,7 @@ addMedia () {
local index=""
local DISK_ID="cdrom$DISK_BUS"
[ -n "$DISK_INDEX" ] && index=",bootindex=$DISK_INDEX"
local result="-drive file=$DISK_FILE,id=$DISK_ID,format=raw,readonly=on,media=cdrom"
local result="-drive file=$DISK_FILE,id=$DISK_ID,format=raw,cache=unsafe,readonly=on,media=cdrom"
case "${DISK_TYPE,,}" in
"auto" )

View file

@ -23,5 +23,5 @@ info "Booting image${BOOT_DESC} using QEMU v$version..."
if [ -z "$CPU_PIN" ]; then
exec qemu-system-aarch64 ${ARGS:+ $ARGS}
else
taskset -c "$CPU_PIN" exec qemu-system-aarch64 ${ARGS:+ $ARGS}
exec taskset -c "$CPU_PIN" qemu-system-aarch64 ${ARGS:+ $ARGS}
fi

View file

@ -94,13 +94,10 @@ configureDNS() {
DNSMASQ_OPTS+=" --address=/host.lan/${VM_NET_IP%.*}.1"
DNSMASQ_OPTS=$(echo "$DNSMASQ_OPTS" | sed 's/\t/ /g' | tr -s ' ' | sed 's/^ *//')
[[ "$DEBUG" == [Yy1]* ]] && set -x
if ! $DNSMASQ ${DNSMASQ_OPTS:+ $DNSMASQ_OPTS}; then
error "Failed to start dnsmasq, reason: $?" && exit 29
fi
{ set +x; } 2>/dev/null
[[ "$DEBUG" == [Yy1]* ]] && echo
return 0
}