Saturday, April 23, 2016

OpenWRT 15.05.1 on Soekris net4801



I had some trouble getting the OpenWRT 15.05.1 x86/Geode image download to boot on my Soekris net4801. In the default setup the boot didn't get past Grub.

Here are my notes on what I tried.
  • Download the SquashFS combined image
  • Delete CompactFlash:
    sudo dd if=/dev/zero of=/dev/sdb bs=512
  • Copy the image to CompactFlash:
    sudo dd if=openwrt-15.05.1-x86-geode-combined-squashfs.img of=/dev/sdb bs=512
  • mount the boot partition from CompactFlash 
  • in grub.cfg:
    • change serial speed to 19200 to match Soekris BIOS settings, so that we can view the whole boot process with the same settings.
    • remove console parameter from terminal_input and terminal_output entries. It appears Grub or Linux choke when console is present here.
    • in kernel command lines:
      • replace PARTUUID... parameter with /dev/sda2.
      • remove console=tty0. There is only a serial port.
      • change serial console speed to 19200. See above.
  • Attach a terminal to the serial port on the net4801 and watch boot process.
When using the squashfs image the watchdog timer kills the boot before the root file system gets mounted, while the x86/Geode image with ext4 works just fine.

Disabling watchdog on kernel command line in Grub doesn't make a difference. I suspect there's nobody else using the net4801 with OpenWRT and this specific build might not be getting tested.

Next, I tried x86/generic because I really want the Flash wear leveling provided by squashfs+jffs2. I only made the adjustments for console and serial speed from above. Sure enough, the boot pauses for a minute or two at the exact same place where the watchdog triggers with the Geode image ... and then proceeds successfully. This pause happens only on first boot after image copy, so likely some initialization is happening.

At the moment I have OpenWRT configured to match the functionality of the Netgear router I installed temporarily last week.  Using the Web interface, this was about as easy as one can make it. 

So far, so good.

No comments: