First download a buildroot.tar.gz from here. Extract and run make menuconfig :
$ cd $PROJ_ROOT $ wget http://buildroot.uclibc.org/downloads/snapshots/buildroot-snapshot.tar.bz2 $ tar -jxf buildroot-snapshot.tar.bz2 $ mv buildroot-snapshot.tar.bz2 archives/ $ cd buildroot $ make menuconfig
The following is what I changed from the default:
Now run "make". Wait for the first download to complete the you will be asked four questions.
$ make <snip> * * uClibc Configuration * Target Architecture 1. alpha (TARGET_alpha) 2. arm (TARGET_arm) 3. bfin (TARGET_bfin) 4. cris (TARGET_cris) 5. e1 (TARGET_e1) 6. frv (TARGET_frv) 7. h8300 (TARGET_h8300) 8. i386 (TARGET_i386) 9. i960 (TARGET_i960) 10. m68k (TARGET_m68k) 11. microblaze (TARGET_microblaze) > 12. mips (TARGET_mips) 13. nios (TARGET_nios) 14. nios2 (TARGET_nios2) 15. powerpc (TARGET_powerpc) 16. superh (TARGET_sh) 17. sparc (TARGET_sparc) 18. v850 (TARGET_v850) 19. x86_64 (TARGET_x86_64) (NEW) choice[1-19?]: 12 * * Target Architecture Features and Options * Target Processor Architecture > 1. Generic (MIPS I) (CONFIG_MIPS_ISA_1) (NEW) 2. MIPS II (CONFIG_MIPS_ISA_2) (NEW) 3. MIPS III (CONFIG_MIPS_ISA_3) (NEW) 4. MIPS IV (CONFIG_MIPS_ISA_4) (NEW) 5. MIPS32 (CONFIG_MIPS_ISA_MIPS32) (NEW) 6. MIPS64 (CONFIG_MIPS_ISA_MIPS64) (NEW) choice[1-6?]: 5 Target Processor Endianness > 1. Little Endian (ARCH_LITTLE_ENDIAN) (NEW) 2. Big Endian (ARCH_BIG_ENDIAN) (NEW) choice[1-2?]: 1 Target CPU has a memory management unit (MMU) (ARCH_HAS_MMU) [Y/n/?] (NEW) y
Hit Enter to the first question (about the Target Architecture - you should have selected it in make menuconfig). Choose option 5 for the second (CONFIG_MIPS_ISA_MIPS32). Choose option 1 (ARCH_LITTLE_ENDIAN) for the third question and Y for ARCH_HAS_MMU. Now go and grab a drink, the required components will be downloaded and built.
Ok, once that is done you should have a shiny new toolchain sitting in ./build_mipsel/staging_dir/bin . You'll probably want to add that to your $PATH by adding the following lines to your .bashrc (make sure they are AFTER the PROJ_ROOT lines):
PATH=$PATH:$PROJ_ROOT/buildroot/build_mipsel/staging_dir/bin export PATH
IMPORTANT! You need to symlink /opt/brcm/hndtools-mipsel-linux-3.0 to $PROJ_ROOT/builroot/build_mipsel/staging_dir to fix some problems related to hard coded paths.
$ cd opt $ mkdir brcm $ ln -s $PROJ_ROOT/buildroot/build_mipsel/staging_dir brcm/hndtools-mipsel-linux-3.0
I've figured out something about the toolchain - it doesn't handle dependencies very well. I was getting hung up because I was trying to build nano, which depends on ncurses. But simply using make menuconfig and adding ncurses after finding this out did not help -- you have to make the dependencies first, then run through again with the dependants selected.