Setting up a cross compiler: Buildroot notes

This post was written by eli on May 2, 2013
Posted Under: ARM,Linux,Software,Zynq

Just a quick summary on how to compile my own cross-compiler in 20 minutes.

  • Download from Buildroot’s home page
  • Run “make xconfig”. The configuration is stored in .config
  • Possibly set BR2_JLEVEL=8 for parallel compilation(even though 0 should just do it right according to the number of processors present)
  • Pick little Endian ARM Cortex-9 for Xillinux (Zynq-7000)
  • “make source” to grab the tarballs
  • The run “make”. Should take 10 minutes on a quadcore with hyperthreading.
  • The cross compiler’s executable is at output/host/usr/arm-buildroot-linux-uclibcgnueabi/bin/gcc but don’t use it directly (or you get “error trying to exec ‘cc1′: execvp: No such file or directory”)
  • Instead, go something like
    output/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc -Wall -O3 --static -o hello hello.c
  • The same prefix goes for other cross-compilation binutils

Add a Comment

required, use real name
required, will not be published
optional, your blog address