2013년 5월 3일 금요일

Install opencl with AMD streaming SDK


Installed env:

OS : unbuntu 10.04 , 64bits
Graphic Card : AMD Radeaon HD 4870
AMD Straming SDK 2.6

- AMD driver download

http://support.amd.com/us/gpudownload/linux/legacy/Pages/legacy-radeon_linux.aspx
http://support.amd.com/us/gpudownload/linux/previous/Pages/radeon_linux.aspx

- stream SDK download
http://developer.amd.com/tools-and-sdks/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/downloads/

1. Check your Graphic card supports opencl or not
You can check here
http://developer.amd.com/tools-and-sdks/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk/system-requirements-driver-compatibility/

if the graphic card is not supported , download lower version and check

AMD-APP-SDK-<version>-RC-lnx64\docsAMD_APP_SDK_Getting_Started_Guide_<version>.pdf

2. install driver and opencl SDK
 unzip SDK package then run Install-AMD-APP.sh with root log-in

3. go to <install_dir>/AMD-APP-SDK-v2.x-RC3-lnx64/samples/opencl then make

 if you do not install openGL you get build error with below message

/opt/AMDAPP/include/GL/glew.h:1138:20: error: GL/glu.h: No such file or directory

in this case install openGL

$ sudo apt-get install freeglut3-dev

then make again, build will be succeeded







2012년 10월 31일 수요일

ubuntu svn server install ( over apache )


I installed svn server under ubuntu LTS 10.04 64 bits

SVN Server Setup

1. install essentail packages
#  sudo apt-get install subversion libapache2-svn apache2

2. create repository
 # svnadmin create /home3/swmgr/tmpsvn/sample

3. configure conf file
open  /home3/swmgr/tmpsvn/sample/conf/svnserve.conf
then uncommnet belows
 auth-access = write ==> set permission
 password-db = passwd ==> indicate passward file

open /home3/swmgr/tmpsvn/sample/conf/passwd
then add user and passward

[users]
user = passwd
dokyun = hellscream

4. start svn server
 svnserve -d -r /home3/swmgr/tmpsvn/sample

5. check
# svn checkout svn://192.168.0.4 ./svn
 or
# svn checkout svn://localhost ./svn

if  ,,, /db/txn-current-lock': Permission denied  error happens when svn access
check the directory permission.
$ chmod -R 775 /home3/swmgr/tmpsvn/sample


SVN over Apache


1. set directory owner
 # sudo chown -R www-data /home3/swmgr/tmpsvn/sample/

2. configure
 open /etc/apache2/mods-enabled/dav_svn.conf
 then add

<Location /svn>
  DAV svn
  SVNPath /home3/swmgr/tmpsvn/sample
  AuthType Basic
  AuthName "Subversion Repository"
  AuthUserFile /etc/apache2/dav_svn.passwd
  Require valid-user
</Location>

3. add user
# sudo htpasswd2 -cm /etc/apache2/dav_svn.passwd dokyun
 or
# sudo htpasswd -cm /etc/apache2/dav_svn.passwd dokyun

4. restart apache
 sudo /etc/init.d/apache2 restart
5. check





2012년 9월 18일 화요일

sulogin: no password entry for root


default console device is not set properly in inittab
Set tty device in inittab , for example

if console was set as

::respawn:/sbin/getty 115200 ttyO0

in inittab and you started with ttyO2,  then

sulogin: no password entry for root

message shows

set

::respawn:/sbin/getty 115200 ttyO2

you can log in properly

2012년 8월 26일 일요일

Building Android system


Move to android root directory.

Set up buildenv as below

dokyun@android$
dokyun@android$ source ./build/envsetup.sh
including device/samsung/maguro/vendorsetup.sh
including device/samsung/tuna/vendorsetup.sh
including device/ti/panda/vendorsetup.sh
including sdk/bash_completion/adb.bash
dokyun@android$

Set up build target as below
$ lunch [Build-name]-[build type]

build name is target device name such as panda or maguro
build type is build configuration such as debugging option or limitation.

currently I do not have special target , select emulator for build-name , eng for build-type

dokyun@android$ lunch full-eng
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.1
TARGET_PRODUCT=full
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ITL41D
============================================
dokyun@android$

then build

dokyun@android$ make -j4

It can takes more than 1 hour at first build , it depends on your build system

You can also select manually the target board as like below

dokyun@android$ lunch
You're building on Linux
Lunch menu... pick a combo:
     1. full-eng
     2. full_x86-eng
     3. vbox_x86-eng
     4. full_maguro-userdebug
     5. full_tuna-userdebug
     6. full_panda-eng
Which would you like? [full-eng] 6
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=4.0.1
TARGET_PRODUCT=full_panda
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=ITL41D
============================================
dokyun@android$ make -j4



2012년 8월 19일 일요일

Adroid Source Code Download


  • Installing repo


Repo is a tool that makes it easier to work with Git in the context of Android.

$ mkdir ~/bin
$ PATH=~/bin:$PATH

$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo

As you can see , it just get repository related script form https://dl-ssl.google.com/dl/googlesource/git-repo/repo and make excutable

  • Initializing a Repo client

First make working directory, in my case

$ mkdir ~/android
$ cd ~/android

then initialize repository.

$ repo init -u https://android.googlesource.com/platform/manifest

It shows below error at first time

-----------------------------------------------------------------------
*** Please tell me who you are.
Run
  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: empty ident  <dokyun@redbomb-server.(none)> not allowed-----------------------------------------------------------------------

as you can see on the error message, type your email and name

$ git config --global user.email "dokyun.beon@gmail.com"
$ git config --global user.name "dokyun beon"

then excute again
$ repo init -u https://android.googlesource.com/platform/manifest
$ repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
$ repo sync

as you can see, down load is done
-----------------------------------------------------------------------
dokyun@android$ ls
Makefile  bionic    build  dalvik       device  external    hardware  ndk       prebuilt  system
abi       bootable  cts    development  docs    frameworks  libcore   packages  sdk
dokyun@android$
-----------------------------------------------------------------------

refer to official home more detail.

http://source.android.com/source/downloading.html

2012년 8월 4일 토요일

exporting kernel headers- headers_install


  • command for exporting kernel headers in user space
make headers_install ARCH=arm INSTALL_HDR_PATH=/usr/include

  • how to include headers for headers_install
Add headers in Kbuild under {kernel_source_dir}/include/
header-y += {header_file_name.h}

For more detail, refer to headers_install.txt