ArchR v2.0-rc3 — first official release-candidate

Kernel 6.12 LTS · Mesa 26.0.5 Panfrost · CMA 96 MB · zlib-ng 2.2.4
CPU turbo 1.5 GHz (vdd_arm 1.45 V) · GPU 650 MHz @ 1.150 V · mali_kbase PM patch
43 motherboard revisions covered · two image variants with hardware auto-detect
PortMaster pre-installed · MESA_GLTHREAD whitelist · RetroAchievements
Tailscale / WireGuard / ZeroTier · Syncthing + rclone · Samba

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Douglas Teles
2026-04-29 14:36:32 -03:00
commit 2d0a76b94a
3920 changed files with 380594 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
---
name: Bug Report
about: Describe this issue
title: "[BUG]"
labels: ISSUE NEEDS REVIEW
assignees: ''
---
### Have you first checked existing issues and documentation for a solution?
[ArchR GitHub Issues](https://github.com/archr-linux/Arch-R/issues)
<!-- Any issue created without sufficient information may be closed. -->
### Describe the bug
<!-- A clear description of what the bug is. -->
### How to reproduce
Steps to reproduce the behavior:
1. Go to '...'
2. Play '....'
3. See error
### Information
- ArchR Version: [e.g. 20260316]
- Hardware Platform: [e.g. Powkiddy RGB20SX]
### Log file
<!-- Add debug log files that we can search for errors. -->
### Context
<!-- Add any context about the problem here. -->
+8
View File
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Help and Support
url: https://discord.gg/Q5RY3gEuwv
about: Please ask for help and post questions in our Discord
- name: Feature Requests
url: https://discord.gg/Q5RY3gEuwv
about: Please ask for feature requests in our Discord
+119
View File
@@ -0,0 +1,119 @@
&nbsp;&nbsp;<img src="distributions/ArchR/logos/archr-logo.png" width=192>
#
ArchR is a community developed Linux distribution for handheld gaming devices, forked from [ROCKNIX](https://github.com/ROCKNIX/distribution). Our goal is to produce an operating system that has the features and capabilities that we need, and to have fun as we develop it.
## Licenses
ArchR is a Linux distribution forked from ROCKNIX, made up of many open-source components. Components are provided under their respective licenses. This distribution includes components licensed for non-commercial use only.
### ArchR Branding
ArchR branding and images are licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-nc-sa/4.0/).
#### You are free to
* Share — copy and redistribute the material in any medium or format
* Adapt — remix, transform, and build upon the material
#### Under the following terms
* Attribution — You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
* NonCommercial — You may not use the material for commercial purposes.
* ShareAlike — If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
### ArchR Software
Copyright (C) 2024-2026 ArchR (https://github.com/archr-linux). Derived from ROCKNIX, Copyright (C) 2024 ROCKNIX (https://github.com/ROCKNIX).
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
## Installation
* Download the latest version of ArchR.
* Decompress the image.
* Write the image to an SDCARD using an imaging tool. Common imaging tools include [Balena Etcher](https://www.balena.io/etcher/), [Raspberry Pi Imager](https://www.raspberrypi.com/software/), and [Win32 Disk Imager](https://sourceforge.net/projects/win32diskimager/). If you're skilled with the command line, dd works fine too.
### Installation Package Downloads
| **Device/Platform** | **Download Package** | **Documentation** |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------|
| **Anbernic RG351P/M/V, Game Console R33S/R35S/R36S, ODROID Go Advance, ODROID Go Super, Magicx XU10, Powkiddy V10/RGB10** | [ArchR-RK3326.aarch64-$DATE-a.img.gz](https://github.com/archr-linux/Arch-R/releases/download/$DATE/ArchR-RK3326.aarch64-$DATE-a.img.gz) | [documentation](/documentation/PER_DEVICE_DOCUMENTATION/RK3326/) |
| **Magicx XU Mini M, Powkiddy RGB10X** | [ArchR-RK3326.aarch64-$DATE-b.img.gz](https://github.com/archr-linux/Arch-R/releases/download/$DATE/ArchR-RK3326.aarch64-$DATE-b.img.gz) | [documentation](/documentation/PER_DEVICE_DOCUMENTATION/RK3326/) |
| **Anbernic RG353P/M/V/VS/PS, RG503, RGARC-D/S, Powkiddy RK2023, RGB10 Max 3, RGB30, RGB20SX, RGB20 Pro** | [ArchR-RK3566.aarch64-$DATE-Generic.img.gz](https://github.com/archr-linux/Arch-R/releases/download/$DATE/ArchR-RK3566.aarch64-$DATE-Generic.img.gz) | [documentation](/documentation/PER_DEVICE_DOCUMENTATION/RK3566/) |
| **Anbernic RG552** | [ArchR-RK3399.aarch64-$DATE.img.gz](https://github.com/archr-linux/Arch-R/releases/download/$DATE/ArchR-RK3399.aarch64-$DATE.img.gz) | [documentation](/documentation/PER_DEVICE_DOCUMENTATION/RK3399/) |
| **Anbernic RG35XX PLUS/H/SP/2024, RG40XX V/H, RGCUBEXX, RG34XX SP, RG28XX [Must Follow Install Instructions](https://github.com/archr-linux/Arch-R/wiki/h700-installation)** | [ArchR-H700.aarch64-$DATE.img.gz](https://github.com/archr-linux/Arch-R/releases/download/$DATE/ArchR-H700.aarch64-$DATE.img.gz) | [documentation](/documentation/PER_DEVICE_DOCUMENTATION/H700/) |
| **Hardkernel ODROID Go Ultra, Powkiddy RGB10 Max 3 Pro** | [ArchR-S922X.aarch64-$DATE.img.gz](https://github.com/archr-linux/Arch-R/releases/download/$DATE/ArchR-S922X.aarch64-$DATE.img.gz) | [documentation](/documentation/PER_DEVICE_DOCUMENTATION/S922X/) |
| **Gameforce Ace (default). Orange Pi 5 / 5 Plus, Radxa Rock 5a / 5b / 5b+ / CM5, and Indiedroid Nova** | [ArchR-RK3588.aarch64-$DATE.img.gz](https://github.com/archr-linux/Arch-R/releases/download/$DATE/ArchR-RK3588.aarch64-$DATE.img.gz) | [documentation](/documentation/PER_DEVICE_DOCUMENTATION/RK3588/) |
| **Powkiddy x55** | [ArchR-RK3566.aarch64-$DATE-Powkiddy_x55.img.gz](https://github.com/archr-linux/Arch-R/releases/download/$DATE/ArchR-RK3566.aarch64-$DATE-Powkiddy_x55.img.gz) | [documentation](/documentation/PER_DEVICE_DOCUMENTATION/RK3566-X55/) |
| **Retroid Pocket 5, Pocket Mini, Pocket Mini V2, Pocket Flip2** | [ArchR-SM8250.aarch64-$DATE.img.gz](https://github.com/archr-linux/Arch-R/releases/download/$DATE/ArchR-SM8250.aarch64-$DATE.img.gz) | [documentation](/documentation/PER_DEVICE_DOCUMENTATION/SM8250/) |
| **Ayn Odin 2, Odin 2 Mini, Odin 2 Portal, Thor, Ayaneo Pocket ACE/EVO/DMG/DS** | [ArchR-SM8550.aarch64-$DATE.img.gz](https://github.com/archr-linux/Arch-R/releases/download/$DATE/ArchR-SM8550.aarch64-$DATE.img.gz) | [documentation](/documentation/PER_DEVICE_DOCUMENTATION/SM8550/) |
| **Ayaneo Pocket S2** | [ArchR-SM8650.aarch64-$DATE.img.gz](https://github.com/archr-linux/Arch-R/releases/download/$DATE/ArchR-SM8650.aarch64-$DATE.img.gz) | [documentation](/documentation/PER_DEVICE_DOCUMENTATION/SM8650/) |
## Upgrading
* Download and install the update online via the System Settings menu.
* If you are unable to update online
* Download the latest version of ArchR from Github
* Copy the update to your device over the network to your device's update share.
* Reboot the device, and the update will begin automatically.
### Update Package Downloads
| **Device/Platform** | **Download Package** |
|---------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------|
| **Anbernic RG351P/M/V, Game Console R33S/R35S/R36S, ODROID Go Advance, ODROID Go Super, Magicx XU10, XU Mini M, Powkiddy V10/RGB10/RGB10X** | [ArchR-RK3326.aarch64-$DATE.tar](https://github.com/archr-linux/Arch-R/releases/download/$DATE/ArchR-RK3326.aarch64-$DATE.tar) |
| **Anbernic RG353P/M/V/VS/PS, RG503, RGARC-D/S, Powkiddy RK2023, RGB10 Max 3, RGB30, RGB20SX, RGB20 Pro, X55** | [ArchR-RK3566.aarch64-$DATE.tar](https://github.com/archr-linux/Arch-R/releases/download/$DATE/ArchR-RK3566.aarch64-$DATE.tar) |
| **Anbernic RG552** | [ArchR-RK3399.aarch64-$DATE.tar](https://github.com/archr-linux/Arch-R/releases/download/$DATE/ArchR-RK3399.aarch64-$DATE.tar) |
| **Anbernic RG35XX PLUS/H/SP/2024, RG40XX V/H, RGCUBEXX, RG34XX SP, RG28XX** | [ArchR-H700.aarch64-$DATE.tar](https://github.com/archr-linux/Arch-R/releases/download/$DATE/ArchR-H700.aarch64-$DATE.tar) |
| **Hardkernel ODROID Go Ultra, Powkiddy RGB10 Max 3 Pro** | [ArchR-S922X.aarch64-$DATE.tar](https://github.com/archr-linux/Arch-R/releases/download/$DATE/ArchR-S922X.aarch64-$DATE.tar) |
| **Gameforce Ace, Orange Pi 5 / 5 Plus, Radxa Rock 5a / 5b / 5b+ / CM5 and Indiedroid Nova** | [ArchR-RK3588.aarch64-$DATE.tar](https://github.com/archr-linux/Arch-R/releases/download/$DATE/ArchR-RK3588.aarch64-$DATE.tar) |
| **Retroid Pocket 5, Pocket Mini, Pocket Mini V2, Pocket Flip2** | [ArchR-SM8250.aarch64-$DATE.tar](https://github.com/archr-linux/Arch-R/releases/download/$DATE/ArchR-SM8250.aarch64-$DATE.tar) |
| **Ayn Odin 2, Odin 2 Mini, Odin 2 Portal, Thor, Ayaneo Pocket ACE/EVO/DMG/DS** | [ArchR-SM8550.aarch64-$DATE.tar](https://github.com/archr-linux/Arch-R/releases/download/$DATE/ArchR-SM8550.aarch64-$DATE.tar) |
| **Ayaneo Pocket S2** | [ArchR-SM8650.aarch64-$DATE.tar](https://github.com/archr-linux/Arch-R/releases/download/$DATE/ArchR-SM8650.aarch64-$DATE.tar) |
## Documentation
### Contribute
* [Building ArchR](https://github.com/archr-linux/distribution/wiki/contribute/build/)
* [Code of Conduct](https://github.com/archr-linux/distribution/wiki/contribute/code-of-conduct/)
* [Contributing to ArchR](https://github.com/archr-linux/distribution/wiki/contribute/)
* [Modifying ArchR](https://github.com/archr-linux/distribution/wiki/contribute/modify/)
* [Adding Hardware Quirks](https://github.com/archr-linux/distribution/wiki/contribute/quirks/)
* [Creating Packages](https://github.com/archr-linux/distribution/wiki/contribute/packages/)
* [Pull Request Template](/PULL_REQUEST_TEMPLATE.md)
### Play
* [Installing ArchR](https://github.com/archr-linux/distribution/wiki/play/install/)
* [Updating ArchR](https://github.com/archr-linux/distribution/wiki/play/update/)
* [Controls](https://github.com/archr-linux/distribution/wiki/play/controls/)
* [Netplay](https://github.com/archr-linux/distribution/wiki/play/netplay/)
* [Configuring Moonlight](https://github.com/archr-linux/distribution/wiki/systems/moonlight/)
* [Device Specific Documentation](/documentation/PER_DEVICE_DOCUMENTATION)
### Configure
* [Optimizations](https://github.com/archr-linux/distribution/wiki/configure/optimizations/)
* [Shaders](https://github.com/archr-linux/distribution/wiki/configure/shaders/)
* [Cloud Sync](https://github.com/archr-linux/distribution/wiki/configure/cloud-sync/)
* [VPN](https://github.com/archr-linux/distribution/wiki/configure/vpn/)
### Other
* [Frequently Asked Questions](https://github.com/archr-linux/distribution/wiki/faqs/)
* [Donating to ArchR](https://github.com/archr-linux/Arch-R)
## Change Log
### New Features
* Added...?
### Updates
* Updated...?
### Bug Fixes
* Fixed...?
**Full Changelog**: https://github.com/archr-linux/Arch-R/compare/$LAST_TAG...$DATE
+175
View File
@@ -0,0 +1,175 @@
# build directories
/build.*/
/builds
/.fakeroot.*
.claude
# automatically downloaded source files
/sources/
# prebuild target binarys to provide
/target/
# mkpkg temp
mkpkg-temp
# options
/.libreelec
# private working directory
/.work/
# dedicated filesystem
/lost+found/
# symlinks...
/sources
/.work
# ccache
/.ccache/
# backup files
*.orig
# crap
.DS_Store
.directory
Thumbs.db
*.log
*.pdf
# temp scripts (debug/install helpers)
fix-debug.sh
install-debug.sh
# ignore git repos from update scripts
tools/mkpkg/*.git
# ignore old linux configs
projects/**/*.old
# Generated MIPI overlay output (regenerated by generator.sh)
config/mipi-generator/output/
# Generated DTBO overlays in u-boot config (copied from mipi-generator output)
projects/ArchR/devices/RK3326/packages/u-boot/config/overlays_original/*.dtbo
projects/ArchR/devices/RK3326/packages/u-boot/config/overlays_clone/*.dtbo
# ArchR
/.archr
/.cache
/.doc_cache
/.env
/.es_cache
/.config
# Upstream/legacy distributions (not used by ArchR)
distributions/ROCKNIX/
distributions/LibreELEC/
distributions/LEIoT/
# Upstream/other platform projects (not used by PROJECT=ArchR)
projects/ROCKNIX/
projects/Allwinner/
projects/Amlogic/
projects/ARM/
projects/Generic/
projects/NXP/
projects/Qualcomm/
projects/Rockchip/
projects/RPi/
projects/Samsung/
# Non-R36S device directories
projects/ArchR/devices/H700/
projects/ArchR/devices/RK3399/
projects/ArchR/devices/RK3566/
projects/ArchR/devices/RK3588/
projects/ArchR/devices/S922X/
projects/ArchR/devices/SDM845/
projects/ArchR/devices/SM8250/
projects/ArchR/devices/SM8550/
projects/ArchR/devices/SM8650/
# Non-R36S device documentation
documentation/PER_DEVICE_DOCUMENTATION/H700/
documentation/PER_DEVICE_DOCUMENTATION/RK3399/
documentation/PER_DEVICE_DOCUMENTATION/RK3566/
documentation/PER_DEVICE_DOCUMENTATION/RK3588/
documentation/PER_DEVICE_DOCUMENTATION/S922X/
documentation/PER_DEVICE_DOCUMENTATION/SDM845/
documentation/PER_DEVICE_DOCUMENTATION/SM8250/
documentation/PER_DEVICE_DOCUMENTATION/SM8550/
documentation/PER_DEVICE_DOCUMENTATION/SM8650/
# Kodi/mediacenter (MEDIACENTER not set in ArchR)
packages/mediacenter/
# Driver addons (DRIVER_ADDONS_SUPPORT=no in ArchR)
packages/linux-driver-addons/
# Kodi addons (no MEDIACENTER in ArchR)
# Kodi addons (no MEDIACENTER in ArchR) - keep addon-depends for shared libraries
packages/addons/*
!packages/addons/addon-depends/
# Platform-specific bootloaders/tools (not RK3326)
packages/tools/bcm2835-bootloader/
packages/tools/bcm2835-utils/
packages/tools/bcmstat/
packages/tools/rpi-eeprom/
packages/tools/amlogic-boot-fip/
packages/tools/exynos-boot-fip/
# Firmware not used by R36S (FIRMWARE=esp8089-firmware only)
packages/linux-firmware/brcmfmac_sdio-firmware/
packages/linux-firmware/brcmfmac_sdio-firmware-imx/
packages/linux-firmware/brcmfmac_sdio-firmware-rpi/
packages/linux-firmware/dvb-firmware/
packages/linux-firmware/firmware-dragonboard/
packages/linux-firmware/firmware-imx/
packages/linux-firmware/iwlwifi-firmware/
# Non-R36S CI workflows
.github/workflows/build-aarch64-emu-libretro.yml
.github/workflows/build-aarch64-emu-standalone.yml
.github/workflows/build-aarch64-qt6.yml
.github/workflows/build-aarch64-mame-lr.yml
# Emulators not used by RK3326 (too heavy or Vulkan-only)
projects/ArchR/packages/emulators/standalone/aethersx2-sa/
projects/ArchR/packages/emulators/standalone/azahar-sa/
projects/ArchR/packages/emulators/standalone/bigpemu-sa/
projects/ArchR/packages/emulators/standalone/cemu-sa/
projects/ArchR/packages/emulators/standalone/rpcs3-sa/
projects/ArchR/packages/emulators/standalone/supermodel-sa/
projects/ArchR/packages/emulators/standalone/xemu-sa/
projects/ArchR/packages/emulators/standalone/skyemu-sa/
projects/ArchR/packages/emulators/libretro/kronos-lr/
# Graphics packages not used by RK3326 (no Vulkan on Mali G31)
projects/ArchR/packages/graphics/libmali-vulkan/
projects/ArchR/packages/graphics/vulkan-wsi-layer/
# Qualcomm/non-RK3326 tools
projects/ArchR/packages/tools/archr-abl/
projects/ArchR/packages/tools/qcom-abl/
# Platform-specific base packages (not used by RK3326)
packages/audio/rpi-cirrus-config/
packages/tools/crust/
packages/tools/mkbootimg/
packages/tools/grub/
packages/linux-firmware/firmware-dragonboard/
packages/linux-firmware/firmware-imx/
packages/graphics/nvidia/
packages/multimedia/intel-vaapi-driver/
packages/multimedia/media-driver/
packages/multimedia/gmmlib/
packages/sysutils/open-vm-tools/
#other
docs/*
bench-results/
Executable
+58
View File
@@ -0,0 +1,58 @@
FROM archlinux:latest
SHELL ["/usr/bin/bash", "-c"]
# Update system and install base packages
# Fix: archlinux:latest has corrupt pacman local db (missing desc files in overlay)
# Step 1: upgrade base system (creates new layer, fixes stale db entries)
RUN pacman-db-upgrade 2>/dev/null; \
for pkg in /var/lib/pacman/local/*/; do \
[ ! -f "${pkg}desc" ] && rm -rf "$pkg" 2>/dev/null; \
done; true
RUN pacman -Syu --noconfirm
# Step 2: clean stale entries from previous layer, then install build deps
RUN for pkg in /var/lib/pacman/local/*/; do \
[ ! -f "${pkg}desc" ] && rm -rf "$pkg" 2>/dev/null; \
done; true
RUN pacman -S --noconfirm --needed \
base-devel bc jdk-openjdk file gawk gettext git go gperf \
perl-json perl-xml-parser ncurses lzop make patchutils \
python python-setuptools parted unzip wget curl \
xorg-mkfontscale libxslt zip vim zstd rdfind automake \
xmlstarlet rsync which sudo rpcsvc-proto perl-parse-yapp xorg-bdftopcf \
dtc python-pip
# Python fdt package for MIPI panel overlay generation
RUN pip3 install --break-system-packages fdt
# Note: GCC downgrade removed - build system compiles its own cross-toolchain (GCC 15.1).
# Host GCC is only used for host tools. Fixes from projects/ArchR/packages/ handle
# any GCC 15 incompatibilities in individual packages (spirv-tools, llvm, etc.)
# Create build user
RUN useradd -m -s /bin/bash docker && \
echo 'docker ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
# Set locale
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen && \
locale-gen
ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8
# Ensure Perl tools (pod2man, yapp, etc.) are in standard PATH
RUN for f in /usr/bin/core_perl/*; do [ -f "$f" ] && ln -sf "$f" /usr/bin/ 2>/dev/null; done; \
for f in /usr/bin/vendor_perl/*; do [ -f "$f" ] && ln -sf "$f" /usr/bin/ 2>/dev/null; done; \
true
### Cross compiling on ARM
RUN if [ "$(uname -m)" = "aarch64" ]; then pacman -S --noconfirm qemu-user-static; fi
RUN if [ ! -d /lib64 ]; then ln -sf /usr/x86_64-archr-linux-gnu/lib64 /lib64 2>/dev/null || true; fi
RUN if [ ! -d /lib/x86_64-archr-linux-gnu ]; then ln -sf /usr/x86_64-archr-linux-gnu/lib /lib/x86_64-archr-linux-gnu 2>/dev/null || true; fi
RUN mkdir -p /work && chown docker /work
# Git safe.directory for any user (env-file may override HOME)
RUN git config --system --add safe.directory '*'
WORKDIR /work
USER docker
+33
View File
@@ -0,0 +1,33 @@
<img src="distributions/ArchR/logos/archr-logo.png" width=192>
---
## Licenses
ArchR is a Linux distribution forked from [ROCKNIX](https://github.com/ROCKNIX/distribution), made up of many open-source components. Components are provided under their respective licenses. This distribution includes components licensed for non-commercial use only.
### ArchR Branding
ArchR branding and images are licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](https://creativecommons.org/licenses/by-nc-sa/4.0/). Original ROCKNIX branding remains the property of the ROCKNIX project.
You are free to:
- Share: copy and redistribute the material in any medium or format
- Adapt: remix, transform, and build upon the material
Under the following terms:
- Attribution: You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- NonCommercial: You may not use the material for commercial purposes.
- ShareAlike: If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
### ArchR Software
Copyright 2024-2026 ArchR (https://github.com/archr-linux)
Original software and scripts developed by the ArchR team are licensed under the terms of the [GNU GPL Version 2](https://choosealicense.com/licenses/gpl-2.0/). The full license can be found in this project's licenses folder.
Portions of this software are derived from ROCKNIX, Copyright 2024 ROCKNIX (https://github.com/ROCKNIX).
### Bundled Works
All other software is provided under each component's respective license. These licenses can be found in the software sources or in this project's licenses folder. Modifications to bundled software and scripts by the ArchR team are licensed under the terms of the software being modified.
+111
View File
@@ -0,0 +1,111 @@
-include $(HOME)/.archr/options
export OFFICIAL
all: world
system:
./scripts/image
release:
./scripts/image release
image:
./scripts/image mkimage
noobs:
./scripts/image noobs
clean:
./scripts/makefile_helper --clean
distclean:
./scripts/makefile_helper --distclean
src-pkg:
tar cvJf sources.tar.xz sources
docs:
./tools/foreach './scripts/clean emulators && ./scripts/build emulators'
world: RK3326
kconfig-olddefconfig-%:
DEVICE=$* ./tools/adjust_kernel_config olddefconfig
kconfig-menuconfig-%:
DEVICE=$* ./tools/adjust_kernel_config menuconfig
RK3326:
unset DEVICE_ROOT
OFFICIAL=$(if $(filter y yes Y YES 1,$(OFFICIAL)),yes,) PROJECT=ArchR DEVICE=RK3326 ARCH=arm ./scripts/build_distro
OFFICIAL=$(if $(filter y yes Y YES 1,$(OFFICIAL)),yes,) PROJECT=ArchR DEVICE=RK3326 ARCH=aarch64 ./scripts/build_distro
update:
PROJECT=ArchR DEVICE=RK3326 ARCH=aarch64 ./scripts/update_packages
package:
./scripts/build ${PACKAGE}
package-clean:
./scripts/clean ${PACKAGE}
## Docker builds - overview
# docker-* commands just wire up docker to call the normal make command via docker
# For example: make docker-RK3326 will use docker to call: make RK3326
# All variables are scoped to docker-* commands to prevent weird collisions/behavior with non-docker commands
docker-%: DOCKER_IMAGE := "archr-build:latest"
# DOCKER_WORK_DIR is the directory in the Docker image - it is set to /work by default
# Anytime this directory changes, you must run `make clean` similarly to moving the distribution directory
docker-%: DOCKER_WORK_DIR := $(shell if [ -n "${DOCKER_WORK_DIR}" ]; then echo ${DOCKER_WORK_DIR}; else echo "$$(pwd)" ; fi)
# ${HOME}/.archr/options is a global options file containing developer and build settings.
docker-%: GLOBAL_SETTINGS := $(shell if [ -f "${HOME}/.archr/options" ]; then echo "-v \"${HOME}/.archr/options:${HOME}/.archr/options\""; else echo ""; fi)
# LOCAL_SSH_KEYS_FILE is a variable that contains the location of the authorized keys file for development build use. It will be mounted into the container if it exists.
docker-%: LOCAL_SSH_KEYS_FILE := $(shell if [ -n "${LOCAL_SSH_KEYS_FILE}" ]; then echo "-v \"${LOCAL_SSH_KEYS_FILE}:${LOCAL_SSH_KEYS_FILE}\""; else echo ""; fi)
# EMULATIONSTATION_SRC is a variable that contains the location of local emulationstation source code. It will be mounted into the container if it exists.
docker-%: EMULATIONSTATION_SRC := $(shell if [ -n "${EMULATIONSTATION_SRC}" ]; then echo "-v \"${EMULATIONSTATION_SRC}:${EMULATIONSTATION_SRC}\""; else echo ""; fi)
# UID is the user ID of current user - ensures docker sets file permissions properly
docker-%: UID := $(shell id -u)
# GID is the main user group of current user - ensures docker sets file permissions properly
docker-%: GID := $(shell id -g)
# PWD is 'present working directory' and passes through the full path to current dir to docker (becomes 'work')
docker-%: PWD := $(shell pwd)
# Command to use (either `docker` or `podman`)
docker-%: DOCKER_CMD:= $(shell if which docker 2>/dev/null 1>/dev/null; then echo "docker"; elif which podman 2>/dev/null 1>/dev/null; then echo "podman"; fi)
# Podman requires some extra args (`--userns=keep-id` and `--security-opt=label=disable`). Set those args if using podman
# Make sure that docker isn't just an alias for podman
docker-%: PODMAN_ARGS:= $(shell if echo "$$(docker --version 2>/dev/null || podman --version 2>/dev/null )" | grep podman 1>/dev/null ; then echo "--userns=keep-id --security-opt=label=disable -v /proc/mounts:/etc/mtab"; fi)
# Launch docker as interactive if this is an interactive shell (allows ctrl-c for manual and running non-interactive - aka: build server)
docker-%: INTERACTIVE=$(shell [ -t 0 ] && echo "-it")
# By default pass through anything after `docker-` back into `make`
docker-%: COMMAND=make $*
# If the user issues a `make docker-shell` just start up bash as the shell to run commands
docker-shell: COMMAND=bash
# Command: builds and saves a docker builder image locally.
# The build user must also be a member of the "docker" group.
docker-image-build:
$(DOCKER_CMD) buildx create --use
$(DOCKER_CMD) buildx build --tag $(DOCKER_IMAGE) --platform $(shell if [ "$$(uname -m)" = "aarch64" ]; then echo "linux/arm64"; else echo "linux/amd64"; fi) --load .
# Command: pulls latest docker image from dockerhub. This will *replace* locally built version.
docker-image-pull:
$(DOCKER_CMD) pull $(DOCKER_IMAGE)
# Wire up docker to call equivalent make files using % to match and $* to pass the value matched by %
docker-%:
./scripts/get_env > .env
BUILD_DIR="$(DOCKER_WORK_DIR)" $(DOCKER_CMD) run $(PODMAN_ARGS) $(INTERACTIVE) --init --env-file .env --rm --user $(UID):$(GID) $(GLOBAL_SETTINGS) $(LOCAL_SSH_KEYS_FILE) $(EMULATIONSTATION_SRC) -v "$(PWD)":"$(DOCKER_WORK_DIR)" -v /tmp:/tmp -w "$(DOCKER_WORK_DIR)" $(DOCKER_EXTRA_OPTS) $(DOCKER_IMAGE) $(COMMAND)
+179
View File
@@ -0,0 +1,179 @@
<p align="center">
<img src="distributions/ArchR/logos/archr-logo.png" width="280" alt="Arch R" style="background:#000">
</p>
<p align="center">
<strong>Arch Linux-based gaming distribution for handheld devices.</strong>
</p>
<p align="center">
<a href="https://github.com/archr-linux/Arch-R/releases/latest"><img src="https://img.shields.io/github/release/archr-linux/Arch-R.svg?color=0080FF&label=latest%20version&style=flat-square" alt="Latest Version"></a>
<a href="https://github.com/archr-linux/Arch-R/commits"><img src="https://img.shields.io/github/commit-activity/m/archr-linux/Arch-R?color=0080FF&style=flat-square" alt="Activity"></a>
<a href="https://github.com/archr-linux/Arch-R/pulls"><img src="https://img.shields.io/github/issues-pr-closed/archr-linux/Arch-R?color=0080FF&style=flat-square" alt="Pull Requests"></a>
</p>
---
Arch R is a custom Linux distribution for the **R36S** handheld gaming console and all its variants, built on top of [ROCKNIX](https://github.com/ROCKNIX/distribution) with an **Arch Linux-based** build environment. It supports **16 board profiles** and **20 display panels** across original and clone hardware.
## Features
- Arch Linux-based build system with Docker support.
- Kernel 6.12 LTS with board auto-detection via SARADC.
- Mesa Panfrost open-source GPU driver (GLES 3.1, no proprietary blobs).
- EmulationStation frontend with RetroArch and 18+ cores pre-installed.
- Full audio support with speaker/headphone auto-switch.
- Battery monitoring with capacity reporting and LED warning.
- 43 pre-generated MIPI panel overlays (15 original + 18 clone + 10 soysauce variants), one per motherboard revision.
- Separate images for original and clone boards, both with hardware auto-detection.
- Integrated cross-device local and remote network play.
- Fine-grained control for battery life and performance.
- Bluetooth audio and controller support.
- HDMI audio/video output, USB audio.
- Device sync with Syncthing and rclone.
- VPN support with WireGuard, Tailscale, and ZeroTier.
- Built-in scraping and RetroAchievements.
## Supported Hardware
### Boards
| Board | Image |
|-------|-------|
| R36S (original), R33S | Original |
| Odroid Go Advance / v1.1 / Super | Original |
| Anbernic RG351V / RG351M | Original |
| GameForce Chi, MagicX XU10 | Original |
| K36 / R36S clones / EE Clone | Clone |
| Powkiddy RGB10 / RGB10X / RGB20S | Clone |
| MagicX XU-Mini-M, BatLexp G350 | Clone |
### Display Panels
Arch R ships 43 pre-generated MIPI panel overlays covering all known R36S display variants, named after the exact motherboard revision (e.g. `R36S-V21_2024-12-18_2551.dtbo`, `G80CA-MB_V1.3-20251212_Panel_8.dtbo`). Panel selection is done by copying the correct `.dtbo` file to `overlays/mipi-panel.dtbo` on the boot partition. Sources live under `config/archr-dts/{original,clone,soysauce}/<MB-revision>/`; the build extracts the panel description from each revision's `rk3326-r36s-linux.dtb` via `config/mipi-generator/generator.sh`.
## Quick Start
Download the latest images from [Releases](https://github.com/archr-linux/Arch-R/releases):
- **Original image** -- for genuine R36S and compatible boards.
- **Clone image** -- for K36 clones and compatible boards.
Flash to a MicroSD card:
```bash
xz -d ArchR-R36S-*.img.xz
sudo dd if=ArchR-R36S-*.img of=/dev/sdX bs=4M status=progress
sync
```
Insert the SD card and power on. The correct board DTB is selected automatically.
## Building from Source
### Requirements
- Docker (recommended) or native Linux build environment
- ~40 GB free disk space
- ~8 GB RAM recommended
### Build
```bash
git clone https://github.com/archr-linux/Arch-R.git
cd Arch-R
# Build Docker image (first time only)
make docker-image-build
# Build for R36S (all variants)
make docker-RK3326
```
Output images are generated in `target/`.
### Build Commands
| Command | Description |
|---------|-------------|
| `make docker-RK3326` | Full build inside Docker |
| `make RK3326` | Native build (requires all dependencies) |
| `make docker-image-build` | Build the Docker build environment |
| `make clean` | Remove build artifacts |
## Architecture
Arch R separates **board configuration** from **panel configuration**:
- **Board DTB** = hardware profile (GPIOs, PMIC, joypad, audio codec). Selected automatically by U-Boot via SARADC.
- **Panel overlay** = display init sequence and timings. Applied on top of the board DTB at boot time.
This means the same image works on all boards of a variant. Only the panel overlay needs to match the specific display.
### Boot Flow
```
Power On
U-Boot (BSP or mainline)
boot.scr: read SARADC hwrev, select board DTB
sysboot: load kernel + DTB + overlay from extlinux.conf
Kernel 6.12 + initramfs
mount root (ext4) + storage
switch_root to systemd
systemd
archr-autostart (quirks, governors, audio)
EmulationStation
```
### Partition Layout
| Partition | Filesystem | Label | Purpose |
|-----------|-----------|-------|---------|
| 1 | FAT32 | ARCHR | Boot (kernel, DTBs, overlays, boot.scr) |
| 2 | ext4 | ARCHR_ROOT | Root filesystem |
| 3 | ext4 | STORAGE | User data, ROMs, configs |
## Community
Contributions are welcome. Please open issues or pull requests on [GitHub](https://github.com/archr-linux/Arch-R).
## Licenses
**Arch R** is a fork of [ROCKNIX](https://github.com/ROCKNIX/distribution), which is a fork of [JELOS](https://github.com/JustEnoughLinuxOS/distribution/). All upstream licenses apply.
You are free to:
- **Share**: copy and redistribute the material in any medium or format.
- **Adapt**: remix, transform, and build upon the material.
Under the following terms:
- **Attribution**: You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
- **NonCommercial**: You may not use the material for commercial purposes.
- **ShareAlike**: If you remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.
### Arch R Software
Copyright (C) 2026-present [Arch R](https://github.com/archr-linux/Arch-R)
Original software and scripts developed by Arch R are licensed under the terms of the [GNU GPL Version 2](https://choosealicense.com/licenses/gpl-2.0/). The full license can be found in this project's licenses folder.
### Bundled Works
All other software is provided under each component's respective license. These licenses can be found in the software sources or in this project's licenses folder. Modifications to bundled software and scripts by upstream projects are licensed under the terms of the software being modified.
## Credits
Like any Linux distribution, this project is not the work of one person. It is the work of many people around the world who have developed the open-source components without which this project could not exist.
Special thanks to:
- **[ROCKNIX](https://github.com/ROCKNIX/distribution)** -- the upstream distribution that Arch R is forked from. ROCKNIX provided the complete build system, device support, EmulationStation integration, and the foundation for handheld gaming on Linux.
- **[JELOS](https://github.com/JustEnoughLinuxOS/distribution/)** -- the project that ROCKNIX was originally forked from.
- **[CoreELEC](https://coreelec.org/)** and **[LibreELEC](https://libreelec.tv/)** -- the embedded Linux distributions whose build system forms the backbone of this project.
- **[Hardkernel](https://www.hardkernel.com/)** -- for the Odroid Go Advance BSP U-Boot and kernel device trees.
- **[Rockchip](https://www.rock-chips.com/)** -- for the RK3326 SoC and rkbin firmware.
- **[Mesa](https://mesa3d.org/)** -- for the Panfrost open-source GPU driver.
- **[RetroArch](https://www.retroarch.com/)** and **[Libretro](https://www.libretro.com/)** -- for the emulation framework and cores.
- **[EmulationStation](https://emulationstation.org/)** -- for the frontend.
- All developers and contributors across the open-source community who made this possible.
View File
+34
View File
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="@PKG_ADDON_ID@"
name="@ADDON_NAME@"
version="@ADDON_VERSION@"
provider-name="@PROVIDER_NAME@">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
@REQUIRES@
</requires>
<extension point="xbmc.service" library="default.py">
<provides>@PKG_ADDON_PROVIDES@</provides>
</extension>
<extension point="xbmc.addon.metadata">
<summary>@PKG_SHORTDESC@</summary>
<description>
@PKG_LONGDESC@
</description>
<disclaimer>
@PKG_DISCLAIMER@
</disclaimer>
<broken>
@PKG_ADDON_BROKEN@
</broken>
<platform>all</platform>
<news>
@PKG_ADDON_NEWS@
</news>
<assets>
<icon>resources/icon.png</icon>
<fanart>resources/fanart.png</fanart>
@PKG_ADDON_SCREENSHOT@
</assets>
</extension>
</addon>
+31
View File
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="@PKG_ADDON_ID@"
name="@ADDON_NAME@"
version="@ADDON_VERSION@"
provider-name="@PROVIDER_NAME@">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
@REQUIRES@
</requires>
<extension point="xbmc.python.script" library="default.py" />
<extension point="xbmc.python.module" library="lib/">
</extension>
<extension point="xbmc.addon.metadata">
<summary>@PKG_SHORTDESC@</summary>
<description>
@PKG_LONGDESC@
</description>
<disclaimer>
@PKG_DISCLAIMER@
</disclaimer>
<platform>all</platform>
<news>
@PKG_ADDON_NEWS@
</news>
<assets>
<icon>resources/icon.png</icon>
<fanart>resources/fanart.png</fanart>
@PKG_ADDON_SCREENSHOT@
</assets>
</extension>
</addon>
+31
View File
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="@PKG_ADDON_ID@"
name="@ADDON_NAME@"
version="@ADDON_VERSION@"
provider-name="@PROVIDER_NAME@">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
@REQUIRES@
</requires>
<extension point="xbmc.python.script" library="default.py">
<provides>@PKG_ADDON_PROVIDES@</provides>
</extension>
<extension point="xbmc.addon.metadata">
<summary>@PKG_SHORTDESC@</summary>
<description>
@PKG_LONGDESC@
</description>
<disclaimer>
@PKG_DISCLAIMER@
</disclaimer>
<platform>all</platform>
<news>
@PKG_ADDON_NEWS@
</news>
<assets>
<icon>resources/icon.png</icon>
<fanart>resources/fanart.png</fanart>
@PKG_ADDON_SCREENSHOT@
</assets>
</extension>
</addon>
+34
View File
@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="@PKG_ADDON_ID@"
name="@ADDON_NAME@"
version="@ADDON_VERSION@"
provider-name="@PROVIDER_NAME@">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
@REQUIRES@
</requires>
<extension point="xbmc.service" library="default.py">
<provides>@PKG_ADDON_PROVIDES@</provides>
</extension>
<extension point="xbmc.python.library" library="addon.py">
<provides></provides>
</extension>
<extension point="xbmc.addon.metadata">
<summary>@PKG_SHORTDESC@</summary>
<description>
@PKG_LONGDESC@
</description>
<disclaimer>
@PKG_DISCLAIMER@
</disclaimer>
<platform>all</platform>
<news>
@PKG_ADDON_NEWS@
</news>
<assets>
<icon>resources/icon.png</icon>
<fanart>resources/fanart.png</fanart>
@PKG_ADDON_SCREENSHOT@
</assets>
</extension>
</addon>
@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="@PKG_ADDON_ID@"
name="@ADDON_NAME@"
version="@ADDON_VERSION@"
provider-name="@PROVIDER_NAME@">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
@REQUIRES@
</requires>
<extension point="xbmc.python.pluginsource" library="addon.py">
<provides>@PKG_ADDON_PROVIDES@</provides>
</extension>
<extension point="xbmc.service">
</extension>
<extension point="xbmc.addon.metadata">
<summary>@PKG_SHORTDESC@</summary>
<description>
@PKG_LONGDESC@
</description>
<disclaimer>
@PKG_DISCLAIMER@
</disclaimer>
<platform>all</platform>
<news>
@PKG_ADDON_NEWS@
</news>
<assets>
<icon>resources/icon.png</icon>
<fanart>resources/fanart.png</fanart>
@PKG_ADDON_SCREENSHOT@
</assets>
</extension>
</addon>
+31
View File
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<addon id="@PKG_ADDON_ID@"
name="@ADDON_NAME@"
version="@ADDON_VERSION@"
provider-name="@PROVIDER_NAME@">
<requires>
<import addon="xbmc.python" version="3.0.0"/>
@REQUIRES@
</requires>
<extension point="xbmc.service" library="default.py">
<provides>@PKG_ADDON_PROVIDES@</provides>
</extension>
<extension point="xbmc.addon.metadata">
<summary>@PKG_SHORTDESC@</summary>
<description>
@PKG_LONGDESC@
</description>
<disclaimer>
@PKG_DISCLAIMER@
</disclaimer>
<platform>all</platform>
<news>
@PKG_ADDON_NEWS@
</news>
<assets>
<icon>resources/icon.png</icon>
<fanart>resources/fanart.png</fanart>
@PKG_ADDON_SCREENSHOT@
</assets>
</extension>
</addon>
+38
View File
@@ -0,0 +1,38 @@
# determines TARGET_CPU, if not forced by user
if [ -z "$TARGET_CPU" ]; then
TARGET_CPU=cortex-a53
fi
# TARGET_CPU:
# generic cortex-a35 cortex-a53 cortex-a57 cortex-a72
# exynos-m1 qdf24xx thunderx xgene1 cortex-a57.cortex-a53
# cortex-a72.cortex-a53
# determine architecture's family
case $TARGET_CPU in
generic|cortex-a35|cortex-a53|cortex-a57|cortex-a72|exynos-m1|qdf24xx|thunderx|xgene1|cortex-a57.cortex-a53|cortex-a72.cortex-a53|cortex-a73.cortex-a53)
TARGET_SUBARCH=armv8-a
TARGET_FEATURES+=" neon"
# This only makes sense for 8.0-a, later revisions have LSE
TARGET_CFLAGS=" -mno-outline-atomics"
;;
cortex-a55|cortex-a76.cortex-a55|cortex-a77|cortex-a75.cortex-a55|cortex-a710)
TARGET_SUBARCH=armv8.2-a
TARGET_FEATURES+=" neon"
;;
cortex-x3|cortex-x4)
TARGET_SUBARCH=armv9-a
TARGET_FEATURES+=" neon"
;;
esac
TARGET_SUBARCH="$TARGET_SUBARCH$TARGET_ARCH_FLAGS"
TARGET_TUNE="$TARGET_CPU"
TARGET_GCC_ARCH=aarch64
TARGET_KERNEL_ARCH=arm64
# setup ARCH specific *FLAGS
TARGET_CFLAGS="$TARGET_CFLAGS -march=$TARGET_SUBARCH -mtune=$TARGET_TUNE -mabi=lp64 -Wno-psabi"
TARGET_LDFLAGS="$TARGET_LDFLAGS -march=$TARGET_SUBARCH -mtune=$TARGET_TUNE"
TARGET_ARCH_GCC_OPTS="--with-abi=lp64 --with-arch=$TARGET_SUBARCH --with-tune=$TARGET_TUNE"
+71
View File
@@ -0,0 +1,71 @@
# determines TARGET_CPU, if not forced by user
if [ -z "$TARGET_CPU" ]; then
TARGET_CPU=cortex-a8
fi
# TARGET_CPU:
# arm2 arm250 arm3 arm6 arm60 arm600 arm610 arm620 arm7 arm7m arm7d
# arm7dm arm7di arm7dmi arm70 arm700 arm700i arm710 arm710c
# arm7100 arm720 arm7500 arm7500fe arm7tdmi arm7tdmi-s arm710t
# arm720t arm740t strongarm strongarm110 strongarm1100
# strongarm1110 arm8 arm810 arm9 arm9e arm920 arm920t arm922t
# arm946e-s arm966e-s arm968e-s arm926ej-s arm940t arm9tdmi
# arm10tdmi arm1020t arm1026ej-s arm10e arm1020e arm1022e
# arm1136j-s arm1136jf-s mpcore mpcorenovfp arm1156t2-s
# arm1176jz-s arm1176jzf-s cortex-a8 cortex-a9 cortex-r4
# cortex-r4f cortex-m3 cortex-m1 xscale iwmmxt iwmmxt2 ep9312.
# TARGET_FPU:
# This specifies what floating point hardware (or hardware emulation) is
# available on the target. Permissible names are:
# fpa fpe2 fpe3 maverick vfp vfpv3 vfpv3-fp16 vfpv3-d16 vfpv3-d16-fp16
# vfpv3xd vfpv3xd-fp16 neon neon-fp16 vfpv4 vfpv4-d16 fpv4-sp-d16
# neon-vfpv4.
# determine architecture's family
case $TARGET_CPU in
arm1176jzf-s)
TARGET_SUBARCH=armv6zk
TARGET_ABI=eabi
;;
cortex-a7|cortex-a15|cortex-a17|cortex-a15.cortex-a7|cortex-a17.cortex-a7)
TARGET_SUBARCH=armv7ve
TARGET_ABI=eabi
TARGET_FEATURES+=" neon"
;;
cortex-a5|cortex-a8|cortex-a9)
TARGET_SUBARCH=armv7-a
TARGET_ABI=eabi
TARGET_FEATURES+=" neon"
;;
cortex-a35|cortex-a53|cortex-a72.cortex-a53|cortex-a55|cortex-a76.cortex-a55|cortex-a73.cortex-a53|cortex-a75.cortex-a55)
TARGET_SUBARCH=armv8-a
TARGET_ABI=eabi
TARGET_FEATURES+=" neon"
;;
cortex-a77)
TARGET_SUBARCH=armv8.2-a
TARGET_ABI=eabi
TARGET_FEATURES+=" neon"
;;
cortex-a710)
TARGET_SUBARCH=armv9-a
TARGET_ABI=eabi
TARGET_FEATURES+=" neon"
;;
esac
# if [ "${TARGET_FLOAT}" = "hard" ]; then
# TARGET_ABI+="hf"
# fi
TARGET_GCC_ARCH=${TARGET_SUBARCH/-}
TARGET_KERNEL_ARCH=${TARGET_KERNEL_ARCH:-arm}
TARGET_SUBARCH="$TARGET_SUBARCH$TARGET_ARCH_FLAGS"
TARGET_TUNE="$TARGET_CPU$TARGET_TUNE_FLAGS"
# setup ARCH specific *FLAGS
TARGET_CFLAGS="$TARGET_CFLAGS -march=$TARGET_SUBARCH -mtune=$TARGET_TUNE -mfloat-abi=$TARGET_FLOAT -mfpu=$TARGET_FPU -mabi=aapcs-linux -Wno-psabi -Wa,-mno-warn-deprecated"
TARGET_LDFLAGS="$TARGET_LDFLAGS -march=$TARGET_SUBARCH -mtune=$TARGET_TUNE -mfloat-abi=$TARGET_FLOAT -mfpu=$TARGET_FPU"
TARGET_ARCH_GCC_OPTS="--with-abi=aapcs-linux --with-arch=$TARGET_SUBARCH --with-tune=$TARGET_TUNE --with-float=$TARGET_FLOAT --with-fpu=$TARGET_FPU"
+30
View File
@@ -0,0 +1,30 @@
# determines TARGET_CPU, if not forced by user
if [ -z "${TARGET_CPU}" ]; then
TARGET_CPU="x86-64"
fi
# determine architecture's family
TARGET_SUBARCH="x86_64"
TARGET_GCC_ARCH="${TARGET_SUBARCH/-/}"
TARGET_KERNEL_ARCH="x86"
# setup ARCH specific *FLAGS
TARGET_CFLAGS="-march=${TARGET_CPU}"
TARGET_LDFLAGS=""
# build with microarchitecture feature support defined by the TARGET_CPU value
# see https://gitlab.com/x86-psABIs/x86-64-ABI/-/wikis/home for further details
if [ -z "${TARGET_FEATURES}" ]; then
TARGET_FEATURES="64bit cmov cx8 fpu fxsr mmx osfxsr sce sse sse2"
TARGET_FEATURES_X86_64_V2="cmpxchg16b lahf-sahf popcnt sse3 sse4_1 sse4_2 ssse3"
TARGET_FEATURES_X86_64_V3="avx avx2 bmi1 bmi2 f16c fma lzcnt movbe osxsave"
if [ "${TARGET_CPU}" = "x86-64" ]; then
TARGET_FEATURES+=" no_sahf"
elif [ "${TARGET_CPU}" = "x86-64-v2" ]; then
TARGET_FEATURES+=" ${TARGET_FEATURES_X86_64_V2}"
elif [ "${TARGET_CPU}" = "x86-64-v3" ]; then
TARGET_FEATURES+=" ${TARGET_FEATURES_X86_64_V2} ${TARGET_FEATURES_X86_64_V3}"
fi
fi
TARGET_FEATURES="$(echo ${TARGET_FEATURES} | xargs -n1 | sort -u | xargs)"

Some files were not shown because too many files have changed in this diff Show More