Changes between Version 3 and Version 4 of dev/setup/raspi-cross-builder


Ignore:
Timestamp:
Aug 3, 2012, 1:15:47 PM (8 years ago)
Author:
sam
Comment:

a few more instructions about Raspi cross-building

Legend:

Unmodified
Added
Removed
Modified
  • dev/setup/raspi-cross-builder

    v3 v4  
    4747make
    4848}}}
     49
     50== Using Debian / Raspbian libraries ==
     51
     52Choose a directory to store Raspbian packages, for instance `$RASPI_SDK_ROOT/chroot`. You can then use `debootstrap` to install packages to it, but if you have a multiarch-enabled system you can use this poor man's shell script:
     53
     54{{{
     55#!sh
     56raspi-install () {
     57    for pkg in "$@"
     58    do
     59        apt-get download "$pkg":armhf \
     60         && dpkg-deb -x "$pkg"_*.deb $RASPI_SDK_ROOT/chroot \
     61         && rm -f "$pkg"_*_armhf.deb
     62    done
     63}
     64}}}
     65
     66Then for ''eg.'' SDL:
     67
     68{{{
     69#!sh
     70raspi-install libsdl1.2debian libsdl1.2-dev
     71}}}
     72
     73Then add the following to `CPPFLAGS` in the configure line:
     74
     75{{{
     76#!sh
     77-I$RASPI_SDK_ROOT/root/usr/include
     78}}}
     79
     80And the following to `LDFLAGS`:
     81
     82{{{
     83#!sh
     84-L$RASPI_SDK_ROOT/chroot/lib/arm-linux-gnueabihf
     85-Wl,-rpath-link -Wl,$RASPI_SDK_ROOT/chroot/lib/arm-linux-gnueabihf
     86-L$RASPI_SDK_ROOT/chroot/usr/lib/arm-linux-gnueabihf
     87-Wl,-rpath-link -Wl,$RASPI_SDK_ROOT/chroot/usr/lib/arm-linux-gnueabihf
     88-Wl,--unresolved-symbols=ignore-in-shared-libs
     89}}}