From c0c0ee30d2f9b80db68549e300777d9473b00109 Mon Sep 17 00:00:00 2001 From: ravenclaw900 <50060110+ravenclaw900@users.noreply.github.com> Date: Fri, 6 Aug 2021 07:58:10 -0500 Subject: [PATCH 1/5] v7.5 + DietPi-Software | Begin to add Box64 --- README.md | 1 + dietpi/dietpi-software | 64 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 64 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c014d0172f..c2f7b20dff 100644 --- a/README.md +++ b/README.md @@ -313,6 +313,7 @@ Links to hardware and software manufacturers, sources and build instructions use - [PostgreSQL](https://git.postgresql.org/gitweb/?p=postgresql.git) - [OpenJDK](https://github.com/openjdk) - [Blynk Server](https://github.com/Peterkn2001/blynk-server) +- [Box64](https://github.com/ptitSeb/box64) --- diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 15e79a0d4e..f45f5540a0 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -1030,6 +1030,18 @@ INDEX_BROWSER_TARGET=$INDEX_BROWSER_TARGET" 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=196 + + 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/#box86' + aSOFTWARE_DEPS[$software_id]='16' + # Only works on ARMv8 + 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 #-------------------------------------------------------------------------------- @@ -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=196 # 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.2'; 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 amd64 binaries executed via box64 automatically from now on + G_EXEC systemctl restart systemd-binfmt fi software_id=27 # TasmoAdmin @@ -13692,6 +13740,20 @@ _EOF_ [[ -d '/usr/lib/i386-linux-gnu' ]] && rmdir --ignore-fail-on-non-empty /usr/lib/i386-linux-gnu fi + software_id=196 # Box64 + if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )) + then + Banner_Uninstalling + [[ -f '/usr/local/bin/box64' ]] && rm -v /usr/local/bin/box64 + [[ -f '/etc/binfmt.d/box64.conf' ]] && rm -v /etc/binfmt.d/box64.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 + """ + fi + software_id=27 # TasmoAdmin if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )); then From e18c8746e0c1e96038c61cd95e93831afb1317db Mon Sep 17 00:00:00 2001 From: ravenclaw900 <50060110+ravenclaw900@users.noreply.github.com> Date: Sat, 7 Aug 2021 09:58:31 -0500 Subject: [PATCH 2/5] v7.5 + DietPi-Software | Allow Steam for aarch64 --- dietpi/dietpi-software | 1 - 1 file changed, 1 deletion(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index f45f5540a0..0925ada168 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -995,7 +995,6 @@ INDEX_BROWSER_TARGET=$INDEX_BROWSER_TARGET" (( $G_HW_ARCH == 2 )) && aSOFTWARE_DEPS[$software_id]+=' 62' # x86_64 and ARMv7 only aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0 - aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,3]=0 #------------------ software_id=164 From 0fa8f42cf7c503af1da4d10c7197f812bb0fb4e4 Mon Sep 17 00:00:00 2001 From: ravenclaw900 <50060110+ravenclaw900@users.noreply.github.com> Date: Sat, 14 Aug 2021 08:08:58 -0500 Subject: [PATCH 3/5] v7.5 + DietPi-Software | Fix software ID --- dietpi/dietpi-software | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 0925ada168..729d143647 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -993,7 +993,9 @@ INDEX_BROWSER_TARGET=$INDEX_BROWSER_TARGET" aSOFTWARE_DEPS[$software_id]='5 6 desktop' # Box86 required on ARM (( $G_HW_ARCH == 2 )) && aSOFTWARE_DEPS[$software_id]+=' 62' - # x86_64 and ARMv7 only + # Box64 required on ARMv8 + (( $G_HW_ARCH == 3 )) && aSOFTWARE_DEPS[$software_id]+=' 197' + # x86_64, ARMv7, and ARMv8 only aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0 #------------------ software_id=164 @@ -1030,7 +1032,7 @@ INDEX_BROWSER_TARGET=$INDEX_BROWSER_TARGET" aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,3]=0 aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,10]=0 #------------------ - software_id=196 + software_id=197 aSOFTWARE_NAME[$software_id]='Box64' aSOFTWARE_DESC[$software_id]='x86_64 userspace emulation' @@ -7913,7 +7915,7 @@ If you want to update ${aSOFTWARE_NAME[$software_id]}, please use its internal u G_EXEC systemctl restart systemd-binfmt fi - software_id=196 # Box64 + software_id=197 # Box64 if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == 1 )) then Banner_Installing @@ -13739,7 +13741,7 @@ _EOF_ [[ -d '/usr/lib/i386-linux-gnu' ]] && rmdir --ignore-fail-on-non-empty /usr/lib/i386-linux-gnu fi - software_id=196 # Box64 + software_id=197 # Box64 if (( ${aSOFTWARE_INSTALL_STATE[$software_id]} == -1 )) then Banner_Uninstalling From 66f160ad1927699eeaa7c5880d30ac8a6aa2880a Mon Sep 17 00:00:00 2001 From: ravenclaw900 <50060110+ravenclaw900@users.noreply.github.com> Date: Sat, 14 Aug 2021 08:10:34 -0500 Subject: [PATCH 4/5] v7.5 + DietPi-Software | Fix uninstall steps --- dietpi/dietpi-software | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 729d143647..635927e4d3 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -13747,12 +13747,9 @@ _EOF_ Banner_Uninstalling [[ -f '/usr/local/bin/box64' ]] && rm -v /usr/local/bin/box64 [[ -f '/etc/binfmt.d/box64.conf' ]] && rm -v /etc/binfmt.d/box64.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/lib/x86_64-linux-gnu/libstdc++.so.6' ]] && rm -v /usr/lib/x86_84-linux-gnu/libstdc++.so.6 + [[ -f '/usr/lib/x86_64-linux-gnu/libgcc_s.so.1' ]] && rm -v /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 + [[ -d '/usr/lib/x86_64-linux-gnu' ]] && rmdir --ignore-fail-on-non-empty /usr/lib/x86_64-linux-gnu fi software_id=27 # TasmoAdmin From a6b6555031769496665137edf4433f964da4c1ad Mon Sep 17 00:00:00 2001 From: MichaIng Date: Tue, 14 Sep 2021 20:50:27 +0200 Subject: [PATCH 5/5] v7.6 + DietPi-Software | Steam: Do not allow to install it with Box64 on ARMv8: It is an i386 binary and hence cannot be executed by Box64 and Box86 cannot be easily installed and run on ARMv8 either. --- .meta/dietpi-survey_report | 3 ++- CHANGELOG.txt | 3 +++ README.md | 2 +- dietpi/dietpi-software | 37 ++++++++++++++++++------------------- 4 files changed, 24 insertions(+), 21 deletions(-) diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index e5889bbaa2..c69e93bf1a 100644 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -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() diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 223479e03c..f8c00f33cb 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -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. diff --git a/README.md b/README.md index c2f7b20dff..7102724e80 100644 --- a/README.md +++ b/README.md @@ -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) @@ -313,7 +314,6 @@ Links to hardware and software manufacturers, sources and build instructions use - [PostgreSQL](https://git.postgresql.org/gitweb/?p=postgresql.git) - [OpenJDK](https://github.com/openjdk) - [Blynk Server](https://github.com/Peterkn2001/blynk-server) -- [Box64](https://github.com/ptitSeb/box64) --- diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 635927e4d3..edb249c09e 100644 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -993,10 +993,9 @@ INDEX_BROWSER_TARGET=$INDEX_BROWSER_TARGET" aSOFTWARE_DEPS[$software_id]='5 6 desktop' # Box86 required on ARM (( $G_HW_ARCH == 2 )) && aSOFTWARE_DEPS[$software_id]+=' 62' - # Box64 required on ARMv8 - (( $G_HW_ARCH == 3 )) && aSOFTWARE_DEPS[$software_id]+=' 197' - # x86_64, ARMv7, and ARMv8 only + # x86_64 and ARMv7 only aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,1]=0 + aSOFTWARE_AVAIL_G_HW_ARCH[$software_id,3]=0 #------------------ software_id=164 @@ -1027,7 +1026,7 @@ 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 @@ -1037,9 +1036,9 @@ INDEX_BROWSER_TARGET=$INDEX_BROWSER_TARGET" 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/#box86' + aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/gaming/#box64' aSOFTWARE_DEPS[$software_id]='16' - # Only works on ARMv8 + # 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 @@ -7925,7 +7924,7 @@ If you want to update ${aSOFTWARE_NAME[$software_id]}, please use its internal u # Download local version=$(curl -sSfL 'https://api.github.com/repos/ptitSeb/box64/tags' | mawk -F\" '/"name": /{print $4;exit}') - [[ $version ]] || { version='v0.1.2'; 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"; } + [[ $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 @@ -7947,7 +7946,7 @@ If you want to update ${aSOFTWARE_NAME[$software_id]}, please use its internal u G_EXEC strip --remove-section=.comment --remove-section=.note box64 G_EXEC make install - # Reload binfmt to have amd64 binaries executed via box64 automatically from now on + # Reload binfmt to have x86_64 binaries executed via box64 automatically from now on G_EXEC systemctl restart systemd-binfmt fi @@ -13733,23 +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' ]] && rm -v /usr/local/bin/box64 - [[ -f '/etc/binfmt.d/box64.conf' ]] && rm -v /etc/binfmt.d/box64.conf - [[ -f '/usr/lib/x86_64-linux-gnu/libstdc++.so.6' ]] && rm -v /usr/lib/x86_84-linux-gnu/libstdc++.so.6 - [[ -f '/usr/lib/x86_64-linux-gnu/libgcc_s.so.1' ]] && rm -v /usr/lib/x86_64-linux-gnu/libgcc_s.so.1 - [[ -d '/usr/lib/x86_64-linux-gnu' ]] && rmdir --ignore-fail-on-non-empty /usr/lib/x86_64-linux-gnu + [[ -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