OpenWrt Forum Archive

Topic: How to Install OpenWrt (Backfire) on the Bifferboard, Sitecom profile.

The content of this topic has been archived on 22 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Although there is a Bifferboard profile in OpenWrt I was never able to get it to work properly with the 2.6.30 kernel.  I had better luck last night making a couple of tweaks to the Sitecom profile and switching to 2.6.32.9 kernel:

1) Download the script in the 'code' section below.

2) Obtain OpenWrt Backfire sources:

$> svn co svn://svn.openwrt.org/openwrt/branches/backfire

First you have to edit files in backfire/target/linux/rdc/

4) Open the Makefile and change

LINUX_VERSION:=2.6.30.10

to

LINUX_VERSION:=2.6.32.9

5) Open config-2.6.32 and change the line CONFIG_CMDLINE from:

CONFIG_CMDLINE="console=ttyS0,38400 rootfstype=squashfs,jffs2"

to

CONFIG_CMDLINE="rootfstype=squashfs,jffs2"

In other words remove the bit about setting the console=tty0,38400.  This will fall back to use the settings from the bootloader.

6) Run 'make menuconfig', select the RDC321x target system.

7) Select target profile, "Devices from Sitecom (WL-153, DC-230)"

8) Run 'make' and wait a while.

9) Run the script below to combine the built kernel and JFFS images. 
This should create 'biff-firmware.img'

Don't flash it to the board yet!  First you have to change Biffboot config.

10) At the Biffboot prompt, lower the kernel_max value to 0x0010, instead of the default 0x0020.  It *may* work without this change, but this will result in slightly faster kernel boot.

11) Also at the Biffboot prompt, change the kernel command-line to remove the root=/dev/sda1 and rootwait parts.  This is needed so the JFFS image will boot correctly.

12) Flash the file to the Bifferboard as you would a normal kernel, either with the serial cable or via Ethernet.  You may have to wait some time for the first boot, due to JFFS erasing trailing blocks.


#!/usr/bin/env python
"""
   Create Bifferboard firmware based on Sitecom image build
"""
import sys, os

root = "backfire/build_dir/linux-rdc"
kernel = os.path.join(root, "bzImage")
jffs = os.path.join(root, "root.jffs2-64k")

kernel_extent = 0x100000
config = 0x6000


if __name__ == "__main__":
  
  k = file(kernel, "rb").read()
  j = file(jffs,"rb").read()
      
  if len(k) > (kernel_extent - config):
    raise IOError("Kernel too large")

  fw = k
  # Pad up
  while len(fw) < (kernel_extent - config):
    fw += "\xff"

  fw += j

  # Check length of total
  if len(fw) > (0x800000 - 0x10000 - 0x6000):
    raise IOError("Rootfs too large")

  target = "biff-firmware.img"
  file(target,"wb").write(fw)
  print "Firmware written to '%s'" % target

(Last edited by bifferos on 15 Jul 2010, 10:25)

bifferos wrote:

5) Open config-2.6.32 and change the line CONFIG_CMDLINE

but there are only 2.6.30 config...

You need to checkout trunk of openwrt: svn co svn://svn.openwrt.org/openwrt/trunk

(Last edited by SystemR89 on 27 Sep 2010, 12:16)

The discussion might have continued from here.