-
Notifications
You must be signed in to change notification settings - Fork 101
Building
Since ArkOS is based on Ubuntu 19.10 for Arm, the process is different from a typical fully open source software build. Below describes the process:
- The base ubuntu 19.10 image can be downloaded from here. Mirror available here.
- The mali gpu driver from here. Mirror available here
sudo cp libmali.so_rk3326_gbm_arm64_r13p0_with_vulkan_and_cl /usr/local/lib/aarch64-linux-gnu/libmali-bifrost-g31-rxp0-gbm.so
sudo cp libmali.so_rk3326_gbm_arm32_r13p0_with_vulkan_and_cl /usr/local/lib/arm-linux-gnueabihf/libmali-bifrost-g31-rxp0-gbm.so
- For the RG503, use the
libmali-bifrost-g52-g2p0-gbm.so
mali driver from here
- The sdl2 build from here
- For the kernel, that is dependent on the device you're targeting:
- Click here for the RG351P/M - You can build it following the instructions here
- Click here for the RG351V - You can build it following the instructions here
- Click here for the OGA/RK2020/RGB10 - You can build it following the instructions here
-
Click here for the Chi - You can build it following the instructions here. Instead of
make odroidgoa_tweaked_defconfig
domake gameforce_defconfig
- Click here for the RG503 - You can build it following the instructions here.
- Click here for the RK2023 and RGB30 - You can build it following the instructions here.
- For the uboot, that is also dependent on the device you're targeting:
Last but not least, Emulationstation-FCAMOD from here
- For the non header version that's fully dependent on SDL2, use this version instead.
- For the rk3566 devices (Such as the RG353M/V/VS, RG503, RK2023 and RGB30), use this version instead.
The rest I add via scripted updates from here:
Sources I modified myself are available through my github account here.
Many of the recipes I use to build various emulators, libretro cores, and other tools are here
Many of my sources have been modified to support my build process. My process involves the use of both 32bit and 64bit ARM debian based chroots within an Ubuntu Mate 20.04 Oracle VirtualBox based VM I utilize. You can download the prebuilt VM either through this Mega or Google Drive link.
More info about this VM is available here.
install Prereqs:
sudo apt update
sudo apt install -y build-essential debootstrap binfmt-support qemu-user-static
Then install armhf and arm64 chroots:
sudo qemu-debootstrap --arch armhf buster /mnt/data/armhf http://deb.debian.org/debian/
sudo qemu-debootstrap --arch arm64 buster /mnt/data/arm64 http://deb.debian.org/debian/
Optional Note
You can choose to use the newer Bullseye debian stable for your chroots which has a newer gcc, however there's an extra step needed to get the arm64 version going. This may have weird quirks so install and use with caution.
Per this post, you'll need to refresh qemu-user-static using a docker command. To do this, do the following after installing the prereqs noted above.:
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt install docker-ce -y
sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
Then install armhf and arm64 chroots:
sudo qemu-debootstrap --arch armhf bullseye /mnt/data/armhf http://deb.debian.org/debian/
sudo qemu-debootstrap --arch arm64 bullseye /mnt/data/arm64 http://deb.debian.org/debian/
If the arm64 fails to complete due to a "Failure trying to run: /sbin/ldconfig" error, then do the following:
sudo rm -rf /mnt/data/arm64
sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
sudo qemu-debootstrap --arch arm64 bullseye /mnt/data/arm64 http://deb.debian.org/debian/
The install of the arm64 chroot should complete now.
For 32 bit Arm environment:
sudo chroot /mnt/data/armhf/
or create a Arm32 shortcut on the desktop gui and click on Arm32 shortcut on desktop
For 64 bit Arm environment:
sudo chroot /mnt/data/arm64/
or create a Arm64 shortcut on the desktop gui and click on Arm64 shortcut on desktop
Helpful tools to install in both environments for RK3326 app builds
apt -y install build-essential git wget libdrm-dev python3 python3-pip python3-setuptools python3-wheel ninja-build libopenal-dev premake4 autoconf libevdev-dev ffmpeg libsnappy-dev libboost-tools-dev magics++ libboost-thread-dev libboost-all-dev pkg-config zlib1g-dev libpng-dev libsdl2-dev clang cmake cmake-data libarchive13 libcurl4 libfreetype6-dev libjsoncpp1 librhash0 libuv1 mercurial mercurial-common libgbm-dev libsdl2-ttf-2.0-0 libsdl2-ttf-dev locales locales-all
dpkg-reconfigure locales (Set you local language)
ln -s /usr/include/libdrm/ /usr/include/drm
pip3 install meson
git clone https://github.com/mesonbuild/meson.git
ln -s /meson/meson.py /usr/bin/meson
Compile and install librga and copy it's headers to appropriate folders:
git clone https://github.com/christianhaitian/linux-rga.git
cd linux-rga
git checkout 1fc02d56d97041c86f01bc1284b7971c6098c5fb
<--- If this is not done, you may get c_RkRgaBlit failed
or c_RkRgaColorFill failed.
errors.
meson build && cd build
meson compile
cp librga.so* /usr/lib/aarch64-linux-gnu/
for arm64 chroot or cp librga.so* /usr/lib/arm-linux-gnueabihf/
for arm32 chroot <---Ignore the error of not copying a librga folder as it's not needed.
cd ..
mkdir /usr/local/include/rga
cp drmrga.h /usr/local/include/rga/
cp rga.h /usr/local/include/rga/
cp RgaApi.h /usr/local/include/rga/
cp RockchipRgaMacro.h /usr/local/include/rga/
libgo2 install and development headers:
git clone https://github.com/OtherCrashOverride/libgo2.git
cd libgo2
premake4 gmake
make
cp libgo2.so* /usr/lib/aarch64-linux-gnu/
for arm64 chroot or cp libgo2.so* /usr/lib/arm-linux-gnueabihf/
for arm32 chroot
mkdir -p /usr/include/go2
cp -L src/*.h /usr/include/go2/
There's also a docker available created by MrRatBurn. It's designed to build apps compatible with RetroOZ, however, RetroOZ is a fork of ArkOS so it should work for most if not all app builds for ArkOS as well. You can find more information about it here