Skip to content

Commit

Permalink
Release v9.8 (MichaIng#7246)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaIng authored Oct 17, 2024
2 parents 89c2dd3 + faa3ef5 commit 5f69eeb
Show file tree
Hide file tree
Showing 23 changed files with 378 additions and 211 deletions.
20 changes: 11 additions & 9 deletions .build/images/dietpi-build
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@ case $HW_MODEL in
0) iname='RPi' HW_ARCH=${HW_ARCH:-1} boot_size=128 root_size=895;;
1) iname='RPi1' HW_ARCH=1 boot_size=128 root_size=895;;
2) iname='RPi2' HW_ARCH=2 boot_size=128 root_size=895;;
4) iname='RPi234' HW_ARCH=3 boot_size=128 root_size=895;;
5) iname='RPi5' HW_ARCH=3 boot_size=128 root_size=895;;
4) iname='RPi234' HW_ARCH=3 boot_size=128 root_size=1000;;
5) iname='RPi5' HW_ARCH=3 boot_size=128 root_size=1000;;
10) iname='OdroidC1' HW_ARCH=2 partition_start=4 boot_size=128 root_size=700 boot_fstype='fat16';;
11) iname='OdroidXU4' HW_ARCH=2 partition_start=4 root_size=800;;
12) iname='OdroidC2' HW_ARCH=3 partition_start=4 root_size=1148;;
Expand Down Expand Up @@ -139,24 +139,26 @@ case $HW_MODEL in
73) iname='ROCKPiS' HW_ARCH=3 partition_start=16 root_size=1100;;
74) iname='RadxaZero' HW_ARCH=3 partition_start=4 root_size=1148;;
75) iname='Container' HW_ARCH=${HW_ARCH:-10} root_size=575;;
'76.1') iname='NanoPiR5S' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;;
'76.2') iname='NanoPiR5C' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;;
77) iname='ROCK3A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;;
'76.1') iname='NanoPiR5S' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;;
'76.2') iname='NanoPiR5C' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;;
77) iname='ROCK3A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;;
78) iname='ROCK5B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;;
'79.1') iname='NanoPiR6S' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;;
'79.2') iname='NanoPiR6C' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;;
'79.3') iname='NanoPCT6' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;;
80) iname='OrangePi5' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;;
80) iname='OrangePi5' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;;
81) iname='VisionFive2' HW_ARCH=11 root_size=639;;
82) iname='OrangePi5Plus' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;;
83) iname='OrangePiZero3' HW_ARCH=3 partition_start=4 root_size=1148;;
84) iname='Star64' HW_ARCH=11 root_size=639;;
85) iname='ROCK5A' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;;
86) iname='ASUSTB2' HW_ARCH=3 partition_start=16 root_size=1100;;
87) iname='OrangePi3B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;;
87) iname='OrangePi3B' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;;
88) iname='OrangePiZero2W' HW_ARCH=3 partition_start=4 root_size=1148;;
89) iname='OrangePi3LTS' HW_ARCH=3 partition_start=4 root_size=1000;;
90) iname='RadxaZERO3' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1136;;
90) iname='RadxaZERO3' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;;
91) iname='OrangePi5Max' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;;
92) iname='NanoPiM6' HW_ARCH=3 PTTYPE='gpt' partition_start=16 root_size=1100;;
*) G_DIETPI-NOTIFY 1 "Invalid hardware model \"$HW_MODEL\" passed, aborting..."; exit 1;;
esac

Expand Down Expand Up @@ -614,7 +616,7 @@ _EOF_

# Force ARMv6 arch on Raspbian
# shellcheck disable=SC2015
(( $HW_ARCH > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6'
(( $HW_ARCH > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6'

# Skip filesystem expansion
G_EXEC rm rootfs/etc/systemd/system/local-fs.target.wants/dietpi-fs_partition_resize.service
Expand Down
5 changes: 1 addition & 4 deletions .build/images/dietpi-imager
Original file line number Diff line number Diff line change
Expand Up @@ -761,11 +761,8 @@ _EOF_
(( $SKIP_ARCHIVE )) && exit 0

# Generate xz archive
# NB: LZMA2 ultra compression requires much memory per thread. 1 GiB is not sufficient for >2 threads, hence use "-T2" to limit used CPU threads to "2" on 1 GiB devices with more than two cores.
local threads=0
(( $(free -m | mawk '/Mem:/{print $2}') < 1750 && $(nproc) > 2 )) && threads=2
[[ -f $OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz ]] && G_EXEC rm "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz"
G_EXEC_DESC='Creating final xz archive' G_EXEC xz -9e -k "-T$threads" "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT"
G_EXEC_DESC='Creating final xz archive' G_EXEC xz -9e -T0 -M75% -k "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT"
G_EXEC_DESC='Generating SHA256 hash' G_EXEC eval "sha256sum '$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz' > '$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz.sha256'"
local signature=() sig_text=''
[[ $SIGN_PASS ]] && { G_DIETPI-NOTIFY 2 'Signing archive ...'; gpg --batch --pinentry-mode loopback --passphrase "$SIGN_PASS" -b --armor "$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz" || exit 1; signature=("$OUTPUT_IMG_NAME.$OUTPUT_IMG_EXT.xz.asc") sig_text="\nSignature: $PWD/${signature[*]}"; }
Expand Down
24 changes: 16 additions & 8 deletions .build/images/dietpi-installer
Original file line number Diff line number Diff line change
Expand Up @@ -416,6 +416,7 @@ _EOF_
'79.1' ': NanoPi R6S'
'79.2' ': NanoPi R6C'
'79.3' ': NanoPC T6'
'92' ': NanoPi M6'
'72.1' ': ROCK 4 (all other variants)'
'72.2' ': ROCK 4 SE'
'72.3' ': ROCK 4C Plus'
Expand All @@ -429,6 +430,7 @@ _EOF_
'89' ': Orange Pi 3 LTS'
'80' ': Orange Pi 5'
'82' ': Orange Pi 5 Plus'
'91' ': Orange Pi 5 Max'
'83' ': Orange Pi Zero 3'
'88' ': Orange Pi Zero 2W'
'86' ': ASUS Tinker Board 2'
Expand Down Expand Up @@ -628,7 +630,7 @@ _EOF_
G_EXEC mv "$dir/.build/images/U-Boot/99-dietpi-uboot" /etc/initramfs/post-update.d/99-dietpi-uboot
G_EXEC sed --follow-symlinks -i 's/arm64/arm/' /etc/initramfs/post-update.d/99-dietpi-uboot

elif [[ $G_HW_MODEL =~ ^(12|15|16|40|42|43|44|45|46|47|48|52|54|55|56|57|58|59|60|62|63|64|65|66|67|68|72|73|74|76|77|78|79|80|82|83|85|86|87|88|89|90)$ ]]
elif [[ $G_HW_MODEL =~ ^(12|15|16|40|42|43|44|45|46|47|48|52|54|55|56|57|58|59|60|62|63|64|65|66|67|68|72|73|74|76|77|78|79|80|82|83|85|86|87|88|89|90|91|92)$ ]]
then
armbian_packages=1
G_EXEC mv "$dir/.build/images/U-Boot/boot.cmd" /boot/boot.cmd
Expand Down Expand Up @@ -669,7 +671,7 @@ setenv rootuuid "true"' /boot/boot.cmd
(( $G_HW_MODEL == 15 )) && G_EXEC eval 'echo '\''meson_rng'\'' > /etc/modules-load.d/dietpi-hwrng.conf'

# Rockchip 64-bit (configs work with Amlogic OOTB)
elif [[ $G_HW_MODEL =~ ^(42|43|46|47|55|56|58|68|72|73|76|77|78|79|80|82|85|86|87|90)$ ]]
elif [[ $G_HW_MODEL =~ ^(42|43|46|47|55|56|58|68|72|73|76|77|78|79|80|82|85|86|87|90|91|92)$ ]]
then
G_EXEC sed --follow-symlinks -Ei '/^setenv (kernel|fdt)_addr_r/d' /boot/boot.cmd
G_CONFIG_INJECT 'setenv scriptaddr ' 'setenv scriptaddr "0x9000000"' /boot/boot.cmd
Expand Down Expand Up @@ -697,20 +699,19 @@ setenv rootuuid "true"' /boot/boot.cmd
esac
;;
85) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3588s-rock-5a.dtb' /boot/dietpiEnv.txt;;
87) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=rockchip/rk3566-orangepi-3b.dtb' /boot/dietpiEnv.txt;;
*) :;;
esac
# Overlay prefix
case $G_HW_MODEL in
73) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rk3308' /boot/dietpiEnv.txt;;
78|79|80|82|85) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rk3588' /boot/dietpiEnv.txt;; # ToDo: There are multiple other prefixes used in the kernel package, "rock-5b", "rock-5ab", "rockchip" (for fixup), so the boot.cmd need heavy adjustments (eliminate the prefix entirely) to work with all overlays.
78|79|80|82|85|91|92) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rk3588' /boot/dietpiEnv.txt;; # ToDo: There are multiple other prefixes used in the kernel package, "rock-5b", "rock-5ab", "rockchip" (for fixup), so the boot.cmd need heavy adjustments (eliminate the prefix entirely) to work with all overlays.
*) G_CONFIG_INJECT 'overlay_prefix=' 'overlay_prefix=rockchip' /boot/dietpiEnv.txt;;
esac
# Console args
case $G_HW_MODEL in
73) G_CONFIG_INJECT 'consoleargs=' 'consoleargs=console=ttyS0,1500000' /boot/dietpiEnv.txt;; # headless
47|55|56) G_CONFIG_INJECT 'consoleargs=' 'consoleargs=console=ttyS2,1500000' /boot/dietpiEnv.txt;; # headless
78|79|80|82|85) G_EXEC sed --follow-symlinks -i 's/ttyAML0,115200/ttyFIQ0,1500000/' /boot/dietpiEnv.txt;; # RK3588
78|79|80|82|85|91|92) G_EXEC sed --follow-symlinks -i 's/ttyAML0,115200/ttyFIQ0,1500000/' /boot/dietpiEnv.txt;; # RK3588
*) G_EXEC sed --follow-symlinks -i 's/ttyAML0,115200/ttyS2,1500000/' /boot/dietpiEnv.txt;;
esac

Expand Down Expand Up @@ -791,6 +792,11 @@ setenv rootuuid "true"' /boot/boot.cmd
G_EXEC mv "$dir/.build/images/NanoPiM3/boot.cmd" /boot/boot.cmd
G_EXEC sed --follow-symlinks -i '/overlay/d' /boot/dietpiEnv.txt
G_EXEC sed --follow-symlinks -i 's/ttyAML0/ttySAC0/' /boot/dietpiEnv.txt
# Device tree
case $HW_VARIANT in
2) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=s5p6818-nanopi-fire3.dtb' /boot/dietpiEnv.txt;;
*) G_CONFIG_INJECT 'fdtfile=' 'fdtfile=s5p6818-nanopi-m3.dtb' /boot/dietpiEnv.txt;;
esac
fi
fi

Expand Down Expand Up @@ -1136,6 +1142,8 @@ _EOF_
88) model='orangepizero2w' kernel='sunxi64';;
89) model='orangepi3-lts' kernel='sunxi64';;
90) model='radxa-zero3' kernel='rk35xx' branch='legacy';;
91) model='orangepi5-max' kernel='rk35xx' branch='vendor';;
92) model='nanopi-m6' kernel='rk35xx' branch='vendor';;
*) :;;
esac

Expand Down Expand Up @@ -1272,7 +1280,7 @@ _EOF_
# tiny-initramfs to satisfy dependency: https://github.com/RPi-Distro/repo/issues/358
G_AGI raspi-firmware
G_CONFIG_INJECT 'SKIP_INITRAMFS_GEN=' 'SKIP_INITRAMFS_GEN=yes' /etc/default/raspi-firmware
G_AGI "${kernel[@]}" raspi-utils raspberrypi-sys-mods raspberrypi-archive-keyring "${a32bit[@]}" tiny-initramfs
G_AGI "${kernel[@]}" raspi-utils-core raspberrypi-sys-mods raspberrypi-archive-keyring "${a32bit[@]}" tiny-initramfs
G_EXEC apt-mark auto tiny-initramfs
G_EXEC rm -f /boot/initrd.img-* /boot/firmware/initramfs*
else
Expand Down Expand Up @@ -1957,8 +1965,8 @@ _EOF_'
then
/boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyS1

# Rockchip vendor: ROCK 5B, NanoPi 6, Orange Pi 5, Orange Pi 5 Plus, ROCK 5A, Radxa ZERO 3
elif [[ $G_HW_MODEL =~ ^(78|79|80|82|85|90)$ ]]
# Rockchip vendor/legacy: ROCK 5B, NanoPi 6, Orange Pi 5, Orange Pi 5 Plus, ROCK 5A, Radxa ZERO 3
elif [[ $G_HW_MODEL =~ ^(78|79|80|82|85|90|91|92)$ ]]
then
/boot/dietpi/func/dietpi-set_hardware serialconsole enable ttyFIQ0

Expand Down
2 changes: 1 addition & 1 deletion .build/software/Amiberry/container_build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ G_EXEC mount "${FP_LOOP}p1" rootfs

# Enforce ARMv6 arch on Raspbian
# shellcheck disable=SC2015
(( $arch > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6'
(( $arch > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6'

# Enable automated setup
G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt
Expand Down
2 changes: 1 addition & 1 deletion .build/software/dietpi-software-build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ G_EXEC mount "${FP_LOOP}p1" rootfs

# Enforce ARMv6 arch on Raspbian
# shellcheck disable=SC2015
(( $arch > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6'
(( $arch > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6'

# Enable automated setup
G_CONFIG_INJECT 'AUTO_SETUP_AUTOMATED=' 'AUTO_SETUP_AUTOMATED=1' rootfs/boot/dietpi.txt
Expand Down
6 changes: 4 additions & 2 deletions .build/software/sprd-bluetooth/build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ then
fi
_EOF_

G_EXEC chmod +x sprd-bluetooth/DEBIAN/{postinst,prerm,postrm}

# - md5sums
find sprd-bluetooth ! \( -path sprd-bluetooth/DEBIAN -prune \) -type f -exec md5sum {} + | sed 's|sprd-bluetooth/||' > sprd-bluetooth/DEBIAN/md5sums

Expand All @@ -79,8 +81,8 @@ Date: $(date -uR)
Installed-Size: $(du -sk sprd-bluetooth | mawk '{print $1}')
Section: admin
Priority: optional
Homepage: https://github.com/RPi-Distro/sprd-bluetooth
Description: System tweaks for the Raspberry Pi, DietPi edition
Homepage: https://github.com/orangepi-xunlong/orangepi-build/tree/next/external/packages/blobs/bt/hciattach
Description: Spreadtrum (sprd) Bluetooth support
_EOF_
G_CONFIG_INJECT 'Installed-Size: ' "Installed-Size: $(du -sk sprd-bluetooth | mawk '{print $1}')" sprd-bluetooth/DEBIAN/control

Expand Down
6 changes: 3 additions & 3 deletions .conf/dps_39/minidlna.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# WARNING: After changing this option, you need to restart the service
# via: "systemctl restart minidlna"
# Note: After changing this option, you need to restart the service
# via: "systemctl restart minidlna"

# Media paths
media_dir=A,/mnt/dietpi_userdata/Music
Expand All @@ -11,7 +11,7 @@ db_dir=/mnt/dietpi_userdata/.MiniDLNA_Cache

# Must be one of "off", "fatal", "error", "warn", "info" or "debug".
# "off" turns of logging entirely, "fatal" is the highest level of importance.
# Access logs via: "journalctl -u minidlna", on Bullseye in /var/log/minidlna.
# Access logs via: "journalctl -u minidlna" and /var/log/minidlna.
log_level=warn

# Use a different container as the root of the directory tree presented to
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/dietpi-software.bash
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ Process_Software()
164) aSERVICES[i]='nukkit' aUDP[i]='19132'; (( $arch == 10 )) || aDELAY[i]=60;;
165) aSERVICES[i]='gitea' aTCP[i]='3000'; (( $arch < 10 )) && aDELAY[i]=30;;
#166) aSERVICES[i]='pi-spc';; Service cannot reasonably start in container as WirinPi's gpio command fails reading /proc/cpuinfo
167) aSERVICES[i]='raspotify';;
167) (( $arch < 3 )) || aSERVICES[i]='raspotify';; # 32-bit ARM fails with: "arm-binfmt-P: /usr/bin/librespot: Unable to find a guest_base to satisfy all guest address mapping requirements"
#169) aSERVICES[i]='voice-recognizer';; "RuntimeError: This module can only be run on a Raspberry Pi!"
170) aCOMMANDS[i]='unrar -V';;
#171) aSERVICES[i]='frps frpc' aTCP[i]='7000 7400 7500';; Interactive install with service and ports depending on server/client/both choice
Expand Down Expand Up @@ -320,7 +320,7 @@ G_EXEC mount "${FP_LOOP}p1" rootfs

# Force ARMv6 arch on Raspbian
# shellcheck disable=SC2015
(( $arch > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /usr/bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6'
(( $arch > 1 )) || { echo -e '#/bin/dash\n[ "$*" = -m ] && echo armv6l || /bin/uname "$@"' > rootfs/usr/local/bin/uname && G_EXEC chmod +x rootfs/usr/local/bin/uname; } || Error_Exit 'Failed to generate /usr/local/bin/uname for ARMv6'

# Force RPi on ARM systems if requested
if [[ $RPI == 'true' ]] && (( $arch < 10 ))
Expand Down
18 changes: 13 additions & 5 deletions .meta/dietpi-survey_report
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ shopt -s extglob
[88]='Orange Pi Zero 2W'
[89]='Orange Pi 3 LTS'
[90]='Radxa ZERO 3'
[91]='Orange Pi 5 Max'
[92]='NanoPi M6'
)

## Benchmark data arrays: aBENCH_XX[$HW_MODEL,${aBENCH_XX_INDEX[$HW_MODEL]}]
Expand Down Expand Up @@ -729,13 +731,15 @@ shopt -s extglob
aSOFTWARE_NAME9_6[213]='soju'

aSOFTWARE_NAME9_7=()
aSOFTWARE_NAME9_8=()
for i in "${!aSOFTWARE_NAME9_6[@]}"
do
aSOFTWARE_NAME9_7[i]=${aSOFTWARE_NAME9_6[i]}
aSOFTWARE_NAME9_8[i]=${aSOFTWARE_NAME9_7[i]}
done

# Pre-create software counter array so that we can see also software (available in newest version) with 0 installs
for i in "${aSOFTWARE_NAME9_7[@]}"
for i in "${aSOFTWARE_NAME9_8[@]}"
do
aSOFTWARE[$i]=0
done
Expand Down Expand Up @@ -791,7 +795,7 @@ shopt -s extglob
eval "software=\${aSOFTWARE_NAME${version/./_}[$software]}"
if [[ ! $software ]]
then
echo "Invalid software ID for DietPi version $version"
echo "Invalid software ID \"$software\" for DietPi version $version"
mv -v "/home/dietpi-survey/survey/$file" /home/dietpi-survey/invalid/
return 1
fi
Expand Down Expand Up @@ -1005,9 +1009,13 @@ shopt -s extglob

# Work out averages
# - Divide CPU times by 100 and scale to revert decimal point removal
aBENCH_RESULT_CPU_MIN[i]=$(printf '%.2f' "${aBENCH_RESULT_CPU_MIN[i]}e-2")
aBENCH_RESULT_CPU_MAX[i]=$(printf '%.2f' "${aBENCH_RESULT_CPU_MAX[i]}e-2")
aBENCH_RESULT_CPU_AVG[i]=$(printf '%.2f' "$((${aBENCH_RESULT_CPU_AVG[i]}*10/${aBENCH_CPU_INDEX[i]}+1))e-3")
#aBENCH_RESULT_CPU_MIN[i]=$(printf '%.2f' "${aBENCH_RESULT_CPU_MIN[i]}e-2")
#aBENCH_RESULT_CPU_MAX[i]=$(printf '%.2f' "${aBENCH_RESULT_CPU_MAX[i]}e-2")
#aBENCH_RESULT_CPU_AVG[i]=$(printf '%.2f' "$((${aBENCH_RESULT_CPU_AVG[i]}*10/${aBENCH_CPU_INDEX[i]}+1))e-3")
# - Workaround for current bash printf bug: https://bugs.debian.org/1078556
aBENCH_RESULT_CPU_MIN[i]=$(mawk "{printf \"%.2f\", ${aBENCH_RESULT_CPU_MIN[i]}e-2}" <<< '')
aBENCH_RESULT_CPU_MAX[i]=$(mawk "{printf \"%.2f\", ${aBENCH_RESULT_CPU_MAX[i]}e-2}" <<< '')
aBENCH_RESULT_CPU_AVG[i]=$(mawk "{printf \"%.2f\", $((${aBENCH_RESULT_CPU_AVG[i]}*10/${aBENCH_CPU_INDEX[i]}+1))e-3}" <<< '')

# CPU temps if available
aBENCH_RESULT_CPU_TEMP_START_MIN[i]='N/A'
Expand Down
Loading

0 comments on commit 5f69eeb

Please sign in to comment.