All Projects → superna9999 → pyamlboot

superna9999 / pyamlboot

Licence: Apache-2.0 license
Amlogic USB Boot Protocol Library

Programming Languages

python
139335 projects - #7 most used programming language
Batchfile
5799 projects

Projects that are alternatives of or similar to pyamlboot

UEFI MULTI
UEFI_MULTI - Make Multi-Boot USB-Drive
Stars: ✭ 33 (-2.94%)
Mutual labels:  usb, boot
Multibootusb
Create multiboot live Linux on a USB disk...
Stars: ✭ 1,042 (+2964.71%)
Mutual labels:  usb, boot
MiniNT5-Tools
small Windows 10 (based on Windows PE) with customised tools
Stars: ✭ 34 (+0%)
Mutual labels:  usb, boot
buddy-linux
Do you remember "Wubi Ubuntu Installer"? This project is both a replacement and an improvement of Wubi. You will be able to install your Debian (or derived) distribution on a PC without repartitioning it, simply by using a secondary/external boot device (like a USB drive).
Stars: ✭ 17 (-50%)
Mutual labels:  usb, boot
GrubFM-Installer
GrubFM Installer
Stars: ✭ 27 (-20.59%)
Mutual labels:  usb, boot
mkosxinstallusb
Linux shell script that creates USB flash drive booting OS X installer
Stars: ✭ 34 (+0%)
Mutual labels:  usb, boot
Glim
GRUB Live ISO Multiboot
Stars: ✭ 452 (+1229.41%)
Mutual labels:  usb, boot
Kindd
A kindful dd, written in qt-quick.
Stars: ✭ 93 (+173.53%)
Mutual labels:  usb, boot
MultiOS-USB
Boot operating systems directly from ISO files
Stars: ✭ 106 (+211.76%)
Mutual labels:  usb, boot
Rufus
The Reliable USB Formatting Utility
Stars: ✭ 16,917 (+49655.88%)
Mutual labels:  usb, boot
Multiboot-Toolkit
Create a bootable disk
Stars: ✭ 96 (+182.35%)
Mutual labels:  usb, boot
node-beagle-boot
A node.js USB bootloader server for BeagleBone for booting it into mass storage mode
Stars: ✭ 17 (-50%)
Mutual labels:  usb, boot
bananapi-zero-ubuntu-base-minimal
BananaPi M2 Zero - Ubuntu Focal Base Minimal Image (Experimental) - U-Boot 2017.09 / Kernel 4.18.y / Kernel 4.19.y / Kernel 4.20.y / Kernel 5.3.y / Kernel 5.6.y / Kernel 5.7.y / Kernel 5.11.y
Stars: ✭ 77 (+126.47%)
Mutual labels:  boot, u-boot
libusbp
The Pololu USB Library (also known as libusbp) is a cross-platform C library for accessing USB devices.
Stars: ✭ 65 (+91.18%)
Mutual labels:  usb
usb
Communicate with USB devices
Stars: ✭ 28 (-17.65%)
Mutual labels:  usb
React-Springboot-App
Spring Boot is an open source Java-based framework used to create a micro Service. It is developed by Pivotal Team and is used to build stand-alone and production ready spring applications and React is a free and open-source front-end JavaScript library for building user interfaces based on UI components.
Stars: ✭ 22 (-35.29%)
Mutual labels:  boot
fusee-nano
A minimalist re-implementation of the Fusée Gelée exploit (http://memecpy.com), designed to run on embedded Linux devices. (Zero dependencies)
Stars: ✭ 49 (+44.12%)
Mutual labels:  usb
c-sharp
ymodem bootloader
Stars: ✭ 41 (+20.59%)
Mutual labels:  boot
xone
Linux kernel driver for Xbox One and Xbox Series X|S accessories
Stars: ✭ 636 (+1770.59%)
Mutual labels:  usb
no2muacm
Drop In USB CDC ACM core for iCE40 FPGA
Stars: ✭ 26 (-23.53%)
Mutual labels:  usb

pyamlboot: Amlogic SoC USB Boot utility

The Amlogic SoCs have a USB Boot mode setting itself in USB Gadget mode with a custom protocol.

The protocol reverse engineering can be found in the PROTOCOL.md file.

A 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.

Installation

From PyPi

pip3 install pyamlboot

From GitHub master branch

pip3 install git+https://github.com/superna9999/pyamlboot

For development

git clone https://github.com/superna9999/pyamlboot

S905X2/S905D2/S905X3/S905D3/A311D/S922X Protocol

The G12A, G12B & SM1 uses a specific USB Boot protocol, implemented in the boot-g12.py tool.

Supported Boards

  • Odroid-C4, N2, N2+

The Micro USB is used to communicate with the Boot ROM.

Switch the N2 in eMMC mode, and remove eMMC & SDCard. Remove eMMC & SDCard of Odroid-C4.

  • Khadas VIM3/VIM3L

The USB-C is used to power and communicate with the Boot ROM.

Follow https://docs.khadas.com/vim3/HowtoBootIntoUpgradeMode.html#TST-Mode-Recommended

Command

usage: boot-g12.py [-h] [--version] binary

USB boot tool for Amlogic G12 SoCs

positional arguments:
  binary         binary to load

optional arguments:
  -h, --help     show this help message and exit
  --version, -v  show program's version number and exit

The G12 protocol doesn't permit loading Linux & a ROOTFS from memory, please setup U-Boot to load Linux & a ROOTFS by Ethernet or Fastboot via USB or Ethernet.

sudo ./boot-g12.py /path/to/u-boot.bin

The u-boot.bin is the file generate by the Amlogic Tools after the mkboot stage.

S905X/S912/A113D Protocol

The GXL, GXM & GXBB uses a specific USB Boot protocol, implemented in the boot.py tool.

Supported Boards

  • Libretech-CC (Le Potato)

Remove the SDCard & eMMC Connect a Serial2USB cable to the UART pins to see the boot log Connect a USB Type-A to Type-A cable to the top USB Connector right next to the Ethernet connector

Plug into this USB port
        \/
  ___   __   __
 |   | |__| |__|
 |___| |__| |__|
-----------------
  • Libretech-AC (La Frite)

Remove the eMMC & erase the SPI Flash first sectors. Connect a Serial2USB cable to the UART pins to see the boot log Connect a USB Type-A to Type-A cable to the top USB Connector right next to the Ethernet connector

Plug into this USB port
         \/
    __   __
---|  |-|  |-----
|             ::|
|             ::|
|             ::|
|             ::|

  • Khadas VIM & VIM2

The USB-C is used to power and communicate with the Boot ROM.

For Khadas-VIM, follow https://docs.khadas.com/vim1/HowtoBootIntoUpgradeMode.html#TST-Mode-Recommended

For Khadas-VIM2, follow https://docs.khadas.com/vim2/HowtoBootIntoUpgradeMode.html#TST-Mode-v1-4-only

Command

usage: boot.py [-h] [--version] [--board-files UPATH] [--image IMAGEFILE] [--script SCRIPTFILE]
               [--fdt DTBFILE] [--ramfs RAMFSFILE]
               {khadas-vim3,q200,libretech-ac,s400,khadas-vim2,libretech-cc,khadas-vim}

USB boot tool for Amlogic

positional arguments:
  {khadas-vim3,q200,libretech-ac,s400,khadas-vim2,libretech-cc,khadas-vim}
                        board type to boot on

optional arguments:
  -h, --help            show this help message and exit
  --version, -v         show program's version number and exit
  --board-files UPATH   Path to Board files (default: None)
  --image IMAGEFILE     image file to load (default: None)
  --script SCRIPTFILE   script file to load (default: None)
  --fdt DTBFILE         dtb file to load (default: None)
  --ramfs RAMFSFILE     ramfs file to load (default: None)

Example from a Linux build directory:

sudo ./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

Replace le board name, here libretech-cc by the board you want to boot.

A cpio initramfs in uboot format as rootfs.cpio.uboot is used in the example, can be built using Buildroot.

Eventually change boot.cmd to add more commands before booting linux

If boot.cmd changed, run :

mkimage -C none -A arm -T script -d boot.cmd boot.scr
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].