Coder Social home page Coder Social logo

ls_a370-uboot_tools's Introduction

U-Boot tools for Linkstation Armada370

  • Tools for splitting an joining the U-boot header on Armada 370 based boards.
  • Tool for for recovering via UART.

Tested only on Linkstation devices based on Marvell Armada 370.

Create uboot.uart (used for recovery):

./kwbimage -x -i u-boot.buffalo-orig -o tmp/  
./mvebuimg -v 1 create -b tmp/binary.0 -o uboot/uboot.uart uart tmp/payload

rm tmp/*

Uboot recovery instructions:

  1. Connect the serial port to the Linkstation LS421DE

  2. At the PC execute:
    ./kwboot -b uboot/uboot.uart -t -B 115200 /dev/ttyUSB0

  3. Power on the Linkstation, wait for it to load.

  4. At the Uboot console execute:
    bubt uboot-spi.bak

Create uboot with a RAM initialization header from another uboot:

./kwbimage -x -i uboot/u-boot.buffalo-orig -o tmp/
mv tmp/payload tmp/payload.orig

./kwbimage -x -i uboot/u-boot.buffalo-1.34_voodoo -o tmp/
./mvebuimg -v 1 create -b tmp/binary.0 -o uboot/uboot-voodoo.spi spi tmp/payload.orig
rm tmp/*

doimage:

mvebuimg may create a non working bootloader, in this case we can use doimage which is able to recreate the original bootloader (exact copy).

With doimage first we need to prepend 12 bytes to the binary.0 header, for some reason they're lost when kwbimage splits the bootloader.

In the Buffalo LS421DE, these bytes are: 020000005B00000068000000 (offsets 0x24-0x2f)
In the Buffalo LS220DE, these bytes are: 020000005B00000000000000 (offsets 0x24-0x2f)

  • Command example for using doimage with u-boot 1.34:
echo -ne \\x02\\x00\\x00\\x00\\x5B\\x00\\x00\\x00\\x68\\x00\\x00\\x00 > binary.1
cat binary.0 >> binary.1

./doimage -T flash -D 0x600000 -E 0x6A0000 -G binary.1 payload u-boot.bin
  • For LS421DE 1.84, LS220DE 0.38:
./doimage -T flash -D 0x0 -E 0x0 -G binary.1 payload u-boot.bin

ls_a370-uboot_tools's People

Contributors

danitool avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

erdoukki

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.