Saturday, September 29, 2012

OpenGL ES

参考文献:
1. 座標系変換(1)
2.

Sunday, September 23, 2012

Ubuntu on BeagleBone/BeagleBoard

BeagleBone/BeagleBoard

参考文献:
0. Beaglebone hardware PDF file
1. Ubuntu 12.04をBeagleboneに入れる方法
2. Beagleboard initializaiton (1)
3.
X. Quake 3 git (used for demo)
X. Quake 3 on Raspberry Pi (1)

■Ubuntu 12.04 をBeagleBone入れる
VMwareで構築したUbuntu PCマシーン+Toolchainで作業
$ mkdir Ubuntu_on_beagle
$ cd Ubuntu_on_bealge
$ wget http://rcn-ee.net/deb/rootfs/precise/ubuntu-12.04-r6-minimal-armhf-2012-09-10.tar.xz

$ tar xJf ubuntu-12.04-r6-minimal-armhf-2012-09-10.tar.xz
$ cd  ubuntu-12.04-r6-minimal-armhf-2012-09-10
$ sudo ./setup_sdcard.sh --mmc /media/usb?? --uboot bone ※??は適当にSDカードのドライブを指定

Beagleboneに電源 + USBケーブル接続し、PCからTeratermでシリアル接続(Baudrate: 115200

login: ubuntu
pass: temppwd

ログイン後の結果:

Ubuntu 12.04.1 LTS arm ttyO0

arm login: ubuntu
Password:
Welcome to Ubuntu 12.04.1 LTS (GNU/Linux 3.2.28-psp21 armv7l)

 * Documentation:  https://help.ubuntu.com/

The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.

To run a command as administrator (user "root"), use "sudo ".
See "man sudo_root" for details.

ubuntu@arm:~$


■ Lubuntuをインストール
$ sudo shutdown -h now
電源を抜いて、HDMI-Cape, HDMI-DVI変換をモニタにつないでから再度、電源を入れる

$ sudo apt-get -yV install lubuntu-core
$ sudo apt-get -yV install lubuntu-desktop
$ sudo apt-get -yV install lxde-common
$ sudo apt-get -yV install lxde-core
$ sudo apt-get -yV install lxde

これでlubuntuが無事画面に出ることを確認


Saturday, September 08, 2012

Ubuntu 12.04 on VMware

Ubuntu 12.04 on vmware

■UI変わりすぎて使いにくい。なんとか戻すことにする

sudo apt-get install gdm
sudo apt-get install gnome-shell gnome-session-fallback

テキストログイン→GUIログインにしたい場合は
sudo start gdm

これでとりあえずOK

■日本語環境
sudo add-apt-repository ppa:japaneseteam/ppa
sudo apt-get update
sudo apt-get install ubuntu-defaults-ja

なんか日本語を対応させたいが、今英語バージョンで、もう一度ここから日本語バージョンのイメージをダウンロードし直すか、英語バージョンを日本語にするかを迷う。とりあえず後者で、手順はページの説明通り

Ubuntu 12.04 LTSの場合:
wget -q https://www.ubuntulinux.jp/ubuntu-ja-archive-keyring.gpg -O- | sudo apt-key add - wget -q https://www.ubuntulinux.jp/ubuntu-jp-ppa-keyring.gpg -O- | sudo apt-key add - sudo wget https://www.ubuntulinux.jp/sources.list.d/precise.list -O /etc/apt/sources.list.d/ubuntu-ja.list sudo apt-get update
sudo apt-get upgrade
sudo apt-get install ubuntu-defaults-ja
sudo fontconfig-voodoo --force -s ja_JP

■Google日本語入力
sudo add-apt-repository ppa:ikoinoba/ppa
sudo apt-get update
sudo apt-get install ibus-mozc
sudo reboot

■ディレクトリを日本語にする
LANG=C xdg-user-dirs-gtk-update

■GVim
sudo apt-get install vim-gnome ubuntu-restricted-extras

■ Build
sudo apt-get install build-essential
sudo apt-get install svn git ssh
sudo apt-get install cmake
sudo apt-get install freeglut3 freeglut3-dev

make a small test:
g++ test.cpp -lGL -lglut -o test ※test.cppをリンクオプションの後に置くとエラー!

■ARMクロスコンパイルビルドチェーン 参考:ここ
sudo apt-get install g++-arm-linux-gnueabi
sudo apt-get install g++-arm-linux-gnueabihf

arm-linux-gnueabi-addr2line    arm-linux-gnueabihf-gcov
arm-linux-gnueabi-ar           arm-linux-gnueabihf-gcov-4.6
arm-linux-gnueabi-as           arm-linux-gnueabihf-gprof
arm-linux-gnueabi-c++filt      arm-linux-gnueabihf-ld
arm-linux-gnueabi-cpp          arm-linux-gnueabihf-ld.bfd
arm-linux-gnueabi-cpp-4.6      arm-linux-gnueabihf-ld.gold
arm-linux-gnueabi-elfedit      arm-linux-gnueabihf-nm
arm-linux-gnueabi-g++          arm-linux-gnueabihf-objcopy
arm-linux-gnueabi-g++-4.6      arm-linux-gnueabihf-objdump
arm-linux-gnueabi-gcc          arm-linux-gnueabihf-ranlib
arm-linux-gnueabi-gcc-4.6      arm-linux-gnueabihf-readelf
arm-linux-gnueabi-gcov         arm-linux-gnueabihf-size
arm-linux-gnueabi-gcov-4.6     arm-linux-gnueabihf-strings
arm-linux-gnueabi-gprof        arm-linux-gnueabihf-strip
arm-linux-gnueabihf-addr2line  arm-linux-gnueabi-ld
arm-linux-gnueabihf-ar         arm-linux-gnueabi-ld.bfd
arm-linux-gnueabihf-as         arm-linux-gnueabi-ld.gold
arm-linux-gnueabihf-c++filt    arm-linux-gnueabi-nm
arm-linux-gnueabihf-cpp        arm-linux-gnueabi-objcopy
arm-linux-gnueabihf-cpp-4.6    arm-linux-gnueabi-objdump
arm-linux-gnueabihf-elfedit    arm-linux-gnueabi-ranlib
arm-linux-gnueabihf-g++        arm-linux-gnueabi-readelf
arm-linux-gnueabihf-g++-4.6    arm-linux-gnueabi-size
arm-linux-gnueabihf-gcc        arm-linux-gnueabi-strings
arm-linux-gnueabihf-gcc-4.6    arm-linux-gnueabi-strip


■Eclipseをインストールして、Proxy設定
Eclipseをインストールすると、設定ファイルなどはすべてrootが所有者になり、一般ユーザから設定を変更しても反映されない。Proxy設定はひとつの例。解決方法は
下記を /etc/eclipse.ini に追加すること

-Dorg.eclipse.ecf.provider.filetransfer.excludeContributors=org.eclipse.ecf.provider.filetransfer.httpclient
-Dhttp.proxyPort=8080
-Dhttp.proxyHost=XXX
-Dhttp.proxyUser=XXX
-Dhttp.proxyPassword=XXX
-Dhttp.nonProxyHosts=localhost|127.0.0.1