{"id":20933071,"url":"https://github.com/superna9999/pyamlboot","last_synced_at":"2025-04-04T04:03:56.035Z","repository":{"id":47697157,"uuid":"137770316","full_name":"superna9999/pyamlboot","owner":"superna9999","description":"Amlogic USB Boot Protocol Library","archived":false,"fork":false,"pushed_at":"2024-10-03T11:24:35.000Z","size":14990,"stargazers_count":96,"open_issues_count":7,"forks_count":37,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-28T03:07:39.181Z","etag":null,"topics":["amlogic","boot","u-boot","usb"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pyamlboot/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/superna9999.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":"ROADMAP","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-18T15:29:15.000Z","updated_at":"2025-03-14T12:25:40.000Z","dependencies_parsed_at":"2024-05-01T17:13:36.827Z","dependency_job_id":"5eaee96b-aafa-4fe9-b8d2-9b3cd6e619d7","html_url":"https://github.com/superna9999/pyamlboot","commit_stats":{"total_commits":55,"total_committers":5,"mean_commits":11.0,"dds":0.2727272727272727,"last_synced_commit":"ffaaad9503192ece98970b7100a03c54ba58befc"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superna9999%2Fpyamlboot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superna9999%2Fpyamlboot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superna9999%2Fpyamlboot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/superna9999%2Fpyamlboot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/superna9999","download_url":"https://codeload.github.com/superna9999/pyamlboot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247117757,"owners_count":20886439,"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":["amlogic","boot","u-boot","usb"],"created_at":"2024-11-18T21:54:20.023Z","updated_at":"2025-04-04T04:03:55.978Z","avatar_url":"https://github.com/superna9999.png","language":"Python","readme":"\u003c!--- SPDX-License-Identifier: Apache-2.0 OR MIT --\u003e\n\n# pyamlboot: Amlogic SoC USB Boot utility\n\nThe Amlogic SoCs have a USB Boot mode setting itself in USB Gadget mode with a custom protocol.\n\nThe protocol reverse engineering can be found in the [PROTOCOL.md](PROTOCOL.md) file.\n\nA library `pyamlboot` provides all the calls provided by the USB protocol, and the `boot.py` permit booting from the SoC ROM in USB Boot mode.\n\n## Installation\n\n### From PyPi\n\n```\npip3 install pyamlboot\n```\n\n### From GitHub master branch\n\n```\npip3 install git+https://github.com/superna9999/pyamlboot\n```\n\n## For development\n\n```\ngit clone https://github.com/superna9999/pyamlboot\n```\n\n## S905X2/S905D2/S905X3/S905D3/A311D/S922X Protocol\n\nThe G12A, G12B \u0026 SM1 uses a specific USB Boot protocol, implemented in the `boot-g12.py` tool.\n\n### Supported Boards\n\n- Odroid-C4, N2, N2+\n\nThe Micro USB is used to communicate with the Boot ROM.\n\nSwitch the N2 in eMMC mode, and remove eMMC \u0026 SDCard.\nRemove eMMC \u0026 SDCard of Odroid-C4.\n\n- Khadas VIM3/VIM3L\n\nThe USB-C is used to power and communicate with the Boot ROM.\n\nFollow https://docs.khadas.com/vim3/HowtoBootIntoUpgradeMode.html#TST-Mode-Recommended\n\n### Command\n\n```\nusage: boot-g12.py [-h] [--version] binary\n\nUSB boot tool for Amlogic G12 SoCs\n\npositional arguments:\n  binary         binary to load\n\noptional arguments:\n  -h, --help     show this help message and exit\n  --version, -v  show program's version number and exit\n```\n\nThe G12 protocol doesn't permit loading Linux \u0026 a ROOTFS from memory, please setup U-Boot\nto load Linux \u0026 a ROOTFS by Ethernet or Fastboot via USB or Ethernet.\n\n```\nsudo ./boot-g12.py /path/to/u-boot.bin\n```\n\nThe `u-boot.bin` is the file generate by the Amlogic Tools after the `mkboot` stage.\n\n## S905X/S912/A113D Protocol\n\nThe GXL, GXM \u0026 GXBB uses a specific USB Boot protocol, implemented in the `boot.py` tool.\n\n### Supported Boards\n\n- Libretech-CC (Le Potato)\n\nRemove the SDCard \u0026 eMMC\nConnect a Serial2USB cable to the UART pins to see the boot log\nConnect a USB Type-A to Type-A cable to the top USB Connector right next to the Ethernet connector\n\n```\nPlug into this USB port\n        \\/\n  ___   __   __\n |   | |__| |__|\n |___| |__| |__|\n-----------------\n```\n\n- Libretech-AC (La Frite)\n\nRemove the eMMC \u0026 erase the SPI Flash first sectors.\nConnect a Serial2USB cable to the UART pins to see the boot log\nConnect a USB Type-A to Type-A cable to the top USB Connector right next to the Ethernet connector\n\n```\nPlug into this USB port\n         \\/\n    __   __\n---|  |-|  |-----\n|             ::|\n|             ::|\n|             ::|\n|             ::|\n\n```\n\n- Khadas VIM \u0026 VIM2 \n\nThe USB-C is used to power and communicate with the Boot ROM.\n\nFor Khadas-VIM, follow https://docs.khadas.com/vim1/HowtoBootIntoUpgradeMode.html#TST-Mode-Recommended\n\nFor Khadas-VIM2, follow https://docs.khadas.com/vim2/HowtoBootIntoUpgradeMode.html#TST-Mode-v1-4-only\n\n### Command\n\n```\nusage: boot.py [-h] [--version] [--board-files UPATH] [--image IMAGEFILE] [--script SCRIPTFILE]\n               [--fdt DTBFILE] [--ramfs RAMFSFILE]\n               {khadas-vim3,q200,libretech-ac,s400,khadas-vim2,libretech-cc,khadas-vim}\n\nUSB boot tool for Amlogic\n\npositional arguments:\n  {khadas-vim3,q200,libretech-ac,s400,khadas-vim2,libretech-cc,khadas-vim}\n                        board type to boot on\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --version, -v         show program's version number and exit\n  --board-files UPATH   Path to Board files (default: None)\n  --image IMAGEFILE     image file to load (default: None)\n  --script SCRIPTFILE   script file to load (default: None)\n  --fdt DTBFILE         dtb file to load (default: None)\n  --ramfs RAMFSFILE     ramfs file to load (default: None)\n```\n\nExample from a Linux build directory:\n```\nsudo ./boot.py --image arch/arm64/boot/Image --fdt arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dtb --ramfs /path/to/rootfs.cpio.uboot --script boot.scr libretech-cc\n```\n\nReplace le board name, here `libretech-cc` by the board you want to boot.\n\nA cpio initramfs in uboot format as `rootfs.cpio.uboot` is used in the example, can be built\nusing Buildroot.\n\nEventually change `boot.cmd` to add more commands before booting linux\n\nIf `boot.cmd` changed, run :\n\n```\nmkimage -C none -A arm -T script -d boot.cmd boot.scr\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperna9999%2Fpyamlboot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsuperna9999%2Fpyamlboot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsuperna9999%2Fpyamlboot/lists"}