From 7ba05735b3c0b79e98d3a9168c73857ec48b430f Mon Sep 17 00:00:00 2001 From: Rod Whitby Date: Thu, 30 Jun 2005 09:48:23 +0000 Subject: [PATCH] initial nslu2-linux infrastructure checkin --- .mtn-ignore | 7 +++ .mtn2git_empty | 0 Makefile | 74 ++++++++++++++++++++++++ openslug/.mt-ignore | 4 ++ openslug/.mtn2git_empty | 0 openslug/Makefile | 48 ++++++++++++++++ openslug/conf/.mt-ignore | 1 + openslug/conf/.mtn2git_empty | 0 openslug/conf/local.conf.template | 96 +++++++++++++++++++++++++++++++ unslung/.mt-ignore | 4 ++ unslung/.mtn2git_empty | 0 unslung/Makefile | 48 ++++++++++++++++ unslung/conf/.mt-ignore | 1 + unslung/conf/.mtn2git_empty | 0 unslung/conf/local.conf.template | 59 +++++++++++++++++++ 15 files changed, 342 insertions(+) create mode 100644 .mtn-ignore create mode 100644 .mtn2git_empty create mode 100644 Makefile create mode 100644 openslug/.mt-ignore create mode 100644 openslug/.mtn2git_empty create mode 100644 openslug/Makefile create mode 100644 openslug/conf/.mt-ignore create mode 100644 openslug/conf/.mtn2git_empty create mode 100644 openslug/conf/local.conf.template create mode 100644 unslung/.mt-ignore create mode 100644 unslung/.mtn2git_empty create mode 100644 unslung/Makefile create mode 100644 unslung/conf/.mt-ignore create mode 100644 unslung/conf/.mtn2git_empty create mode 100644 unslung/conf/local.conf.template diff --git a/.mtn-ignore b/.mtn-ignore new file mode 100644 index 0000000000..170b9c14e8 --- /dev/null +++ b/.mtn-ignore @@ -0,0 +1,7 @@ +bitbake +downloads +monotone +oe-symlinks +openembedded +optware + diff --git a/.mtn2git_empty b/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000000..c56fcbc417 --- /dev/null +++ b/Makefile @@ -0,0 +1,74 @@ +# Makefile for the NSLU2 Linux development system +# Licensed under the GPL v2 or later + +all: update build + +build: unslung-build openslug-build optware-build + +setup: monotone-setup bitbake-setup openembedded-setup oe-symlinks-setup optware-setup + +update: monotone-update bitbake-update openembedded-update oe-symlinks-update optware-update + +clobber: optware-clobber oe-symlinks-clobber openembedded-clobber bitbake-clobber + +unslung-build: + ( cd unslung ; make ) + +openslug-build: + ( cd openslug ; make ) + +optware-build: + ( cd optware ; make ) + +monotone-setup monotone/nslu2-linux.db unslung/Makefile openslug/Makefile: + [ -e monotone/nslu2-linux.db ] || ( mkdir -p monotone && monotone -d monotone/nslu2-linux.db db init ) + ( monotone -d monotone/nslu2-linux.db pull ewi546.ewi.utwente.nl org.openembedded ) + ( monotone -d monotone/nslu2-linux.db unset database default-server ) + ( monotone -d monotone/nslu2-linux.db unset database default-collection ) + ( monotone -d monotone/nslu2-linux.db pull mtn.nslu2-linux.org org ) + [ -e MT ] || ( monotone -d monotone/nslu2-linux.db co -b org.nslu2-linux.dev . ) + [ -e downloads ] || mkdir -p downloads + [ -e unslung/downloads ] || ( cd unslung ; ln -s ../downloads . ) + [ -e openslug/downloads ] || ( cd openslug ; ln -s ../downloads . ) + +monotone-update: monotone/nslu2-linux.db + monotone pull && monotone update + +bitbake-setup bitbake/bin/bitbake: + [ -e bitbake/bin/bitbake ] || ( svn co svn://svn.berlios.de/bitbake/trunk/bitbake ) + +bitbake-update: bitbake/bin/bitbake + ( cd bitbake ; svn update ) + +bitbake-clobber: + rm -rf bitbake + +openembedded-setup openembedded/conf/machine/nslu2.conf: + [ -e openembedded/conf/machine/nslu2.conf ] || monotone co -b org.openembedded.nslu2-linux openembedded + +openembedded-update: openembedded/conf/machine/nslu2.conf + ( cd openembedded ; monotone update ) + +openembedded-clobber: + rm -rf openembedded + +oe-symlinks-setup oe-symlinks/packages: + [ -e oe-symlinks/packages ] || ( svn co svn://svn.berlios.de/openslug/trunk/openslug/nslu2-linux oe-symlinks ) + +oe-symlinks-update: oe-symlinks/packages + ( cd oe-symlinks ; svn update ) + +oe-symlinks-clobber: + rm -rf oe-symlinks + +optware-setup optware/Makefile: + [ -e optware/Makefile ] || ( cvs -d :pserver:anonymous@cvs.sf.net:/cvsroot/nslu co -d optware unslung ) + [ -e optware/downloads ] || ( cd optware ; ln -s ../downloads . ) + +optware-update: optware/Makefile + ( cd optware ; cvs update -d -P ) + +optware-clobber: + rm -rf optware + +# End of Makefile diff --git a/openslug/.mt-ignore b/openslug/.mt-ignore new file mode 100644 index 0000000000..dd5df82133 --- /dev/null +++ b/openslug/.mt-ignore @@ -0,0 +1,4 @@ +downloads +openslug-source.tar.gz +setup-env +tmp diff --git a/openslug/.mtn2git_empty b/openslug/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/openslug/Makefile b/openslug/Makefile new file mode 100644 index 0000000000..a0c0ec1e72 --- /dev/null +++ b/openslug/Makefile @@ -0,0 +1,48 @@ +# Makefile for OpenSlug +# Licensed under the GPL v2 or later + +openslug-firmware: setup-env conf/local.conf + ( source setup-env ; bitbake openslug-packages ) + +# This does the same thing but with a clean environment +# The HOME setting prevents user environment settings +# from changing the build. CCACHE_DIR is necessary to +# prevent ccache (if installed) attempting to use a +# .cache in the home directory. +openslug-firmware-safe: setup-env conf/local.conf + env -i CCACHE_DISABLE=1 CCACHE_DIR="`pwd`/tmp/ccache" HOME=/dev/null \ + sh -c 'source setup-env; bitbake openslug-packages' + +setup-env: + [ -e bitbake ] || ( ln -s ../bitbake . ) + [ -e downloads ] || ( ln -s ../downloads . ) + [ -e openembedded ] || ( ln -s ../openembedded . ) + [ -e oe-symlinks ] || ( ln -s ../oe-symlinks . ) + echo 'OEROOT='`pwd` > setup-env + echo 'OESYS=$$OEROOT/bitbake/' >> setup-env + echo 'PKGDIR=$$OEROOT/openembedded/' >> setup-env + echo 'OEBUILD=$$OEROOT' >> setup-env + echo 'export PYTHONPATH=$$OESYS/lib' >>setup-env + echo 'export BBPATH=$$OEBUILD:$$PKGDIR:$$OESYS' >> setup-env + echo 'export PATH=$$OESYS/bin/:$$PATH' >> setup-env + echo 'export LD_LIBRARY_PATH=' >> setup-env + echo 'export LANG=C' >> setup-env + echo 'unset LC_CTYPE' >> setup-env + echo 'unset CC' >> setup-env + echo 'unset CXX' >> setup-env + echo 'alias bb=bitbake' >> setup-env + echo 'echo Environment set up for OpenSlug development.' >> setup-env + +conf/local.conf: + sed -e "s|%%%OEROOT%%%|`pwd`|" conf/local.conf.template > conf/local.conf + +clobber: + rm -rf tmp + +openslug-source: + tar zcvf openslug-source.tar.gz --exclude=MT Makefile bitbake conf openembedded oe-symlinks + +distclean: clobber + rm -rf setup-env conf/local.conf bitbake downloads openembedded oe-symlinks + +# End of Makefile diff --git a/openslug/conf/.mt-ignore b/openslug/conf/.mt-ignore new file mode 100644 index 0000000000..f21e1b217b --- /dev/null +++ b/openslug/conf/.mt-ignore @@ -0,0 +1 @@ +local.conf diff --git a/openslug/conf/.mtn2git_empty b/openslug/conf/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/openslug/conf/local.conf.template b/openslug/conf/local.conf.template new file mode 100644 index 0000000000..f5095c54c5 --- /dev/null +++ b/openslug/conf/local.conf.template @@ -0,0 +1,96 @@ +OEROOT = "%%%OEROOT%%%" + +# Use this to specify where OE should place the downloaded sources into +DL_DIR = "${OEROOT}/downloads" + +# Delete the line below. Then specify which .oe files to consider for +# your build. Typically this will be something like OEFILES = "/path/to/packages/*/*.oe" +# BBFILES := "/home/slug/openembedded/packages/*/*.bb" +BBFILES := "${OEROOT}/oe-symlinks/packages/*/*.bb" + +# Use the OEMASK below to instruct OE to _NOT_ consider some .oe files +# This is a regulary expression, so be sure to get your parenthesis balanced. +OEMASK = "" + +# Uncomment this if you want to use a prebuilt toolchain. You will need to +# provide packages for toolchain and additional libraries yourself. You also +# have to set PATH in your environment to make sure OE finds additional binaries. +# Note: You will definitely need to say: +# ASSUME_PROVIDED = "virtual/arm-linux-gcc-2.95" +# to build any of two Linux 2.4 Embedix kernels, +# i.e. openzaurus-sa-2.4.18 and openzaurus-pxa-2.4.18 - and don't forget +# to rename the binaries as instructed in the Wiki. +# ASSUME_PROVIDED = "virtual/${TARGET_PREFIX}gcc virtual/libc" + +# Select between multiple alternative providers, if more than one is eligible. +PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial" +PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc:gcc-cross" +PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}g++:gcc-cross" + +# Uncomment this to specify where OE should create its temporary files. +# Note that a full build of everything in OE will take GigaBytes of hard +# disk space, so make sure to free enough space. The default TMPDIR is +# /tmp +TMPDIR = ${OEROOT}/tmp + +# Uncomment this to specify a machine to build for. See the conf directory +# for machines currently known to OpenEmbedded. +MACHINE = "nslu2" + +# Uncomment this to select a distribution policy. See the conf directory +# for distributions currently known to OpenEmbedded. +DISTRO = "openslug" + +# Add to this any extra projects (packages) to be built with the image +# (look in openembedded/packages/openslug-packages.bb for a list of +# packages known to build with openslug.) +OPENSLUG_EXTRA_DEPENDS = "" + +# Add to this specific built .ipk package names to add to the image. +# These will be included in the root flash file system stored on the +# NSLU2. Be careful not to fill the file system, OpenSlug will not +# boot if the file system is close to full. +OPENSLUG_EXTRA_RDEPENDS = "" + +# Support for a variety of file systems is built in to the openslug +# image, programs to format disks with these file systems may be +# added or removed. By default ext2. ext3 and reiserfs supported +# is included by the following lines. +# +# 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. (OPENSLUG_EXT2_PROGS is defined in +# openembedded/conf/distro/openslug.conf) +OPENSLUG_EXTRA_DEPENDS += "e2fsprogs" +OPENSLUG_EXTRA_RDEPENDS += "${OPENSLUG_EXT2_PROGS}" + +# These lines add support for formatting reiserfs file systems on +# a hard disk. +OPENSLUG_EXTRA_DEPENDS += "reiserfsprogs" +OPENSLUG_EXTRA_RDEPENDS += "reiserfsprogs" + +# These lines add a build of the 'upslug' program which may be +# used to download the final image to an NSLU2. The program can +# be found within the tmp/work/upslug-native* directory. +OPENSLUG_EXTRA_DEPENDS += "upslug-native" + +# 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.) +OPENSLUG_EXTRA_DEPENDS += "lrzsz" +OPENSLUG_EXTRA_RDEPENDS += "lrzsz" + + +# Uncomment this to disable the parse cache (not recommended). +CACHE = "${OEROOT}/tmp/cache" + +# Uncomment this if you want OE to emit the log if a build fails. +OEINCLUDELOGS = "yes" + +# Specifies a location to search for pre-generated tarballs when fetching +# a cvs:// URI. Uncomment this, if you not want to pull directly from CVS. +CVS_TARBALL_STASH = "http://www.oesources.org/source/current/" + +# INHERIT += "src_distribute_local pkg_distribute" + +# EDIT THIS FILE and then remove the line below before using! diff --git a/unslung/.mt-ignore b/unslung/.mt-ignore new file mode 100644 index 0000000000..2cf465fead --- /dev/null +++ b/unslung/.mt-ignore @@ -0,0 +1,4 @@ +downloads +unslung-source.tar.gz +setup-env +tmp diff --git a/unslung/.mtn2git_empty b/unslung/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/unslung/Makefile b/unslung/Makefile new file mode 100644 index 0000000000..b64453007b --- /dev/null +++ b/unslung/Makefile @@ -0,0 +1,48 @@ +# Makefile for Unslung +# Licensed under the GPL v2 or later + +unslung-firmware: setup-env conf/local.conf + (source setup-env ; bitbake unslung-packages) + +# This does the same thing but with a clean environment +# The HOME setting prevents user environment settings +# from changing the build. CCACHE_DIR is necessary to +# prevent ccache (if installed) attempting to use a +# .cache in the home directory. +unslung-firmware-safe: setup-env conf/local.conf + env -i CCACHE_DISABLE=1 CCACHE_DIR="`pwd`/tmp/ccache" HOME=/dev/null \ + sh -c 'source setup-env; bitbake unslung-packages' + +setup-env: + [ -e bitbake ] || ( ln -s ../bitbake . ) + [ -e downloads ] || ( ln -s ../downloads . ) + [ -e openembedded ] || ( ln -s ../openembedded . ) + [ -e oe-symlinks ] || ( ln -s ../oe-symlinks . ) + echo 'OEROOT='`pwd` > setup-env + echo 'OESYS=$$OEROOT/bitbake/' >> setup-env + echo 'PKGDIR=$$OEROOT/openembedded/' >> setup-env + echo 'OEBUILD=$$OEROOT' >> setup-env + echo 'BBPATH=$$OEBUILD:$$PKGDIR:$$OESYS' >> setup-env + echo 'PATH=$$OESYS/bin/:$$PATH' >> setup-env + echo 'LD_LIBRARY_PATH=' >> setup-env + echo 'export PATH LD_LIBRARY_PATH BBPATH' >> setup-env + echo 'export LANG=C' >> setup-env + echo 'unset LC_CTYPE' >> setup-env + echo 'unset CC' >> setup-env + echo 'unset CXX' >> setup-env + echo 'alias bb=bitbake' >> setup-env + echo 'echo Environment set up for Unslung development.' >> setup-env + +conf/local.conf: + sed -e "s|%%%OEROOT%%%|`pwd`|" conf/local.conf.template > conf/local.conf + +clobber: + rm -rf tmp + +unslung-source: + tar zcvf unslung-source.tar.gz --exclude=MT Makefile bitbake conf openembedded oe-symlinks + +distclean: clobber + rm -f setup-env conf/local.conf bitbake downloads openembedded oe-symlinks + +# End of Makefile diff --git a/unslung/conf/.mt-ignore b/unslung/conf/.mt-ignore new file mode 100644 index 0000000000..f21e1b217b --- /dev/null +++ b/unslung/conf/.mt-ignore @@ -0,0 +1 @@ +local.conf diff --git a/unslung/conf/.mtn2git_empty b/unslung/conf/.mtn2git_empty new file mode 100644 index 0000000000..e69de29bb2 diff --git a/unslung/conf/local.conf.template b/unslung/conf/local.conf.template new file mode 100644 index 0000000000..a13923f749 --- /dev/null +++ b/unslung/conf/local.conf.template @@ -0,0 +1,59 @@ +OEROOT = "%%%OEROOT%%%" + +# Use this to specify where OE should place the downloaded sources into +DL_DIR = "${OEROOT}/downloads" + +# Delete the line below. Then specify which .oe files to consider for +# your build. Typically this will be something like OEFILES = "/path/to/packages/*/*.oe" +# BBFILES := "/home/slug/openembedded/packages/*/*.bb" +BBFILES := "${OEROOT}/oe-symlinks/packages/*/*.bb" + +# Use the OEMASK below to instruct OE to _NOT_ consider some .oe files +# This is a regulary expression, so be sure to get your parenthesis balanced. +OEMASK = "" + +# Uncomment this if you want to use a prebuilt toolchain. You will need to +# provide packages for toolchain and additional libraries yourself. You also +# have to set PATH in your environment to make sure OE finds additional binaries. +# Note: You will definitely need to say: +# ASSUME_PROVIDED = "virtual/arm-linux-gcc-2.95" +# to build any of two Linux 2.4 Embedix kernels, +# i.e. openzaurus-sa-2.4.18 and openzaurus-pxa-2.4.18 - and don't forget +# to rename the binaries as instructed in the Wiki. +# ASSUME_PROVIDED = "virtual/${TARGET_PREFIX}gcc virtual/libc" + +# Select between multiple alternative providers, if more than one is eligible. +PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc-initial:gcc-cross-initial" +PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}gcc:gcc-cross" +PREFERRED_PROVIDERS += " virtual/${TARGET_PREFIX}g++:gcc-cross" + +# Uncomment this to specify where OE should create its temporary files. +# Note that a full build of everything in OE will take GigaBytes of hard +# disk space, so make sure to free enough space. The default TMPDIR is +# /tmp +TMPDIR = ${OEROOT}/tmp + +# Uncomment this to specify a machine to build for. See the conf directory +# for machines currently known to OpenEmbedded. +MACHINE = "nslu2" + +# Uncomment this to select a distribution policy. See the conf directory +# for distributions currently known to OpenEmbedded. +DISTRO = "unslung" + +OPENSLUG_EXTRA_DEPENDS = "" +OPENSLUG_EXTRA_RDEPENDS = "" + +# Uncomment this to disable the parse cache (not recommended). +CACHE = "${OEROOT}/tmp/cache" + +# Uncomment this if you want OE to emit the log if a build fails. +OEINCLUDELOGS = "yes" + +# Specifies a location to search for pre-generated tarballs when fetching +# a cvs:// URI. Uncomment this, if you not want to pull directly from CVS. +CVS_TARBALL_STASH = "http://www.oesources.org/source/current/" + +# INHERIT += "src_distribute_local pkg_distribute" + +# EDIT THIS FILE and then remove the line below before using! -- 2.39.5