feat: Add CPU pinning for Rockchip Orange Pi 5 (#140)

This commit is contained in:
Kroese 2024-06-02 19:56:04 +02:00 committed by GitHub
parent 3460fea0f0
commit cd732860ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 35 additions and 25 deletions

View file

@ -1,5 +1,5 @@
FROM scratch
COPY --from=qemux/qemu-arm:2.02 / /
COPY --from=qemux/qemu-arm:2.03 / /
ARG VERSION_ARG="0.0"
ARG DEBCONF_NOWARNINGS="yes"

View file

@ -25,7 +25,12 @@ trap - ERR
info "Booting ${APP}${BOOT_DESC}..."
{ qemu-system-aarch64 ${ARGS:+ $ARGS} >"$QEMU_OUT" 2>"$QEMU_LOG"; rc=$?; } || :
if [ -z "$CPU_PIN" ]; then
{ qemu-system-aarch64 ${ARGS:+ $ARGS} >"$QEMU_OUT" 2>"$QEMU_LOG"; rc=$?; } || :
else
{ taskset -c "$CPU_PIN" qemu-system-aarch64 ${ARGS:+ $ARGS} >"$QEMU_OUT" 2>"$QEMU_LOG"; rc=$?; } || :
fi
(( rc != 0 )) && error "$(<"$QEMU_LOG")" && exit 15
terminal

View file

@ -666,14 +666,14 @@ addDriver() {
case "${id,,}" in
"win7x86"* ) folder="w7/x86" ;;
"win7x64"* ) folder="w7/amd64" ;;
"win81x64"* ) folder="w10/amd64" ;;
"win81x64"* ) folder="w8.1/amd64" ;;
"win10x64"* ) folder="w10/amd64" ;;
"win11x64"* ) folder="w11/amd64" ;;
"win2025"* ) folder="2k22/amd64" ;;
"win2022"* ) folder="2k22/amd64" ;;
"win2019"* ) folder="2k19/amd64" ;;
"win2016"* ) folder="2k16/amd64" ;;
"win2012"* ) folder="2k16/amd64" ;;
"win2012"* ) folder="2k12R2/amd64" ;;
"win2008"* ) folder="2k8R2/amd64" ;;
"win10arm64"* ) folder="w10/ARM64" ;;
"win11arm64"* ) folder="w11/ARM64" ;;

View file

@ -21,7 +21,32 @@ if [ ! -d "$share" ] && [ -d "$STORAGE/shared" ]; then
fi
mkdir -p "$share"
[ -z "$(ls -A "$share")" ] && chmod 777 "$share"
if [ -z "$(ls -A "$share")" ]; then
chmod 777 "$share"
{ echo "--------------------------------------------------------"
echo " $APP for Docker v$(</run/version)..."
echo " For support visit $SUPPORT"
echo "--------------------------------------------------------"
echo ""
echo "Using this folder you can share files with the host machine."
echo ""
echo "To change its location, include the following bind mount in your compose file:"
echo ""
echo " volumes:"
echo " - \"/home/user/example:/shared\""
echo ""
echo "Or in your run command:"
echo ""
echo " -v \"/home/user/example:/shared\""
echo ""
echo "Replace the example path /home/user/example with the desired shared folder."
echo ""
} | unix2dos > "$share/readme.txt"
fi
{ echo "[global]"
echo " server string = Dockur"
@ -50,26 +75,6 @@ mkdir -p "$share"
echo " force group = root"
} > "/etc/samba/smb.conf"
{ echo "--------------------------------------------------------"
echo " $APP for Docker v$(</run/version)..."
echo " For support visit $SUPPORT"
echo "--------------------------------------------------------"
echo ""
echo "Using this folder you can share files with the host machine."
echo ""
echo "To change its location, include the following bind mount in your compose file:"
echo ""
echo " volumes:"
echo " - \"/home/user/example:/shared\""
echo ""
echo "Or in your run command:"
echo ""
echo " -v \"/home/user/example:/shared\""
echo ""
echo "Replace the example path /home/user/example with the desired shared folder."
echo ""
} | unix2dos > "$share/readme.txt"
! smbd && smbd --debug-stdout
# Enable Web Service Discovery