<p>Hi all,</p>
<p>I would like to announce that I ported coreboot to the Bifferboard.</p>
<p><a href="http://coreboot.org">coreboot</a> is a Free Software project aimed at replacing the proprietary BIOS (firmware) found in most computers. coreboot performs a little bit of hardware initialization and then executes additional boot logic, called a payload.</p>
<p>coreboot can carry various payloads, for example <a href="http://www.seabios.org/">SeaBIOS</a> or even <a href="http://www.denx.de/wiki/U-Boot/">U-Boot</a> (this is new and not yet tested with the Bifferboard). SeaBIOS provides classic BIOS services, and it is used mainly with <a href="http://www.qemu.org">QEMU</a>, but coreboot uses SeaBIOS with real hardware.</p>
<p>The main advantage in my opinion is to be able to boot from USB natively. With SeaBIOS, the Bifferboard can boot your kernel from an USB medium. There is no need to have the kernel in Bifferboard’s limited flash!</p>
<p>I will have a look how to stick U-Boot to that, so it is more similar to Biffboot. This email is more like an announcement that something like this is possible. Maybe someone interested, could give it a try or even contribute to this.</p>
<p>Please note that I bricked the Bifferboard many times, therefore a serial line interface and JTAG is a must have for the beginning.</p>
<p>I implemented a support to <a href="http://flashrom.org">flashrom</a>, which is a userspace flashing tool.</p>
<p>Also coreboot’s current revision and SeaBIOS (stable) support the Bifferboard.</p>
<h2 id="instructions-for-testing">Instructions for testing</h2>
<h3 id="precautions">Precautions</h3>
<p>Make sure you can recover from bricked Bifferboard.</p>
<h3 id="get-and-build-coreboot">Get and build coreboot</h3>
<p>Clone the Git repository:</p>
<pre><code>git clone http://review.coreboot.org/p/coreboot</code></pre>
<p>Now go to <code>util/crossgcc</code> and build a GCC toolchain by running <code>./buildgcc</code>. This is needed since typically Ubuntu’s binutils are broken. You can skip this step of course.</p>
<p>Now configure everything with Kconfig.</p>
<pre><code>make menuconfig</code></pre>
<p>Select <em>Bifferos/Bifferboad</em> in the Mainboard menu and in the Payload menu choose <em>SeaBIOS</em>.</p>
<p>Please note that you will have to ommit various features to fit everything into 64 KB. But the default ROM chip size is 128 KB which should be enough.</p>
<p>After this step, run <code>make</code> to build the image.</p>
<p><code>build/coreboot.rom</code> is a 128 KB file with coreboot and SeaBIOS combined. Please note that you can even add other payloads like kernels if you wish.</p>
<h3 id="build-flashrom">Build Flashrom</h3>
<p>Now on your Bifferboard, build <a href="http://flashrom.org/Downloads">Flashrom</a>.</p>
<pre><code>svn co svn://flashrom.org/flashrom/trunk flashrom
cd flashrom
make
sudo make install # You can also run the binary from the build folder.</code></pre>
<p>Current SVN head contains support for the flash chip and the RDC chipset.</p>
<h3 id="create-and-flash-the-rom-image">Create and flash the ROM image</h3>
<p>Now read out the flash:</p>
<pre><code>flashrom -r backup.rom
cp backup.rom new.rom</code></pre>
<p>SAVE THIS FILE <code>backup.rom</code> TO SECURE PLACE. It contains a backup of your whole flash chip (last 64 KB is Biffboot).</p>
<p>Now you need to combine <code>coreboot.rom</code> with <code>new.rom</code> by for example using <code>dd</code>:</p>
<p>Example for 64 KB 8 MB flash:</p>
<pre><code>dd if=coreboot.rom of=new.rom bs=1k seek=8128 conv=notrunc</code></pre>
<p>Example for 128 KB 8 MB flash:</p>
<pre><code>dd if=coreboot.rom of=new.rom bs=1k seek=8064 conv=notrunc</code></pre>
<p>It is time to flash the image to the chip. Please add some swapfile beforehand:</p>
<pre><code>swapon /swap.swp
flashrom -w new.rom</code></pre>
<p>You may reboot now. You should see some messages in this moment on serial line. Please note that there is a slight delay in the beginning because ramstage is uncompressing slowly because I did not figure out how to cache certain ROM regions.</p>
<p>Please join the <a href="http://www.coreboot.org/Mailinglist">coreboot mailing list</a> and the <a href="http://www.coreboot.org/IRC">IRC channel</a> to discuss this project further.</p>
<p>Thanks,</p>
<p>Rudolf</p>