Compile for pandaboard

by groleo

An easier way than cross-compiling is to use mk-sbuild[1]/schroot[2]
For example, pandaboard is an hard-float arm, so you can create a chroot for it with:

  mk-sbuild --arch=armhf --name=arm-linux-gnueabi \
 --debootstrap-mirror= precise

When the process is done, you’ll get something like:

  To CHANGE the golden image: sudo schroot -c arm-linux-gnueabi-armhf-source -u root                                                                                                      
  To ENTER an image snapshot: schroot -c arm-linux-gnueabi-armhf                                                                                                                          
  To BUILD within a snapshot: sbuild -A -d arm-linux-gnueabi-armhf PACKAGE*.dsc

The chroot will be placed in


Now you can enter the image and compile your code, w/o going through all the –host/–target cross-compiling hassle.

In case you need to check if an ELF was compiled for armhf, you can run

readelf -A /path/to/binary | grep Tag_ABI_VFP_args

If compiled for armhf, you should see something like:

  Tag_ABI_VFP_args: VFP registers