NSLU2-Linux
view · edit · print · history

HowTo.OpenSlugNativeCompileEnvironment History

Hide minor edits - Show changes to markup

January 02, 2008, at 05:24 PM by dolphs -- package gone
Changed line 7 from:
  1. ipkg install slugos-native
to:
  1. ipkg install slugos-native -this package no longer exists on slugos 4.8beta-
July 10, 2006, at 11:46 AM by eFfeM --
Added lines 1-2:

This page is deprecated and for historical reference only. See SlugOSNativeCompileEnvironment for the new page.

July 08, 2006, at 10:58 PM by Harvy --
Changed line 67 from:
to:

down load and configure gcc --with-low-memory

July 08, 2006, at 07:10 PM by Harvy --
Changed lines 68-70 from:

download and install binutils 2.1.7

the ipk seems to work but some of the libs are missing....?

to:

the ipk seems to work but some of the libs are missing....? download and install binutils 2.1.7 (not ipk but tar.bz2 from gnu)

July 08, 2006, at 07:08 PM by Harvy --
Added lines 68-69:

download and install binutils 2.1.7

July 07, 2006, at 08:55 PM by eFfeM -- openslug-native -> slugos-native
Changed line 5 from:
  1. ipkg install openslug-native
to:
  1. ipkg install slugos-native
June 26, 2006, at 10:36 PM by Harvy --
Changed lines 68-70 from:
to:

the ipk seems to work but some of the libs are missing....?

June 26, 2006, at 08:23 PM by Harvy --
Changed lines 66-69 from:
to:

ipkg --force-overwrite install ipkg-utils

June 26, 2006, at 07:07 PM by Harvy -- Cosmetic
Changed lines 34-54 from:

will post musings and tidy up tommeow <Harvy> with openslug-native just installed it and it worked <Harvy> so far I have tried ldconfig <Harvy> stdio.h does not appear to be in /usr/include <Harvy> ah just emerged the libc headers -- found it

 Signoff: caplink811_log (Success)

<Harvy> no it is not -- wrong slug <Harvy> ok more of my soloish witterings where does kernel-dev live not /usr/src

 koen (n=koen@72.22.143.163) has joined channel #openslug

<Harvy> ahh of course libc6-dev and bind-dev were missingggggggggggggggggggggggggggggggggggggg <Harvy> wounder if anybody will ever read this

 EvilDevil?_ (n=miau@p54A6CE02.dip.t-dialin.net) has joined channel #openslug
 Signoff: kami22 ()

<Harvy> Configuring libthread-db1 <Harvy> //usr/lib/ipkg/info/libthread-db1.postinst: 4: ldconfig: not found <Harvy> postinst script returned status 127 <Harvy> ERROR: libthread-db1.postinst returned 127 run /sbin/ldconfig <Harvy> Nothing to be done <Harvy> is slu bug ever goiing to be back up...?

to:

stdio.h does not appear to be in /usr/include so install libc6-dev and bind-dev

the next problem is configuring libthread-db1 //usr/lib/ipkg/info/libthread-db1.postinst: 4: ldconfig: not found libthread-db1.postinst returned 127 so run /sbin/ldconfig by hand

Deleted lines 49-50:

I will tidy this up when I get native to work

Changed lines 66-69 from:

having a 2.7 slug and a slug3 is helping as long as I dont get mixed up

to:
June 20, 2006, at 10:42 PM by Harvy --
Changed lines 56-57 from:
to:

works with a warning

Added lines 60-82:

I will tidy this up when I get native to work

nano fails gcc does not seem to be looking for libs in /lib bb -b openembedded/packages/nano/nano_1.3.9.bb NOTE: package nano-1.3.9: started NOTE: package nano-1.3.9-r0: task do_fetch: started NOTE: package nano-1.3.9-r0: task do_fetch: completed NOTE: package nano-1.3.9-r0: task do_package: started NOTE: Couldn't find shared library provider for libncurses.so.5 NOTE: Couldn't find shared library provider for libc.so.6 NOTE: Couldn't find shared library provider for libncurses.so.5 NOTE: Couldn't find shared library provider for libc.so.6 sh: ipkg-build: not found NOTE: Task failed: ipkg-build execution failed NOTE: package nano-1.3.9-r0: task do_package: failed ERROR: TaskFailed? event exception, aborting

having a 2.7 slug and a slug3 is helping as long as I dont get mixed up

June 20, 2006, at 07:48 PM by Harvy --
Added lines 56-58:

testing with bb -b openembedded/packages/nano/nano_1.3.9.bb

June 20, 2006, at 07:45 PM by Harvy --
Changed lines 30-55 from:

The command ipkg install openslug-native will install all tools for development, so you can also do your own coding.

to:

The command ipkg install openslug-native will install all tools for development, so you can also do your own coding.


not any more. will post musings and tidy up tommeow <Harvy> with openslug-native just installed it and it worked <Harvy> so far I have tried ldconfig <Harvy> stdio.h does not appear to be in /usr/include <Harvy> ah just emerged the libc headers -- found it

 Signoff: caplink811_log (Success)

<Harvy> no it is not -- wrong slug <Harvy> ok more of my soloish witterings where does kernel-dev live not /usr/src

 koen (n=koen@72.22.143.163) has joined channel #openslug

<Harvy> ahh of course libc6-dev and bind-dev were missingggggggggggggggggggggggggggggggggggggg <Harvy> wounder if anybody will ever read this

 EvilDevil?_ (n=miau@p54A6CE02.dip.t-dialin.net) has joined channel #openslug
 Signoff: kami22 ()

<Harvy> Configuring libthread-db1 <Harvy> //usr/lib/ipkg/info/libthread-db1.postinst: 4: ldconfig: not found <Harvy> postinst script returned status 127 <Harvy> ERROR: libthread-db1.postinst returned 127 run /sbin/ldconfig <Harvy> Nothing to be done <Harvy> is slu bug ever goiing to be back up...?

test with gcc -o hello hello.c

January 18, 2006, at 09:37 AM by mrkzander --
Added lines 15-23:

I had to install boost and zlib in order to get monotone to complile

  1. Run ipkg install boost-dev
  2. Run wget http://www.zlib.net/zlib-1.2.3.tar.gz
  3. Run tar xvzf zlib-1.2.3.tar.gz
  4. Run cd zlib-1.2.3
  5. Run ./configure && make
  6. as ROOT Run make install

January 12, 2006, at 12:32 AM by Patrick Schneider -- Added build instructions for monotone >=0.24
Added lines 7-14:

At the moment (2006-01-12) it's necessary to download and compile monotone >=0.24 on the slug, because openslug 2.7beta ships with monotone 0.22 and there's no way to use the master Makefile without upgrading to 0.24 or 0.25 by yourself.

  1. Run wget http://www.venge.net/monotone/downloads/monotone-0.25.tar.gz
  2. Run tar xvzf monotone-0.25.tar.gz
  3. Run cd monotone-0.25
  4. Run ./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var
  5. This may take some time
  6. Run make && make install

This takes even more time. You might get a big cup of coffee. If you haven't de-undeclocked your NSLU2 yet, you'll consider it now... Thinking about setting up a cross-compile environment on your 3 Ghz PC? Yeah, me too. This step will take at least 4 hours on an overclocked slug.

December 16, 2005, at 08:35 AM by thx1011 -- More info for having a build system
Changed lines 1-2 from:

So you want do compile natively eh ?

to:

So you want to compile natively eh ?

Added lines 11-13:

The command ipkg install openslug-native will install all tools for development, so you can also do your own coding.

September 27, 2005, at 04:51 AM by rwhitby --
Deleted lines 10-57:

Everything below here is obsolete

Here's how [g2] does it. It may not be the best (I'm open for suggestions), but I've been able to build

  • Python 2.4.1
  • Linux kernel 2.6.11.2
  • libxml2
  • Apache 2.0.53
  • PHP 5.04
  • Schoolbell which uses Zope3 and Python
  • Perl 5.8.7 (note you neet to echo 5 > /proc/cpu/alignment for the ./configure.gnu to work)

Things you'll need

  1. A recent pull > mid June 2005 (this has all the openslug-packages)
  2. bb openslug-image and openslug-packages
  3. turnup to an external harddisk (you'll need the hd for swap)
  4. Setup the swap partition (I'm using 192MB with my 64MB fat slug)
  5. (for now) a http server on your build machine or a copy of the tmp/deploy/ipk directory

NOTE: When this HowTo was written, binutils and gnu-config were missing from openembedded/packages/meta/openslug-packages.bb If they are not built, add them in the OPENSLUG_DEVELOPMENT section.

What to do

  1. Edit /etc/ipkg.conf on your slug to point to you local ipkgs build. For me that meant removing the /etc/ipkg/oe-nslu2.conf file for now and changing /etc/ipkg.conf from having src line in there to point to "src openslug http://192.168.123.xx" which is my tmp/deploy/ipk directory.
  2. ipkg update
  3. (optional) I installed vim-tiny "ipkg install vim-tiny"
  4. Run the OpenSlugDevInst.sh script (I'll be adding this to openslug-init soon after some more testing
  5. tar up the following directories from your tmp/work/openslug-kernel-.../linux-2.6.11.2/include (asm-arm, asm-generic, linux) -- thanks to jacques for giving me this tip and the libpthread one that follows shortly.
  6. scp the tarball to your openslug target and untar those directories in /usr/include. Add a symlink of asm-arm to asm in that directory also. (ln -s asm-arm asm)

Feel empowered

At this point you are ready to build stuff. You can now do stuff like:

  1. wget http://www.python.org/ftp/python/2.4.1/Python-2.4.1.tar.bz2
  2. untar it
  3. cd Python-2.4.1
  4. ./configure 2>&1 | tee py_config.log
  5. make 2>&1 | tee py_make.log
  6. make test
  7. make install

Using BitBake on the slug

This is currently a bit experimental, and might change.

September 27, 2005, at 04:50 AM by rwhitby --
Added lines 3-14:
  1. Make sure you have lots of swap
  2. Add a normal user, 'slug' is recommended
  3. ipkg install openslug-native
  4. Login as the normal user
  5. Run wget http://www.nslu2-linux.org/Makefile && make setup
  6. Run bash, then cd openslug && source setup-env
  7. Now you can run make to build everything supposed to be built nativly, or use bb to build specific packages:
    bb -b openembedded/packages/perl/perl-5.8.7.bb

Everything below here is obsolete

Deleted lines 58-68:
  1. Make sure you have lots of swap
  2. Add a normal user, 'slug' is recommended
  3. ipkg install openslug-native
  4. Login as the normal user
  5. Run wget http://www.nslu2-linux.org/Makefile && make setup
  6. Run bash, then cd openslug && source setup-env
  7. Now you can run make to build everything supposed to be built nativly, or use bb to build specific packages:
    bb -b openembedded/packages/perl/perl-5.8.7.bb
August 28, 2005, at 09:31 AM by me -- just a little extra, to spare some typing when following this howto
Changed lines 28-29 from:
  1. scp the tarball to your openslug target and untar those directories in /usr/include. Add a symlink of asm-arm to asm in that directory also.
to:
  1. scp the tarball to your openslug target and untar those directories in /usr/include. Add a symlink of asm-arm to asm in that directory also. (ln -s asm-arm asm)
August 03, 2005, at 03:31 PM by daka --
Changed lines 45-46 from:

This is currently highly experimental, and will change alot.

to:

This is currently a bit experimental, and might change.

Changed line 49 from:
  1. ipkg install openslug-native
to:
  1. ipkg install openslug-native
Changed lines 51-56 from:
  1. Run wget http://www.nslu2-linux.org/Makefile && make setup
  2. Run bash, then cd openslug && source setup-env
  3. Now you can build everything supposed to be build nativly with make, or use bb to build specific packages, for example bb -b openembedded/packages/perl/perl-5.8.7.bb
to:
  1. Run wget http://www.nslu2-linux.org/Makefile && make setup
  2. Run bash, then cd openslug && source setup-env
  3. Now you can run make to build everything supposed to be built nativly, or use bb to build specific packages:
    bb -b openembedded/packages/perl/perl-5.8.7.bb
August 03, 2005, at 03:28 PM by daka --
Changed lines 45-46 from:

This is currently highly experimental, and will change alot. This is supposed to be simplified over time.

to:

This is currently highly experimental, and will change alot.

Changed line 48 from:
  1. Add an user, 'slug' is recommended
to:
  1. Add a normal user, 'slug' is recommended
Changed lines 52-56 from:
  1. Done, make sure you are logged in as your normal user, run bash, then cd openslug && source setup-env
  2. Now you can use bb to build packages, for example bb -b openembedded/packages/perl/perl-5.8.7.bb. just wait 3 hours and you will have your packages :-)
to:
  1. Run bash, then cd openslug && source setup-env
  2. Now you can build everything supposed to be build nativly with make, or use bb to build specific packages, for example bb -b openembedded/packages/perl/perl-5.8.7.bb
August 03, 2005, at 02:46 PM by daka --
Deleted lines 49-50:
  1. ipkg install ipkg-utils libtool quilt pkgconfig --force-depend --force-overwrite
  2. ln -s libtool /usr/bin/armeb-linux-libtool <-- If this is really needed is unknown.. testing needed
Changed lines 51-53 from:
  1. Run wget http://www.nslu2-linux.org/Makefile && make setup && cd openslug && make setup-env conf/local.conf
  2. Add/change the folowing in your openslug/local.conf:
    DISTRO = "openslug-native"
to:
  1. Run wget http://www.nslu2-linux.org/Makefile && make setup
July 31, 2005, at 11:00 PM by daka --
Changed line 51 from:
  1. ln -s libtool /usr/bin/armeb-linux-libtool
to:
  1. ln -s libtool /usr/bin/armeb-linux-libtool <-- If this is really needed is unknown.. testing needed
July 31, 2005, at 10:59 PM by daka --
Changed lines 55-58 from:

ASSUME_PROVIDED = "libtool-cross libtool-native automake-native autoconf-native \
quilt-native ipkg-utils-native gnu-config-native pkgconfig-native \
virtual/armeb-linux-gcc virtual/libc update-rc.d"
BUILD_ARCH = armeb

to:

DISTRO = "openslug-native"

July 31, 2005, at 10:29 PM by daka --
Changed line 58 from:

BUILD_ARCH = armeb \\

to:

BUILD_ARCH = armeb

July 31, 2005, at 10:29 PM by daka --
Changed line 51 from:
  1. ln -s /usr/bin/libtool armeb-linux-libtool
to:
  1. ln -s libtool /usr/bin/armeb-linux-libtool
July 31, 2005, at 10:27 PM by daka --
Changed line 53 from:
  1. Run wget http://www.nsul2-linux.org/Makefile && make setup && cd openslug && make setup-env conf/local.conf
to:
  1. Run wget http://www.nslu2-linux.org/Makefile && make setup && cd openslug && make setup-env conf/local.conf
July 31, 2005, at 10:26 PM by daka --
Changed lines 52-53 from:
  1. Copy bitbake, openembedded, openslug (excluding tmp) and oe-symlinks from you normal build host to the homedirectory of the user you created
  2. cd bitbake && ./setup.py build && ./setup.py install
to:
  1. Login as the normal user
  2. Run wget http://www.nsul2-linux.org/Makefile && make setup && cd openslug && make setup-env conf/local.conf
Deleted lines 58-59:

BBFILES := "${OEROOT}/oe-symlinks/native/*/*.bb"

  1. Create oe-symlinks/native and link in the packages you want avaliable
Changed lines 60-63 from:
  1. Now you can use bb to build packages, for example bb perl. just wait 3 hours and you will have your packages :-)
to:
  1. Now you can use bb to build packages, for example bb -b openembedded/packages/perl/perl-5.8.7.bb. just wait 3 hours and you will have your packages :-)
July 30, 2005, at 08:39 PM by daka --
Changed lines 49-53 from:
  1. Run the OpenSlugDevInst.sh script
  2. Install all of python except python-curses, using: ipkg list | grep ^python | grep -v curses | cut -f1 -d" " | xargs ipkg install
  3. Install perl, unfortuanly there is no working perl in the feed right now, there are some unofficial ones you can use by running: echo "src/gz oe2 http://david.thg.se/saker/openslug/native/unstable" >
    /etc/ipkg/perl-feed.conf && ipkg update && ipkg install perl

    you can also build it locally yourself it you want.
to:
  1. ipkg install openslug-native
July 22, 2005, at 12:40 AM by daka --
Changed line 58 from:
  1. Add/change the folowing to your openslug/local.conf:\\
to:
  1. Add/change the folowing in your openslug/local.conf:\\
July 22, 2005, at 12:40 AM by daka --
Changed lines 52-53 from:

/etc/ipkg/perl-feed.conf && ipkg update && ipkg install perl@@, you can build it locally yourself it you want.

to:

/etc/ipkg/perl-feed.conf && ipkg update && ipkg install perl@@
you can also build it locally yourself it you want.

July 22, 2005, at 12:37 AM by daka --
Changed line 62 from:

BBFILES := "${OEROOT}/oe-symlinks/native/*/*.bb" \\

to:

BBFILES := "${OEROOT}/oe-symlinks/native/*/*.bb"

July 22, 2005, at 12:36 AM by daka --
Added lines 42-68:

Using BitBake on the slug

This is currently highly experimental, and will change alot. This is supposed to be simplified over time.

  1. Make sure you have lots of swap
  2. Add an user, 'slug' is recommended
  3. Run the OpenSlugDevInst.sh script
  4. Install all of python except python-curses, using: ipkg list | grep ^python | grep -v curses | cut -f1 -d" " | xargs ipkg install
  5. Install perl, unfortuanly there is no working perl in the feed right now, there are some unofficial ones you can use by running: echo "src/gz oe2 http://david.thg.se/saker/openslug/native/unstable" >
    /etc/ipkg/perl-feed.conf && ipkg update && ipkg install perl
    , you can build it locally yourself it you want.
  6. ipkg install ipkg-utils libtool quilt pkgconfig --force-depend --force-overwrite
  7. ln -s /usr/bin/libtool armeb-linux-libtool
  8. Copy bitbake, openembedded, openslug (excluding tmp) and oe-symlinks from you normal build host to the homedirectory of the user you created
  9. cd bitbake && ./setup.py build && ./setup.py install
  10. Add/change the folowing to your openslug/local.conf:
    ASSUME_PROVIDED = "libtool-cross libtool-native automake-native autoconf-native \
    quilt-native ipkg-utils-native gnu-config-native pkgconfig-native \
    virtual/armeb-linux-gcc virtual/libc update-rc.d"
    BUILD_ARCH = armeb
    BBFILES := "${OEROOT}/oe-symlinks/native/*/*.bb"
    # Create oe-symlinks/native and link in the packages you want avaliable
  11. Done, make sure you are logged in as your normal user, run bash, then cd openslug && source setup-env
  12. Now you can use bb to build packages, for example bb perl. just wait 3 hours and you will have your packages :-)
June 25, 2005, at 08:16 PM by repvik --
Changed lines 29-30 from:
  1. cd /usr/lib; edit libc.so and libpthread.so and delete the comments before the GROUP line. I think this is the 4 for lines.

NOTE: The three first lines are comments, the 4th line starts with *** BUG. Remove 'em all, leaving only the GROUP-line.

to:
June 23, 2005, at 10:14 PM by g2 -- Perl update
Changed lines 10-11 from:
  • Most of Perl (haven't tried the full compile in a while)
to:
  • Perl 5.8.7 (note you neet to echo 5 > /proc/cpu/alignment for the ./configure.gnu to work)
June 23, 2005, at 11:47 AM by repvik -- clarification of GROUP-line
Changed line 30 from:

NOTE: The three first lines are comments, the 4th line starts with *** BUG. Remove 'em all.

to:

NOTE: The three first lines are comments, the 4th line starts with *** BUG. Remove 'em all, leaving only the GROUP-line.

June 22, 2005, at 03:58 AM by repvik -- /usr/lib/*.so editing.
Changed lines 18-20 from:
to:

NOTE: When this HowTo was written, binutils and gnu-config were missing from openembedded/packages/meta/openslug-packages.bb If they are not built, add them in the OPENSLUG_DEVELOPMENT section.

Changed line 30 from:
to:

NOTE: The three first lines are comments, the 4th line starts with *** BUG. Remove 'em all.

June 17, 2005, at 06:53 PM by g2 --
Changed line 25 from:
  1. tar up the following directories from your tmp/work/openslug-kernel-.../linux-2.6.11.2/include (asm-arm, asm-generic, linux)
to:
  1. tar up the following directories from your tmp/work/openslug-kernel-.../linux-2.6.11.2/include (asm-arm, asm-generic, linux) -- thanks to jacques for giving me this tip and the libpthread one that follows shortly.
June 17, 2005, at 06:51 PM by g2 -- Add OpenSlug native compile information here
Added lines 1-40:

So you want do compile natively eh ?

Here's how [g2] does it. It may not be the best (I'm open for suggestions), but I've been able to build

  • Python 2.4.1
  • Linux kernel 2.6.11.2
  • libxml2
  • Apache 2.0.53
  • PHP 5.04
  • Schoolbell which uses Zope3 and Python
  • Most of Perl (haven't tried the full compile in a while)

Things you'll need

  1. A recent pull > mid June 2005 (this has all the openslug-packages)
  2. bb openslug-image and openslug-packages
  3. turnup to an external harddisk (you'll need the hd for swap)
  4. Setup the swap partition (I'm using 192MB with my 64MB fat slug)
  5. (for now) a http server on your build machine or a copy of the tmp/deploy/ipk directory

What to do

  1. Edit /etc/ipkg.conf on your slug to point to you local ipkgs build. For me that meant removing the /etc/ipkg/oe-nslu2.conf file for now and changing /etc/ipkg.conf from having src line in there to point to "src openslug http://192.168.123.xx" which is my tmp/deploy/ipk directory.
  2. ipkg update
  3. (optional) I installed vim-tiny "ipkg install vim-tiny"
  4. Run the OpenSlugDevInst.sh script (I'll be adding this to openslug-init soon after some more testing
  5. tar up the following directories from your tmp/work/openslug-kernel-.../linux-2.6.11.2/include (asm-arm, asm-generic, linux)
  6. scp the tarball to your openslug target and untar those directories in /usr/include. Add a symlink of asm-arm to asm in that directory also.
  7. cd /usr/lib; edit libc.so and libpthread.so and delete the comments before the GROUP line. I think this is the 4 for lines.

Feel empowered

At this point you are ready to build stuff. You can now do stuff like:

  1. wget http://www.python.org/ftp/python/2.4.1/Python-2.4.1.tar.bz2
  2. untar it
  3. cd Python-2.4.1
  4. ./configure 2>&1 | tee py_config.log
  5. make 2>&1 | tee py_make.log
  6. make test
  7. make install
view · edit · print · history · Last edited by dolphs.
Based on work by eFfeM, Harvy, mrkzander, Patrick Schneider, thx1011, rwhitby, me, daka, repvik, and g2.
Originally by g2.
Page last modified on January 02, 2008, at 05:24 PM