Homepage Johann Hanne 
Valid XHTML 1.0 Strict
About | Projects | Gadgets | Photos | Links
Projects - Linksys BEFSX41 stuff - Installing uClinux 

Warning: The first step of the following guide puts a foreign bootloader onto your device. This has the consequence that you won't be able to recover the original firmware unless you have a backup. To get a backup you have to dump the flash ROM via JTAG which requires some soldering on your device, a JTAG adapter and suitable software. I do have a backup of the original firmware but as it's copyrighted I will not send a copy of it to you, so please don't ask for it! Furthermore, there is no reliable ADM6996 driver for uClinux and the CX82100 yet, so if you put uClinux onto your BEFSX41 you won't no longer be able to use it as router. Before you actually perform any of the following steps, first completely read this document and be sure to understand everything and that you have a working BOOTP/DHCP/NFS server. Last but not least, even if everything works as expected, it may still kill your BEFSX41. You have been warned!

Usually, one of the hardest things when trying to put Linux onto an embedded device is to put a suitable bootloader onto the flash ROM. However, Linksys has left a nice backdoor in the firmware which really makes it easy. All you need is a suitable TFTP client (from http://redsand.net/projects/linksys-tftp/linksys-tftp.php) and a bootloader image (this is a compiled bootloader from the CX82100 bootloader page).

Just rename the bootloader image file to "boot.bin" and send it to your BEFSX41 while keeping your fingers crossed:

linksys-tftp <your-befsx41-ip>
put boot.bin <your-befsx41-admin-password>

As soon as the TFTP transfer is complete, the original Linksys firmware will shutdown. Wait a minute and just unplug the power supply for now.

The new bootloader will send BOOTP requests with source MAC address 84:db:e0:00:74:a3 (hardcoded in tftp.c of the bootloader source code). A suitable dhcpd.conf file for answering these requests is:

ddns-updates off;
ddns-update-style none;


subnet netmask {

host befsx41 {
  hardware ethernet 84:db:e0:00:74:a3;
  allow bootp;
  server-name "";
  filename "befsx41-linux-nfsroot.bin";

This would assign to the bootloader via BOOTP and tell it to get its kernel by requesting a file named "befsx41-linux-nfsroot.bin" via TFTP from (your workstation/server). This file must contain an uncompressed uClinux kernel image compiled for the CX82100.

The kernel itself will then send DHCP requests, but this time with source MAC address 00:30:cd:00:02:cc (hardcoded in linux/arch/armnommu/mach-cx821xx/cnxtbsp.c). In order to let dhcpd reply to these DHCP requests, you will have add an entry to dhcpd.conf, e.g.:

host befsx41-linux {
  hardware ethernet 00:30:cd:00:02:cc;
  option root-path "";

This entry will assign to the Linux kernel on your BEFSX41 and tell it to get its root filesystem via NFS from, directory /var/befsx41-root. A NFS server must be running on with an entry in /etc/exports like this:


Just put a minimalistic root filesystem to /var/befsx41-root (pay attention when unpacking the tarball: be sure to untar it in /var, so that /var/befsx41-root/linuxrc exists and you don't have a /var/befsx41-root/befsx41-root/ directory). Also note that you have restart your DHCP and NFS server after you have changed the configuration files. Now power up your BEFSX41 again and it should boot Linux. It's reachable via telnet now with the IP address assigned via DHCP ( in the example files). You can log in as root without password.