{"id":16836457,"url":"https://github.com/platform-system-interface/aml_boot","last_synced_at":"2025-04-11T05:10:47.203Z","repository":{"id":180787648,"uuid":"665700633","full_name":"platform-system-interface/aml_boot","owner":"platform-system-interface","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-17T19:12:24.000Z","size":42,"stargazers_count":11,"open_issues_count":1,"forks_count":3,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-25T03:12:31.608Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/platform-system-interface.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-12T19:50:58.000Z","updated_at":"2025-02-13T18:22:25.000Z","dependencies_parsed_at":null,"dependency_job_id":"a3bada8e-9058-439e-a389-e73d1b5f42cf","html_url":"https://github.com/platform-system-interface/aml_boot","commit_stats":null,"previous_names":["orangecms/aml_boot","platform-system-interface/aml_boot"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/platform-system-interface%2Faml_boot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/platform-system-interface%2Faml_boot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/platform-system-interface%2Faml_boot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/platform-system-interface%2Faml_boot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/platform-system-interface","download_url":"https://codeload.github.com/platform-system-interface/aml_boot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248345266,"owners_count":21088244,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T12:13:32.099Z","updated_at":"2025-04-11T05:10:47.171Z","avatar_url":"https://github.com/platform-system-interface.png","language":"Rust","readme":"# Amlogic Boot Tool\n\nThis tool talks to Amlogic's mask ROM loader over USB.\n\n## Accessing the loader\n\nMany SBCs have a button to press on power-on to enter the loader mode. Some\nproducts may come with a button as well or require entering certain commands\ninto the stock bootloader. We have found them to be an inconsistent mess. 🤷\n\n## Compatibility\n\nSoCs up to generation 3 (S905X, S905X2, S905{X,Y,D}3, etc) should be supported.\nThose show as product string \"GX-CHIP\".\n\nOn some platforms, the commands may (partially) not work or behave different.\n\n**NOTE: Since the protocols are not public, we had to find our ways.\nContributions and opening issues are welcome.**\n\nFor details, see the sections on [how we got there](#how-we-got-there) and the\n[protocol versions](#protocol-versions).\n\n## Building\n\nHave a Rust toolchain installed with Cargo.\n\n```sh\ncargo build --release\n```\n\n## Preparation\n\nYou need to have udev rules for Amlogic devices installed to access them as a\nregular user. Copy `70-amlogic.rules` into `/etc/udev/rules.d/`.\n\n## Usage\n\n```\n./target/release/aml_boot\n```\n\nOr directly:\n\n```\ncargo run --release\n```\n\nThis will print help on the CLI usage.\n\nYou can work on the code and directly run it to see if your changes work, e.g.:\n\n```sh\ncargo run --release -- info\n```\n\nNote the `--` to escape from Cargo.\n\n## How we got there\n\nThis tool has been stated one evening at [Chaospott](https://chaospott.de), in\npart to get familiar with the protocol and have our own clean slate code base.\n\nWe had a look at existing tools which were either lacking some features or just\nerrored for the boards we tried them with. Memory read/write are still erroring.\nExamples are a TV box based on the S905X4 (different protocol?) and the Libre\nComputer S905D3-CC.\n\nThe Khadas VIM1 and Libre Computer A311D-CC work fine, e.g., blinky demo:\n\n```sh\naml_boot blinky khadas-vim1\naml_boot blinky lc-a311d-cc\n```\n\nNote that other authors have already done a lot and documented their findings.\nBig kudos to Neil Armstrong and others who did all the hard work before us. :)\nLook at [proto-rev.md](proto-rev.md) for notes on previous and our work.\n\n### Previous work\n\nSee \u003chttps://github.com/superna9999/pyamlboot\u003e for reference.\n\nCorresponding talk by Neil Armstrong at Embedded Linux Conference Europe 2020:\n\u003chttps://www.youtube.com/watch?v=u0-swEMDFp0\u003e\n\n\u003e U-Boot: Porting and Maintaining a Bootloader for a Multimedia SoC Family\n\nSlides:\n\u003chttps://elinux.org/images/e/ef/ELC-E_2020_U-Boot_porting_and_maintaining_a_bootloader_for_a_multimedia_SoC_family.pdf\u003e\n\nFrederic B has dumped the S905D3 mask ROM and found vulnerabilities.\n\n\u003chttps://fredericb.info/2021/02/dump-amlogic-s905d3-bootrom-from-khadas-vim3l-board.html\u003e\n\n\u003chttps://fredericb.info/2021/02/amlogic-usbdl-unsigned-code-loader-for-amlogic-bootrom.html\u003e\n\n## Protocol versions\n\nSo, there _is_ now a newer protocol, as people write.\n\n[Sean Hoyt](https://twitter.com/Deadman_Android/status/1505570226540355592)\n(Mar 20, 2022):\n\n\u003e As with all newer amlogic soc's it now uses \"Amlogic DNL\" for it's flashing\n\u003e instead of the older World cup update tool. The button on the board can take\n\u003e you to fastboot/recovery or USB burn mode. Currently it is not bootloader\n\u003e unlockable.\n\n[Previous post in thread (with photos)](\nhttps://twitter.com/Deadman_Android/status/1505570224531247105):\n\n\u003e T-Mobile TVision Hub 2nd gen board pics and general info. Specs: Amlogic\n\u003e S905Y4, 2gb of ram (Rayson RS512M32), 8gb emmc 5.1 (Samsung KLM8G1GETF-B041)\n\nSo the mask ROM's protocol has changed from version 4 on (needs verification!)?\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplatform-system-interface%2Faml_boot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplatform-system-interface%2Faml_boot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplatform-system-interface%2Faml_boot/lists"}