NSLU2-Linux
view · edit · print · history

Main.UpSlug2 History

Hide minor edits - Show changes to markup

October 12, 2008, at 08:40 PM by Reedy -- fix
Changed lines 40-41 from:
  • openSUSE: [@http://software.opensuse.org/search?baseproject=ALL&p=1&q=upslug2]
to:
  • openSUSE: http://software.opensuse.org/search?baseproject=ALL&p=1&q=upslug2
October 12, 2008, at 08:39 PM by Reedy -- better opensuse link
Changed lines 40-41 from:
  • openSUSE: http://software.opensuse.org/search?q=upslug2&baseproject=home:bwalle
to:
  • openSUSE: [@http://software.opensuse.org/search?baseproject=ALL&p=1&q=upslug2]
July 19, 2008, at 09:32 PM by Tim Hastings -- Dropped the 1st person.
Changed lines 84-85 from:

I successfully ran upslug2 from a virtual Fedora 7 on Microsoft Virtual PC / Vista.

to:

Upslug2 also works from a virtual Fedora 7 on Microsoft Virtual PC / Vista.

July 19, 2008, at 09:30 PM by Tim Hastings -- Microsoft Virtual PC / Fedora on Vista
Added lines 84-85:

I successfully ran upslug2 from a virtual Fedora 7 on Microsoft Virtual PC / Vista.

January 25, 2008, at 08:46 PM by fcarolo -- formatting
Changed lines 82-83 from:

For a proof of Debian Etch running Upslug2 in a VMWare 6 pc, bridged network to a 64bit Vista Ultimate host, see: http://images.reedyboy.net/VMWare.jpg

to:

For a proof of Debian Etch running Upslug2 in a VMWare 6 pc, bridged network to a 64bit Vista Ultimate host, see here.

January 25, 2008, at 08:45 PM by fcarolo -- formatting
Changed lines 80-81 from:

Upslug2 does work with VMware? Workstation. Note that the user must configure the VM to have access on the ethernet in Bridge mode. (Upslug2 requires layer 2 access on the network). You must be using version 6 or above of VMWare? workstation. Proof, Debian Etch running upslug2 in a VMWare? 6 pc, bridged network to a 64bit Vista Ultimate host - http://images.reedyboy.net/VMWare.jpg

to:

Upslug2 does work with VMware Workstation. Note that the user must configure the VM to have access on the ethernet in Bridge mode. (Upslug2 requires layer 2 access on the network). You must be using version 6 or above of VMWare workstation.

For a proof of Debian Etch running Upslug2 in a VMWare 6 pc, bridged network to a 64bit Vista Ultimate host, see: http://images.reedyboy.net/VMWare.jpg

January 25, 2008, at 08:35 PM by Reedy Boy -- tweak
Changed lines 80-81 from:

Last solution, Upslug2 does work with VMware? Workstation. Note that the user must configure the VM to have access on the ethernet in Bridge mode. (Upslug2 requires layer 2 access on the network). You must be using version 6 or above of VMWare? workstation. Proof - http://images.reedyboy.net/VMWare.jpg

to:

Upslug2 does work with VMware? Workstation. Note that the user must configure the VM to have access on the ethernet in Bridge mode. (Upslug2 requires layer 2 access on the network). You must be using version 6 or above of VMWare? workstation. Proof, Debian Etch running upslug2 in a VMWare? 6 pc, bridged network to a 64bit Vista Ultimate host - http://images.reedyboy.net/VMWare.jpg

January 25, 2008, at 08:33 PM by Reedy Boy -- comments to VMWare
Changed lines 78-79 from:

If you only have a Windows computer available you can make it run Linux temporarily just for UpSlug2, without affecting anything on its hard disk, by booting from a "Live" Linux CD such as Knoppix. Alternatively you could use the Sercomm Update Utility for Windows. Last solution, Upslug2 does work with VMware? Workstation. Note that the user must configure the VM to have access on the ethernet in Bridge mode. (Upslug2 requires layer 2 access on the network.)

to:

If you only have a Windows computer available you can make it run Linux temporarily just for UpSlug2, without affecting anything on its hard disk, by booting from a "Live" Linux CD such as Knoppix. Alternatively you could use the Sercomm Update Utility for Windows.

Last solution, Upslug2 does work with VMware? Workstation. Note that the user must configure the VM to have access on the ethernet in Bridge mode. (Upslug2 requires layer 2 access on the network). You must be using version 6 or above of VMWare? workstation. Proof - http://images.reedyboy.net/VMWare.jpg

January 19, 2008, at 06:02 PM by Ced --
Changed lines 78-80 from:

If you only have a Windows computer available you can make it run Linux temporarily just for UpSlug2, without affecting anything on its hard disk, by booting from a "Live" Linux CD such as Knoppix. Alternatively you could use the Sercomm Update Utility for Windows. Note that UpSlug2 is reported to not work from inside a VMWare virtual machine (Working in Vmware Workstation 5 with vmxnet driver).

to:

If you only have a Windows computer available you can make it run Linux temporarily just for UpSlug2, without affecting anything on its hard disk, by booting from a "Live" Linux CD such as Knoppix. Alternatively you could use the Sercomm Update Utility for Windows. Last solution, Upslug2 does work with VMware? Workstation. Note that the user must configure the VM to have access on the ethernet in Bridge mode. (Upslug2 requires layer 2 access on the network.)

January 08, 2008, at 01:26 PM by Meska --
Changed lines 78-80 from:

If you only have a Windows computer available you can make it run Linux temporarily just for UpSlug2, without affecting anything on its hard disk, by booting from a "Live" Linux CD such as Knoppix. Alternatively you could use the Sercomm Update Utility for Windows. Note that UpSlug2 is reported to not work from inside a VMWare virtual machine.

to:

If you only have a Windows computer available you can make it run Linux temporarily just for UpSlug2, without affecting anything on its hard disk, by booting from a "Live" Linux CD such as Knoppix. Alternatively you could use the Sercomm Update Utility for Windows. Note that UpSlug2 is reported to not work from inside a VMWare virtual machine (Working in Vmware Workstation 5 with vmxnet driver).

November 12, 2007, at 10:28 PM by marceln -- Added yum install for upslug2 on f7
Changed lines 37-38 from:
  • Fedora 7 i386: rpm -ihv http://pion.xs4all.nl/rpm/f7-i386/upslug-20070916-1.i386.rpm
  • Fedora 7 x86_64: rpm -ihv http://pion.xs4all.nl/rpm/f7-x86_64/upslug-20070916-1.x86_64.rpm
to:
  • Fedora 7/8: yum install upslug2
October 19, 2007, at 12:55 PM by fcarolo -- formatting, fixed false wikilinks
Changed lines 9-10 from:

Then, to find a list of NSLU2 machines in upgrade mode, just run the upslug2 program with no options. (Note that Upslug2 must always run as root):

to:

Then, to find a list of NSLU2 machines in upgrade mode, just run the upslug2 program with no options. (Note that UpSlug2 must always run as root):

Changed lines 26-30 from:

Upslug2 requires a direct connection to the NSLU2 in the same Ethernet segment. This means it will not work if you have routers or NAT devices between your computer and the NSLU2. A WiFi connection via a wireless access point can be used, however a wireless connection is not as reliable as a wired one and some users do not recommended it for re-flashing the NSLU2.

Obtaining upslug2

to:

UpSlug2 requires a direct connection to the NSLU2 in the same Ethernet segment. This means it will not work if you have routers or NAT devices between your computer and the NSLU2. A WiFi connection via a wireless access point can be used, however a wireless connection is not as reliable as a wired one and some users do not recommended it for re-flashing the NSLU2.

Obtaining UpSlug2

Changed lines 79-81 from:

If you only have a Windows computer available you can make it run Linux temporarily just for UpSlug2, without affecting anything on its hard disk, by booting from a "Live" Linux CD such as Knoppix. Alternatively you could use the Sercomm Update Utility for Windows. Note that UpSlug2 is reported to not work from inside a VMWare? virtual machine.

to:

If you only have a Windows computer available you can make it run Linux temporarily just for UpSlug2, without affecting anything on its hard disk, by booting from a "Live" Linux CD such as Knoppix. Alternatively you could use the Sercomm Update Utility for Windows. Note that UpSlug2 is reported to not work from inside a VMWare virtual machine.

Changed lines 99-100 from:

UpSlug2 has some of the functionality of slugimage (also in the NSLU cvs repository). When used with the --image option it copies the given image without change, however it does not overwrite the RedBoot or SysConf partitions. To overwrite these partitions use --image with --Complete-reprogram after editing the program (in upslug2.cc) to allow this option.

to:

UpSlug2 has some of the functionality of slugimage (also in the NSLU cvs repository). When used with the --image option it copies the given image without change, however it does not overwrite the RedBoot or SysConf partitions. To overwrite these partitions use --image with --Complete-reprogram after editing the program (in upslug2.cc) to allow this option.

October 19, 2007, at 09:38 AM by Phil Endecott -- Move windows instructions to a section with a heading
Changed lines 1-4 from:

UpSlug2 is a tool to flash your NSLU2 from a computer on the same network. It is available for Linux and MacOS X.

If you only have a Windows computer available you can make it run Linux temporarily just for UpSlug2, without affecting anything on its hard disk, by booting from a "Live" Linux CD such as Knoppix. Alternatively you could use the Sercomm Update Utility for Windows. Note that UpSlug2 is reported to not work from inside a VMWare? virtual machine.

to:

UpSlug2 is a tool to flash your NSLU2 from a computer on the same network. It is available for Linux and MacOS X. Windows users see below.

Changed lines 67-70 from:

Another note: For those whose Linux distro is not listed above (or you're running another OS altogether) and building of the source is not happening for whatever reason, albeit lack of a compiler or other dependencies, download and burn a live CD such as Ubuntu. Then either install the upslug2 package manually or use something like aptitude as listed above.

to:
Added lines 77-81:

Windows Users

If you only have a Windows computer available you can make it run Linux temporarily just for UpSlug2, without affecting anything on its hard disk, by booting from a "Live" Linux CD such as Knoppix. Alternatively you could use the Sercomm Update Utility for Windows. Note that UpSlug2 is reported to not work from inside a VMWare? virtual machine.

October 19, 2007, at 09:29 AM by Phil Endecott -- VMWare doesn\'t work, use a live CD instead
Changed lines 1-2 from:

UpSlug2 is a tool to flash your NSLU2 from a computer on the same network. It is available for Linux and MacOS X. If you use Windows, you should use Sercomm Update Utility for Windows.

to:

UpSlug2 is a tool to flash your NSLU2 from a computer on the same network. It is available for Linux and MacOS X.

If you only have a Windows computer available you can make it run Linux temporarily just for UpSlug2, without affecting anything on its hard disk, by booting from a "Live" Linux CD such as Knoppix. Alternatively you could use the Sercomm Update Utility for Windows. Note that UpSlug2 is reported to not work from inside a VMWare? virtual machine.

October 17, 2007, at 01:16 AM by fcarolo -- link to mac version
Changed lines 1-3 from:

UpSlug2 is a tool to flash your NSLU2 from a computer on the same network. It is available for Linux and MacOS X, but not for Windows.

to:

UpSlug2 is a tool to flash your NSLU2 from a computer on the same network. It is available for Linux and MacOS X. If you use Windows, you should use Sercomm Update Utility for Windows.

Added lines 43-44:

If you have a Mac, you will need to build UpSlug2 from source, as described in the UpSlug2 on OSX page.

September 24, 2007, at 09:33 PM by BrianZhou -- s/unslung/optware device/
Changed line 36 from:
  • Unslung slug, or any optware device or : ipkg install upslug2 (Yes, you can use a slug running Unslung, or any device that supports optware, to upgrade a slug.)
to:
  • Unslung slug, or any optware device: ipkg install upslug2 (Yes, you can use a slug running Unslung, or any device that supports optware, to upgrade a slug.)
September 24, 2007, at 09:33 PM by BrianZhou -- s/unslung/optware device/
Changed line 36 from:
  • Unslung 6.8: ipkg install upslug2 (Yes, you can use a slug running Unslung to upgrade another one.)
to:
  • Unslung slug, or any optware device or : ipkg install upslug2 (Yes, you can use a slug running Unslung, or any device that supports optware, to upgrade a slug.)
September 24, 2007, at 08:42 PM by fcarolo -- info about newer Ubuntu versions
Changed line 37 from:
  • Ubuntu (Edgy): sudo aptitude install upslug2
to:
  • Ubuntu (Edgy and above): sudo aptitude install upslug2
September 24, 2007, at 08:37 PM by fcarolo -- formatting
Changed lines 48-49 from:
svn co http://svn.nslu2-linux.org/svnroot/upslug2/trunk upslug2
to:
svn co http://svn.nslu2-linux.org/svnroot/upslug2/trunk upslug2
September 23, 2007, at 09:02 PM by bwalle -- change URL
Changed lines 42-43 from:
  • openSUSE: BuildService package
to:
  • openSUSE: http://software.opensuse.org/search?q=upslug2&baseproject=home:bwalle
September 23, 2007, at 09:01 PM by bwalle -- Added openSUSE link
Changed lines 42-43 from:
to:
  • openSUSE: BuildService package
September 16, 2007, at 07:58 PM by marceln -- Added fedora 7 and rhel 5 packages
Changed lines 38-43 from:
to:
  • Fedora 7 i386: rpm -ihv http://pion.xs4all.nl/rpm/f7-i386/upslug-20070916-1.i386.rpm
  • Fedora 7 x86_64: rpm -ihv http://pion.xs4all.nl/rpm/f7-x86_64/upslug-20070916-1.x86_64.rpm
  • rhel 5 i386: rpm -ihv http://pion.xs4all.nl/rpm/rhel5-i386/upslug-20070916-1.i386.rpm
  • rhel 5 x86_64: rpm -ihv http://pion.xs4all.nl/rpm/rhel5-x86_64/upslug-20070916-1.x86_64.rpm
September 15, 2007, at 06:52 AM by favorite_son -- whoops...messed up the first note
Deleted lines 53-54:

Another note: For those whose Linux distro is not listed above (or you're running another OS altogether) and building of the source is not happening for whatever reason, albeit lack of a compiler or other dependencies, download and burn a live CD such as Ubuntu. Then either install the upslug2 package manually or use something like aptitude as listed above.

Changed lines 61-62 from:
to:

Another note: For those whose Linux distro is not listed above (or you're running another OS altogether) and building of the source is not happening for whatever reason, albeit lack of a compiler or other dependencies, download and burn a live CD such as Ubuntu. Then either install the upslug2 package manually or use something like aptitude as listed above.

September 15, 2007, at 06:51 AM by favorite_son -- could not get ./configure to work in Fedora core 5. I know...dumb.
Added lines 54-55:

Another note: For those whose Linux distro is not listed above (or you're running another OS altogether) and building of the source is not happening for whatever reason, albeit lack of a compiler or other dependencies, download and burn a live CD such as Ubuntu. Then either install the upslug2 package manually or use something like aptitude as listed above.

Added line 64:
July 20, 2007, at 07:19 PM by fcarolo -- removed false wikilinks
Changed lines 149-150 from:
 RedBoot boot loader and the current 'SysConf?' configuration is not changed.
to:
 RedBoot boot loader and the current 'SysConf' configuration is not changed.
July 18, 2007, at 06:20 AM by mhornsby -- Correct install for Max OS
Deleted line 35:
  • OS X / fink: sudo fink install upslug2
April 15, 2007, at 05:28 PM by Rob Lockhart -- added full parameters to upslug2
Added lines 113-162:

Full information (from "upslug2 --help" output):

Usage: upslug2 {options}

 options:
  -h --help:                     output this help message
  -d --device[eth0]:             local ethernet device to use
  -t --target:                   NSLU2 to upgrade (MAC address)
  -f --from:                     MAC of host (this machine)
  -v --verify:                   verify only (do not write flash)
  -U --no-verify:                upgrade only (do not verify)
  -n --no-reboot:                do not reboot after upgrade
  -i --image:                    complete flash image to use
  -C --Complete-reprogram:       overwrite RedBoot
  -k --kernel:                   compressed kernel image (zImage)
  -r --ramdisk:                  compressed ramdisk image (rootfs)
  -R --ram-payload:              payload (replaces ramdisk)
  -j --rootfs:                   jffs2 (flash) rootfs
  -p --payload:                  FIS directory payload
  -e --endian[,b,b]:             kernel and data endianness;
                          [<kernel>],<data>[,<directory>]
                          l: little endian
                          p: pdp endian
                          b: big endian

  -P --product-id[1]:            2 byte product id
  -T --protocol-id[0]:           2 byte protocol id
  -F --firmware-version[0x2329]: 2 byte firmware version
  -E --extra-version[0x90f7]:    2 byte extra version info

 Specify --target to upgrade an NSLU2 (or to verify a previous upgrade)
 without no arguments upslug2 will list the NSLU2 machines which are currently
 in upgrade mode (and do nothing else).  Without --target upslug2 will only
 perform an upgrade if there is just one NSLU2 in upgrade mode.

 Specify --image=<file> if a complete NSLU2 flash image is available, if
 --Complete-reprogram is specified the whole flash image will be overwritten
 (the NSLU2 may become permanently unuseable if this is done), otherwise the
 RedBoot boot loader and the current 'SysConf?' configuration is not changed.

 Alternatively specify --kernel and --rootfs to build the image which will be
 used to upgrade the NSLU2.  In this case --product-id, --protocol-id and
 --firmware-version should be specified to set these fields in the flash image.

 Image endianness is detected automatically from the kernel.  By default no byte
 swapping is performed (none is normally necessary).  The --endian flag can be
 used to force byte swapping to occur.  It takes three arguments separated by ','
 characters to specify the endianness of the kernel, the data and the values in
 the RedBoot FIS directory
April 07, 2007, at 05:54 PM by Rob Lockhart -- added note for base offset for flash
Changed lines 97-98 from:

The partition layout is as follows:

to:

The partition layout is as follows (assuming 0x50000000 base offset):

April 04, 2007, at 12:56 PM by Ed -- Added ubuntu instructions for completeness.
Changed lines 38-39 from:
to:
  • Ubuntu (Edgy): sudo aptitude install upslug2
April 03, 2007, at 06:30 PM by fcarolo -- link formatting
Changed lines 1-3 from:

UpSlug2 is a tool to flash your NSLU2 from a computer on the same network. It is available for Linux and MacOS? X, but not for Windows.

to:

UpSlug2 is a tool to flash your NSLU2 from a computer on the same network. It is available for Linux and MacOS X, but not for Windows.

Changed lines 18-19 from:

You specify the flash image using the --image option. The flash image should be an 8 MByte? file. Here is an example:

to:

You specify the flash image using the --image option. The flash image should be an 8 MByte file. Here is an example:

Changed lines 57-58 from:

To build for MacOS? X or other BSD-derived operating systems, see Main.UpSlug2onOSX.

to:

To build for MacOS X or other BSD-derived operating systems, see Main.UpSlug2onOSX.

Changed lines 100-101 from:
SysConf? 0x40000..0x5FFFF: system configuration, cannot be changed.
to:
SysConf 0x40000..0x5FFFF: system configuration, cannot be changed.
April 03, 2007, at 10:14 AM by jv -- fixed minotr typo in automake version
Changed lines 55-56 from:
AM_INIT_AUTOMAKE(1.78)
to:
AM_INIT_AUTOMAKE(1.7.8)
April 03, 2007, at 10:13 AM by jv -- added note about autoconf and automake version change
Added lines 52-56:

Note: On Fedora Core 1, I had to modify the configure.ac file, changing the expected versions for autoconf and automake to the following.

AC_PREREQ(2.57)
AM_INIT_AUTOMAKE(1.78)
March 03, 2007, at 03:10 PM by Phil Endecott -- Tidy up and move MacOS X stuff to a new page
Changed lines 1-8 from:

UpSlug2 is a tool to flash your NSLU2 from an external computer on the same subnet. It is similar to the original UpSlug, however it can handle the separate components of an image (rootfs/kernel/etc) as well as a complete image.

It requires a direct connection to the NSLU2 in the same Ethernet segment. This means it will not work if you have routers or NAT devices between your computer and the NSLU2. A WiFi connection via a wireless access point can be used, however a wireless connection is not as reliable as a wired one and is not recommended for re-flashing the NSLU2.

The source code for UpSlug2 resides in the Subversion repository of the nslu2-linux project and has a standard GNU autotools configuration environment. You can fetch it from the repository at http://svn.nslu2-linux.org/svnroot/upslug2/trunk/ or you can browse it with trac.

Notice: according to the upslug2 readme you need darwinports from http://www.darwinports.org. But additionally you need the libpcap library. After installing darwinports just open a terminal and type 'port install libpcap'. (done unde Mac OS X.4.5, mhomscheidt)

to:

UpSlug2 is a tool to flash your NSLU2 from a computer on the same network. It is available for Linux and MacOS? X, but not for Windows.

Changed lines 6-9 from:

First you have to put your NSLU2 into upgrade mode (See UseTheResetButtonToEnterUpgradeMode).

Then, to find a list of NSLU2 machines in upgrade mode:

to:

See below for how to obtain and install the program.

To use it, first you have to put your NSLU2 into 'upgrade mode'. This is described here: UseTheResetButtonToEnterUpgradeMode.

Then, to find a list of NSLU2 machines in upgrade mode, just run the upslug2 program with no options. (Note that Upslug2 must always run as root):

Changed lines 14-17 from:

You must use the full ethernet MAC address (six pairs of hex digits separated by ':' characters) as the argument to the --target option to identify the slug to upgrade.

With a complete (8MByte) flash image: (This is a standard firmware release)

to:

If this doesn't find your Slug it means that either you have not put it in upgrade mode successfully, or the network connection between the PC and the Slug is not working (see the notes below about the network requirements). Or, if your PC has more than one network interface, you may need to specify one using --device.

If more than one Slug is detected you need to give the full ethernet MAC address (six pairs of hex digits separated by ':' characters) as the argument to the --target option to identify one of them. This is not necessary if there is only one Slug in upgrade mode.

You specify the flash image using the --image option. The flash image should be an 8 MByte? file. Here is an example:

Changed lines 22-41 from:

More specialized options for developers:

With just the kernel image ("zImage-openslug") and the image of the JFFS2 root file system ("openslug-nslu2-date.rootfs.jffs2"):

upslug2 --target="xx:xx:xx:xx:xx:xx" --kernel="zImage-openslug" --rootfs="openslug-nslu2-date.rootfs.jffs2"

To get more information about the options:

upslug2 --help

If you need to use an ethernet device other than eth0 (the default built in to the program) simply specify it with the --device option. Test that the device works correctly by using upslug2 with no options other than --device.

Remember you will need to run upslug2 as root in order for it to correctly access the ethernet interface on your host machine.

Building upslug2

At present the program is only released in the Subversion repository for the nslu2-linux project.

In order to build upslug2, get the source code from the Subversion repository:

to:

As it runs the program will display progress information as it erases, programs and verifies the flash. When it completes it will reboot the Slug.

Network Requirements

Upslug2 requires a direct connection to the NSLU2 in the same Ethernet segment. This means it will not work if you have routers or NAT devices between your computer and the NSLU2. A WiFi connection via a wireless access point can be used, however a wireless connection is not as reliable as a wired one and some users do not recommended it for re-flashing the NSLU2.

Obtaining upslug2

If you use one of the following distributions you can install it from the usual package repositories, as follows:

  • Gentoo: emerge upslug2
  • Debian etch: apt-get install upslug2
  • OS X / fink: sudo fink install upslug2
  • Unslung 6.8: ipkg install upslug2 (Yes, you can use a slug running Unslung to upgrade another one.)

Otherwise you can install from source as follows.

The source code for UpSlug2 resides in the Subversion repository of the nslu2-linux project and has a standard GNU autotools configuration environment. You can fetch it from the repository at http://svn.nslu2-linux.org/svnroot/upslug2/trunk/ or you can browse it with trac.

Changed lines 45-46 from:

After you have downloaded the source code, use the GNU autotools (e.g. autoconf and automake) and the GCC to build upslug2:

to:

After you have downloaded the source code, use GNU autotools (i.e. autoconf and automake) and GCC to build upslug2:

Added lines 52-58:

To build for MacOS? X or other BSD-derived operating systems, see Main.UpSlug2onOSX.

For other operating systems consult PortingUpslug2.

Permissions

Changed lines 63-107 from:

When made setuid the program only uses the root privilege to open the ethernet device (eth0 or the one specified to --device). The device name is only used in socket calls.

Prepackaged for distributions

  • Gentoo: emerge upslug2
  • Debian etch: apt-get install upslug2
  • OS X / fink: sudo fink install upslug2
  • Unslung 6.8: ipkg install upslug2 (Yes, you can use a slug running Unslung to upgrade another one.)

Building for operating systems other than Linux

For BSD derived operating systems -including Mac OS X- the source includes support for using libpcap in place of the raw packet interfaces used for Linux. Simply change the configure step:

./configure --with-libpcap

If necessary install libpcap to make this work - the configure step will fail if you do not already have libpcap installed.

For other operating systems consult PortingUpslug2.

UpSlug2 and OSX

Upslug2 (version 11) can be used on OS X, most easily either via DarwinPorts (gets you libpcap, not upslug2, yet?) or Fink (will shortly bring both, at least in 'unstable').

DarwinPorts: 'sudo port install libpcap' + build upslug2 & use '-d en0'

Note : DarwinPorts needs the libpcap libraries defined as in the Upslug2 README.macos

Fink: 'sudo fink install upslug2'

You may need to type 'rehash' before the 'upslug2' command becomes visible.

The following need to be considered:

  • libpcap >= 0.9.3 required (use DarwinPorts or Fink)
  • use 'sudo' to run the command: sudo upslug2
  • running a self-compiled upslug2, use './upslug2' to find the file

If your system MTU is not 1500, UpSlug2 may fail with the following error message: Message too long: transmit error N12NSLU2Upgrade9SendErrorE. Therefore, temporarily change your MTU size to 1500. I was using 1492.

For some reason, upslug2 is not available via fink. So go ahead and grab it directly from sourceforge.net: http://sourceforge.net/project/showfiles.php?group_id=116564

- Farhan Yousaf

Advanced use

to:

When made setuid the program only uses the root privilege to open the ethernet device (eth0 or the one specified to --device). The device name is only used in socket calls.

More specialized options for developers:

With just the kernel image ("zImage-openslug") and the image of the JFFS2 root file system ("openslug-nslu2-date.rootfs.jffs2"):

upslug2 --target="xx:xx:xx:xx:xx:xx" --kernel="zImage-openslug" --rootfs="openslug-nslu2-date.rootfs.jffs2"

To get more information about the options:

upslug2 --help

If you need to use an ethernet device other than eth0 (the default built in to the program) simply specify it with the --device option. Test that the device works correctly by using upslug2 with no options other than --device.

Remember you will need to run upslug2 as root in order for it to correctly access the ethernet interface on your host machine.

Changed lines 107-108 from:

Larry1981: My NSLU2 and computer are plugged on my home router. My router use the 192.168.0.1 IP, so I can't access the NSLU2 when it is in RedBoot mode. But I can confirm that UpSlug and UpSlug2 are working nice to flash any firmware even in that case. I noticed timeouts when upgrading my firmware in a X terminal. But it never happen when you do it from console. I suggest you to follow the recommandations on that website, but just wanted to share my experience with you. This tool give me more than I expected. I did not had a chance to test with a wireless connection yet, but as wireless is a hazardous thing, I would not recommand anyone to try.

to:

(The above partition information is not accurate for Debian installations that use APEX - would someone like to update it?)

January 18, 2007, at 02:38 PM by Michael Tomkins -- defined which readme
Changed lines 81-82 from:

Note : DarwinPorts needs the libpcap libraries defined as in the README.macos

to:

Note : DarwinPorts needs the libpcap libraries defined as in the Upslug2 README.macos

January 18, 2007, at 02:16 PM by Michael Tomkins -- Moved darwinports info to more logical place
Deleted lines 70-71:

Note : DarwinPorts needs the libpcap libraries defined as in the README.macos

Added lines 81-82:

Note : DarwinPorts needs the libpcap libraries defined as in the README.macos

January 11, 2007, at 09:40 PM by Michael Tomkins --
Changed lines 71-72 from:

Note : DarwinPorts? needs the libpcap libraries defined as in the README.macos

to:

Note : DarwinPorts needs the libpcap libraries defined as in the README.macos

January 11, 2007, at 09:37 PM by Michael Tomkins -- Reorganise previous edit on Darwin Ports
Added lines 71-72:

Note : DarwinPorts? needs the libpcap libraries defined as in the README.macos

Deleted lines 98-102:

-- If you use the DarwinPorts? version of libpcap you must set flags as in the upslug2 readme. Darwin Ports will quite happily install the libraries where MacOs? will not look for them.

- Michael Tomkins

January 11, 2007, at 09:17 PM by Michael Tomkins michftgmailcom -- Note the unobvoius flag setting required by Darwin Ports
Changed lines 97-101 from:
to:

-- If you use the DarwinPorts? version of libpcap you must set flags as in the upslug2 readme. Darwin Ports will quite happily install the libraries where MacOs? will not look for them.

- Michael Tomkins

December 31, 2006, at 01:09 AM by tlhackque -- Clarify what\'s used by developers vs. mortals\' use for fw install
Changed lines 19-20 from:

With a complete (8MByte) flash image:

to:

With a complete (8MByte) flash image: (This is a standard firmware release)

Added lines 23-24:

More specialized options for developers:

December 30, 2006, at 05:05 PM by Farhan Y -- Added link for upslug2
Changed lines 88-90 from:

If your system MTU is not 1500, UpSlug2 may fail with the following error message: Message too long: transmit error N12NSLU2Upgrade9SendErrorE. Therefore, temporarily change your MTU size to 1500. I was using 1492. - Farhan Yousaf

to:

If your system MTU is not 1500, UpSlug2 may fail with the following error message: Message too long: transmit error N12NSLU2Upgrade9SendErrorE. Therefore, temporarily change your MTU size to 1500. I was using 1492.

For some reason, upslug2 is not available via fink. So go ahead and grab it directly from sourceforge.net: http://sourceforge.net/project/showfiles.php?group_id=116564

- Farhan Yousaf

December 07, 2006, at 10:55 PM by fcarolo -- fixed wiki links
Changed lines 73-74 from:

UpSlug2 and OSX

to:

UpSlug2 and OSX

Changed lines 117-118 from:

The image is terminated by a 16 byte signature which identifies the image as valid to RedBoot and includes the product ID, protocol ID and firmware version fields (each two bytes) plus an extra 2 byte version field. The defaults for these fields are taken from the LinkSys? R29 image but may be changed by the corresponding upslug2 options.

to:

The image is terminated by a 16 byte signature which identifies the image as valid to RedBoot and includes the product ID, protocol ID and firmware version fields (each two bytes) plus an extra 2 byte version field. The defaults for these fields are taken from the LinkSys R29 image but may be changed by the corresponding upslug2 options.

December 07, 2006, at 10:53 PM by fcarolo -- cleanup, updated info about svn
Changed lines 1-7 from:

UpSlug2 is a tool to flash your NSLU2 from an external computer on the same subnet (direct Ethernet access is needed; it won't work if you have routers or NAT devices between you and the NSLU2, though WiFi? via a wireless router is OK). It is similar to the original UpSlug, however it can handle the separate components of an image (rootfs/kernel/etc) as well as a complete image.

UpSlug2 is in the same CVS repository on sourceforge (NSLU) as UpSlug and it has a standard GNU autotools configuration environment. You can fetch it from CVS, or you can browse it with viewcvs, or you can download a packaged release.


According to the upslug2 readme you need darwinports from http://www.darwinports.org. But additionally you need the libpcap library. After installing darwinports just open a terminal and type 'port install libpcap'. (done unde Mac OS X.4.5, mhomscheidt)

to:

UpSlug2 is a tool to flash your NSLU2 from an external computer on the same subnet. It is similar to the original UpSlug, however it can handle the separate components of an image (rootfs/kernel/etc) as well as a complete image.

It requires a direct connection to the NSLU2 in the same Ethernet segment. This means it will not work if you have routers or NAT devices between your computer and the NSLU2. A WiFi connection via a wireless access point can be used, however a wireless connection is not as reliable as a wired one and is not recommended for re-flashing the NSLU2.

The source code for UpSlug2 resides in the Subversion repository of the nslu2-linux project and has a standard GNU autotools configuration environment. You can fetch it from the repository at http://svn.nslu2-linux.org/svnroot/upslug2/trunk/ or you can browse it with trac.

Notice: according to the upslug2 readme you need darwinports from http://www.darwinports.org. But additionally you need the libpcap library. After installing darwinports just open a terminal and type 'port install libpcap'. (done unde Mac OS X.4.5, mhomscheidt)

Changed lines 11-12 from:

First you have to put your NSLU2 into upgrade mode (See UseTheResetButtonToEnterUpgradeMode). The page for UpSlug describe how to accomplish this feat.

to:

First you have to put your NSLU2 into upgrade mode (See UseTheResetButtonToEnterUpgradeMode).

Changed lines 37-47 from:

At present the program is only released in the sourceforge CVS repository, see the information on the NSLU sourceforge CVS page.

Get it from CVS using instructions posted here. Note: you want upslug2, so be sure to get it using this command: cvs -z3 co upslug2

When you have downloaded the CVS source from the upslug2 module use the GNU autotools (e.g. autoconf and automake) and the GCC to build upslug2:

autoreconf -i
./configure
make
to:

At present the program is only released in the Subversion repository for the nslu2-linux project.

In order to build upslug2, get the source code from the Subversion repository:

svn co http://svn.nslu2-linux.org/svnroot/upslug2/trunk upslug2

After you have downloaded the source code, use the GNU autotools (e.g. autoconf and automake) and the GCC to build upslug2:

cd upslug2
autoreconf -i
./configure
make
Changed lines 52-53 from:
install -o root -g wheel -m 4755 upslug2 /usr/bin/upslug2
to:
install -o root -g wheel -m 4755 upslug2 /usr/bin/upslug2
Changed lines 58-62 from:

Gentoo: emerge upslug2

OS X / fink: sudo fink install upslug2

to:
  • Gentoo: emerge upslug2
  • Debian etch: apt-get install upslug2
  • OS X / fink: sudo fink install upslug2
  • Unslung 6.8: ipkg install upslug2 (Yes, you can use a slug running Unslung to upgrade another one.)
Changed lines 77-78 from:

DarwinPorts?: 'sudo port install libpcap' + build upslug2 & use '-d en0'

to:

DarwinPorts: 'sudo port install libpcap' + build upslug2 & use '-d en0'

Changed line 83 from:
to:
  • libpcap >= 0.9.3 required (use DarwinPorts or Fink)
Changed lines 88-90 from:

If your system MTU is not 1500, UpSlug2 may fail with the following error message: Message too long: transmit error N12NSLU2Upgrade9SendErrorE?. Therefore, temporarily change your MTU size to 1500. I was using 1492. - Farhan Yousaf

to:

If your system MTU is not 1500, UpSlug2 may fail with the following error message: Message too long: transmit error N12NSLU2Upgrade9SendErrorE. Therefore, temporarily change your MTU size to 1500. I was using 1492. - Farhan Yousaf

Changed lines 95-98 from:

UpSlug2 has some of the functionality of slugimage (also in the NSLU cvs repository). When used with the --image option it copies the given image without change, however it does not overwrite the RedBoot or SysConf? partitions. To overwrite these partitions use --image with --Complete-reprogram after editing the program (in upslug2.cc) to allow this option.

The --Complete-reprogram option is deliberately disabled because it overwrites the boot loader - if you get it wrong (because the image is incorrect) or if the power fails during the writing of the RedBoot partition you will have to use JTAG to reflash the boot loader.

to:

UpSlug2 has some of the functionality of slugimage (also in the NSLU cvs repository). When used with the --image option it copies the given image without change, however it does not overwrite the RedBoot or SysConf partitions. To overwrite these partitions use --image with --Complete-reprogram after editing the program (in upslug2.cc) to allow this option.

The --Complete-reprogram option is deliberately disabled because it overwrites the boot loader - if you get it wrong (because the image is incorrect) or if the power fails during the writing of the RedBoot partition you will have to use JTAG to reflash the boot loader.

Changed lines 101-104 from:

With the options documented above a fairly standard flash layout is produced, matching that used in the OpenSlug image. It is also possible to write an old Unslung or LinkSys? style image which has a Ramdisk partition and no jffs2 (Flashdisk) partition.

The parition layout is as follows:

to:

With the options documented above a fairly standard flash layout is produced, matching that used in the OpenSlug image. It is also possible to write an old Unslung or LinkSys style image which has a Ramdisk partition and no jffs2 (Flashdisk) partition.

The partition layout is as follows:

Changed lines 111-114 from:
Ramdisk 0x160000..0x17FFFF: or larger. The ramdisk image, --ramdisk or the ramdisk payload --ram-payload. By default this is empty. With --ramdisk the given file is inserted as a compressed ramdisk image. WIth? ram-payload the file is inserted into the partition, however the header is left at length 0 preventing RedBoot from copying a ramdisk image.
Flashdisk end of ramdisk..0x7DFFFF: variable size. The JFFS2 rootfs image, --rootfs. The partition fills the remainder of the flash (to the start of the FIS directory). The file must be smaller than the available space to allow the JFF2? file system work space - at present an arbitrary free space minimum of one flash erase block (0x20000 bytes) is enforced.
to:
Ramdisk 0x160000..0x17FFFF: or larger. The ramdisk image, --ramdisk or the ramdisk payload --ram-payload. By default this is empty. With --ramdisk the given file is inserted as a compressed ramdisk image. With ram-payload the file is inserted into the partition, however the header is left at length 0 preventing RedBoot from copying a ramdisk image.
Flashdisk end of ramdisk..0x7DFFFF: variable size. The JFFS2 rootfs image, --rootfs. The partition fills the remainder of the flash (to the start of the FIS directory). The file must be smaller than the available space to allow the JFFS2 file system work space - at present an arbitrary free space minimum of one flash erase block (0x20000 bytes) is enforced.
August 23, 2006, at 09:35 PM by akauppi --
Changed lines 57-59 from:

OS X / fink: sudo fink install upslug2 (coming...)

to:

OS X / fink: sudo fink install upslug2

Changed lines 77-78 from:
to:
You may need to type 'rehash' before the 'upslug2' command becomes visible.
August 22, 2006, at 10:48 PM by akauppi --
Changed lines 79-82 from:

- libpcap >= 0.9.3 required (use DarwinPorts? or Fink) - use 'sudo' to run the command: sudo upslug2 - running a self-compiled upslug2, use './upslug2' to find the file

to:
  • libpcap >= 0.9.3 required (use DarwinPorts? or Fink)
  • use 'sudo' to run the command: sudo upslug2
  • running a self-compiled upslug2, use './upslug2' to find the file
August 22, 2006, at 10:46 PM by akauppi -- Major cleanup of OS X section
Added lines 57-59:

OS X / fink: sudo fink install upslug2 (coming...)

Changed lines 62-63 from:

For BSD derived operating systems including, in principle, Mac OS, the source includes support for using libpcap in place of the raw packet interfaces used for Linux. Simply change the configure step:

to:

For BSD derived operating systems -including Mac OS X- the source includes support for using libpcap in place of the raw packet interfaces used for Linux. Simply change the configure step:

Added lines 72-82:

Upslug2 (version 11) can be used on OS X, most easily either via DarwinPorts (gets you libpcap, not upslug2, yet?) or Fink (will shortly bring both, at least in 'unstable').

DarwinPorts?: 'sudo port install libpcap' + build upslug2 & use '-d en0'

Fink: 'sudo fink install upslug2'

The following need to be considered: - libpcap >= 0.9.3 required (use DarwinPorts? or Fink) - use 'sudo' to run the command: sudo upslug2 - running a self-compiled upslug2, use './upslug2' to find the file

Changed lines 84-98 from:
Text is not complete. A better place might be at UpSlugBuildInstructions? The readme of the UpSlug2 for OSX has similar instructions, but they are not online!
As it might help those not so much into unix, I added "To run it, you might need to use ./upslug2 <parameters> instead of upslug2 <parameters>"- Werner Teeling
Please also note that on most Mac OS X systems, eth0 is referred to as en0. Therefore, run upslug as follows: ./upslug2 <parameters> --device en0 - Farhan Yousaf
If your system MTU is not 1500, UpSlug2 may fail with the following error message: Message too long: transmit error [N12NSLU2Upgrade9SendErrorE?]. Therefore, temporarily change your MTU size to 1500. I was using 1492. - Farhan Yousaf

You can use the special OSX version of UpSlug2 (upslug2-11-osx.tgz ), available at the UpSlug2 SourceForge site.

The Mac OSX libpcap unfortunately does not support all the needed functions. Thanks to DarwinPorts, a more recent version can be installed. To get it, first install the DarwinPorts? for OSX (.dmg file). Then enter ' sudo port install libpcap' into terminal.

Copy UpSlug2 copy to $PATH (fi. /usr/local/bin), and proceed to InstallUnslungFirmware?. To run it, you might need to use ./upslug2 <parameters> instead of upslug2 <parameters>

This is a translated version of the original (German language)

to:

If your system MTU is not 1500, UpSlug2 may fail with the following error message: Message too long: transmit error N12NSLU2Upgrade9SendErrorE?. Therefore, temporarily change your MTU size to 1500. I was using 1492. - Farhan Yousaf

August 22, 2006, at 10:19 PM by akauppi -- Major syntax fix; \'\' -> \" to allow the commands to show right (they were showing as: x>x>x>x>x>x)
Changed lines 16-17 from:

You must use the full ethernet MAC address (six pairs of hex digits separated by : characters) as the argument to the --target option to identify the slug to upgrade.

to:

You must use the full ethernet MAC address (six pairs of hex digits separated by ':' characters) as the argument to the --target option to identify the slug to upgrade.

Changed lines 20-25 from:
upslug2 --target=xx:xx:xx:xx:xx:xx --image=openslug.img

With just the kernel image (zImage-openslug) and the image of the JFFS2 root file system (openslug-nslu2-date.rootfs.jffs2):

upslug2 --target=xx:xx:xx:xx:xx:xx --kernel=zImage-openslug --rootfs=openslug-nslu2-date.rootfs.jffs2
to:
upslug2 --target="xx:xx:xx:xx:xx:xx" --image="openslug.img"

With just the kernel image ("zImage-openslug") and the image of the JFFS2 root file system ("openslug-nslu2-date.rootfs.jffs2"):

upslug2 --target="xx:xx:xx:xx:xx:xx" --kernel="zImage-openslug" --rootfs="openslug-nslu2-date.rootfs.jffs2"
August 17, 2006, at 09:02 PM by marceln -- Corrected link
Changed line 3 from:

UpSlug2 is in the same CVS repository on sourceforge (NSLU) as UpSlug and it has a standard GNU autotools configuration environment. You can fetch it from CVS, or you can browse it with viewcvs, or you can download a packaged release.

to:

UpSlug2 is in the same CVS repository on sourceforge (NSLU) as UpSlug and it has a standard GNU autotools configuration environment. You can fetch it from CVS, or you can browse it with viewcvs, or you can download a packaged release.

June 11, 2006, at 09:02 PM by Farhan Yousaf --
Changed lines 72-73 from:
Please also note that on most Mac OS X systems, eth0 is referred to as en0. Therefore, run upslug as follows: ./upslug2 <parameters> --device en0
to:
Please also note that on most Mac OS X systems, eth0 is referred to as en0. Therefore, run upslug as follows: ./upslug2 <parameters> --device en0 - Farhan Yousaf
If your system MTU is not 1500, UpSlug2 may fail with the following error message: Message too long: transmit error [N12NSLU2Upgrade9SendErrorE?]. Therefore, temporarily change your MTU size to 1500. I was using 1492. - Farhan Yousaf
June 11, 2006, at 08:59 PM by Farhan Yousaf -- Added proper reference for Ethernet interface name on Mac OS X
Added line 72:
Please also note that on most Mac OS X systems, eth0 is referred to as en0. Therefore, run upslug as follows: ./upslug2 <parameters> --device en0
May 24, 2006, at 06:07 AM by PieteBrooks -- Add details of what \"the GNU autotools\" are
Changed lines 41-42 from:

When you have downloaded the CVS source from the upslug2 module use the GNU autotools and the GCC to build upslug2:

to:

When you have downloaded the CVS source from the upslug2 module use the GNU autotools (e.g. autoconf and automake) and the GCC to build upslug2:

May 06, 2006, at 05:20 AM by hughhalf -- Put in reminder that upslug2 needs to run as root to put ethernet IF in appropriate mode
Added lines 32-33:

Remember you will need to run upslug2 as root in order for it to correctly access the ethernet interface on your host machine.

May 02, 2006, at 09:52 PM by Werner Teeling -- osx part: added hint to run upslug2
Changed lines 68-69 from:
Text is not complete. A better place might be at UpSlugBuildInstructions? The readme of the UpSlug2 for OSX has similar instructions, but they are not online! - Werner Teeling
to:
Text is not complete. A better place might be at UpSlugBuildInstructions? The readme of the UpSlug2 for OSX has similar instructions, but they are not online!
As it might help those not so much into unix, I added "To run it, you might need to use ./upslug2 <parameters> instead of upslug2 <parameters>"- Werner Teeling
Changed lines 76-77 from:

Copy UpSlug2 copy to $PATH (fi. /usr/local/bin), and proceed to InstallUnslungFirmware?.

to:

Copy UpSlug2 copy to $PATH (fi. /usr/local/bin), and proceed to InstallUnslungFirmware?. To run it, you might need to use ./upslug2 <parameters> instead of upslug2 <parameters>

May 02, 2006, at 09:36 PM by Werner Teeling -- added thoughts on my text about osx.
Added lines 67-69:

Text is not complete. A better place might be at UpSlugBuildInstructions? The readme of the UpSlug2 for OSX has similar instructions, but they are not online! - Werner Teeling

Added line 78:
May 02, 2006, at 09:19 PM by Werner Teeling -- fixed url to darwinports in OSX-part
Changed line 69 from:

The Mac OSX libpcap unfortunately does not support all the needed functions. Thanks to , a more recent version can be installed.

to:

The Mac OSX libpcap unfortunately does not support all the needed functions. Thanks to DarwinPorts, a more recent version can be installed.

May 02, 2006, at 09:16 PM by Werner Teeling -- Added: how to use upslug2 on osx (new chapter)
Added lines 65-74:

UpSlug2 and OSX

You can use the special OSX version of UpSlug2 (upslug2-11-osx.tgz ), available at the UpSlug2 SourceForge site.

The Mac OSX libpcap unfortunately does not support all the needed functions. Thanks to , a more recent version can be installed. To get it, first install the DarwinPorts? for OSX (.dmg file). Then enter ' sudo port install libpcap' into terminal.

Copy UpSlug2 copy to $PATH (fi. /usr/local/bin), and proceed to InstallUnslungFirmware?. This is a translated version of the original (German language)

May 01, 2006, at 09:58 AM by mhomscheidt -- Minor editing changes like internetadress
Changed line 5 from:
According to the upslug2 readme you need darwinports from www.darwinports.org. But additionally you need the libpcap library. After installing darwinports just open a terminal and type 'port install libpcap'. (done unde Mac OS X.4.5)
to:
According to the upslug2 readme you need darwinports from http://www.darwinports.org. But additionally you need the libpcap library. After installing darwinports just open a terminal and type 'port install libpcap'. (done unde Mac OS X.4.5, mhomscheidt)
May 01, 2006, at 08:14 AM by mhomscheidt -- Addition for upslug2-11
Changed lines 4-7 from:
to:

According to the upslug2 readme you need darwinports from www.darwinports.org. But additionally you need the libpcap library. After installing darwinports just open a terminal and type 'port install libpcap'. (done unde Mac OS X.4.5)

March 31, 2006, at 07:58 PM by Larry1981 -- Removed my email address
Changed line 91 from:

Larry1981: My NSLU2 and computer are plugged on my home router. My router use the 192.168.0.1 IP, so I can't access the NSLU2 when it is in RedBoot mode. But I can confirm that UpSlug and UpSlug2 are working nice to flash any firmware even in that case. I noticed timeouts when upgrading my firmware in a X terminal. But it never happen when you do it from console. I suggest you to follow the recommandations on that website, but just wanted to share my experience with you. This tool give me more than I expected. I did not had a chance to test with a wireless connection yet, but as wireless is a hazardous thing, I would not recommand anyone to try. I would like to add a section on this wiki to add my easy tutorials, so if someone could contact me, I would appreciate: larry_laffer_pro ; hotmail.com (replace ' ; ' with '@').

to:

Larry1981: My NSLU2 and computer are plugged on my home router. My router use the 192.168.0.1 IP, so I can't access the NSLU2 when it is in RedBoot mode. But I can confirm that UpSlug and UpSlug2 are working nice to flash any firmware even in that case. I noticed timeouts when upgrading my firmware in a X terminal. But it never happen when you do it from console. I suggest you to follow the recommandations on that website, but just wanted to share my experience with you. This tool give me more than I expected. I did not had a chance to test with a wireless connection yet, but as wireless is a hazardous thing, I would not recommand anyone to try.

March 31, 2006, at 07:24 PM by Larry1981 -- Added a comment
Changed lines 88-91 from:

The image is terminated by a 16 byte signature which identifies the image as valid to RedBoot and includes the product ID, protocol ID and firmware version fields (each two bytes) plus an extra 2 byte version field. The defaults for these fields are taken from the LinkSys? R29 image but may be changed by the corresponding upslug2 options.

to:

The image is terminated by a 16 byte signature which identifies the image as valid to RedBoot and includes the product ID, protocol ID and firmware version fields (each two bytes) plus an extra 2 byte version field. The defaults for these fields are taken from the LinkSys? R29 image but may be changed by the corresponding upslug2 options.


Larry1981: My NSLU2 and computer are plugged on my home router. My router use the 192.168.0.1 IP, so I can't access the NSLU2 when it is in RedBoot mode. But I can confirm that UpSlug and UpSlug2 are working nice to flash any firmware even in that case. I noticed timeouts when upgrading my firmware in a X terminal. But it never happen when you do it from console. I suggest you to follow the recommandations on that website, but just wanted to share my experience with you. This tool give me more than I expected. I did not had a chance to test with a wireless connection yet, but as wireless is a hazardous thing, I would not recommand anyone to try. I would like to add a section on this wiki to add my easy tutorials, so if someone could contact me, I would appreciate: larry_laffer_pro ; hotmail.com (replace ' ; ' with '@').

January 06, 2006, at 12:14 PM by cooper -- link to UseTheResetButtonToEnterUpgradeMode added
Changed lines 7-8 from:

First you have to put your NSLU2 into upgrade mode. The page for UpSlug describe how to accomplish this feat.

to:

First you have to put your NSLU2 into upgrade mode (See UseTheResetButtonToEnterUpgradeMode). The page for UpSlug describe how to accomplish this feat.

November 30, 2005, at 12:07 AM by vapier -- add a sub-section undering building for distro maintainers
Deleted line 35:
Added lines 48-51:

Prepackaged for distributions

Gentoo: emerge upslug2

November 30, 2005, at 12:03 AM by vapier -- add some links to help people locate places to download the source
Changed lines 3-4 from:

UpSlug2 is in the same CVS repository on sourceforge (NSLU) as UpSlug and it has a standard GNU autotools configuration environment.

to:

UpSlug2 is in the same CVS repository on sourceforge (NSLU) as UpSlug and it has a standard GNU autotools configuration environment. You can fetch it from CVS, or you can browse it with viewcvs, or you can download a packaged release.

November 30, 2005, at 12:00 AM by vapier -- update the main description to be more clear as to what this is and how it works by taking some info from the UpSlug page
Changed lines 1-2 from:

UpSlug2 is a command to upload a kernel and rootfs image to an NSLU2. It is similar to the original UpSlug however it can handle the separate components of the image as well as a complete image.

to:

UpSlug2 is a tool to flash your NSLU2 from an external computer on the same subnet (direct Ethernet access is needed; it won't work if you have routers or NAT devices between you and the NSLU2, though WiFi? via a wireless router is OK). It is similar to the original UpSlug, however it can handle the separate components of an image (rootfs/kernel/etc) as well as a complete image.

November 29, 2005, at 11:55 PM by vapier -- tell users that they have to switch their slug to upgrade mode first
Changed lines 7-8 from:

To find a list of NSLU2 machines in upgrade mode:

to:

First you have to put your NSLU2 into upgrade mode. The page for UpSlug describe how to accomplish this feat.

Then, to find a list of NSLU2 machines in upgrade mode:

October 29, 2005, at 06:05 AM by Martin J Hsu -- added link and note about cvs co for upslug2
Added lines 31-34:

Get it from CVS using instructions posted here. Note: you want upslug2, so be sure to get it using this command: cvs -z3 co upslug2

September 26, 2005, at 06:39 AM by jbowler -- Updated for the change to remove handling for LKGfoo
Changed lines 11-12 from:

You can use either the LinkSys? name (LKGxxxxxx?) or the full ethernet MAC address (six pairs of hex digits separated by : characters) as the argument to the --target option to identify the slug to upgrade.

to:

You must use the full ethernet MAC address (six pairs of hex digits separated by : characters) as the argument to the --target option to identify the slug to upgrade.

Changed lines 15-16 from:
upslug2 --target=LKGxxxxxx --image=openslug.img
to:
upslug2 --target=xx:xx:xx:xx:xx:xx --image=openslug.img
Changed lines 19-20 from:
upslug2 --target=LKGxxxxxx --kernel=zImage-openslug --rootfs=openslug-nslu2-date.rootfs.jffs2
to:
upslug2 --target=xx:xx:xx:xx:xx:xx --kernel=zImage-openslug --rootfs=openslug-nslu2-date.rootfs.jffs2
September 05, 2005, at 01:40 AM by jbowler --
Changed lines 51-52 from:

For other operating systems consult PortingUpslug2?.

to:

For other operating systems consult PortingUpslug2.

September 05, 2005, at 01:39 AM by jbowler -- Added note about libpcap
Added lines 43-52:

Building for operating systems other than Linux

For BSD derived operating systems including, in principle, Mac OS, the source includes support for using libpcap in place of the raw packet interfaces used for Linux. Simply change the configure step:

./configure --with-libpcap

If necessary install libpcap to make this work - the configure step will fail if you do not already have libpcap installed.

For other operating systems consult PortingUpslug2?.

September 05, 2005, at 01:00 AM by jbowler --
Changed lines 57-58 from:
RedBoot 0..0x3FFFF: the boot loader, cannot be changed
SysConf? 0x40000..0x5FFFF: system configuration, cannot be changed
to:
RedBoot 0..0x3FFFF: the boot loader, cannot be changed.
SysConf? 0x40000..0x5FFFF: system configuration, cannot be changed.
Added line 62:
Added line 64:
Added line 66:
September 05, 2005, at 12:59 AM by jbowler -- Detailed partition layout options
Added lines 54-64:

The parition layout is as follows:

RedBoot 0..0x3FFFF: the boot loader, cannot be changed
SysConf? 0x40000..0x5FFFF: system configuration, cannot be changed
Kernel 0x60000..0x15FFFF: the compressed kernel, --kernel, limited to 1MByte by default. Changing the kernel to be bigger than this requires making an image with the four bytes at 0x160000..0x160003 (flash) or offset 0x10000..0x10003 in the image to be less or equal to 0x6A0000. upslug2 does not support this at present.
Ramdisk 0x160000..0x17FFFF: or larger. The ramdisk image, --ramdisk or the ramdisk payload --ram-payload. By default this is empty. With --ramdisk the given file is inserted as a compressed ramdisk image. WIth? ram-payload the file is inserted into the partition, however the header is left at length 0 preventing RedBoot from copying a ramdisk image.
Flashdisk end of ramdisk..0x7DFFFF: variable size. The JFFS2 rootfs image, --rootfs. The partition fills the remainder of the flash (to the start of the FIS directory). The file must be smaller than the available space to allow the JFF2? file system work space - at present an arbitrary free space minimum of one flash erase block (0x20000 bytes) is enforced.
FIS directory 0x7E0000..0x7FFFFF: the partition directory, as interpreted by the kernel. If given --payload specifies data to be included after the last partition entry. This data is preceded by a dummy partition name "\xffdat" and the length of the data file.

The image is terminated by a 16 byte signature which identifies the image as valid to RedBoot and includes the product ID, protocol ID and firmware version fields (each two bytes) plus an extra 2 byte version field. The defaults for these fields are taken from the LinkSys? R29 image but may be changed by the corresponding upslug2 options.

September 05, 2005, at 12:41 AM by jbowler -- Lots more detail on the command
Changed lines 3-53 from:

UpSlug2 is in the same CVS repository on sourceforge (NSLU) as UpSlug and it has a standard GNU autotools configuration environment.

to:

UpSlug2 is in the same CVS repository on sourceforge (NSLU) as UpSlug and it has a standard GNU autotools configuration environment.

Basic use

To find a list of NSLU2 machines in upgrade mode:

upslug2

You can use either the LinkSys? name (LKGxxxxxx?) or the full ethernet MAC address (six pairs of hex digits separated by : characters) as the argument to the --target option to identify the slug to upgrade.

With a complete (8MByte) flash image:

upslug2 --target=LKGxxxxxx --image=openslug.img

With just the kernel image (zImage-openslug) and the image of the JFFS2 root file system (openslug-nslu2-date.rootfs.jffs2):

upslug2 --target=LKGxxxxxx --kernel=zImage-openslug --rootfs=openslug-nslu2-date.rootfs.jffs2

To get more information about the options:

upslug2 --help

If you need to use an ethernet device other than eth0 (the default built in to the program) simply specify it with the --device option. Test that the device works correctly by using upslug2 with no options other than --device.

Building upslug2

At present the program is only released in the sourceforge CVS repository, see the information on the NSLU sourceforge CVS page.

When you have downloaded the CVS source from the upslug2 module use the GNU autotools and the GCC to build upslug2:

autoreconf -i
./configure
make

upslug2 must either be run as root or, more secure, install the program into a system directory with root setuid; as root:

install -o root -g wheel -m 4755 upslug2 /usr/bin/upslug2

When made setuid the program only uses the root privilege to open the ethernet device (eth0 or the one specified to --device). The device name is only used in socket calls.

Advanced use

Overwriting the boot loader

UpSlug2 has some of the functionality of slugimage (also in the NSLU cvs repository). When used with the --image option it copies the given image without change, however it does not overwrite the RedBoot or SysConf? partitions. To overwrite these partitions use --image with --Complete-reprogram after editing the program (in upslug2.cc) to allow this option.

The --Complete-reprogram option is deliberately disabled because it overwrites the boot loader - if you get it wrong (because the image is incorrect) or if the power fails during the writing of the RedBoot partition you will have to use JTAG to reflash the boot loader.

Changing the partitions

With the options documented above a fairly standard flash layout is produced, matching that used in the OpenSlug image. It is also possible to write an old Unslung or LinkSys? style image which has a Ramdisk partition and no jffs2 (Flashdisk) partition.

September 04, 2005, at 06:22 PM by jbowler -- Initial page for UpSlug2
Added lines 1-3:

UpSlug2 is a command to upload a kernel and rootfs image to an NSLU2. It is similar to the original UpSlug however it can handle the separate components of the image as well as a complete image.

UpSlug2 is in the same CVS repository on sourceforge (NSLU) as UpSlug and it has a standard GNU autotools configuration environment.