NSLU2-Linux
view · edit · print · history

An OpenSlug build builds more than just the flash image:

 bb openslug-packages

will build a lot of extra packages, but not install them (because there isn't that much space in the flash ROM!)

Installing additional packages

To get these packages you need to download them using ipkg install name-of-package, and to do this you either scp the ipk file from tmp/deploy/ipk/name-of-package_rev.ipk or persuadeipkg to get the file itself.

Configuring ipkg to automatically install packages

To configure ipkg to automatically download packages simply change /etc/ipkg/cross-feed.conf to specify where the packages are:

 src/gz cross ftp://your-file-server/path/to/ipk

For example if you build onto a file server slugger and the tmp directory is /home/slug/tmp you would enter:

 src/gz cross ftp://slugger/home/slug/tmp/deploy/ipk 

Of course the server needs to run an ftp daemon and that may change the path you have to use. You can use http instead of ftp if that is more convenient.

Changing the build to configure ipkg correctly

If you just change /etc/ipkg.conf then you will have to change it in the same way every time you re-flash the slug.

To avoid this change the file in the build. The relevant line in /etc/ipkg.conf is controlled by the src file from openembedded/packages/ipkg/ipkg-collateral.bb - by default this comes from the ipkg-collateral sub-directory of the package.

There are several ways you can change this - for example you could just edit the src file - but then there is a danger of committing the change and pushing it upstream. Since the change is purely local to each system it is better to just make one change to allow a local override.

Do this by applying the following patch to openembedded/packages/ipkg/ipkg-collateral.bb - you can bk edit this safely because even if it does get pushed upstream (jbowler: this would be a good thing IMO) it doesn't change anything on its own:

Patch openembedded/packages/ipkg/ipkg-collateral.bb

This patch can be applied by copying it and removing the leading space from each line. The lines without a space need to be joined to the preceding lines - splitting the lines is necessary to work round bugs in the wiki auto-formatting.

===== ipkg-collateral.bb 1.8 vs edited =====
--- 1.8/packages/ipkg/ipkg-collateral.bb 2005-02-22
+++ edited/ipkg-collateral.bb 2005-03-24
@@ -3,6 +3,8 @@
LICENSE = "MIT"
PR = "r2"

+FILESPATH = "${TOPDIR}/ipkg-files:${FILE_DIRNAME}/${PF}: ${FILE_DIRNAME}/${P}:${FILE_DIRNAME}/${PN}: ${FILE_DIRNAME}/files:${FILE_DIRNAME}"
+
SRC_URI = " \
file://ipkg.conf.comments \
file://dest \

This changes the build to look first in build/ipkg-files, where build is the directory which also contains conf/local.conf. For example this may be /home/slug/build/ipkg-files.

You can now create a local src file in that directory, build/ipkg-files/src, containing just the src line from ipkg.conf (as above).

This will cause every openslug build to generate an ipkg.conf file referring to the directory where the build puts the ipks. This makes everything much easier if you flash the NSLU2 a couple of times every day!

view · edit · print · history · Last edited by landslide.
Originally by jbowler.
Page last modified on August 09, 2005, at 02:28 PM