Flashing u boot onto the tbs2910
Pages 12
- Home
- Building with Yocto
- Cross compiling toolchain setup
- Flashing u boot onto the tbs2910
- Generate a root file system (image)
- Get, patch and build the kernel
- Get, patch and build u boot
- GPIO fan and blue LED control
- Setting up cpu frequency scaling
- Setting up the internal eMMC
- Switching what you boot from
- WiFi
Clone this wiki locally
You'll need a u-boot.imx file to begin. You can compile this u-boot file yourself as explained elsewhere in this wiki or you can download a precompiled u-boot.imx image that I've released.
Build the u-boot loader tool
This tool sends a u-boot.imx file to the tbs2910 and executes it (it does not flash, just loads the binary to some place in ram and executes it).
git clone https://github.com/boundarydevices/imx_usb_loader.git
cd imx_usb_loader
make
sudo make install
If you have trouble compiling this, make sure you have libusb-devel installed
Prepare the hardware
- Unplug the board's power cable.
- Move the burn/run switch to the burn position.
- Use a USB-mini cable to plug in the port marked OTG into your computer.
- Somehow get the debug console (marked UART) connected to your computer.
I bought
$1.50 - PRT-09916 - JST Jumper 4 Wire Assembly
and
$14.95 - BOB-00718 - Breakout Board for FT232RL USB to Serialfrom www.sparkfun.com
Now I have a usb-rs232 connection to the board's debug UART header.
The board speaks 115200-8-n-1. I get a terminal up withsudo screen /dev/ttyUSB0 115200you might need to use a different tty depending on how you decided to connect to the debug UART header. - Connect the board to your network via ethernet.
- Plug in the board's power cable.
- Some LEDs should illuminate, otherwise nothing should happen.
Flash
You will now send your compiled u-boot.imx to the board's RAM and execute it from there using the imx_usb tool you compiled.
sudo imx_usb --configdir=/usr/etc/imx-loader.d/ u-boot.imxImmediately after issuing this command start mashing your keyboard to spam characters into the the debug console (via UART). You need to catch the "Hit any key to stop autoboot" to get to a u-boot command prompt before the board boots up. FYI -- a successful imx_usb bootstrap command produces this output.
Now at the u-boot command prompt, =>, in the tbs2910 debug terminal issue
run update_uboot
reset
This command flashes the boot partition (1) of the onboard eMMC chip with the u-boot.imx from your TFTP server. It's important that your DHCP server and TFTP server are setup properly for this to work. I don't see any real danger of bricking the device here. The run/burn switch seems like a good way to always have access to recovery mode if you mess something up. After reset nothing should happen.
Switch back to run mode
- Unplug the power cable from your device.
- Move the burn/run switch to the run position.
- Plug in the board's power cable. Upon booting in "run" mode, the tbs2910 is hardwired (literally) to load u-boot.imx starting at byte 1024 of partition 1 of the integrated eMMC chip.
- You can catch the "Hit any key to stop autoboot" to drop into the u-boot shell again.