On target-plattofrm (raspberry pi) (source)
sudo apt-get install html-xml-utils curl
mkdir -p bcm2835 && (wget -qO - `curl -sL http://www.airspayce.com/mikem/bcm2835 | hxnormalize -x -e | hxselect -s '\n' -c "div.textblock>p:nth-child(4)>a:nth-child(1)"` | tar xz --strip-components=1 -C bcm2835 )
cd bcm2835
./configure
make
sudo make install
For Cross-compilation:
sudo apt-get install html-xml-utils curl gcc-arm-linux-gnueabihf
mkdir -p bcm2835 && (wget -qO - `curl -sL http://www.airspayce.com/mikem/bcm2835 | hxnormalize -x -e | hxselect -s '\n' -c "div.textblock>p:nth-child(4)>a:nth-child(1)"` | tar xz --strip-components=1 -C bcm2835 )
cd bcm2835
./configure --build=arm-linux --host=arm-rpi-linux-gnueabi
make CC="arm-linux-gnueabihf-gcc"
sudo make CC="arm-linux-gnueabihf-gcc" install