sudo rpi-update
reference: New script to compile TP-Link TL-WN725N version 2 lwfinger driver in Raspbian
ID 0bda:8179 Realtek Semiconductor Corp.
~root:
apt-get install lighttpd mysql-server php5-common php5-cgi php5 php5-mysql
lighty-enable-mod fastcgi-php
service lighttpd force-reload
chown www-data:www-data /var/www
chmod 775 /var/www
usermod -a -G www-data pi
~pi:
newgrp www-data # needed only once after usermod
echo '<?php phpinfo(); ' > /var/www/index.php
download tools-master.zip
cd /tmp
# I'm using i686 the directory depend on host architecture (32/64 bit)
unzip ~/Downloads/tools-master.zip "tools-master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/*"
mv tools-master/arm-bcm2708 ~/toolchains/raspberry-pi/
export PATH=$HOME/toolchains/raspberry-pi/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin:$PATH
test.cpp:
#include <iostream>
int main(int argc, char **argv)
{
std::cout << "hello world" << std::endl;
return 0;
}
run test on rpi:
arm-linux-gnueabihf-g++ -Wall -O2 -o test test.cpp
scp test pi@rpi-host:/tmp
ssh pi@rpi-host
/tmp/test
$ hello world