VIA APC Debian Linux
Download Image
http://www.raspbian.org/ApricotImages
原 APC Debian image 有些使用上不方便
因此OSSLab 實驗室做了一些修改
Install Image
1.sudo fdisk -l
you will see the your sd card disk, like /dev/sdb
2.sudo dd if=your_image_file.img of=/dev/sdb bs=64k
used "gparted" to change the rootfs partition size (原 ApricotImages image 為2GB 建議擴充)
== arduino IDE ==
sudo apt-get install arduino arduino-core
安裝後,執行檔(arduino、avr-g++、avr-gcc、avrdude、等等)位於/usr/bin裡,
avrdude的設定檔位於/etc/avrdude.conf,
範例程式碼與API參考文件分別位於/usr/share/doc/arduino-core的子目錄examples與reference裡,
Arduino核心程式碼位於/usr/share/arduino/hardware/arduino/cores/arduino裡,
內建程式庫位於/usr/share/arduino/libraries裡,請自行瀏覽其他相關目錄。
Download latest Arduino IDE, for example "arduino-1.0.3" now
http://arduino.cc/en/main/software
If you use the embedded Linux like "Linaro" etc....
Please do below actions
1.cd arduino-1.0.3
cp /usr/lib/jni/librxtxSerial.so lib/librxtxSerial.so
cp /usr/share/java/RXTXcomm.jar lib/RXTXcomm.jar
2.cp /usr/bin/avrdude arduino-1.0.3/hardware/tools/avrdude
cp /etc/avrdude.conf arduino-1.0.3/hardware/tools/avrdude.conf
3.cd arduino-1.0.3/hardware/tools/avr/bin
cp /usr/bin/avr* .
4.cd arduino-1.0.3/hardware/tools/avr/bin.gcc
cp /usr/bin/avr-cpp .
cp /usr/bin/avr-g++ .
cp /usr/bin/avr-gcc .
5.cd arduino-1.0.3/hardware/tools/avr/lib/gcc/avr
rm -rf *
cp -r /usr/lib/gcc/avr/4.x.x .
6. cd arduino-1.0.3/
./arduino &
== ser2net
1.sudo apt-get install ser2net
2.sudo vim /etc/ser2net.conf
Add below, "3001" is port number.....
3001:raw:600:/dev/ttyUSB0:9600 NONE 1STOPBIT 8DATABITS XONXOFF LOCAL -RTSCTS
every time you reboot your board, you need to do
sudo chmod 666 /dev/ttyACM0 or
sudo chmod 666 /dev/ttyUSB0
===== mjpg-streamer ======= (將USB mjpeg webcam 轉為IP CAM 服務)
1.sudo apt-get install libjpeg-dev libjpeg62-dev
2.svn co https://mjpg-streamer.svn.sourceforg.../mjpg-streamer mjpg-streamer
3.cd mjpg-streamer/mjpg-streamer
4. ./start.sh
5. If you want to change the http port:
vim plugins/output_http/output_http.c:86
port = htons(8080); <<== change the port number
===luci==
http://luci.subsignal.org/trac/wiki/Download
sudo apt-get install lua5.1
sudo apt-get install liblua5.1-0-dev
sudo apt-get install libssl-dev
sudo apt-get install libncurses5 libncurses5-dev
sudo apt-get install bridge-utils
== lighttpd ===
Reference: http://phorum.study-area.org/index.php?topic=67673.0
1. sudo apt-get install lighttpd
2. sudo vim /etc/lighttpd/lighttpd.conf
index-file.names = ( "index.php", "index.html",
"index.lua", "index.cgi", <== 加了兩個
"index.htm", "default.htm",
" index.lighttpd.html" )
在"indlsex-file.names"裡加了兩個預設首頁檔名, 可以不加沒關係
3. sudo vim /etc/lighttpd/conf-available/10-cgi.conf
==> 加入這個 alias.url = ( "/cgi-bin/" => "/var/www/cgi-bin/")
4. sudo lighty-enable-mod cgi
5. sudo /etc/init.d/lighttpd restart
== kernel ==
Install CROSS_COMPILE
1.wget http://www.codesourcery.com/sgpp/lit...ux-gnu.tar.bz2
2. sudo cp arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 /usr/local
3. sudo tar -jxvf arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2
4. vi ~/.bashrc
export PATH=$PATH:/usr/local/arm-2009q1/bin
Build Kernel
1.git clone https://github.com/apc-io/apc-8750.git
2.wget http://www.raspbian.org/ApricotImage...3_kernel.patch
3.cd apc-8750
patch -p1 < apc_apricot_r3_kernel.patch
4.cd kernel
a. make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- ubin
b. make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- modules
c. mkdir /some/where/your/folder/modules
d. make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- INSTALL_MOD_PATH=/some/where/your/folder/modules modules_install
5. insert your sd card
a. cp uzImage.bin /media/BOOT
b. sudo cp -r /some/where/your/folder/modules/lib/modules /media/APC/lib