Using OpenEbmedded to create a slugos-image

Using open embedded is more complex than using the nslug master make file, but only a small amount more.  The up side you end up with a more customized and smaller baseline image to add your stuff too.  It does have newer bits than the nslug build, but it worked on the weekend of 2/18/2007, YMMV.  What you choose to use is up to you. 

Use these notes after you have read/attempted the instructions on the openembedded web pages.  My goal is to capture some basic configurations and insights before I forget them all as I start focusing on the PIC code I need to start writing soon.

Uploading your 8MB slug image

I use upslug2 with the following command line: "upslug2 -d eth1 -i slugosbe-4.3-beta-nslu2.bin "  My system has multiple Ethernet adapters, yours will likely need to use "-d eth0".  The trick to getting the NSLU2 into update mode is to watch the 2 LED's closest to the RJ45 jack.  The end one goes on at power on and slowly blinks orange / read when you have gotten it into update mode.  The second LED provides the "tell" for when you should push, and hold for ~0.5 sec, the reset button (next to the power jack).  The tell is that the LED blinks, and within 2 seconds of the 3rd blink you need to hit the reset for at least 0.5 sec.  (hint, one of the blinks is quite short)  Upton releasing the reset button if the end LED is blinking reddish you are now in update mode and can run the upslug2 utility.

The upslug2 utility needs to be run with root privileges.  My command results in a subnet pin / probe for a NSLU2 in update mode, if present it erases the current image and uploads the image pointed to in the command line.

Good luck.

Building Slugos-image using the OpenEmbedded directly:

Now that you have a working build, the following provides a glimpse of what its like to work / customize your target beyond the stock components:

Getting started with OE builds is a bit lower level than working with NSLUG's master make file.  The benefit is that for your trouble you get more control in what's on the root FS.   With OpenSlug from NSLUG when I add python to the build I have zero KB free in the root file system.  With SlugOS-image using OE, I have 1162KB free in the flash.  (I'm sure Its missing a lot of NAS capability, but I just want ssh and python needed to make my robot work)

The following are notes I've captured this weekend:
DISTRO = "slugos"
DL_DIR = "${HOME}/oe_downloads"
MACHINE = "nslu2be"
DISTRO = "slugos"
export PATH=/home/mgross/_dev/oe/bitbake/bin:$PATH
export BBPATH=/home/mgross/_dev/oe/build:/home/mgross/_dev/oe/

Adding a Micro innovations CIF USB 1.1 web camera support to the slugos-image

This is a 18$ (crappy cam) I got a frys the other day to the nslug.  Out of the box this camera works with Ubuntu desktop, and shows up as a spca5xx / pixart PAC207BCA device.

I've gotten it to "sort-of" work.  I had to add a few things to the SLUGOS_STANDARD_RDEPENDS defined in the slugos.conf file.  These are: kernel-module-v4l2-common, kernel-module-v4l1-compat, kernel-module-videodev, and spca5xx.

Then I had to hack the kernel.bbclas file to copy the kernel build autoconf.h file to the stageing config.h file.  It seems that the kernel build no longer uses config.h and opts for autoconfig.h.

Further I had to hack the spca5xx.c file to include <media/v4l2-dev.h> for the thing to compile.

Lastly I pulled down a sample program vidcat that takes video for linux devices and captures a single frame.  After some googling, I got my copy of the source from: and a working binary that works with the NSLUG from  See the nslu2 wiki on this topic for more information:

Now it captures a video frame and I can now try to do some processing on.

I'm going to try to clean up the build some more, but for now the following is the patch to my bit bake files that implements my current hack on the slugos OE build  (I'll come back later and make my own OE distro/image files later) ....

diff -urN -X dontdiff
---    2007-02-19 07:11:50.000000000 -0800
+++    2007-02-19 12:50:40.000000000 -0800
@@ -73,6 +73,7 @@
     mkdir -p ${STAGING_KERNEL_DIR}/include/linux
     cp -fR include/linux/* ${STAGING_KERNEL_DIR}/include/linux/
+    cp -fR include/linux/autoconf.h ${STAGING_KERNEL_DIR}/include/linux/config.h
     mkdir -p ${STAGING_KERNEL_DIR}/include/net
     cp -fR include/net/* ${STAGING_KERNEL_DIR}/include/net/
diff -urN -X dontdiff
---    2007-02-19 07:12:12.000000000 -0800
+++    2007-02-19 18:22:17.000000000 -0800
@@ -23,7 +23,7 @@
 # not absolutely required for boot.
 # NOTE: only jffs2 support is an absolute requirement of boot, even
 # the ext2/ext3 support is optional!
-SLUGOS_EXT2_PROGS =  "e2fsprogs-mke2fs e2fsprogs-fsck e2fsprogs-e2fsck e2fsprogs-badblocks"
+# SLUGOS_EXT2_PROGS =  "e2fsprogs-mke2fs e2fsprogs-fsck e2fsprogs-e2fsck e2fsprogs-badblocks"
 # The standard firmware contents and additional packages built as requirements
 # of the firmware are defined here in SLUGOS_STANDARD_RDEPENDS.
@@ -37,12 +37,12 @@
 # These lines add support for formatting ext2 and ext3 file systems
 # on a hard disk attached to the NSLU2.  ext3 is the standard Linux
 # file system.
 # These lines add support for an X/Y/ZModem package called lrzsz
 # (this is of use for people with modified NSLU2 hardware which
 # supports a serial port.)
 # Filesystem selection.  Adding entries here adds the module to the
 # image.  The module must be built as part of nslu2-kernel (i.e. it
@@ -61,15 +61,13 @@
 # boot (however you can do a simple flash file system boot - no
 # attached disk - and install the nfs modules from ssh.)
-kernel-module-ext2 \
-kernel-module-jbd \
-kernel-module-ext3 \
 kernel-module-vfat \
-kernel-module-ntfs \
-kernel-module-isofs \
-kernel-module-udf \
 kernel-module-nls-cp437 \
 kernel-module-nls-utf8 \
+spca5xx \
+kernel-module-v4l2-common \
+kernel-module-v4l1-compat \
+kernel-module-videodev \
 # Add daemon required for HW RNG support
@@ -84,10 +82,10 @@
 # Add modules required for IDE support
-kernel-module-libata \
-kernel-module-pata-artop \
+#kernel-module-libata \
+#kernel-module-pata-artop \
 # Add modules required for Network support
@@ -105,6 +103,6 @@
 # to the firmware image.  None of these things are requirements to have
 # a bootable, useable, system however they *are* expected to be present
 # in SlugOS.
 require conf/distro/include/
diff -urN -X dontdiff
---    2007-02-19 07:12:06.000000000 -0800
+++    2007-02-20 16:33:27.000000000 -0800
@@ -17,3 +17,17 @@
       mkdir -p $(MODULE_INSTALLDIR)
+--- spca5xx-20060202/drivers/usb/spca5xx.c~    2006-04-29 08:38:07.000000000 -0700
++++ spca5xx-20060202/drivers/usb/spca5xx.c    2007-02-19 16:57:35.000000000 -0800
+@@ -54,6 +54,8 @@
+ #include <linux/pagemap.h>
+ #include <linux/usb.h>
++#include <media/v4l2-dev.h>
+ #include <asm/io.h>
+ #include <asm/semaphore.h>
+ #include <asm/page.h>
diff -urN -X dontdiff
---    2007-02-19 07:12:09.000000000 -0800
+++    2007-02-18 17:47:44.000000000 -0800
@@ -26,7 +26,7 @@
 FILES_${PN} += "${base_libdir}/udev/*"
 FILES_${PN}-dbg += "${base_libdir}/udev/.debug"
-UDEV_EXTRAS = "extras/firmware/ extras/scsi_id/ extras/volume_id/ extras/run_directory/"
+UDEV_EXTRAS = "extras/firmware/ extras/scsi_id/ extras/run_directory/"
 EXTRA_OEMAKE += "libudevdir=/lib/udev libdir=${base_libdir} prefix="
 do_install () {