Option to enable Binder and Ashmem modules for use with Anbox (#122)

* Add the option to enable Binder and Ashmem

These kernel modules are needed for Anbox, and maybe other android projects as well.

* Delete prepare

* Add files via upload

* Add binder and ashmem option to prepare

* Got rid of the extra prepare file, oops
This commit is contained in:
Sukid 2020-11-20 04:42:14 -05:00 committed by GitHub
parent b69de7d1cc
commit 1c22d6853c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View File

@ -118,6 +118,9 @@ _zfsfix=""
# Set to "true" to enable support for fsync, an experimental replacement for esync found in Valve Proton 4.11+ - https://steamcommunity.com/games/221410/announcements/detail/2957094910196249305
_fsync=""
# Set to "true" to enable the Binder and Ashmem, the kernel modules required to use the android emulator Anbox.
_anbox=""
# A selection of patches from Zen/Liquorix kernel and additional tweaks for a better gaming experience (ZENIFY) - Default is "true"
_zenify="true"

View File

@ -1061,6 +1061,23 @@ _tkg_srcprep() {
fi
fi
# Anbox modules
if [ "$_basever" > "56" ]; then
if [ -z "$_anbox" ]; then
plain ""
plain "Enable android modules for use with Anbox?"
plain "https://github.com/anbox/anbox"
read -rp "`echo $' > N/y : '`" CONDITION12;
fi
if [[ "$CONDITION12" =~ [yY] ]] || [ "$_zfsfix" = "true" ]; then
echo "CONFIG_ASHMEM=y" >> ./.config
echo "CONFIG_ANDROID=y" >> ./.config
echo "CONFIG_ANDROID_BINDER_IPC=y" >> ./.config
echo "CONFIG_ANDROID_BINDERFS=y" >>./.config
echo 'CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder"' >>./.config
fi
fi
# Community patches
if [ -n "$_community_patches" ]; then
if [ ! -d "$_where/../community-patches" ]; then