so far).
--- /dev/null
+# Makefile for UcSlugC
+# Licensed under the GPL v2 or later
+#
+# Define DISTRO and TARGET before including this in Makefile
+
+BUILD_DIRS = downloads home
+REQUIRED_DIRS = bitbake openembedded common
+FIRMWARE_DEPS = create-topdir $(BUILD_DIRS) $(REQUIRED_DIRS)
+
+# The default rule is to build the firmware in an unprotected environment.
+$(DISTRO)-firmware: $(FIRMWARE_DEPS)
+ . common/env; exec bitbake $(TARGET)
+
+# This rule clobbers the environment (note that ccache uses '$HOME' by
+# default, so the cache will end up there).
+$(DISTRO)-safe:
+ env -i HOME="`pwd`/home" PATH="$${PATH}" $(MAKE) $(DISTRO)-firmware
+
+# topdir.conf is re-created automatically if the directory is
+# moved - this will cause a full bitbake reparse
+.PHONY: create-topdir
+create-topdir: topdir.conf
+ . topdir.conf && test "`pwd`" = "$$TOPDIR" || echo "TOPDIR='`pwd`'" >topdir.conf
+
+topdir.conf:
+ echo "TOPDIR='`pwd`'" >$@
+
+# rules for directories - if a symlink exists and the target does not
+# exist something will go wrong in the build, therefore cause a failure
+# here by the mkdir.
+$(BUILD_DIRS):
+ test -d $@ || if test -d ../$@; then ln -s ../$@ .; else mkdir $@; fi
+
+# these directories must already exist - either in TOPDIR (here) or in ..
+$(REQUIRED_DIRS):
+ test -d $@ || if test -d ../$@; then ln -s ../$@ .; else exit 1; fi
+
+.PHONY: clobber
+clobber:
+ rm -rf tmp
+
+.PHONY: $(DISTRO)-source
+$(DISTRO)-source: $(REQUIRED_DIRS)
+ tar zcf $@.tar.gz --exclude=MT Makefile conf/auto.conf $(REQUIRED_DIRS:=/.)
+
+# This target probably isn't important any longer, because the -source
+# target above does the right thing
+.PHONY:
+distclean: clobber
+ rm -rf topdir.conf conf/local.conf $(BUILD_DIRS)
+
+# This target is mainly for testing - it is intended to put the disto directory
+# back to its original state, it will destroy a source-tarball system (because
+# it removes directories from the tarball).
+.PHONY:
+really-clean: distclean
+ rm -rf $(REQUIRED_DIRS) $(DISTRO)-source.tar.gz
--- /dev/null
+# NSLU2 master makefile bitbake site configuration
+# It should not be necessary to alter this file!
+#
+# This configuration defines the location of the directories
+# bitbake requires to build a particular distribution (DISTRO)
+#
+# Each DISTRO must create a appropriate topdir file containing
+# (just) the definition of TOPDIR
+include topdir.conf
+
+# These definitions should be the same for every DISTRO - if
+# a change is necessary make it in the DISTRO auto.conf. The
+# rvalues are evaluated here for safety (i.e. to prevent accidents
+# if something else defines TOPDIR).
+TMPDIR := "${TOPDIR}/tmp"
+CACHE := "${TMPDIR}/cache"
+DL_DIR := "${TOPDIR}/downloads"
+
+# The following is not defined or used by the standard bitbake
+# configuration files, however it must be defined here for 'freeze'
+# and 'unfreeze' to work correctly
+PKGDIR := "${TOPDIR}/openembedded"
+
+# BBFILES is the list of all the .bb files bitbake looks at when
+# working out how to build a package. By default this value is
+# overridden later in the ${DISTRO}.conf file (when it includes
+# conf/distro/freeze.conf).
+BBFILES := "${PKGDIR}/packages/*/*.bb"
+
+# The distro must create the following directories - either by
+# populating them with the required files or, in the master makefile
+# environment, by symbolic links to the relevant shared directories
+# (which are directories of the same name in ..)
+#
+# common - contains conf/site.conf - this file
+# bitbake - the directory containing the bitbake program
+# downloads - contains the source files downloaded from the network
+# openembedded - the directory containing the OE source
+#
+# All these directories may be shared between multiple distros.
+# The 'tmp' directory may not be shared, however bitbake will create
+# it automatically when required. The 'downloads' directory will also
+# be created if required by bitbake.
--- /dev/null
+# setup up the environment for a bitbake build. This is used
+# by the makefile and may also be directly sourced from an
+# interactive shell. The makefile uses 'env -i' to ensure
+# no variables are inherited apart from CCACHE_DISABLE and
+# CCACHE_DIR
+#
+# topdir must exist in the directory and define TOPDIR to
+# the full path name of the working directory
+. ./topdir.conf
+test -n "$TOPDIR" -a -d "$TOPDIR" || {
+ echo "environment: TOPDIR not defined" >&2
+ exit 1
+}
+#
+# the following must match the definitions in common/conf/site.conf
+export PYTHONPATH="${TOPDIR}/bitbake/lib"
+export BBPATH="${TOPDIR}:${TOPDIR}/common:${TOPDIR}/openembedded:${TOPDIR}/bitbake"
+export PATH="${TOPDIR}/bitbake/bin:${PATH}"
+export LD_LIBRARY_PATH=
+export LANG=C
+#NOTE: if you add export definitions here add them below too!
+#
+# unset the following (unnecessary for the makefile, but safe)
+unset LC_CTYPE
+unset CC
+unset CXX
+unset MFLAGS
+unset MAKEFLAGS
+#
+# make bb into a 'safe' bitbake
+alias bb="env -i \
+ CCACHE_DISABLE='${CCACHE_DISABLE}' \
+ CCACHE_DIR='${CCACHE_DIR}' \
+ PYTHONPATH='${PYTHONPATH}' \
+ BBPATH='${BBPATH}' \
+ PATH='${PATH}' \
+ LD_LIBRARY_PATH='${LD_LIBRARY_PATH}' \
+ LANG='${LANG}' \
+ '${TOPDIR}/bitbake/bin/bitbake'"
+#
+# remove TOPDIR - not required
+unset TOPDIR
--- /dev/null
+# Makefile for UcSlugC
+# Licensed under the GPL v2 or later
+DISTRO=ucslugc
+TARGET=openslug-packages
+
+include common/Make.rules
+
+# The following is required for bootstrapping
+common/Make.rules:
+ make -f ../common/Make.rules common
--- /dev/null
+# UcSlugC bitbake configuration
+DISTRO="ucslugc"
+MACHINE="nslu2"