Fix OpenWRT

From MiCasaVerde
Jump to: navigation, search


HOWTO fix some older OpenWRT issues

Contents

Introduction

Vera uses a slightly outdated Kamikaze version of OpenWRT embedded Linux distribution for Broadcom platform, based on 2.4 Linux kernel.

Issues

Since the release, used in Vera, there were several changes in OpenWRT, which need to be taken into account in order to get extra packages installed successfully:

  • Packages now specify in their metadata how much space they take on the filesystem, thus ipkg first checks if enough space is available. But it doesn't take mini_fo overlay into account and complains that there is 0 bytes available in the root filesystem, since it's read-only.
  • In latest trunk snapshots (besides switching from ipkg to opkg) all the packages now specify "brcm-2.4" architecture instead of the old "mipsel", rendering them incompatible with the release of OpenWRT used in Vera. Although, there are ways to make Vera recognize "brcm-2.4" architecture as compatible, there can be issues with some packages not working properly.

Prerequisites

Flash Partitions

The default hardware Vera runs on is Asus WL-500g router with 16MB or RAM and 8MB of flash. Flash is split into several partitions:

  • 128KB bootloader
  • ~500KB Linux kernel
  • ~5.8MB root squashfs filesystem (r/o)
  • 64KB config storage
  • ~1.8MB data jffs filesystem (r/w)

There is only 1.8MB of compressed space available for installing additional packages into the system. This data filesystem is mounted as /jffs, but is also an overlay of the rootfs in / (uses mini_fo fs, a la union fs, providing "copy on write" access)

Package Manager

The package manager in this version of OpenWRT is ipkg (Itsy Packager). It uses configuration file /etc/ipkg.conf

Instructions

Fixes

So, to solve the first item, we need to instruct ipkg to install packages into /jffs instead of / and add an extra "dest" line to /etc/ipkg.conf (should be the first "dest" to work as a default):

dest jffs /jffs

To address the second issue above, we should use the released Kamikaze versions of the packages, instead of the trunk. The URL of the system repository is http://downloads.openwrt.org/kamikaze/8.09.2/brcm-2.4/packages and the URL of the X-Wrt repository is http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages

The first line with the default system OpenWRT repository URL has to be changed like this:

src snapshots http://downloads.openwrt.org/kamikaze/8.09.2/brcm-2.4/packages

The last line with the X-Wrt repository URL should look like this:

src X-Wrt http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages

Summary

Here is the final /etc/ipkg.conf file:

src snapshots http://downloads.openwrt.org/kamikaze/8.09.2/brcm-2.4/packages
dest jffs /jffs
dest root /
dest ram /tmp
src X-Wrt http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages

Testing

First, we need to download the metadata with the list of installable packages:

# ipkg update
Downloading http://downloads.openwrt.org/kamikaze/8.09.2/brcm-2.4/packages/Packages
Updated list of available packages in /usr/lib/ipkg/lists/snapshots
Downloading http://downloads.x-wrt.org/xwrt/kamikaze/8.09.2/brcm-2.4/packages/Packages
Updated list of available packages in /usr/lib/ipkg/lists/X-Wrt
Done.

Then we can get the list of available packages with "ipkg list" and install extra packages with "ipkg install <pkgname>":

# ipkg install etherwake
Installing etherwake (1.09-1) to jffs...
Downloading http://downloads.openwrt.org/kamikaze/8.09.2/brcm-2.4/packages/etherwake_1.09-1_mipsel.ipk
Configuring etherwake
Done.

# etherwake
Specify the Ethernet address as 00:11:22:33:44:55.

References

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox