This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
LessOS is a minimal Linux distribution for handheld gaming devices, forked from ROCKNIX. It's stripped down (~217 packages vs ~410) to run the LessUI launcher instead of EmulationStation.
# Build LessOS for RK3566 devices (uses Docker)
make docker-LessOS-RK3566
# Build LessOS for SM8250 devices (uses Docker)
make docker-LessOS-SM8250
# Build without Docker (requires full toolchain)
make LessOS-RK3566
# Clean a specific package and rebuild
DISTRO=LessOS PROJECT=ROCKNIX DEVICE=RK3566 ARCH=aarch64 ./scripts/clean lessos
make LessOS-RK3566
# Enter Docker shell for debugging
make docker-shell- Partition 1 (FAT32): Read-only system - kernel, squashfs system image, device trees
- Partition 2 (ext4): User storage (
/storage) - fixed 512MB - Partition 3 (exFAT): LESSUI partition (
/storage/lessui) - created on first boot, fills remaining space - External SD (optional): Mounted at
/sd2bylessos-automount
lessos-automount.servicemounts external SD to/sd2(if present)050-lessos(autostart) creates partition 3 if missing, mounts at/storage/lessui, extracts LessUI.zip (if present)lessos-boot.servicesearches for init.sh:/sd2/lessos/→/storage/lessui/lessos/- Executes found
init.sh→ LessUI starts (or powers off after 5s if no init.sh found)
Note: Partition 3 is always created regardless of whether LessUI.zip is included. The payload is optional.
distributions/LessOS/- Distribution config (options, version)projects/ROCKNIX/packages/lessos/- Boot system packagescripts/mkimage- Image creationscripts/get_env- Docker environment variable whitelist
Boot system with two scripts:
lessos-automount- mounts external SD card to/sd2lessos-boot- finds and executesinit.shfrom/sd2/lessos/or/storage/lessui/lessos/
Includes systemd services and profile override for UI_SERVICE.
In distributions/LessOS/options:
BASE_ONLY="true"- Skip EmulationStation, themes, emulatorsEMULATION_DEVICE="no"- LessUI handles emulationWINDOWMANAGER="none"- Direct framebuffer/DRMSTORAGE_SIZE=512- Fixed 512MB ext4 storage partition
# Boot logs
cat /var/log/lessos-boot.log
cat /var/log/lessos-automount.log
# Service status
journalctl -u lessos-automount.service
journalctl -u lessos-boot.service
# Test init.sh manually
systemctl stop lessos-boot
/storage/lessui/lessos/init.sh