Skip to content

synan-mannan/BB_Imager_WASM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BB_Imager_WASM

A web-based tool to flash BeagleBoard images to OMAP devices via USB. This application runs entirely in the browser using WebAssembly and the WebUSB API.

BeagleBoard

Overview

BB_Imager_WASM is a WebUSB-based flashing tool that allows users to:

  • Download official BeagleBoard images directly from the web
  • Flash custom image files to OMAP devices via USB
  • Monitor the flashing process in real-time

Technology Stack

  • Frontend: HTML5, CSS3, JavaScript (ES6+)
  • WASM Module: Rust compiled to WebAssembly using wasm-bindgen
  • USB Communication: WebUSB API
  • Build System: Cargo (Rust)

Project Structure

BB_Imager_WASM/
├── index.html          # Main HTML page with UI
├── style.css           # Styling for the application
├── script.js           # JavaScript for download and USB flashing
├── Cargo.toml          # Rust project configuration
├── src/
│   └── lib.rs          # Rust code for USB boot protocol
└── README.md           # This file

Prerequisites

For Development/Building

  1. Rust - Install from rustup.rs
  2. wasm-pack - Install via:
    cargo install wasm-pack

For Running the Application

  • A modern web browser with WebUSB support (Chrome, Edge, Opera)
  • An OMAP-based device (BeagleBoard/BeagleBone) in USB boot mode
  • Appropriate USB permissions configured

Building

  1. Build the WASM module:

    wasm-pack build --target web
  2. Serve the application using a local web server:

    # Using Python
    python -m http.server 8080
    
    # Using Node.js
    npx serve .
  3. Open http://localhost:8080 in your browser

Usage

Downloading Images

  1. Open the application in a WebUSB-compatible browser
  2. Select an image source (Official BeagleBoard Repository)
  3. Choose an image from the available list
  4. Click "Download Selected" to download the image

Flashing to Device

  1. Connect your BeagleBoard/BeagleBone device in USB boot mode
  2. Click "Select Image File" and choose your image file (.bin, .img, .hex, .xz)
  3. Click "Connect & Flash" to begin the flashing process
  4. Monitor the progress in the log window

Note: The device must be in USB boot mode. Consult your BeagleBoard documentation for instructions on entering boot mode.

Features

Image Downloader

  • Browse available BeagleBoard images
  • Download images directly from official sources
  • Display image metadata (name, size)

USB Flasher

  • WebUSB-based device communication
  • Real-time progress logging
  • Support for various image formats
  • Automatic USB endpoint detection

WASM Module (Rust)

The Rust module provides low-level USB boot protocol functions:

  • block_size() - Returns the USB block size (512 bytes)
  • boot_command() - Generates the OMAP boot command
  • image_length_packet() - Creates length packet for image transfer
  • raw_chunk() - Pads data chunks to block size

Browser Compatibility

Browser WebUSB Support
Chrome Full Support
Edge Full Support
Opera Full Support
Firefox Limited/No
Safari Limited/No

Troubleshooting

USB Device Not Found

  • Ensure the device is in USB boot mode
  • Try a different USB cable
  • Check USB driver installation

Permission Denied

  • On Linux, you may need to add udev rules
  • On Windows, ensure appropriate drivers are installed

Flashing Fails

  • Verify the image file is compatible with your device
  • Check that the device has sufficient storage
  • Ensure stable USB connection

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests.

License

This project is for educational and development purposes. Refer to BeagleBoard's official images for their respective licenses.

Acknowledgments

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors