Repository navigation
feat: build with lilka-bootloader, install Retro-Go from .img - #151
Closed
black-ghost-off wants to merge 2 commits into
Closed
black-ghost-off wants to merge 2 commits into
black-ghost-off wants to merge 2 commits into
Conversation
- Lilka v2 is built with the boot menu and partition table from lilka-dev/lilka-bootloader (boot/): Keira app0/app1, Retro-Go apps, SPIFFS. KeiraOS_merged*.bin carries them (plus blank otadata), so the web flasher writes the new layout at 0x0 as before - FlashImageApp installs the apps of a full flash image (retro-go_lilka.img) into the partitions with the same labels; .bin/.img from the file manager and the catalog go there when the file has a partition table at 0x8000 - Applications -> Retro-Go when Retro-Go is installed - Keira updates target the other app0/app1 slot: web OTA picks it explicitly, KeiraUpdate refuses when esp_https_ota would overwrite another app - Init lwip before mounting filesystems and drop the /tmp VFS: IDF 4.4 has 8 VFS slots and WiFi aborted with ESP_ERR_NO_MEM once SPIFFS was mounted - CI: Python 3.11 (3.9 is gone from ubuntu-latest) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lilka_bootloader # Conflicts: # .github/workflows/firmware.yml
Collaborator
|
same as for sdk piece, I may not push that, since we loose freedom for no reason I mean, it would be more difficult to "install" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Keira for Lilka v2 is now built with the boot menu and partition table from lilka-bootloader. Keira and Retro-Go live on one flash and switch into each other. The web flasher installs this layout without any changes on its side.
Build and flashing
boot/lilka_v2/bootloader.binandboot/lilka_v2/partitions.csvcome from lilka-bootloaderb070661.boot/README.mdexplains how to update them.app04 MB /app13 MB, Retro-Go apps (launcher,retro-core, …), SPIFFS 3.2 MB.platformio.iniuses the new partition table.boot/bootloader.py(a pre-script) hands PlatformIO an absolute path to the custom bootloader, becausecustom_bootloaderis resolved relative to the framework's variants dir. Sopio run -t uploadalso writes the new bootloader.boot_app0.binat0xe000) intoKeiraOS_merged*.bin. flasher.lilka.dev writes this file at0x0as before, and the board then starts Keira fromapp0.ubuntu-latest(Ubuntu 26.04), sosetup-pythonfailed.Boot menu
Hold START on power-on or reset to get a menu:
.binfiles found on the SD card. One is written toapp1and runs once, like multiboot.Retro-Go
FlashImageApp: when a.bin/.imghas a partition table at0x8000, Keira copies its apps into the partitions with the same labels. It never touches the image's bootloader, its partition table, or Keira itself. Plain.binfiles still go to multiboot..imgfiles open from the file manager and the catalog (K_FT_BIN_HANDLER).launcherpartition holds a valid app (esp_ota_get_partition_description).make retro-goin lilka-bootloader. It producesretro-go_lilka.img.Keira updates with more than 2 OTA apps
esp_ota_get_next_update_partition()fromapp1returns Retro-Go'slauncher:app0/app1(KeiraSystem::getUpdatePartition()).esp_https_otain IDF 4.4 can't take a target partition) refuses the update instead of overwriting another app.WiFi
With SD and SPIFFS mounted, all 8 VFS slots of IDF 4.4 were taken:
/dev/stdio,/spiffs,/sd,/tmp, root VFS;WiFi.mode()→esp_vfs_lwip_sockets_register()→ESP_ERR_NO_MEM→abort(), so the board restarted in a loop.The fix: lwip (
esp_netif_init()) starts before any filesystem is mounted, and/tmp(the SPIRamVFS skeleton, nothing uses it yet) is no longer registered.Migration
KeiraOS_merged*.binover USB (flasher). SPIFFS sits at a different offset, so its old contents are lost.Testing
On Lilka v2:
KeiraOS_merged.binbuilt with the same commands as CI and written at0x0without an erase, like the flasher does: the ROM loads lilka-bootloader, and Keira starts fromapp0with SD and SPIFFS mounted.retro-go_lilka.imgfrom the file manager; Keira ↔ Retro-Go switching.clang-format20.1.8 is clean on the changed files;cppcheckreports nothing on the new code.Depends on lilka-dev/sdk#39 for multiboot.
🤖 Generated with Claude Code