Skip to content

lynxis/bbb_screwdriver_builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BBB screwdriver

A tool for coreboot developers and users. The firmware itself is based on vanilla OpenWRT Chaos Calmer with some modifications. This firmware is mainly intended for beagle bone black (BBB).

Release Note 0.3.0 "screwdriver" - 2015-10-15

  • SDCard only release
  • USB debug gadget on USB
  • flashrom support
  • SPI pins are 17/18 21/22 on P9. 1/2 GND, 3/4 VCC 3.3V.
  • based on OpenWRT Chaos Calmer release rev r47050

Known Bugs

  • some old bbb won't boot (from sd card). Wiping the eMMC fixes this problem.

Install the screwdriver on your BBB

You have to copy it raw on a sd card. The screwdriver can not (yet) installed on the eMMC. Under linux you can use dd.

WARNING If you choose a wrong X you can damage your OS!!!

dd if=openwrt-0.3-omap-beagleboneblack-sdcard-vfat-am335x_evm.img of=/dev/sdX

How to access to screwdriver?

  • via network
  • via rs232 3.3V TTL

Connecting via network

  • screwdriver provides a dhcp server and is accessable via 192.168.1.1
  • connect network cable
  • username/password root/coreboot
  • ssh root@192.168.1.1

Connect via RS232 3.3V

  • connect a 3.3V serial adapter to pin 1 GND, 4 & 5 data
  • no password required

How to flash a chip?

  • flashrom -p linux_spi:dev=/dev/spidev1.0 -r /tmp/foo

BBB Pin on P9 | Pin on SOIC-8 Chip | Description

  1 & 2    |       4            | Ground GND
  3 & 4    |       8            | VCC 3.3 V
  17       |       1            | CS ChipSelect
  18       |       5            | MOSI MasterOutSlaveIn
  21       |       2            | MISO MasterInSlaveOut
  22       |       6            | CLK Clock

VCC is not connected in all cases!!! Be sure you don't power the chip from 2 sources, it's a bad idea!

How to use the screwdriver as USB debug device

cat /dev/ttyGS0 | tee -a /tmp/output

Contact / More information

For questions write a mail to lynxis@fe80.eu or come to irc channel #coreboot on freenode. If you find bugs please report them at: issues

Development

Build Prerequisites

Please take a look at the OpenWrt documentation for a complete and uptodate list of packages for your operating system. Make sure the list contains quilt. We use it for patch management.

On Ubuntu/Debian:

apt-get install git subversion build-essential libncurses5-dev zlib1g-dev gawk \
  unzip libxml-perl flex wget gawk libncurses5-dev gettext quilt python

Building BBB screwdriver

To get the source and build the firmware locally use:

git clone https://github.com/lynxis/bbb_screwdriver_builder
cd firmware
make -j4
# -j4 means it builds with 4 threads at the same time. depends how many cores and threads your machine has.
ls firmwares/omap/default/

The build will take some time. You can improve the build time with build options such as -j <number of cores>. V=s will give more verbose error messages.

An internet connection is required during the build process. A good internet connection can improve the build time.

You need approximately 10GB of space for the build.

Directory Layout

You can find the actual firmware images generated by the ImageBuilder (and the ImageBuilder itself) in firmwares. The layout looks like the following:

firmwares/
    omap/
        OpenWrt-ImageBuilder-....tar.bz2
        default/
           images..
        packages/
           base/
           luci/
           packages/
           routing/

As you notice there are two different versions:

  • default: BBB screwdriver

Creating a release

Every release has a semantic version number;

For a new release, create a new branch. The branch name must be a semantic version number. Make sure you change the semantic version number and, for major releases, the codename in the README and config files (./configs/*)

Also create a tag for every release.

Patches with quilt

Important: all patches should be pushed upstream!

If a patch is not yet included upstream, it can be placed in the patches directory with the quilt tool. Please configure quilt as described in the openwrt wiki (which also provides a documentation of quilt).

Add, modify or delete a patch

In order to add, modify or delete a patch run:

make clean pre-patch

Then switch to the openwrt directory:

cd openwrt

Now you can use the quilt commands as described in the openwrt wiki.

Example: add a patch
quilt push -a                 # apply all patches
quilt new 008-awesome.patch   # tell quilt to create a new patch
quilt edit somedir/somefile1  # edit files
quilt edit somedir/somefile2
quilt refresh                 # creates/updates the patch file

Submitting patches

BBB screwdriver

Please create a pull request for the project you want to submit a patch.

openwrt

Create a commit in the openwrt directory that contains your change. Use git format-patch to create a patch:

git format-patch origin

Send a patch to the openwrt mailing list with git send-email:

git send-email \
  --to=openwrt-devel@lists.openwrt.org \
  --smtp-server=mail.foo.bar \
  --smtp-user=foo \
  --smtp-encryption=tls \
  0001-a-fancy-change.patch

Additional information: https://dev.openwrt.org/wiki/SubmittingPatches

About

A development util for ehci debug and spi flashing. See http://www.coreboot.org/BBB_screwdriver

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published