BeagleBone Black - screwdriver
The wiki is being retired!
Documentation is now handled by the same processes we use for code: Add something to the Documentation/ directory in the coreboot repo, and it will be rendered to https://doc.coreboot.org/. Contributions welcome!
A tool for coreboot/libreboot/flashrom developers and users. The firmware itself is based on vanilla OpenWrt Chaos Calmer(15.04) with some modifications. This firmware is mainly intended for BeagleBone Black (BBB).
To install screwdriver on the BeagleBone Black you have to create a bootable memory with the screwdriver. In this example we use a Micro-SD card. The card should be at least 128MB big.
1. Download recent screwdriver Version 0.3.0 from http://repo.fe80.eu/screwdriver/0.3.0/omap/generic/default/openwrt-0.3.0-omap-beagleboneblack-sdcard-vfat-am335x_evm.img (sha512sum: 685f72aaa14342c848f15c933ea4f80deb33cd3751457e3e19e3b101659d2b96bae7f7be33b542cfdc4750cdd27e7e47ce35ffba15a5c2e76f8c41e7aad05f69 )
2. Insert the memory you want to install screwdriver on into your computer.
Linux users can check the latest messages in
dmesg and if the memory is listed as /dev/sdb this have to be used together with 'dd' for installation from inside the directory containing the downloaded .img file:
sudo dd if=openwrt-0.3.0-omap-beagleboneblack-sdcard-vfat-am335x_evm.img of=/dev/sdb bs=4M
Windows users have to use additional software like 'Win32 Disk Imager' from here: https://sourceforge.net/projects/win32diskimager/
3. Now you can insert the memory into your BeagleBone Black.
In most cases screwdriver would boot automaticly when the memory is inserted and then the power(external 5V power plug).
Troubleshooting if it does not start automaticly: You can choose between tree solutions.
First and always working solution: Delete/wipe the internal memory of the BeagleBone black. This would force the BeagleBone Black to always boot from the memory you inserted.
Second solution: Pressing and holding every time the 'User Boot' button. This is the button next to the big, regular USB port.
Third solution: Rewrite internal memory to a recent official debian+u-boot image. It boots then automaticly when you insert the screwdriver memory.
There are two recommended ways to connect to the terminal of the screwdriver.
First and always working: Use a USB to TTL (for example CP2104 for about 2$) adapter and connect it to the serial port of the BeagleBone Black.
You have to use just 3 wires. Ground, TX and RX. Connect your ttl-adapter ground to serial pin 1 (the one with the white dot), RX to serial pin 4 and TX to serial pin 5.
For the serial connection you can use for example
minicom -s. In most cases on a linux machine the usb-ttl adapter gets: /dev/ttyUSB0 . The BeagleBone Black default serial speed is 115200.
Second: Use a network cable and ssh. There is a dhcp server (192.168.1.1) running on the screwdriver.
Using screwdriver for flashing SPI flash with flashrom
screwdriver already have flashrom preinstalled and the BeagleBone Black have connectors you can flash SPI flash memory with.
You can flash SPI flash chips that are not 'in-circuit' without the need of additional power source. The light 3,3V rail the BeagleBone Black delivers can power the SPI chip if you power up the BeagleBone Black with at least 5V 1,2A power supply over its round power connector.
This is a good article with pictures how to wire the BeagleBone Black to a SPI flash chip: https://www.linux.com/learn/tutorials/746860-how-to-access-chips-over-the-spi-on-beaglebone-black/
|BeagleBoneBlack||Pin on P9(written next to the big connector board)||SPI||SPI Soic8 Pin||CPU||DTS|
|GND||1 + 2||GND||4||GND||GND|
|VDD_3V3D||3 + 4||VCC||8||VDD_3V3D||VDD_3V3D|
After wiring everything up you can flash with this command:
flashrom -p linux_spi:dev=/dev/spidev1.0 -w yourfile If you get the warning in flashrom that the flash chip is unsupported, you can force the flash with additional '-f' command and if everything worked fine, please directly report a logfile of the flash to the flashrom developers.
Using screwdriver as USB EHCI debugging tool
The BeagleBone Black have a great free(as in freedom) and flexible architecture we can use for USB EHCI debugging. It have to be powered by external power supply over the round power connector. You need: mini-usb cable Connect the mini-usb cable to the EHCI debug port of your device you want to debug coreboot/libreboot on. If you are not sure what usb port is using ehci debug, you can just try all of them out.
To run USB EHCI debugging you have to run:
cat /dev/ttyGS0 | tee -a /tmp/output
Then power on the target you want to debug and you would hopefully see the debug output.
Using screwdriver for flashing SPI flash with flashrom - IN-CIRCUIT
older/outdated screwdriver versions
Version 0.2: http://repo.fe80.eu/screwdriver/0.2/omap/generic/openwrt-0.2-omap-beagleboneblack-sdcard-vfat-am335x_evm.img sha512sum: 26fc145b4b43b2589d500429c3bba379612870a63c2c03388cd663345a7c3a0792efc97cf3546c1e53b5d7eb958d43b9d21a9d6d0e4f13dd03f29878ef8dc753
The official screwdriver development repository: https://github.com/lynxis/bbb_screwdriver_builder
1. how to wire spi chip: http://www.linux.com/learn/tutorials/746860-how-to-access-chips-over-the-spi-on-beaglebone-black/
2. Beagle bone black shematics: https://raw.githubusercontent.com/CircuitCo/BeagleBone-Black/master/BBB_SRM.pdf
3. BeagleBone CPU datasheet: http://www.ti.com/lit/ds/symlink/am3358.pdf
4. am335x CPU technical reference: http://www.ti.com/lit/ug/spruh73l/spruh73l.pdf