The Facts about Adding Packages to ROOter

The more advanced user of ROOter firmware make, at times, want to add a different feature to their router using the OpenWrt repository. This doucument will outline some facts about this process.

Memory Space

For those people using one of the supported routers with only 4 meg of flash Ram the major issue in adding a new feature is the lack of memory space. This does not apply to routers with 8meg or more of flash memory.

You can check how much free memory space your router has by going to the System menu and then to the Software submenu.

The Free Space will tell you how much memory is available for adding new features. A ROOter flashed router requires at least 90 KB of free space in order for it to boot up and operate correctly. Any thing less than this will cause problems such a failure to save the password or any other chages you may make.

ROOter uses almost all of the flash memory on a 4 meg router for its basic features so there is very little left to use for any new features.

You can get an idea of how much memory space a new feature requires by looking at the package sizes in the OpenWrt repository. Remember that a package may also install other packages that it depends on so the memory requirements will almost always be much larger than just the base package size.

The first thought in this situation is to remove any unneeded packages from the firmware to free up more memory to add the new feature. It appears that you can uninstall packages from the Software submenu and, in theory, get more memory.

This does not work, however.

Removing a package from the firmware does not actually delete it but just makes it inactive. You can not free up any memory by doing this.

The only way to free up memory by removing unwanted packages is to build a new image without those packages.

In short, if you have a router with only 4 meg of flash memory there is no room for any extra features and there is no way short of making a new image of ever getting any extra memory.

Kerrnel Mismatch

Even if you have enough flash memory to hold the new feature you wish to add there can be a problem with the Linux kernel used by the firmware.

The kernel is the basic part of Linux that is used by OpenWrt with all the features being added on top of this. Kernels are numbered such as 3.18 or 4.1 to tell how new they are. As the kernel number increases this indicates that changes have been made to the code and these changes may not be backward compatible with older kernel versions.

Certain programs made to work with kernel 3.18 may not work correctly with kernel 4.1 unless they are recompiled or modified. This is usually restricted to those packages whose name start with kmod-.

As mentioned above, when you install a new package into ROOter it may also install other packages that it requires. If one of these other packages is a kernel package (whose name starts with kmod-) then the kernel used in the ROOter firmware must match the kernel used when the package was compiled.

If the kernel numbers do not match between the firmware and the package being installed then OpenWrt will give a kernel mismatch error and not allow it to be installed. This is to prevent software problem from occurring due to incompatible kernels.

The problem that arises here is that ROOter does not use the same kernel as that used when the OpenWrt repository was compiled. Even though ROOter uses the OpenWrt Chaos Calmer revision for most of its images the kernel has been updated some since the OpenWrt Chaos Calmer repository was compiled and therefore the kernel packages in the repository are not compatible with ROOter.

This is a problem that can not be solved unless ROOter has its own repository of packages, which it doesn't.

The bottom line here is, you can't install a new feature if it requires the installation of any kernel packages from the OpenWrt repository.