view · edit · print · history

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


Build a native version of GNU patch directly on your NSLU2 Box.


  1. Installation of Unslung.
  2. Successful completion of NativeNSLU2Toolchain (including setting and exporting C_INCLUDE_PATH), which provides a development environment on your NSLU2.
  3. Successful completion of BuildGNUMakeOnYourNSLU2Box. make is needed to make patch.
  4. Busybox version 1.00 (potentially optional). Use ipkg to install.


The instructions for making GNU patch are included in README and INSTALL files included in the release. However, this set of instructions are specific for the NSLU2. The only trick involved in making patch is passing the correct options to ./configure All these instructions take place directly on your NSLU2. Don't skip the prerequisites!

  1. Retrieve source code for GNU patch, and then unzip and untar it.

    cd /share/hdd/data (you can, of course, put it wherever you like -- a src/ dir may be apropos)
    wget ftp://ftp.gnu.org/gnu/patch/patch-2.5.4.tar.gz
    tar -zxvf patch-2.5.4.tar.gz
  2. Create the patch executable, and put it somewhere in your path. The configure script included with gnu patch is old enough not to recognize the armv5b, so we include it in step 2. The --prefix switch will cause make install to put patch into /opt/bin

    cd patch-2.5.4
    ./configure --host=armv5b-softfloat-linux --target=armv5b-softfloat-linux --prefix=/opt
    make install (ensure /opt/bin is in your path)

That's it, GNU patch for the NSLU2 on the NSLU2.

view · edit · print · history · Last edited by jeremyeglen.
Based on work by tman and jeremyeglen.
Originally by rwhitby.
Page last modified on April 14, 2005, at 10:26 PM