From 43cb0f84ab6d79aca99ccd2ea300cd7fc77439a8 Mon Sep 17 00:00:00 2001 From: Abdessamad Derraz <3028866+Abdess@users.noreply.github.com> Date: Fri, 6 Nov 2026 09:04:51 +0100 Subject: [PATCH] feat: add AmberELEC hardware targets AmberELEC's metapackage adds LIBRETRO_CORES_EXTRA (bsnes, Mesen, melonDS, geolith) only on RG552, RG353 and RG503, and deletes those cores from es_systems.cfg on every other device (packages/amberelec/package.mk:23-31, 45-58 at a21975bf). The new target scraper reads the Makefile's device images, that test and es_systems.cfg the way the platform scraper does: RG351P, RG351V and RG351MP list 125 cores, the other three 136. The installer reads the device from COREELEC_DEVICE in os-release (scripts/image:168). --- install.ps1 | 2 +- install.py | 5 +- install.sh | 2 +- install/launchers/index.json | 16 +- install/targets/amberelec.json | 797 +++++++++++++++++ platforms/_registry.yml | 4 +- platforms/targets/amberelec.yml | 805 ++++++++++++++++++ .../targets/amberelec_targets_scraper.py | 157 ++++ tests/test_amberelec_targets.py | 102 +++ tests/test_install.py | 22 +- wiki/tools.md | 1 + 11 files changed, 1895 insertions(+), 18 deletions(-) create mode 100644 install/targets/amberelec.json create mode 100644 platforms/targets/amberelec.yml create mode 100644 scripts/scraper/targets/amberelec_targets_scraper.py create mode 100644 tests/test_amberelec_targets.py diff --git a/install.ps1 b/install.ps1 index 896cdaf76..4ddc9ef79 100644 --- a/install.ps1 +++ b/install.ps1 @@ -16,7 +16,7 @@ # and Invoke-WebRequest throws on a cut transfer before the hash is read: # the site's build rewrites this line there (scripts/sitebootstrap.py). $mismatchAdvice = "The download was most likely cut short: try again. Within minutes of an update of this project the two files can come from caches of different ages. Waiting five minutes settles that." - $defaultInstallSha256 = "34fd006cc0456c61b9a621e52f35cee6d3fd55ff14bbc6cea207ddc7bc57d858" + $defaultInstallSha256 = "f90d3dc9f71f7d4b309f2a9a564907291eb694eb6f88dd651b861e54f7414e38" $maximumInstallerBytes = 2MB $installerExit = 0 $installer = if ($PSScriptRoot) { Join-Path $PSScriptRoot "install.py" } else { $null } diff --git a/install.py b/install.py index 01c0b9425..e3b82854b 100644 --- a/install.py +++ b/install.py @@ -109,7 +109,7 @@ TARGETS_URL = f"{BASE_URL}/install/targets/{{platform}}.json" # has no hardware targets, where the run sent the user after a list that # exists nowhere. TARGET_PLATFORMS = frozenset({ - "batocera", "emudeck", "knulli", "lakka", "recalbox", "retroarch", "retrobat", + "amberelec", "batocera", "emudeck", "knulli", "lakka", "recalbox", "retroarch", "retrobat", "retrodeck", "retropie", "rocknix", "romm", }) RAW_FILE_URL = f"{BASE_URL}/{{path}}" @@ -1472,7 +1472,10 @@ def _parse_bash_var(path: Path, key: str) -> str | None: # /usr/share/batocera to /usr/share/knulli (knulli-linux 57afa662, # board/scripts/post-build-script.sh:264-278) and writes KNULLI_SYSTEM_ARCH # to knulli.arch (package/system/knulli-system/knulli-system.mk:98-99). +# AmberELEC's scripts/image writes COREELEC_DEVICE (a21975bf, line 168), the +# DEVICE its Makefile builds (RG351P). _BOARD_SOURCES: dict[str, tuple[str, str]] = { + "amberelec": ("os_release", "COREELEC_DEVICE"), "batocera": ("file", "/usr/share/batocera/batocera.arch"), "recalbox": ("file", "/recalbox/recalbox.arch"), "rocknix": ("os_release", "HW_DEVICE"), diff --git a/install.sh b/install.sh index b085a4cbb..d5f49f5e2 100755 --- a/install.sh +++ b/install.sh @@ -23,7 +23,7 @@ DEFAULT_INSTALL_URL="https://raw.githubusercontent.com/Abdess/retrobios/main/ins # curl or wget stop on a cut transfer before the hash is read: the site's # build rewrites this line there (scripts/sitebootstrap.py). MISMATCH_ADVICE="The download was most likely cut short: try again. Within minutes of an update of this project the two files can come from caches of different ages. Waiting five minutes settles that." -DEFAULT_INSTALL_SHA256="34fd006cc0456c61b9a621e52f35cee6d3fd55ff14bbc6cea207ddc7bc57d858" +DEFAULT_INSTALL_SHA256="f90d3dc9f71f7d4b309f2a9a564907291eb694eb6f88dd651b861e54f7414e38" MAX_INSTALLER_BYTES=2097152 cleanup() { diff --git a/install/launchers/index.json b/install/launchers/index.json index 358ee41c9..771cf18b9 100644 --- a/install/launchers/index.json +++ b/install/launchers/index.json @@ -27,8 +27,8 @@ { "dest": "roms/ports/retrobios/install.py", "repo_path": "install.py", - "size": 1103111, - "sha256": "34fd006cc0456c61b9a621e52f35cee6d3fd55ff14bbc6cea207ddc7bc57d858", + "size": 1103292, + "sha256": "f90d3dc9f71f7d4b309f2a9a564907291eb694eb6f88dd651b861e54f7414e38", "executable": false }, { @@ -71,8 +71,8 @@ "muos": { "archive": { "dest": "ARCHIVE/RetroBIOS.muxapp", - "size": 1156738, - "sha256": "35c0920008baadca997d0f778e99ce46d702bbe3d3f0d33104d7158422b292aa" + "size": 1156919, + "sha256": "2efccc205141dfffc016b4ef9988e11877ef249634052835069ca1dd8921cdce" }, "members": [ { @@ -92,8 +92,8 @@ { "name": "RetroBIOS/install.py", "repo_path": "install.py", - "size": 1103111, - "sha256": "34fd006cc0456c61b9a621e52f35cee6d3fd55ff14bbc6cea207ddc7bc57d858", + "size": 1103292, + "sha256": "f90d3dc9f71f7d4b309f2a9a564907291eb694eb6f88dd651b861e54f7414e38", "executable": false }, { @@ -166,8 +166,8 @@ { "dest": ".config/modules/retrobios/install.py", "repo_path": "install.py", - "size": 1103111, - "sha256": "34fd006cc0456c61b9a621e52f35cee6d3fd55ff14bbc6cea207ddc7bc57d858", + "size": 1103292, + "sha256": "f90d3dc9f71f7d4b309f2a9a564907291eb694eb6f88dd651b861e54f7414e38", "executable": false }, { diff --git a/install/targets/amberelec.json b/install/targets/amberelec.json new file mode 100644 index 000000000..ff186677e --- /dev/null +++ b/install/targets/amberelec.json @@ -0,0 +1,797 @@ +{ + "rg351mp": [ + "81", + "AMIBERRY", + "AdvanceMame", + "DoubleCherryGB", + "HATARISA", + "OPENBOR", + "PPSSPPSDL", + "SCUMMVMSA", + "a5200", + "arduous", + "atari800", + "beetle_gba", + "beetle_lynx", + "beetle_ngp", + "beetle_pce", + "beetle_pce_fast", + "beetle_pcfx", + "beetle_supafaust", + "beetle_supergrafx", + "beetle_vb", + "beetle_wswan", + "bluemsx", + "cap32", + "crocods", + "dosbox_core", + "dosbox_pure", + "drastic", + "duckstation", + "easyrpg", + "ecwolf", + "emuscv", + "ep128emu_core", + "fake08", + "fbalpha2012", + "fbalpha2019", + "fbneo", + "fceumm", + "flycast", + "flycast2021", + "flycast2021le", + "fmsx", + "freechaf", + "freeintv", + "freej2me", + "freej2me-plus", + "fuse", + "gambatte", + "gearboy", + "gearcoleco", + "gearsystem", + "genesis_plus_gx", + "genesis_plus_gx_wide", + "gpsp", + "gw", + "gzdoom", + "handy", + "hatari", + "hypseus_singe", + "jaxe", + "lowresnx", + "lzdoom", + "mame", + "mame2000", + "mame2003_plus", + "mame2010", + "mame2015", + "mame2016", + "mgba", + "mojozork", + "mupen64plus_next", + "mupen64plussa", + "nekop2", + "neocd", + "nestopia", + "np2kai", + "o2em", + "opera", + "parallel_n64", + "pcsx_rearmed", + "pico8", + "picodrive", + "piemu", + "pokemini", + "potator", + "ppsspp", + "prboom", + "prosystem", + "puae", + "puae2021", + "px68k", + "quasi88", + "quicknes", + "race", + "raze", + "same_cdi", + "sameboy", + "sameduck", + "scummvm", + "smsplus", + "snes9x", + "snes9x2002", + "snes9x2005_plus", + "snes9x2010", + "solarus", + "stella", + "stella2014", + "swanstation", + "tgbdual", + "theodore", + "tic80", + "uae4arm", + "uw8", + "uzem", + "vba_next", + "vbam", + "vecx", + "vice_x128", + "vice_x64", + "vice_xplus4", + "vice_xvic", + "vircon32", + "virtualjaguar", + "wasm4", + "x1", + "yabasanshiroSA" + ], + "rg351p": [ + "81", + "AMIBERRY", + "AdvanceMame", + "DoubleCherryGB", + "HATARISA", + "OPENBOR", + "PPSSPPSDL", + "SCUMMVMSA", + "a5200", + "arduous", + "atari800", + "beetle_gba", + "beetle_lynx", + "beetle_ngp", + "beetle_pce", + "beetle_pce_fast", + "beetle_pcfx", + "beetle_supafaust", + "beetle_supergrafx", + "beetle_vb", + "beetle_wswan", + "bluemsx", + "cap32", + "crocods", + "dosbox_core", + "dosbox_pure", + "drastic", + "duckstation", + "easyrpg", + "ecwolf", + "emuscv", + "ep128emu_core", + "fake08", + "fbalpha2012", + "fbalpha2019", + "fbneo", + "fceumm", + "flycast", + "flycast2021", + "flycast2021le", + "fmsx", + "freechaf", + "freeintv", + "freej2me", + "freej2me-plus", + "fuse", + "gambatte", + "gearboy", + "gearcoleco", + "gearsystem", + "genesis_plus_gx", + "genesis_plus_gx_wide", + "gpsp", + "gw", + "gzdoom", + "handy", + "hatari", + "hypseus_singe", + "jaxe", + "lowresnx", + "lzdoom", + "mame", + "mame2000", + "mame2003_plus", + "mame2010", + "mame2015", + "mame2016", + "mgba", + "mojozork", + "mupen64plus_next", + "mupen64plussa", + "nekop2", + "neocd", + "nestopia", + "np2kai", + "o2em", + "opera", + "parallel_n64", + "pcsx_rearmed", + "pico8", + "picodrive", + "piemu", + "pokemini", + "potator", + "ppsspp", + "prboom", + "prosystem", + "puae", + "puae2021", + "px68k", + "quasi88", + "quicknes", + "race", + "raze", + "same_cdi", + "sameboy", + "sameduck", + "scummvm", + "smsplus", + "snes9x", + "snes9x2002", + "snes9x2005_plus", + "snes9x2010", + "solarus", + "stella", + "stella2014", + "swanstation", + "tgbdual", + "theodore", + "tic80", + "uae4arm", + "uw8", + "uzem", + "vba_next", + "vbam", + "vecx", + "vice_x128", + "vice_x64", + "vice_xplus4", + "vice_xvic", + "vircon32", + "virtualjaguar", + "wasm4", + "x1", + "yabasanshiroSA" + ], + "rg351v": [ + "81", + "AMIBERRY", + "AdvanceMame", + "DoubleCherryGB", + "HATARISA", + "OPENBOR", + "PPSSPPSDL", + "SCUMMVMSA", + "a5200", + "arduous", + "atari800", + "beetle_gba", + "beetle_lynx", + "beetle_ngp", + "beetle_pce", + "beetle_pce_fast", + "beetle_pcfx", + "beetle_supafaust", + "beetle_supergrafx", + "beetle_vb", + "beetle_wswan", + "bluemsx", + "cap32", + "crocods", + "dosbox_core", + "dosbox_pure", + "drastic", + "duckstation", + "easyrpg", + "ecwolf", + "emuscv", + "ep128emu_core", + "fake08", + "fbalpha2012", + "fbalpha2019", + "fbneo", + "fceumm", + "flycast", + "flycast2021", + "flycast2021le", + "fmsx", + "freechaf", + "freeintv", + "freej2me", + "freej2me-plus", + "fuse", + "gambatte", + "gearboy", + "gearcoleco", + "gearsystem", + "genesis_plus_gx", + "genesis_plus_gx_wide", + "gpsp", + "gw", + "gzdoom", + "handy", + "hatari", + "hypseus_singe", + "jaxe", + "lowresnx", + "lzdoom", + "mame", + "mame2000", + "mame2003_plus", + "mame2010", + "mame2015", + "mame2016", + "mgba", + "mojozork", + "mupen64plus_next", + "mupen64plussa", + "nekop2", + "neocd", + "nestopia", + "np2kai", + "o2em", + "opera", + "parallel_n64", + "pcsx_rearmed", + "pico8", + "picodrive", + "piemu", + "pokemini", + "potator", + "ppsspp", + "prboom", + "prosystem", + "puae", + "puae2021", + "px68k", + "quasi88", + "quicknes", + "race", + "raze", + "same_cdi", + "sameboy", + "sameduck", + "scummvm", + "smsplus", + "snes9x", + "snes9x2002", + "snes9x2005_plus", + "snes9x2010", + "solarus", + "stella", + "stella2014", + "swanstation", + "tgbdual", + "theodore", + "tic80", + "uae4arm", + "uw8", + "uzem", + "vba_next", + "vbam", + "vecx", + "vice_x128", + "vice_x64", + "vice_xplus4", + "vice_xvic", + "vircon32", + "virtualjaguar", + "wasm4", + "x1", + "yabasanshiroSA" + ], + "rg353": [ + "81", + "AMIBERRY", + "AdvanceMame", + "DoubleCherryGB", + "HATARISA", + "OPENBOR", + "PPSSPPSDL", + "SCUMMVMSA", + "a5200", + "arduous", + "atari800", + "beetle_gba", + "beetle_lynx", + "beetle_ngp", + "beetle_pce", + "beetle_pce_fast", + "beetle_pcfx", + "beetle_snes", + "beetle_supafaust", + "beetle_supergrafx", + "beetle_vb", + "beetle_wswan", + "bluemsx", + "bsnes", + "bsnes2014_balanced", + "bsnes2014_performance", + "bsnes_mercury_balanced", + "bsnes_mercury_performance", + "cap32", + "crocods", + "dosbox_core", + "dosbox_pure", + "drastic", + "duckstation", + "easyrpg", + "ecwolf", + "emuscv", + "ep128emu_core", + "fake08", + "fbalpha2012", + "fbalpha2019", + "fbneo", + "fceumm", + "flycast", + "flycast2021", + "flycast2021le", + "fmsx", + "freechaf", + "freeintv", + "freej2me", + "freej2me-plus", + "fuse", + "gambatte", + "gearboy", + "gearcoleco", + "gearsystem", + "genesis_plus_gx", + "genesis_plus_gx_wide", + "geolith", + "gpsp", + "gw", + "gzdoom", + "handy", + "hatari", + "hypseus_singe", + "jaxe", + "lowresnx", + "lzdoom", + "mame", + "mame2000", + "mame2003_plus", + "mame2010", + "mame2015", + "mame2016", + "melonds", + "melondsds", + "mesen", + "mesen-s", + "mgba", + "mojozork", + "mupen64plus_next", + "mupen64plussa", + "nekop2", + "neocd", + "nestopia", + "np2kai", + "o2em", + "opera", + "parallel_n64", + "pcsx_rearmed", + "pico8", + "picodrive", + "piemu", + "pokemini", + "potator", + "ppsspp", + "prboom", + "prosystem", + "puae", + "puae2021", + "px68k", + "quasi88", + "quicknes", + "race", + "raze", + "same_cdi", + "sameboy", + "sameduck", + "scummvm", + "smsplus", + "snes9x", + "snes9x2002", + "snes9x2005_plus", + "snes9x2010", + "solarus", + "stella", + "stella2014", + "swanstation", + "tgbdual", + "theodore", + "tic80", + "uae4arm", + "uw8", + "uzem", + "vba_next", + "vbam", + "vecx", + "vice_x128", + "vice_x64", + "vice_xplus4", + "vice_xvic", + "vircon32", + "virtualjaguar", + "wasm4", + "x1", + "yabasanshiroSA" + ], + "rg503": [ + "81", + "AMIBERRY", + "AdvanceMame", + "DoubleCherryGB", + "HATARISA", + "OPENBOR", + "PPSSPPSDL", + "SCUMMVMSA", + "a5200", + "arduous", + "atari800", + "beetle_gba", + "beetle_lynx", + "beetle_ngp", + "beetle_pce", + "beetle_pce_fast", + "beetle_pcfx", + "beetle_snes", + "beetle_supafaust", + "beetle_supergrafx", + "beetle_vb", + "beetle_wswan", + "bluemsx", + "bsnes", + "bsnes2014_balanced", + "bsnes2014_performance", + "bsnes_mercury_balanced", + "bsnes_mercury_performance", + "cap32", + "crocods", + "dosbox_core", + "dosbox_pure", + "drastic", + "duckstation", + "easyrpg", + "ecwolf", + "emuscv", + "ep128emu_core", + "fake08", + "fbalpha2012", + "fbalpha2019", + "fbneo", + "fceumm", + "flycast", + "flycast2021", + "flycast2021le", + "fmsx", + "freechaf", + "freeintv", + "freej2me", + "freej2me-plus", + "fuse", + "gambatte", + "gearboy", + "gearcoleco", + "gearsystem", + "genesis_plus_gx", + "genesis_plus_gx_wide", + "geolith", + "gpsp", + "gw", + "gzdoom", + "handy", + "hatari", + "hypseus_singe", + "jaxe", + "lowresnx", + "lzdoom", + "mame", + "mame2000", + "mame2003_plus", + "mame2010", + "mame2015", + "mame2016", + "melonds", + "melondsds", + "mesen", + "mesen-s", + "mgba", + "mojozork", + "mupen64plus_next", + "mupen64plussa", + "nekop2", + "neocd", + "nestopia", + "np2kai", + "o2em", + "opera", + "parallel_n64", + "pcsx_rearmed", + "pico8", + "picodrive", + "piemu", + "pokemini", + "potator", + "ppsspp", + "prboom", + "prosystem", + "puae", + "puae2021", + "px68k", + "quasi88", + "quicknes", + "race", + "raze", + "same_cdi", + "sameboy", + "sameduck", + "scummvm", + "smsplus", + "snes9x", + "snes9x2002", + "snes9x2005_plus", + "snes9x2010", + "solarus", + "stella", + "stella2014", + "swanstation", + "tgbdual", + "theodore", + "tic80", + "uae4arm", + "uw8", + "uzem", + "vba_next", + "vbam", + "vecx", + "vice_x128", + "vice_x64", + "vice_xplus4", + "vice_xvic", + "vircon32", + "virtualjaguar", + "wasm4", + "x1", + "yabasanshiroSA" + ], + "rg552": [ + "81", + "AMIBERRY", + "AdvanceMame", + "DoubleCherryGB", + "HATARISA", + "OPENBOR", + "PPSSPPSDL", + "SCUMMVMSA", + "a5200", + "arduous", + "atari800", + "beetle_gba", + "beetle_lynx", + "beetle_ngp", + "beetle_pce", + "beetle_pce_fast", + "beetle_pcfx", + "beetle_snes", + "beetle_supafaust", + "beetle_supergrafx", + "beetle_vb", + "beetle_wswan", + "bluemsx", + "bsnes", + "bsnes2014_balanced", + "bsnes2014_performance", + "bsnes_mercury_balanced", + "bsnes_mercury_performance", + "cap32", + "crocods", + "dosbox_core", + "dosbox_pure", + "drastic", + "duckstation", + "easyrpg", + "ecwolf", + "emuscv", + "ep128emu_core", + "fake08", + "fbalpha2012", + "fbalpha2019", + "fbneo", + "fceumm", + "flycast", + "flycast2021", + "flycast2021le", + "fmsx", + "freechaf", + "freeintv", + "freej2me", + "freej2me-plus", + "fuse", + "gambatte", + "gearboy", + "gearcoleco", + "gearsystem", + "genesis_plus_gx", + "genesis_plus_gx_wide", + "geolith", + "gpsp", + "gw", + "gzdoom", + "handy", + "hatari", + "hypseus_singe", + "jaxe", + "lowresnx", + "lzdoom", + "mame", + "mame2000", + "mame2003_plus", + "mame2010", + "mame2015", + "mame2016", + "melonds", + "melondsds", + "mesen", + "mesen-s", + "mgba", + "mojozork", + "mupen64plus_next", + "mupen64plussa", + "nekop2", + "neocd", + "nestopia", + "np2kai", + "o2em", + "opera", + "parallel_n64", + "pcsx_rearmed", + "pico8", + "picodrive", + "piemu", + "pokemini", + "potator", + "ppsspp", + "prboom", + "prosystem", + "puae", + "puae2021", + "px68k", + "quasi88", + "quicknes", + "race", + "raze", + "same_cdi", + "sameboy", + "sameduck", + "scummvm", + "smsplus", + "snes9x", + "snes9x2002", + "snes9x2005_plus", + "snes9x2010", + "solarus", + "stella", + "stella2014", + "swanstation", + "tgbdual", + "theodore", + "tic80", + "uae4arm", + "uw8", + "uzem", + "vba_next", + "vbam", + "vecx", + "vice_x128", + "vice_x64", + "vice_xplus4", + "vice_xvic", + "vircon32", + "virtualjaguar", + "wasm4", + "x1", + "yabasanshiroSA" + ] +} diff --git a/platforms/_registry.yml b/platforms/_registry.yml index 891b01a95..e93abe5a7 100644 --- a/platforms/_registry.yml +++ b/platforms/_registry.yml @@ -868,8 +868,8 @@ platforms: # setsettings.py leaves it: saves sit beside each game, no single place. save_directory: null schedule: monthly - target_scraper: null - target_source: null + target_scraper: amberelec_targets + target_source: https://github.com/AmberELEC/AmberELEC/blob/dev/packages/amberelec/package.mk install: detect: # AmberELEC 5a3882cb scripts/image:150-152, options:17. CHAos diff --git a/platforms/targets/amberelec.yml b/platforms/targets/amberelec.yml new file mode 100644 index 000000000..1515bed13 --- /dev/null +++ b/platforms/targets/amberelec.yml @@ -0,0 +1,805 @@ +platform: amberelec +source: https://github.com/AmberELEC/AmberELEC/blob/a21975bfb1a3af68f66e07a931b994b523e1e6e2/packages/amberelec/package.mk +scraped_at: '2026-11-06T07:53:33Z' +targets: + rg351mp: + architecture: aarch64 + cores: + - '81' + - AMIBERRY + - AdvanceMame + - DoubleCherryGB + - HATARISA + - OPENBOR + - PPSSPPSDL + - SCUMMVMSA + - a5200 + - arduous + - atari800 + - beetle_gba + - beetle_lynx + - beetle_ngp + - beetle_pce + - beetle_pce_fast + - beetle_pcfx + - beetle_supafaust + - beetle_supergrafx + - beetle_vb + - beetle_wswan + - bluemsx + - cap32 + - crocods + - dosbox_core + - dosbox_pure + - drastic + - duckstation + - easyrpg + - ecwolf + - emuscv + - ep128emu_core + - fake08 + - fbalpha2012 + - fbalpha2019 + - fbneo + - fceumm + - flycast + - flycast2021 + - flycast2021le + - fmsx + - freechaf + - freeintv + - freej2me + - freej2me-plus + - fuse + - gambatte + - gearboy + - gearcoleco + - gearsystem + - genesis_plus_gx + - genesis_plus_gx_wide + - gpsp + - gw + - gzdoom + - handy + - hatari + - hypseus_singe + - jaxe + - lowresnx + - lzdoom + - mame + - mame2000 + - mame2003_plus + - mame2010 + - mame2015 + - mame2016 + - mgba + - mojozork + - mupen64plus_next + - mupen64plussa + - nekop2 + - neocd + - nestopia + - np2kai + - o2em + - opera + - parallel_n64 + - pcsx_rearmed + - pico8 + - picodrive + - piemu + - pokemini + - potator + - ppsspp + - prboom + - prosystem + - puae + - puae2021 + - px68k + - quasi88 + - quicknes + - race + - raze + - same_cdi + - sameboy + - sameduck + - scummvm + - smsplus + - snes9x + - snes9x2002 + - snes9x2005_plus + - snes9x2010 + - solarus + - stella + - stella2014 + - swanstation + - tgbdual + - theodore + - tic80 + - uae4arm + - uw8 + - uzem + - vba_next + - vbam + - vecx + - vice_x128 + - vice_x64 + - vice_xplus4 + - vice_xvic + - vircon32 + - virtualjaguar + - wasm4 + - x1 + - yabasanshiroSA + rg351p: + architecture: aarch64 + cores: + - '81' + - AMIBERRY + - AdvanceMame + - DoubleCherryGB + - HATARISA + - OPENBOR + - PPSSPPSDL + - SCUMMVMSA + - a5200 + - arduous + - atari800 + - beetle_gba + - beetle_lynx + - beetle_ngp + - beetle_pce + - beetle_pce_fast + - beetle_pcfx + - beetle_supafaust + - beetle_supergrafx + - beetle_vb + - beetle_wswan + - bluemsx + - cap32 + - crocods + - dosbox_core + - dosbox_pure + - drastic + - duckstation + - easyrpg + - ecwolf + - emuscv + - ep128emu_core + - fake08 + - fbalpha2012 + - fbalpha2019 + - fbneo + - fceumm + - flycast + - flycast2021 + - flycast2021le + - fmsx + - freechaf + - freeintv + - freej2me + - freej2me-plus + - fuse + - gambatte + - gearboy + - gearcoleco + - gearsystem + - genesis_plus_gx + - genesis_plus_gx_wide + - gpsp + - gw + - gzdoom + - handy + - hatari + - hypseus_singe + - jaxe + - lowresnx + - lzdoom + - mame + - mame2000 + - mame2003_plus + - mame2010 + - mame2015 + - mame2016 + - mgba + - mojozork + - mupen64plus_next + - mupen64plussa + - nekop2 + - neocd + - nestopia + - np2kai + - o2em + - opera + - parallel_n64 + - pcsx_rearmed + - pico8 + - picodrive + - piemu + - pokemini + - potator + - ppsspp + - prboom + - prosystem + - puae + - puae2021 + - px68k + - quasi88 + - quicknes + - race + - raze + - same_cdi + - sameboy + - sameduck + - scummvm + - smsplus + - snes9x + - snes9x2002 + - snes9x2005_plus + - snes9x2010 + - solarus + - stella + - stella2014 + - swanstation + - tgbdual + - theodore + - tic80 + - uae4arm + - uw8 + - uzem + - vba_next + - vbam + - vecx + - vice_x128 + - vice_x64 + - vice_xplus4 + - vice_xvic + - vircon32 + - virtualjaguar + - wasm4 + - x1 + - yabasanshiroSA + rg351v: + architecture: aarch64 + cores: + - '81' + - AMIBERRY + - AdvanceMame + - DoubleCherryGB + - HATARISA + - OPENBOR + - PPSSPPSDL + - SCUMMVMSA + - a5200 + - arduous + - atari800 + - beetle_gba + - beetle_lynx + - beetle_ngp + - beetle_pce + - beetle_pce_fast + - beetle_pcfx + - beetle_supafaust + - beetle_supergrafx + - beetle_vb + - beetle_wswan + - bluemsx + - cap32 + - crocods + - dosbox_core + - dosbox_pure + - drastic + - duckstation + - easyrpg + - ecwolf + - emuscv + - ep128emu_core + - fake08 + - fbalpha2012 + - fbalpha2019 + - fbneo + - fceumm + - flycast + - flycast2021 + - flycast2021le + - fmsx + - freechaf + - freeintv + - freej2me + - freej2me-plus + - fuse + - gambatte + - gearboy + - gearcoleco + - gearsystem + - genesis_plus_gx + - genesis_plus_gx_wide + - gpsp + - gw + - gzdoom + - handy + - hatari + - hypseus_singe + - jaxe + - lowresnx + - lzdoom + - mame + - mame2000 + - mame2003_plus + - mame2010 + - mame2015 + - mame2016 + - mgba + - mojozork + - mupen64plus_next + - mupen64plussa + - nekop2 + - neocd + - nestopia + - np2kai + - o2em + - opera + - parallel_n64 + - pcsx_rearmed + - pico8 + - picodrive + - piemu + - pokemini + - potator + - ppsspp + - prboom + - prosystem + - puae + - puae2021 + - px68k + - quasi88 + - quicknes + - race + - raze + - same_cdi + - sameboy + - sameduck + - scummvm + - smsplus + - snes9x + - snes9x2002 + - snes9x2005_plus + - snes9x2010 + - solarus + - stella + - stella2014 + - swanstation + - tgbdual + - theodore + - tic80 + - uae4arm + - uw8 + - uzem + - vba_next + - vbam + - vecx + - vice_x128 + - vice_x64 + - vice_xplus4 + - vice_xvic + - vircon32 + - virtualjaguar + - wasm4 + - x1 + - yabasanshiroSA + rg353: + architecture: aarch64 + cores: + - '81' + - AMIBERRY + - AdvanceMame + - DoubleCherryGB + - HATARISA + - OPENBOR + - PPSSPPSDL + - SCUMMVMSA + - a5200 + - arduous + - atari800 + - beetle_gba + - beetle_lynx + - beetle_ngp + - beetle_pce + - beetle_pce_fast + - beetle_pcfx + - beetle_snes + - beetle_supafaust + - beetle_supergrafx + - beetle_vb + - beetle_wswan + - bluemsx + - bsnes + - bsnes2014_balanced + - bsnes2014_performance + - bsnes_mercury_balanced + - bsnes_mercury_performance + - cap32 + - crocods + - dosbox_core + - dosbox_pure + - drastic + - duckstation + - easyrpg + - ecwolf + - emuscv + - ep128emu_core + - fake08 + - fbalpha2012 + - fbalpha2019 + - fbneo + - fceumm + - flycast + - flycast2021 + - flycast2021le + - fmsx + - freechaf + - freeintv + - freej2me + - freej2me-plus + - fuse + - gambatte + - gearboy + - gearcoleco + - gearsystem + - genesis_plus_gx + - genesis_plus_gx_wide + - geolith + - gpsp + - gw + - gzdoom + - handy + - hatari + - hypseus_singe + - jaxe + - lowresnx + - lzdoom + - mame + - mame2000 + - mame2003_plus + - mame2010 + - mame2015 + - mame2016 + - melonds + - melondsds + - mesen + - mesen-s + - mgba + - mojozork + - mupen64plus_next + - mupen64plussa + - nekop2 + - neocd + - nestopia + - np2kai + - o2em + - opera + - parallel_n64 + - pcsx_rearmed + - pico8 + - picodrive + - piemu + - pokemini + - potator + - ppsspp + - prboom + - prosystem + - puae + - puae2021 + - px68k + - quasi88 + - quicknes + - race + - raze + - same_cdi + - sameboy + - sameduck + - scummvm + - smsplus + - snes9x + - snes9x2002 + - snes9x2005_plus + - snes9x2010 + - solarus + - stella + - stella2014 + - swanstation + - tgbdual + - theodore + - tic80 + - uae4arm + - uw8 + - uzem + - vba_next + - vbam + - vecx + - vice_x128 + - vice_x64 + - vice_xplus4 + - vice_xvic + - vircon32 + - virtualjaguar + - wasm4 + - x1 + - yabasanshiroSA + rg503: + architecture: aarch64 + cores: + - '81' + - AMIBERRY + - AdvanceMame + - DoubleCherryGB + - HATARISA + - OPENBOR + - PPSSPPSDL + - SCUMMVMSA + - a5200 + - arduous + - atari800 + - beetle_gba + - beetle_lynx + - beetle_ngp + - beetle_pce + - beetle_pce_fast + - beetle_pcfx + - beetle_snes + - beetle_supafaust + - beetle_supergrafx + - beetle_vb + - beetle_wswan + - bluemsx + - bsnes + - bsnes2014_balanced + - bsnes2014_performance + - bsnes_mercury_balanced + - bsnes_mercury_performance + - cap32 + - crocods + - dosbox_core + - dosbox_pure + - drastic + - duckstation + - easyrpg + - ecwolf + - emuscv + - ep128emu_core + - fake08 + - fbalpha2012 + - fbalpha2019 + - fbneo + - fceumm + - flycast + - flycast2021 + - flycast2021le + - fmsx + - freechaf + - freeintv + - freej2me + - freej2me-plus + - fuse + - gambatte + - gearboy + - gearcoleco + - gearsystem + - genesis_plus_gx + - genesis_plus_gx_wide + - geolith + - gpsp + - gw + - gzdoom + - handy + - hatari + - hypseus_singe + - jaxe + - lowresnx + - lzdoom + - mame + - mame2000 + - mame2003_plus + - mame2010 + - mame2015 + - mame2016 + - melonds + - melondsds + - mesen + - mesen-s + - mgba + - mojozork + - mupen64plus_next + - mupen64plussa + - nekop2 + - neocd + - nestopia + - np2kai + - o2em + - opera + - parallel_n64 + - pcsx_rearmed + - pico8 + - picodrive + - piemu + - pokemini + - potator + - ppsspp + - prboom + - prosystem + - puae + - puae2021 + - px68k + - quasi88 + - quicknes + - race + - raze + - same_cdi + - sameboy + - sameduck + - scummvm + - smsplus + - snes9x + - snes9x2002 + - snes9x2005_plus + - snes9x2010 + - solarus + - stella + - stella2014 + - swanstation + - tgbdual + - theodore + - tic80 + - uae4arm + - uw8 + - uzem + - vba_next + - vbam + - vecx + - vice_x128 + - vice_x64 + - vice_xplus4 + - vice_xvic + - vircon32 + - virtualjaguar + - wasm4 + - x1 + - yabasanshiroSA + rg552: + architecture: aarch64 + cores: + - '81' + - AMIBERRY + - AdvanceMame + - DoubleCherryGB + - HATARISA + - OPENBOR + - PPSSPPSDL + - SCUMMVMSA + - a5200 + - arduous + - atari800 + - beetle_gba + - beetle_lynx + - beetle_ngp + - beetle_pce + - beetle_pce_fast + - beetle_pcfx + - beetle_snes + - beetle_supafaust + - beetle_supergrafx + - beetle_vb + - beetle_wswan + - bluemsx + - bsnes + - bsnes2014_balanced + - bsnes2014_performance + - bsnes_mercury_balanced + - bsnes_mercury_performance + - cap32 + - crocods + - dosbox_core + - dosbox_pure + - drastic + - duckstation + - easyrpg + - ecwolf + - emuscv + - ep128emu_core + - fake08 + - fbalpha2012 + - fbalpha2019 + - fbneo + - fceumm + - flycast + - flycast2021 + - flycast2021le + - fmsx + - freechaf + - freeintv + - freej2me + - freej2me-plus + - fuse + - gambatte + - gearboy + - gearcoleco + - gearsystem + - genesis_plus_gx + - genesis_plus_gx_wide + - geolith + - gpsp + - gw + - gzdoom + - handy + - hatari + - hypseus_singe + - jaxe + - lowresnx + - lzdoom + - mame + - mame2000 + - mame2003_plus + - mame2010 + - mame2015 + - mame2016 + - melonds + - melondsds + - mesen + - mesen-s + - mgba + - mojozork + - mupen64plus_next + - mupen64plussa + - nekop2 + - neocd + - nestopia + - np2kai + - o2em + - opera + - parallel_n64 + - pcsx_rearmed + - pico8 + - picodrive + - piemu + - pokemini + - potator + - ppsspp + - prboom + - prosystem + - puae + - puae2021 + - px68k + - quasi88 + - quicknes + - race + - raze + - same_cdi + - sameboy + - sameduck + - scummvm + - smsplus + - snes9x + - snes9x2002 + - snes9x2005_plus + - snes9x2010 + - solarus + - stella + - stella2014 + - swanstation + - tgbdual + - theodore + - tic80 + - uae4arm + - uw8 + - uzem + - vba_next + - vbam + - vecx + - vice_x128 + - vice_x64 + - vice_xplus4 + - vice_xvic + - vircon32 + - virtualjaguar + - wasm4 + - x1 + - yabasanshiroSA diff --git a/scripts/scraper/targets/amberelec_targets_scraper.py b/scripts/scraper/targets/amberelec_targets_scraper.py new file mode 100644 index 000000000..72b3b557f --- /dev/null +++ b/scripts/scraper/targets/amberelec_targets_scraper.py @@ -0,0 +1,157 @@ +"""Scraper for AmberELEC per-device emulator availability. + +Sources (AmberELEC/AmberELEC, at the commit platforms/amberelec.yml names): + - Makefile -- one `DEVICE= ARCH= ./scripts/build_distro` target + per image (RG351P, RG351V, RG351MP, RG552, RG353, RG503 at a21975bf) + - packages/amberelec/package.mk -- LIBRETRO_CORES_EXTRA joins PKG_EMUS + only on the devices its `if` names (lines 23-31 at a21975bf: RG552, + RG353, RG503), and on every other device makeinstall_target deletes + each of those cores from es_systems.cfg (lines 45-58) + - packages/ui/emulationstation/config/es_systems.cfg -- read the way the + platform scraper reads it, after that deletion + +An RG351P image carries neither melonDS nor bsnes: without a target list, +its pack shipped the Nintendo DS firmware anyway. +""" + +from __future__ import annotations + +import argparse +import re +import sys +from datetime import datetime, timezone + +import yaml + +from . import BaseTargetScraper + +PLATFORM_NAME = "amberelec" + +RAW_BASE = "https://raw.githubusercontent.com/AmberELEC/AmberELEC/{ref}" +META_MK = "packages/amberelec/package.mk" + +try: + from ..amberelec_scraper import BUILDS_OF, ES_SYSTEMS_TEMPLATE, RUNNERS + from ..base_scraper import fetch_bytes + from ..batocera_scraper import _not_cores + from ..es_emulators import es_cores, xml_systems +except ImportError: + from scraper.amberelec_scraper import BUILDS_OF, ES_SYSTEMS_TEMPLATE, RUNNERS + from scraper.base_scraper import fetch_bytes + from scraper.batocera_scraper import _not_cores + from scraper.es_emulators import es_cores, xml_systems + +_DEVICE_RE = re.compile( + r"^(\w+):\n\tDEVICE=(\w+) ARCH=(\w+) \./scripts/build_distro$", re.MULTILINE +) +_EXTRA_RE = re.compile(r'LIBRETRO_CORES_EXTRA="([^"]*)"') +# The `if` whose body adds the extra cores to PKG_EMUS. +_EXTRA_IF_RE = re.compile( + r"if \[\[ (?P[^\n]*?) \]\]; then\s*\n\s*PKG_EMUS\+=\" \$\{LIBRETRO_CORES_EXTRA\}\"" +) +# What makeinstall_target does to es_systems.cfg on the other devices. +_REMOVAL_LINES = ( + "for CORE in ${LIBRETRO_CORES_EXTRA}; do", + 'sed -i "s|$CORE||g"', + r"sed -i -e '//!ba;/melonds/d}'", +) +_EMULATOR_BLOCK_RE = re.compile(r"[^\n]*[^\n]*\n?", re.DOTALL) + + +def devices(makefile: str) -> dict[str, str]: + """{device: architecture} of each image the Makefile builds.""" + found = {device: arch for target, device, arch in _DEVICE_RE.findall(makefile) + if target == device} + if not found: + raise RuntimeError("the AmberELEC Makefile builds no device image") + return found + + +def extra_cores(package_mk: str) -> tuple[list[str], set[str]]: + """(the extra cores, the devices that keep them) from the metapackage.""" + listed = _EXTRA_RE.search(package_mk) + test = _EXTRA_IF_RE.search(package_mk) + if listed is None or test is None: + raise RuntimeError(f"{META_MK}: no LIBRETRO_CORES_EXTRA or no test adding it") + missing = [line for line in _REMOVAL_LINES if line not in package_mk] + if missing: + raise RuntimeError(f"{META_MK}: makeinstall_target no longer reads {missing[0]!r}") + keep = set(re.findall(r'"\$\{DEVICE\}" == "(\w+)"', test.group("test"))) + for alternatives in re.findall(r'"\$\{DEVICE\}" =~ \^\(([\w|]+)\)\$', test.group("test")): + keep.update(alternatives.split("|")) + if not keep: + raise RuntimeError(f"{META_MK}: the test adding the extra cores names no device") + return listed.group(1).split(), keep + + +def without_cores(es_systems: str, cores: list[str]) -> str: + """es_systems.cfg as makeinstall_target leaves it on a device without them.""" + for core in cores: + if core == "melonds": + es_systems = _EMULATOR_BLOCK_RE.sub( + lambda block: "" if "melonds" in block.group(0) else block.group(0), + es_systems, + ) + es_systems = es_systems.replace(f"{core}", "") + return es_systems + + +def device_cores(es_systems: str, extra: list[str], keeps_extra: bool) -> list[str]: + """Every core and standalone emulator one device's es_systems.cfg offers.""" + text = es_systems if keeps_extra else without_cores(es_systems, extra) + cores, _standalone, _dual = es_cores( + xml_systems(text), RUNNERS, BUILDS_OF, _not_cores(PLATFORM_NAME) + ) + return sorted(set(cores)) + + +class Scraper(BaseTargetScraper): + """Per-device core lists from AmberELEC's metapackage.""" + + def __init__(self, url: str = "https://github.com/AmberELEC/AmberELEC") -> None: + super().__init__(url=url) + self.ref = "" + + def _raw(self, path: str) -> str: + return fetch_bytes(f"{RAW_BASE.format(ref=self.ref)}/{path}").decode("utf-8") + + def fetch_targets(self) -> dict: + self.ref = self.pinned_revision(PLATFORM_NAME) + extra, keep = extra_cores(self._raw(META_MK)) + es_systems = fetch_bytes(ES_SYSTEMS_TEMPLATE.format(ref=self.ref)).decode("utf-8") + targets: dict[str, dict] = {} + for device, arch in sorted(devices(self._raw("Makefile")).items()): + cores = device_cores(es_systems, extra, device in keep) + targets[device.lower()] = {"architecture": arch, "cores": cores} + print(f" {device.lower()} ({arch}): {len(cores)} cores", file=sys.stderr) + return { + "platform": PLATFORM_NAME, + "source": f"{self.url}/blob/{self.ref}/{META_MK}", + "scraped_at": datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ"), + "targets": targets, + } + + +def main() -> None: + parser = argparse.ArgumentParser( + allow_abbrev=False, description="Scrape AmberELEC per-device cores" + ) + parser.add_argument("--dry-run", action="store_true", help="Show target summary") + parser.add_argument("--output", "-o", help="Output YAML file") + args = parser.parse_args() + + scraper = Scraper() + data = scraper.fetch_targets() + if args.dry_run: + for name, info in data["targets"].items(): + print(f" {name} ({info['architecture']}): {len(info['cores'])} cores") + return + if args.output: + scraper.write_output(data, args.output) + print(f"Written to {args.output}") + return + print(yaml.dump(data, default_flow_style=False, sort_keys=False)) + + +if __name__ == "__main__": + main() diff --git a/tests/test_amberelec_targets.py b/tests/test_amberelec_targets.py new file mode 100644 index 000000000..3724fd0d5 --- /dev/null +++ b/tests/test_amberelec_targets.py @@ -0,0 +1,102 @@ +"""AmberELEC's images differ by device, and only its metapackage says how. + +packages/amberelec/package.mk adds LIBRETRO_CORES_EXTRA (melonDS, bsnes, +Mesen, geolith) on RG552, RG353 and RG503 and deletes those cores from +es_systems.cfg everywhere else. With no target list, an RG351P pack carried +the firmware of cores its image never had. +""" + +from __future__ import annotations + +import sys +import unittest +from pathlib import Path + +REPO_ROOT = Path(__file__).resolve().parents[1] +sys.path.insert(0, str(REPO_ROOT / "scripts")) + +from scraper.targets import amberelec_targets_scraper as scraper # noqa: E402 + +MAKEFILE = """RG351P: +\tDEVICE=RG351P ARCH=aarch64 ./scripts/build_distro + +RG552: +\tDEVICE=RG552 ARCH=aarch64 ./scripts/build_distro + +toolchain-RK3326: +\tDEVICE=RK3326 ARCH=aarch64 ./scripts/build toolchain +""" + +PACKAGE_MK = """ LIBRETRO_CORES_EXTRA="bsnes melonds" + + PKG_EMUS="${LIBRETRO_CORES}" + + if [[ "${DEVICE}" == "RG552" || "${DEVICE}" =~ ^(RG353|RG503)$ ]]; then + PKG_EMUS+=" ${LIBRETRO_CORES_EXTRA}" + fi + +makeinstall_target() { + for CORE in ${LIBRETRO_CORES_EXTRA}; do + if [[ $CORE == "melonds" ]]; then + sed -i -e '//!ba;/melonds/d}' es_systems.cfg + fi + sed -i "s|$CORE||g" es_systems.cfg + done +} +""" + +ES_SYSTEMS = """ + + snes + + + + snes9x + bsnes + + + + + + nds + + + + melonds + + + + + drastic + + + + + +""" + + +class TheMetapackageDecidesEachDevice(unittest.TestCase): + def test_devices_are_the_images_the_makefile_builds(self): + self.assertEqual(scraper.devices(MAKEFILE), {"RG351P": "aarch64", "RG552": "aarch64"}) + + def test_the_extra_cores_and_their_devices(self): + extra, keep = scraper.extra_cores(PACKAGE_MK) + self.assertEqual(extra, ["bsnes", "melonds"]) + self.assertEqual(keep, {"RG552", "RG353", "RG503"}) + + def test_a_device_without_them_loses_their_cores(self): + extra, _keep = scraper.extra_cores(PACKAGE_MK) + full = scraper.device_cores(ES_SYSTEMS, extra, True) + lean = scraper.device_cores(ES_SYSTEMS, extra, False) + self.assertEqual(set(full) - set(lean), {"bsnes", "melonds"}) + self.assertIn("drastic", lean) + + def test_a_changed_removal_stops_the_scrape(self): + changed = PACKAGE_MK.replace('sed -i "s|$CORE||g"', "true") + with self.assertRaises(RuntimeError): + scraper.extra_cores(changed) + + +if __name__ == "__main__": + unittest.main() diff --git a/tests/test_install.py b/tests/test_install.py index f36389a1e..0ea26705f 100644 --- a/tests/test_install.py +++ b/tests/test_install.py @@ -3420,7 +3420,8 @@ class ACardPreparedOnAComputerGetsItsBoard(unittest.TestCase): class APlatformWithoutTargetsSaysSoOffline(unittest.TestCase): """Offline, --target on AmberELEC asked for install/targets/amberelec.json, - which exists nowhere: online the same run says it has no targets.""" + which existed nowhere: online the same run said it had no targets. + EmuELEC has none still.""" def test_the_list_matches_the_published_targets(self): published = {path.stem for path in (REPO_ROOT / "install" / "targets").glob("*.json")} @@ -3428,16 +3429,16 @@ class APlatformWithoutTargetsSaysSoOffline(unittest.TestCase): def test_offline_says_there_are_no_targets(self): dest = Path(_tempdir(self)) - for extra in ([], ["--manifest", str(REPO_ROOT / "install" / "amberelec.json")]): + for extra in ([], ["--manifest", str(REPO_ROOT / "install" / "emuelec.json")]): with self.subTest(manifest=bool(extra)): proc = subprocess.run( - [sys.executable, str(REPO_ROOT / "install.py"), "--platform", "amberelec", + [sys.executable, str(REPO_ROOT / "install.py"), "--platform", "emuelec", "--dest", str(dest), "--target", "rk3326", "--offline", "--no-input", "--dry-run", *extra], capture_output=True, text=True, timeout=120, stdin=subprocess.DEVNULL) self.assertEqual(proc.returncode, 2, proc.stderr) - self.assertIn("AmberELEC has no hardware targets", proc.stderr) - self.assertNotIn("targets/amberelec.json", proc.stderr) + self.assertIn("EmuELEC has no hardware targets", proc.stderr) + self.assertNotIn("targets/emuelec.json", proc.stderr) class TheBoardTheSystemNamesIsTheTarget(unittest.TestCase): @@ -3492,6 +3493,17 @@ class TheBoardTheSystemNamesIsTheTarget(unittest.TestCase): .read_text(encoding="utf-8")) self.assertLessEqual({*install._RPI_MODELS.values(), "x86_64"}, set(targets)) + def test_amberelec_names_its_device(self): + # An RG351P image carries no melonDS or bsnes, and the full list was + # installed: AmberELEC had no target list to read the device against. + with unittest.mock.patch.object( + install, "_parse_os_release", return_value={"COREELEC_DEVICE": "RG351P"} + ): + self.assertEqual(install.detect_board("amberelec"), "rg351p") + targets = json.loads((REPO_ROOT / "install" / "targets" / "amberelec.json") + .read_text(encoding="utf-8")) + self.assertIn("rg351p", targets) + def test_lakka_names_its_device_or_its_project(self): # An RPi4 Lakka installed 5.7 GB of every board's files: its board # was in os-release and never read. diff --git a/wiki/tools.md b/wiki/tools.md index dab60e5b0..a42c26adb 100644 --- a/wiki/tools.md +++ b/wiki/tools.md @@ -1701,6 +1701,7 @@ Located in `scripts/scraper/targets/`. Each inherits `BaseTargetScraper` and imp | `knulli_targets_scraper` | the same, read from KNULLI's tree and Buildroot fork | board | | `recalbox_targets_scraper` | board defconfigs + system.ini cores | board | | `rocknix_targets_scraper` | emulators package.mk + device options | device | +| `amberelec_targets_scraper` | Makefile devices + metapackage extra cores + es_systems.cfg | device | | `lakka_targets_scraper` | libretro_cores package.mk + project and device options | device image | | `emudeck_targets_scraper` | EmuScripts (SteamOS and Windows) | operating system | | `retropie_targets_scraper` | scriptmodules + rp_module_flags | platform flag |