Skip to content

Commit

Permalink
v7.6 (#4625)
Browse files Browse the repository at this point in the history
+ DietPi-Software | Box64: Add x86_64 userspace emulator for ARMv8 systems
  • Loading branch information
ravenclaw900 authored Sep 14, 2021
1 parent 55be549 commit c690a06
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .meta/dietpi-survey_report
Original file line number Diff line number Diff line change
Expand Up @@ -552,11 +552,12 @@ shopt -s extglob
aSOFTWARE_NAME7_6=()
for i in "${!aSOFTWARE_NAME7_5[@]}"
do
# shellcheck disable=SC2034
aSOFTWARE_NAME7_6[$i]=${aSOFTWARE_NAME7_5[$i]}
# Pre-create software counter array so that we can see also software with 0 installs
aSOFTWARE["${aSOFTWARE_NAME7_6[$i]}"]=0
done
# shellcheck disable=SC2034
aSOFTWARE_NAME7_6[197]='Box64'

# $1 = File name
Process_File()
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Changes:
- DietPi-Software | MPD: The service file and default mpd.conf are not overwritten anymore (from Buster on), but instead the required changes are added to the default, shipped with the Debian package. This resolves some error messages on MPD startup on Bullseye and leaves most custom changes untouched on a reinstall. Furthermore, by default MPD now logs to journal, accessible via "journalctl -u mpd". Many thanks to @maartenlangeveld for reporting the MPD startup errors: https://github.com/MichaIng/DietPi/issues/4690
- DietPi-Software | Kodi: Our Raspberry Pi accelerated Kodi package is now installed on ARMv7 RPi systems as well.

New Software:
- Box64 | This x86_64 userspace emulator allows you to run x86_64 binaries on an ARMv8/arm64 system. It works very similar to Box86, hence is able to use arm64 shared libraries with the x86_64 binaries, so that often no additional libraries need to be installed. Thanks to binfmt, it is invoked automatically if an x86_64 binary is tried to be executed. Many thanks to @ravenclaw900 for implementing this software title: https://github.com/MichaIng/DietPi/pull/4625

Fixes:
- General | Resolved an issue on ARMv7 Buster and Bullseye system, where the haveged entropy daemon crashes due to limited syscall permissions. This can lead to several issues, like hanging boot, hanging installs or services starts. Many thanks to @jg777 for reporting this issue: https://github.com/MichaIng/DietPi/issues/4710
- DietPi-Drive_Manager | Corrected false information when doing an exFAT filesystem check & repair: Until Stretch, only checking for exFAT errors is supported but not repairing them. From Buster on, both is fully supported.
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ Links to hardware and software manufacturers, sources and build instructions use
- [Tor](https://gitlab.torproject.org/tpo/core/tor)
- [Docker Compose](https://github.com/docker/compose)
- [Box86](https://github.com/ptitSeb/box86)
- [Box64](https://github.com/ptitSeb/box64)
- [Steam](https://steamcommunity.com/)
- [mjpg-streamer](https://github.com/jacksonliam/mjpg-streamer)
- [IPFS](https://github.com/ipfs/ipfs)
Expand Down
75 changes: 67 additions & 8 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -1026,10 +1026,22 @@ INDEX_BROWSER_TARGET=$INDEX_BROWSER_TARGET"
aSOFTWARE_CATX[$software_id]=5
aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/gaming/#box86'
aSOFTWARE_DEPS[$software_id]='16'
# Only works on ARMv7
# ARMv7 only
aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0
aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,3]=0
aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,10]=0
#------------------
software_id=197

aSOFTWARE_NAME[$software_id]='Box64'
aSOFTWARE_DESC[$software_id]='x86_64 userspace emulation'
aSOFTWARE_CATX[$software_id]=5
aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/gaming/#box64'
aSOFTWARE_DEPS[$software_id]='16'
# ARMv8 only
aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0
aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,2]=0
aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,10]=0

# Social & Search
#--------------------------------------------------------------------------------
Expand Down Expand Up @@ -7899,7 +7911,43 @@ If you want to update ${aSOFTWARE_NAME[$software_id]}, please use its internal u
G_EXEC make install

# Reload binfmt to have i386 binaries executed via box86 automatically from now on
(( $G_HW_ARCH < 10 )) && G_EXEC systemctl restart systemd-binfmt
G_EXEC systemctl restart systemd-binfmt
fi

software_id=197 # Box64
if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 ))
then
Banner_Installing

# APT deps
DEPS_LIST='cmake python3-minimal'

# Download
local version=$(curl -sSfL 'https://api.github.com/repos/ptitSeb/box64/tags' | mawk -F\" '/"name": /{print $4;exit}')
[[ $version ]] || { version='v0.1.4'; G_DIETPI-NOTIFY 1 "Automatic latest ${aSOFTWARE_NAME[$software_id]} version detection failed. Version \"$version\" will be installed as fallback, but a newer version might be available. Please report this at: https://github.com/MichaIng/DietPi/issues"; }
Download_Install "https://github.com/ptitSeb/box64/archive/$version.tar.gz"

# Build
G_EXEC mkdir box64-${version#v}/build
G_EXEC cd box64-${version#v}/build
# - RPi 4
if [[ $G_HW_MODEL == 4 ]]
then
G_EXEC cmake .. -DRPI4ARM64=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo
# - RK3399
elif [[ $G_HW_CPUID == 3 ]]
then
G_EXEC cmake .. -DRK3399=1 -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo
# - Others
else
G_EXEC cmake .. -DARM_DYNAREC=ON -DNOGIT=1 -DCMAKE_BUILD_TYPE=RelWithDebInfo
fi
G_EXEC_OUTPUT=1 G_EXEC make CFLAGS='-g0 -O3' "-j$(nproc)"
G_EXEC strip --remove-section=.comment --remove-section=.note box64
G_EXEC make install

# Reload binfmt to have x86_64 binaries executed via box64 automatically from now on
G_EXEC systemctl restart systemd-binfmt
fi

software_id=27 # TasmoAdmin
Expand Down Expand Up @@ -13684,12 +13732,23 @@ _EOF_
if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 ))
then
Banner_Uninstalling
[[ -f '/usr/local/bin/box86' ]] && rm -v /usr/local/bin/box86
[[ -f '/etc/binfmt.d/box86.conf' ]] && rm -v /etc/binfmt.d/box86.conf
[[ -f '/usr/lib/i386-linux-gnu/libstdc++.so.6' ]] && rm -v /usr/lib/i386-linux-gnu/libstdc++.so.6
[[ -f '/usr/lib/i386-linux-gnu/libstdc++.so.5' ]] && rm -v /usr/lib/i386-linux-gnu/libstdc++.so.5
[[ -f '/usr/lib/i386-linux-gnu/libgcc_s.so.1' ]] && rm -v /usr/lib/i386-linux-gnu/libgcc_s.so.1
[[ -d '/usr/lib/i386-linux-gnu' ]] && rmdir --ignore-fail-on-non-empty /usr/lib/i386-linux-gnu
[[ -f '/usr/local/bin/box86' ]] && G_EXEC rm /usr/local/bin/box86
[[ -f '/etc/binfmt.d/box86.conf' ]] && G_EXEC rm /etc/binfmt.d/box86.conf
[[ -f '/usr/lib/i386-linux-gnu/libstdc++.so.6' ]] && G_EXEC rm /usr/lib/i386-linux-gnu/libstdc++.so.6
[[ -f '/usr/lib/i386-linux-gnu/libstdc++.so.5' ]] && G_EXEC rm /usr/lib/i386-linux-gnu/libstdc++.so.5
[[ -f '/usr/lib/i386-linux-gnu/libgcc_s.so.1' ]] && G_EXEC rm /usr/lib/i386-linux-gnu/libgcc_s.so.1
[[ -d '/usr/lib/i386-linux-gnu' ]] && G_EXEC rmdir --ignore-fail-on-non-empty /usr/lib/i386-linux-gnu
fi

software_id=197 # Box64
if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 ))
then
Banner_Uninstalling
[[ -f '/usr/local/bin/box64' ]] && G_EXEC rm /usr/local/bin/box64
[[ -f '/etc/binfmt.d/box64.conf' ]] && G_EXEC rm /etc/binfmt.d/box64.conf
[[ -f '/usr/lib/x86_64-linux-gnu/libstdc++.so.6' ]] && G_EXEC rm /usr/lib/x86_84-linux-gnu/libstdc++.so.6
[[ -f '/usr/lib/x86_64-linux-gnu/libgcc_s.so.1' ]] && G_EXEC rm /usr/lib/x86_64-linux-gnu/libgcc_s.so.1
[[ -d '/usr/lib/x86_64-linux-gnu' ]] && G_EXEC rmdir --ignore-fail-on-non-empty /usr/lib/x86_64-linux-gnu
fi

software_id=27 # TasmoAdmin
Expand Down

0 comments on commit c690a06

Please sign in to comment.