NSLU2-Linux
view · edit · print · history

Note that you can now use the instructions at NativelyCompileUnslungPackages to natively packages directly from the Unslung CVS repository.

a success on 10/28/2011 http://www.nslu2-linux.org/wiki/HowTo/TransmissionCompileBuild

This page is my (TJ Yang) learning note about compiling packages natively on nslu2.

This page will retire and merge with other page when time is right.

This is a hack not a real solution.

The real solution is to modify unslung/Makefile to support both platform better without following hacks.

Bill of materials and procedures:

  1. A NSLU2 box with Unslung 3.16 or 3.17 beta firmware.
  2. A good network connection to the Internet.
  3. Check out the package sources from NSLU2 CVS server.
  4. Install the native gcc compiler for NSLU2. See NativeFloatingPointToolchain.
  5. Modify unslung/Makefile for NSLU2 environment.
    1. Disable the crosstool build triggered by making other package.

      Example: you need do adjust the real absolute path to your own setting before running following two commands.These two command will let make skip the making of crosstool.

      touch /share/hdd/data/public/nslu2/tjyang/unslung/toolchain/crosstool/.configure
      touch /share/hdd/data/public/nslu2/tjyang/unslung/toolchain/crosstool/.built
    2. Adjust the CROSS_TARGET variable to gcc installed at 4.

      Example:Modify TARGET_CROSS variable to point to the arm5b native compiler you downloaded and installed.

      TARGET_CROSS=/share/hdd/data/tools/gcc/bin/$(GNU_TARGET_NAME)-
    3. All the scripts in make/*.mk assumes that the shell is bash. This is ok when it run on a Linux workstation but Unslung's "sh" is "ash". for now, I cheated by linking sh to /opt/bin/bash.
    4. "chmod go+w /dev/null;chmod go+rw /tmp" to fix a wrong mode from Unslung firmware (both 3.16 and 3.17 beta)
    5. make sure ar and strip exists, they are missing from gcc-3.4.2-glibc-2.3.2 version of rene's gcc.

      cp /share/hdd/data/tools/gcc/armv5b-softfloat-linux/bin/strip /share/hdd/data/tools/gcc/bin/armv5b-softfloat-linux-strip
      cp /share/hdd/data/tools/gcc/armv5b-softfloat-linux/bin/ar /share/hdd/data/tools/gcc/bin/armv5b-softfloat-linux-ar
  6. Do a test make by "make zlib" and you should see zlib compilation and should not see crosstool compilation.
  7. "ipkg -force-overwrite install bash" install bash.

T.J. Yang (tj_yang@hotmail.com)

view · edit · print · history · Last edited by SRS.
Based on work by rwhitby, tjyang, and tman.
Originally by tjyang.
Page last modified on October 29, 2011, at 02:44 AM