Skip to content

About

Personal workspace for contributions to CodeZombie/goodluckOS. Not a distribution, no releases. Work in progress on the develop branch.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

goodluckOS

Kernel Rootfs

An uncompromisingly fast, small, modern, and feature-rich custom firmware for A23/A33-based handheld consoles.

Important

This is not a goodluckOS distribution. For goodluckOS, use the official project: CodeZombie/goodluckOS.

This fork is my personal workspace. I use it to improve my own consoles (a GA36-MB v1.1 with an Allwinner A33, and an R36H with a Rockchip RK3326) and to prepare contributions, which I offer upstream as small pull requests, only the ones Jeremy wants. It is not meant to compete with goodluckOS or to be installed by anyone else: there are no releases or images here, and none are planned. Everything in it was written with an AI coding assistant (Claude Code), has only run on my devices, and is still being reviewed. What it changes, and where each change stands, is in the fork status discussion.

Important

goodluckOS is BETA software. You will run into bugs!

Please visit The Firmware Builder. This will walk you through the steps of identifying if you have a compatible unit, and building a flashable goodluckOS image.

Features

  • Mainline Linux 7.2
  • Everything compiled from scratch with the best optimization flags for the hardware
  • Optimized for performance. No systemd, no unecessary background processes, no x11/wayland
  • Significantly smaller and faster than the stock firmware
  • Boots in 10 seconds (stock firmware takes 50)
  • Can be flashed to a 1gb SD card and still give you over 500mb of free space for games
  • ZRAM enabled by default
  • Hardware accelerated graphics
  • Speaker and headphone audio. The speaker gets a high-pass filter, so it stays clean instead of distorting on bass it can't play
  • Great battery life
  • A low battery warning over any game at 15% and 5%. Once the battery is empty, by its voltage under the game's load or at 2%, the game is closed, saving as when you quit it, and the console shuts down cleanly before the battery cuts out. On the R36H each run down to empty also teaches the gauge the battery's real capacity, so 0% comes when the battery is empty, also as it wears
  • No swap on SD card (massively improves the life of your card over the stock f/w)
  • Resize Home (System Settings -> Storage) grows your HOME partition to fill all the available space on your microSD card.
  • Volume buttons change the volume and FN+Vol the screen brightness from anywhere, with a level bar shown over whatever is on screen: the launcher, the settings or any game
  • A status bar with the CPU and power chip temperatures, the date and time, the battery, the volume and the audio output: the launcher's top bar, and optionally over any game, with the same items
  • Date and time with a time zone, kept while the console is off, shown in the status bar (12/24-hour, several date formats)
  • Brightness, volume and CPU mode are kept across reboots
  • SELECT+START closes the active application cleanly (RetroArch saves first), bringing you right back to the launcher
  • FN+START+SELECT force-kills the active application
  • FN+DPAD_UP toggles a live FPS/CPU graph for monitoring in-game performance. What it shows, its style and its corner are set in System Settings -> Overlay.
  • The sound goes to the headphones when they're plugged in and back to the speaker when they come out (A33; on the R36H the jack does it by itself), and FN+DPAD_DOWN switches it by hand
  • If the screen is on, the LEDs are off. Nothing blinding you while you're playing in the dark (on the R36H the green LED can't be turned off, and the red one shows the battery charging)
  • In this fork, also the R36H (Rockchip RK3326, 1 GB of RAM), with the same system and HOME as the GA36-MB: see R36H
  • Comes stock with Chocolate Doom, ready to play
  • Luanti, a block-building game in the style of Minecraft, as an app for the App Installer: Minetest Game with mods that bring it close to Minecraft, from its monsters, villages and horses to the Nether and the End, played with the console's buttons (see Luanti for goodluckOS)
  • Second SD card (TF-2 slot) for more games, with its own launcher tab
  • Music and video player (mpv): Music and Videos tabs in the launcher, played full screen with the console's buttons, with speed (0.25x to 2x) and zoom (up to 4x, moved with the right stick) for videos
  • Comes stock with Retroarch and several optimized cores (PCSX-ReArmed, Snes9x, QuickNES, DOSbox, Genesis Plus GX, mGBA, etc)
  • Games perform very well. Metal Gear Solid 1 is completely playable at reasonable framerates
  • Comes with a custom, optimized launcher application, with tabs per system, search, favourites, play time and game artwork/descriptions from gamelist.xml
  • System Settings, in the launcher: brightness, volume, audio output, GPU driver (ARM's Mali driver for apps and ports), launcher options, language, interface font, overlay, date and time, storage (second card, trash, Resize Home), power mode (Battery saver, Balanced, Performance), system info, an app installer, a button tester and a restore of the default settings
  • Translatable interface, with English and Brazilian Portuguese included (see Translations)
  • Autostart any application on boot, including games or a front-end like EmulationStation (coming soon)
  • USB terminal access for remote debugging. Log in with sudo screen /dev/ttyACM* 115200 and root:root
  • HOME shows up on your PC over USB (MTP), like a phone: copy games and saves without taking the SD card out
  • Internet over the same USB cable: the PC shares its connection with the console (CDC NCM, no driver to install), in place of MTP while it's on
  • Half Life 1 ported and playable: Get It Here

USB TTY

goodluckOS gives you a direct line into the operating system from your desktop PC so you can edit system files, monitor processes, debug configurations, etc.

To use it:

  1. Plug your console into a Linux PC with a usb cable via the OTG port.
  2. Open a terminal and run sudo screen /dev/ttyACM* 115200
  3. When prompted, enter the credentials (username: root, password: root)

How Do I Install goodluckOS?

Check out the Firmware Builder for instructions and video guides.

You'll need a backup of at least the first 128mb of the original microSD card that came with your device.

Don't have the original microSD card? Open an issue here on github, we have microSD card dumps for several hardware variants, and one of them may work for you. We'll get you sorted out.

Once it's installed, System Settings -> Storage -> Resize Home expands your HOME partition to fill all the remaining space on your SD card. Do it before copying your games: HOME is backed up to RAM while it's resized. You only need to do this once.

What still needs to be done

  • Headphone auto-detection on the A23 (the A33 has it).
  • More LibRetro cores
  • Fine tune existing LibRetro cores for best performance.
  • Portmaster (or equivalent)
  • EmulationStation (as an optional replacement for Puppy)
  • USB Networking
  • CPU Overclocking
  • Portable Puppy for other firmwares (see below; config file, es_systems.cfg support and runner done)
  • R36H: a card image (its card is put together by hand for now)

Portable Puppy (in development)

Puppy can also run as an optional frontend on other handheld firmwares that use EmulationStation (e.g. dArkOS on the original R36S, ROCKNIX, Knulli), next to the existing frontends rather than replacing them. Progress:

  1. Config file (puppy.conf) - done: fonts, assets, languages, where apps.puppy, the cache and the settings live, and the commands for restart / power off / display off / settings. Without one, Puppy uses the goodluckOS defaults, so goodluckOS works exactly as before. Puppy reads the file given with --config, else $PUPPY_CONFIG, else /etc/puppy.conf. A documented example is in rootfs/package/puppy/portable/puppy.conf.
  2. Systems from es_systems.cfg - done: the tabs come from the EmulationStation system list the firmware already has (folders, extensions and launch commands, with %ROM%, %BASENAME%, %SYSTEM%, and the default %EMULATOR% / %CORE% of ES forks that have a core choice), so it works with no manual setup. Systems without games are left out, and scraped gamelist.xml collections work as on goodluckOS.
  3. Self-contained launching - done: puppy-run.sh shows Puppy, runs what was picked and comes back, like appd does on goodluckOS (there Puppy launches through appctl; puppy.conf's empty launch_command switches to the launch file). A "Quit Puppy" power option (quit = on) goes back to the frontend Puppy was started from. Without a settings app, START opens the power options.
  4. aarch64 build and packaging - to do: 64-bit builds for RK3326 devices (built against an older glibc, or with the libraries shipped next to Puppy in libs/), an install script, and a PortMaster package.

The portable folder looks like this: puppy, puppy-run.sh, puppy.conf, assets/ (Inter_24pt-Medium.ttf, fallback.png), lang/ (the .lang files) and an optional apps/ folder of *.puppy files. So far it has been tested only on a PC with an ArkOS-style es_systems.cfg. Step 4 needs testers with an original R36S or other RK3326 device: if that's you, open an issue!

Supported Devices

Every known variant of the GA36-MB is supported. There are many more Allwinner A23/A33 devices that will almost certainly work, but without the hardware it's hard to say for certain.

Display Panels

The GA36-MB family of devices ship with at least two different display panels. gooduckOS supports both, but we haven't yet found a good way to determine which panel you have ahead of time. For now, just try both until one works.

If the Firmware Builder tells you your device is not supported, you may have a new variant we've never seen before. In that case, send us your script.bin file so we can verify that goodluckOS is safe for your device. We'll update you when we support it.

Coming Soon:

  • R36MAX
  • F35v
  • Other A23/A33-based devices

Know of another Allwinner-based handheld not listed on this page? Open a new Issue and let me know!

If you have one such device, and some spare time, leave an issue on Github and we'll work with you to build support for it, and get it running on your hardware.

Alternatively, consider contributing to the Device Fund so we can purchase new consoles and port goodluckOS to them.

R36H (RK3326), this fork only

The R36H is the R36S's Rockchip board without the FN button: an RK3326 (4x Cortex-A35), 1 GB of RAM and a Mali-G31 GPU. This fork runs on it with an arm64 kernel of its own (kernel/rk3326: the DTS, the panel's init table from the stock DTB, the RAM at 666 MHz) and Mesa's panfrost driver (GLES 3.1), and with the same 32-bit system and HOME as on the GA36-MB: the cores, apps, ports, saves and settings move between the two consoles with a copy of HOME. It boots through the loader and U-Boot of the card that came with the console, which run goodluckOS's boot.ini and kernel from BOOT/gl. The stock card's files are not in this repository.

Where it differs from the GA36-MB:

  • No FN button: R3, the right stick's click, is FN, so games get no R3.
  • No headphone detection: the jack itself moves the sound between the speakers and the headphones, so Audio output is off and FN + D-pad down does nothing.
  • The charge port goes to a charger chip of its own, not to the power chip: the OTG port doesn't charge, and plugging the charger in doesn't turn the console on or show a charge screen.
  • On battery, the card's own U-Boot won't boot below 3.53 V, about a fifth of the R36H's 2.9 Ah left, and says so in text cut in two. kernel/rk3326/uboot-patch.py lowers that to 3.3 V in the first of its four copies and makes the text whole, over a low battery screen that kernel/rk3326/charge-bmps.py draws for BOOT. With the charger in, it boots at any level.
  • The green LED is wired to a power rail and stays on; the red one shows the battery charging.
  • No power chip temperature: Linux reads none from the R36H's RK817, so that status bar item shows ??.

It has not run on the original R36S, also an RK3326, whose board needs its own DTS.

Puppy

Puppy is goodluckOS' application launcher. It's what you see when you start goodluckOS. It was designed to be simple, flexible, and most importantly: fast.

Grid view List view
Puppy in grid view Puppy in list view
Showcase style (System Settings -> Interface), grid view Showcase style, list view
Puppy in the Showcase style's grid Puppy in the Showcase style's list
Search (X): the on-screen keyboard filters every tab as you type
Search with the on-screen keyboard

The top bar shows the time, the volume (a headphones icon when the sound goes to the headphones only) and the battery, whose level turns yellow while charging, green when full and red at 10% or less. System Settings -> Overlay can add the date and the CPU and power chip temperatures, or take any of them out, and sets the bar's opacity and size over games.

Changing the brightness (FN+Vol) or the volume shows a level bar for a moment, and FN + D-pad down shows the audio output. It is drawn by a libEGL that sits in front of the GPU driver, Mesa's or ARM's, so it looks the same over the launcher, the settings and every game:

Brightness Volume Audio output
Brightness level bar Volume level bar Audio output

Puppy works with appd to ensure it's never running when you launch an application. This ensures all of your RAM and CPU resources are available to your game, not an idle launcher.

Puppy uses a ini-formatted apps.puppy files to populate it's application list.

Add a new entry by modifying the apps.puppy file in your HOME partition. Take a look at the comments at the top of that file for syntax/examples

Works with scraped collections: point Skraper (or anything that writes EmulationStation's gamelist.xml) at your rom folders and Puppy shows the games' names, artwork, descriptions and year/genre/players (and, in the Showcase style, plays their videos), no conversion needed (see How do I add games?).

Each system and app category gets its own tab, plus an "All Games" tab with every system's games and the native ports of the Games tab (tagged "Ports"; an app in My List or Recent is tagged "App"), a "My List" tab with your favourites in alphabetical order, and, once you've played something, a "Recent" tab with the last 30 games you opened, newest first, and a "Most Played" tab. The time spent in each game shows next to its name in grid view, and beside its picture in list view with the day it was last played. The strip at the top shows five tabs of the same width, the current one in the middle, and wraps around. Controls:

Button Action
L1 / R1 Previous / next tab (in the Showcase style's grid: skip 10 games along the row)
D-pad / left stick Move (hold to scroll). In list view, left/right jump a page
Right stick up/down Scroll the game's description (list view)
A Launch
Y Add to / remove from My List (your favourites tab)
SELECT Set / clear autolaunch
L2 + R2 Game options: Rename the game with the on-screen keyboard, starting from the name it shows (L1/R1 move the cursor, Aa types capitals): the shown name changes and the file takes a version of it the card accepts (":" becomes " -"), with its cover, gamelist entry and RetroArch saves following, or Move to trash (HOME/.trash; a .cue's tracks and a .m3u's discs go with it). System Settings empties the trash. On a game that runs on ARM's Mali driver (GPU driver: ARM (Mali)), Run on Mesa keeps it on lima, and Run on ARM's driver takes it back
X Search by name with the on-screen keyboard (the search applies to every tab)
B Clear the search, or close the keyboard / power options
START System Settings
POWER Power options: display off, restart, shut down (these two ask first)

With System Settings -> Input Settings -> Confirm button on B, A and B swap.

Grid or list view, whether the tabs are shown and which ones are set in System Settings. In list view, a selected name that doesn't fit scrolls to show the rest.

Shortcuts that work everywhere

On the R36H, which has no FN button, FN is R3 (the right stick's click).

Buttons Action
VOL+ / VOL- Volume, with an on-screen level bar
FN + VOL+ / VOL- Brightness, with an on-screen level bar
POWER Screen off / on (in the launcher it opens the power options)
SELECT + START Close the active app cleanly (RetroArch saves first) and go back to the launcher
FN + SELECT + START Force close the active app
FN + D-pad up Show / hide a live FPS and CPU overlay
FN + D-pad down Sound on the speaker or on the headphones only (on the A33, plugging headphones in or out also switches it; on the R36H the jack does it by itself, and this does nothing)

RetroArch

FN is the hotkey (R3 on the R36H):

Buttons Action
FN + X RetroArch menu
FN + R1 / L1 Save / load state
FN + LEFT / RIGHT Previous / next state slot
FN + Y Pause
FN + R2 Fast forward
FN + L2 Screenshot, saved in HOME/.config/retroarch/screenshots
FN + START Quit the game

The same list is in System Settings -> Input Settings, next to a button tester.

Luanti

Luanti, a block-building game in the style of Minecraft, is an app from its own repository: how to install it, how it plays and its controls, the engine's changes and the mods.

System Settings

Opened with START from the launcher, which it is part of: there's no loading screen on the way in or out, and the launcher comes back as you left it. The sections are on the left, and the page of the selected one on the right:

System Settings
├── Display & Audio
│   ├── Brightness
│   ├── Master Volume
│   ├── Global Mute (GA36-MB)
│   ├── Audio output: Speaker / Headphones (on the R36H, off: its jack switches by itself)
│   ├── GPU driver: Mesa (lima) / ARM (Mali) ─ GA36-MB, once ARM's driver is installed: apps and ports on it
│   ├── Install ARM's driver ─ while a libMali.so is in HOME
│   └── Download ARM's driver ─ without one: the player's own copy from Bootlin's repository, over the USB cable's network
├── Interface
│   ├── Language
│   ├── Look: Style: Retro / Showcase
│   ├── View: Grid / List
│   ├── Font
│   ├── Accent color ─ the highlight colour, from a list of 9
│   ├── Show Puppy on loading screens (off: a plain "Loading..." while a game starts)
│   ├── Trailer sound ─ the Showcase style's trailers play with their sound
│   ├── Tabs: Show tabs
│   └── Launcher tabs ─ which tabs to show
├── Overlay
│   ├── Status bar: In game, In the launcher
│   ├── Show date
│   ├── Show time
│   ├── Show battery
│   ├── Show audio
│   ├── Show CPU temperature
│   ├── Show power chip temperature
│   ├── Opacity in game
│   ├── Size in game ─ 0.6x to 1.4x
│   ├── Performance (FN + UP): Show on game start
│   ├── Content: FPS / FPS + CPU
│   ├── Style: Graph / Text
│   └── Position: top or bottom, left or right
├── Date & Time
│   ├── Now: the current date and time
│   ├── 24-hour clock
│   ├── Date format
│   ├── Year, Month, Day, Hour, Minute
│   ├── Set date and time
│   └── Time zone
├── Storage
│   ├── HOME usage
│   ├── Resize Home ─ the card's and HOME's sizes, and the resize
│   ├── Second card: usage, Eject card / Detect card
│   └── Empty trash
├── System
│   ├── Power mode: Battery saver / Balanced / Performance
│   ├── USB cable: Files (MTP) / Network
│   ├── System Info
│   ├── Network ─ the USB network, with USB cable on Network
│   │   ├── Status, Address, Gateway, DNS, Internet
│   │   ├── Check the internet
│   │   └── Ask for an address
│   ├── App Installer ─ the app zips in HOME/apps to install or update, and the installed apps to uninstall
│   └── Restore default settings
├── Input Settings
│   ├── Confirm button: A (right) / B (bottom)
│   ├── Shortcuts ─ every shortcut
│   └── Button Tester
└── Credits ─ Show credits
  • GPU driver: with ARM (Mali), apps and ports from HOME (installed apps and apps.puppy entries) run on ARM's own Mali-400 driver instead of Mesa's lima; emulators, videos and the system's own entries stay on lima. In the same scenes, Luanti went from 17 to 28 FPS on it, and Ocarina of Time and Majora's Mask with frame interpolation at 60 from 30 to 50 and from 27 to 39; Stardew Valley, held back by the CPU, was slower. L2 + R2 on a game keeps it on Mesa (Run on Mesa), and an app can say GPU=lima itself. ARM's licence doesn't let goodluckOS ship its user-space part: copy ARM's libMali.so, release r6p2, fbdev, for 32-bit ARM (r6p2/arm/fbdev/libMali.so in Bootlin's mali-blobs), to the root of HOME, and Install ARM's driver puts it in place, unchanged; or, with the console on the internet (USB cable: Network), Download ARM's driver fetches your own copy of that file from Bootlin's repository, once you accept Allwinner's licence, and installs it. Its kernel part is ARM's GPL driver as Péter Nyakas ported it to goodluckOS's kernel (goodluckOS-mali-driver).
  • Launcher tabs: My List, Recent, Most Played and each system and apps tab can be hidden; hidden tabs' games still appear in All Games.
  • Font: Default (Inter, or Atkinson Hyperlegible in the Showcase style), VT323, Pixelify Sans or ProggyClean.
  • Accent color: the colour of the selection, the buttons in the hints and the bars, and of the volume and brightness feedback in games (from the next game on): yellow (the default), orange, red, pink, purple, blue, cyan, green or white.
  • Style: Retro, Puppy's own look, or Showcase, after the Vitrine launcher by Jeferson Lopes: a dark blue screen, bold titles, the selection as a rounded pill in the accent color, the face buttons in the hints as their letter in its colour on a grey button, and that launcher's layouts. Its list is Shelf: a narrower list, the picture with rounded corners over the game's data, play time and description, and an A-Z rail lighting the selected game's letter. Its grid is Streaming: the selected game's picture fills the top right under a see-through top bar, its base down beside the row's name and its top cut when it doesn't fit, its left and bottom edges fading into the screen next to the game's name and data, with a row of covers per tab under it. Left/right move along the row and L1/R1 skip 10 games along it; up/down go to the previous/next tab's row and stop at the first and the last. The next tab's row shows under the current one. When the selected game has a video in its gamelist.xml (Skraper's videos), or a VIDEO= line with a clip in its apps.puppy entry (a port's trailer), or is itself a video of the Videos tab (30 s of it), it plays once in place of the picture after 2 s without a button, in both layouts, muted unless Interface's Trailer sound is on; any button stops it.
  • Status bar: the CPU temperature, the power chip (AXP223) temperature (not on the R36H), the date, the time, the battery and the volume and audio output, each one on or off. In game puts them in the top right corner of every game, over a background whose opacity you set; it is off by default, so nothing covers the game. In the launcher puts the same items in the launcher's top bar (on by default). The time, the battery and the audio are on by default. A temperature turns yellow from 75 °C, where the A33 starts to slow down, and red from 90 °C.
  • Performance: the FPS and CPU graphs that FN + D-pad up shows in game, as Mesa's Gallium HUD drew them, on either GPU driver. Text only goes at the top.
  • Overlay changes apply from the next game on.
  • Date & Time: the date format and 12/24 hours (12-hour by default) of the status bar's clock, in the launcher and in games. The clock chip keeps the time while the console is off, so it only needs setting once; the time zone applies to the launcher right away and to the apps opened afterwards.
  • Resize Home: expands HOME to fill the rest of the card, at the next boot (it asks first, then restarts). HOME is backed up to RAM while it's resized, so do it right after flashing, before copying your games.
  • Empty trash: deletes for good the games moved to the trash in the launcher.
  • Power mode: Balanced (the default) speeds the CPU and GPU up only when a game needs it; Battery saver caps the CPU at 816 MHz and the GPU at 240 MHz, for a longer battery life (heavy PS1 games may slow down); Performance keeps both at full speed. The choice is kept across reboots.
  • USB cable: what the PC or phone on the data port gets. Files (MTP, the default) shows HOME as a drive; Network makes the console a network adapter named goodluckOS instead (the A33's USB controller can't do both at once), and the PC or phone can share its connection with it: Internet Sharing on a Mac, the adapter's Sharing tab on Windows, "Shared to other computers" on Linux, or Ethernet tethering on an Android phone (the console on the phone's OTG adapter with an A-to-C cable; the phone needs Android 11 or newer). The choice is kept across reboots; a Mac only sets a new adapter up while its screen is unlocked.
  • Network: the USB network, with USB cable set to Network: the address the console got, the gateway and the DNS; Check the internet fetches a page over HTTPS, and Ask for an address asks right away instead of within a minute. The Scraper app uses it.
  • Restore default settings: puts Overlay, Date & Time, the launcher's view, tabs, font and accent color, and the power mode back to the defaults in /usr/share/goodluck/defaults, keeping the language, the confirm button, the time zone and the clock.
  • Confirm button: A (right, the default, as on a Nintendo pad) or B (bottom, as on an Xbox pad) launches and selects, and the other one goes back. The launcher, its hints and the shortcut list change right away. Every app that reads the pad through SDL (the video player, ports) gets the chosen button as its south one, the button these apps confirm and jump with, from the next one you open. Luanti keeps B (bottom) for jumping and clicking either way. RetroArch reads the pad on its own, so with B the Game Boy (Color), GBA, NES and SNES cores get A and B swapped in their core remaps (~/.config/retroarch/config/remaps/<core>/<core>.rmp), and their games confirm with B too. A remap of your own for A or B is left alone, and going back to A takes the swap out. The other systems keep the buttons as printed (Western PlayStation games already confirm with the bottom one), and RetroArch's menu has its own swap option.
  • Credits: Show credits plays upstream's credits app, the people who made goodluckOS among moving stars (/usr/share/credits/credits.ini). B pauses it, holding A speeds it up, L1 / R1 go to the previous / next name, and R2 or SELECT + START closes it. The list starts over after the last name.

UP / DOWN pick a section and A or RIGHT opens its page; there, LEFT / RIGHT change the selected setting (A opens the list of choices, or turns a switch on or off), B goes back, and L1 / R1 go to the previous / next section from anywhere. START closes System Settings, and POWER opens the power options here too. A change applies and is saved right away, the language and the font included. A page scrolls with the d-pad when it doesn't fit the screen.

VT323, Pixelify Sans and Atkinson Hyperlegible are under the SIL Open Font License and ProggyClean under the MIT License; their license files are next to them in /usr/share/fonts.

Sections, with Display & Audio Launcher tabs
System Settings Launcher tabs
Overlay: the status bar in games and in the launcher In-game status bar
Overlay In-game status bar
Date & Time Performance overlay in game (FN + D-pad up)
Date & Time Performance overlay in game
System (Power mode) Storage: the second card and the trash
System Storage: the second card and the trash
Network over the USB cable App Installer: app zips in HOME/apps, and the installed apps
Network App Installer

Translations

Every text in the launcher, System Settings included, and in the console's messages ("Restarting...") can be translated, and new languages need no code changes. Languages live in /usr/share/goodluck/lang/<code>.lang (in the repository: rootfs/board/my-device/rootfs-overlay/usr/share/goodluck/lang/) and show up in System Settings -> Interface -> Language as soon as the file is there.

To add a language:

  1. Copy pt-BR.lang to a file named after your language's code, e.g. es.lang or fr.lang.
  2. Change the first lines: language is the language's own name (Español) and language_en its English name (Spanish).
  3. Translate the right side of each English text = Translation line. Keep the left side exactly as it is: it's the text that is looked up. Keep %s / %d where they are, and \n for line breaks.
  4. Keep the launcher's bottom-bar words short (Tab, Launch, Search...): the bar is nearly full.
  5. Optionally add your language's name to the other files (Spanish = Espanhol in pt-BR.lang), so the selector shows it in every language.

Anything left untranslated simply shows in English. Then open a pull request with the new file.

What's wrong with the stock firmware?

Stock firmware:

  • Based on ancient, unsupported forks of thelinux kernel version 3.4.
  • Messy file system, hard to customize, even harder to clean.
  • Full of broken/incompatible files.
  • Come with inefficient, out-of-date emulator cores.
  • Software often not compiled with optimal compiler flags.
  • Usually uses swap-on-sd card, which will prematurely kill your expensive microSD card.
  • Slow boot time
  • Bad/no hotkeys
  • Can't be flashed to smaller SD cards.
  • The MBR (at least on the GA36-MB) is broken by default. You can't add games unless you manually fix it with my guide

Internet over USB

The data port can be an Ethernet adapter named goodluckOS instead of the MTP drive (CDC NCM, which Windows 10 and 11, macOS, Linux and Android drive out of the box): the A33's USB controller can't do both at once. System Settings -> System -> Network switches the cable over (the PC sees the console plugged in again) and shows what the console got; see System Settings. From the serial shell, usb-mode.sh network|files does the same and ip addr show usb0 shows the address.

Which chip does my console have?

GA36-MB consoles (sold as R36S) come with an Allwinner A23 or A33, and goodluckOS builds for one don't boot on the other. The stock menu reports a 64-bit CPU and 1 GB of RAM on both, and the marking on the chip can't be trusted either. On Windows, chip-version reads the microSD card that came with the console and tells which chip it has.

The R36H and the original R36S have a Rockchip RK3326 instead: another board, which the GA36-MB's images don't boot on. This fork runs on the R36H, see R36H.

How do I add games?

Plug the console into your PC with a USB cable and open goodluckOS -> HOME (Windows: This PC; Linux: your file manager; macOS needs an MTP app such as OpenMTP). Or plug the SD card into your PC and open up the HOME partition. In there you'll find a roms folder with a few subfolders for each system. Add your roms to those.

If the console was connected to a charger when it booted (no PC), restart it before plugging it into a PC to get MTP; the serial console works either way. Games copied while Puppy is open show up after you reopen it.

On a PC's USB the battery charges up to 90% and then rests, so a console left plugged in for days doesn't wear its battery out. It charges again once the cable comes out and goes back in, or at 50% if a game drains it while plugged in. A charger with no PC behind it charges to full.

Already have a scraped collection (e.g. made with Skraper for EmulationStation)? Copy it as it is, gamelist.xml and media folder included: Puppy reads them. Or let the console fetch the names, descriptions, pictures and videos itself, from ScreenScraper, with the Scraper app: its zip installs in System Settings -> System -> App Installer.

To add custom art to Puppy, add an image file into the icons folder in your rom folder with the same name as the rom file. (eg. if your game is roms/snes/super-mario.smc, your image would be roms/snes/icons/super-mario.png)

Puppy also reads a gamelist.xml in the rom folder (as written by Skraper or EmulationStation): it takes each game's name, description, year/genre/players and image from it. An image in icons still wins over the gamelist's. With the interface in another language, a gamelist.<code>.xml next to it (e.g. gamelist.pt-BR.xml, written by a scraper pass in that language) supplies that language's names, descriptions and genres; images and anything it lacks still come from gamelist.xml. Big images are scaled down once and cached in ~/.cache/puppy/thumbs.

Luanti comes as an app: copy its zip to the apps folder of HOME and install it in System Settings -> System -> App Installer. Its page says where to get it and how to give it the look of your own Minecraft.

Second card (TF-2 slot)

A FAT32 or exFAT card in the second slot shows up in the launcher, in its own External Card tab and in each system's tab. The card is found when the console starts; to swap it with the console on, use System Settings -> Storage: Eject card before taking it out, and Detect card after putting one in. Put the games in a roms folder with the same system folders as HOME (roms/snes, roms/psx, roms/gba...), and covers in each folder's icons. A card with no roms folder gets the folders created the first time it's mounted; existing folders and files are never touched. Music and videos go in media/music and media/videos.

Puppy finds games by folder, not by file type: games loose on the card, or in the wrong system's folder, won't show up or won't start.

Can I add my own archives?

You sure can!

To add a new emulator, find an appropriate armhf libretro core .so file (e.g. from the libretro buildbot). Add it to either:

  1. The /usr/lib/libretro folder in the linux partition, or
  2. Anywhere in your HOME partition, e.g. a cores folder

Then modify HOME -> apps.puppy with a new [ARCHIVE] entry, pointing the COMMAND to your new libretro core. Take a look at HOME -> apps.puppy for an exmaple.

Apps from zips

An app made for goodluckOS comes as a zip: copy it into HOME -> apps and install it from System Settings -> System -> App Installer. It shows up in the launcher tab its app.puppy names (Games: also in All Games), or in an Apps tab. Installing a newer zip of the same app updates it and keeps its data folder; uninstalling deletes its folder. Making one: see Making apps.

How do I add music and videos?

Copy them into HOME -> media -> music and HOME -> media -> videos. The Music and Videos tabs show up in the launcher once there's something in them. A folder (an album, a series) is one entry that plays whole, with its cover.jpg or folder.jpg as the art; a single file plays along with the rest of its folder. In the Showcase style, a video's trailer is 30 s of itself from a fifth of the way in (a series: its first episode's). Other art goes in the icons folder, named like the file or folder.

Controls (also in System Settings -> Input Settings -> Shortcuts):

Button Action
A / START Pause
B Quit
D-pad left / right, left stick left / right Back / forward 10 s
D-pad down / up Back / forward 1 min
L1 / R1 Previous / next file
X Show the playlist
Y Repeat on / off
L2 / R2 Audio / subtitle track
Left stick up / down Faster / slower: 0.25x, 0.5x, 1x, 1.5x, 2x. The speed stays for the next files of the playlist
R3 / L3 (press the stick) Zoom in / out: 1x, 1.5x, 2x, 3x, 4x
Right stick Move the zoomed picture, up to its edges
SELECT Back to normal speed and zoom

With the confirm button on B, A and B swap here too.

The A33 decodes video in software: up to 640x480 H.264 plays smoothly, 1080p and H.265 don't. Convert bigger videos on your PC first, e.g. ffmpeg -i in.mp4 -vf scale=640:480:force_original_aspect_ratio=decrease:force_divisible_by=2 -c:v libx264 -tune fastdecode -crf 23 -c:a aac -ac 2 out.mkv. On Windows, macOS or Linux, convert-videos does this for a whole folder, turns portrait videos to fill the screen and saves a frame of each one as its art.

Does goodluckOS come with any games?

goodluckOS ships with Chocolate Doom and a shareware Doom wad. Luanti and Minetest Game (free software) come as an app (Luanti for goodluckOS).

goodluckOS will never be distributed with unauthorized copyright-protected materials. If you own the copyright to any games (or know of any permissively-licensed/CC games) that you think might make a good fit, please open an Issue! We would love to include more small, high-quality games with the OS by default.

About Ports

Some subset of portmaster games could theoretically work, however I want to tamper your expectations a little bit before we all start getting too excited. The Allwinner A23/A33 is a 32-bit SoC. This means that 64-bit software simply cannot run on it. There are a number of popular android ports that exist only as aarch64 (64-bit) distributions. Those will never work. Additionally, even with ZRAM there, the device is still heavily RAM-limited, so unoptimized games (I'm looking at you, Balatro) will struggle to run without patching.

The R36H's RK3326 is 64-bit, but this fork runs the same 32-bit system on it, so the same ports apply there, with twice the RAM.

With that said, most of the games people actually care about (Stardew Valley, Half-Life 1, n64 re-comps, Android GameMaker games, OpenMW, OpenRCT2, + more) are 32-bit games, and therefore should theoretically work if anyone cares to create 32-bit ports.

Ports in this fork

Four ports are in progress here. Luanti and Stardew Valley are apps from their own repositories, for the App Installer; Stardew Valley brings in your own copy of the game on its first start. The Zeldas need your ROM, so each one is built on a PC from it: Ports says how, and how each one runs.

Luanti Stardew Valley Ocarina of Time Majora's Mask
Luanti Stardew Valley Ocarina of Time Majora's Mask
Free, an app (one zip) An app, with your game from Steam Your ROM Your ROM

Development

How Do I Build It?

GoodluckOS uses a novel four-step containerized build system featuring Buildroot. This means the OS can be configured and built extremely easily and portably with no extra dependencies at all besides Docker and Docker Compose (or Podman).

Take a look at BUILD.MD for instructions and guidelines.

Design Philosophy

goodluckOS has been designed with a few core principles:

  • The core OS will ship with at most one tool for any job. Duplicate functionality is duplicate bugs.
  • goodluckOS should strive to be as battery-efficient as possible. If a not-strictly-necessary pretty UI feature uses more resources than an uglier alternative, the uglier alternative will be preferred.
  • Do not reinvent the wheel. Opt to use existing packages instead of writing them from scratch so long as they don't conflict with the previous principles.
  • Anything not usable by most people should be distributed as an installable package instead of being baked into the core OS.

Please keep those in mind if you intend for your work to be merged upstream :)

We're currently in the process of choosing a package-management solution for goodluckOS, so if your application/feature is not approved for merging upstream please feel free to package it up as an installable application and we would be happy to advertise it as an optional feature for goodluckOS.

AI Contribution Policy

Contributors should feel free to use any tool at their disposal to write their code. Good code is good code regardless who (or what) wrote it. However, large systems that have not been properly tested, documented, or are not understood by the human contributors will not be accepted until all of these conditions are met. This rule applies to both human written code and LLM-generated code.

LICENSE

This project is licensed under the GNU GENERAL PUBLIC LICENSE VERSION 2.0 see the LICENSE file for details.

DISCLAIMER

WARNING: The GNU General Public License v2 covers this in more detail, but to re-iterate: This software has the potential to permanently damage your hardware. You alone are responsible for all damages, and the ensuing results of said damages that may occur as a result of using, or attempting to use this software.

About

Personal workspace for contributions to CodeZombie/goodluckOS. Not a distribution, no releases. Work in progress on the develop branch.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Packages

Contributors

Languages