STLinux 2011. 5. 30. 07:58

webkit for stlinux 바이너리

Binary RPM

http://ftp.stlinux.com/pub/stlinux/2.4/updates/RPMS/sh4/stlinux24-sh4-libwebkit-dev-1.2.6-6.sh4.rpm
http://ftp.stlinux.com/pub/stlinux/2.4/updates/RPMS/sh4/stlinux24-sh4-libwebkit-1.2.6-6.sh4.rpm
http://ftp.stlinux.com/pub/stlinux/2.4/updates/RPMS/sh4/stlinux24-sh4-libwebkit-examples-1.2.6-6.sh4.rpm

source RPM

http://www.stlinux.com/pub/stlinux/2.4/updates/SRPMS/stlinux24-target-webkit-1.2.6-6.src.rpm

I strongly recommend that you do a search on https://bugs.webkit.org/
for issues related to SH4 and the JavaScriptCore JIT, as the JIT will
really boost your performance.

ST의 ST40 400Mhz-DDR2 spec에서 과연 JIT라고 하더라도 속도가 나와줄지...

ARM Core 500Mhz 클럭으로 사용했을때도 웹서핑 하다 속이 타들어 갈거 같았는데.......-_-;;;

흠냐....
STLinux/DirectFB 2008. 12. 9. 19:27

DirectFB Compile for sh4


1. DirectFB란?
- DirectFB란 H/W graphics 가속기능, 입력장치 handling, linux의 frame buffer 위에서 반 투명한 windows와 다중 display layer를 지원하기 위한 추상적이고 통합된 windowing system을 지원하는 가벼운 library이다.
- DirectFB는 모든 graphics 동작에 대하여 software fallbacks으로 동작하는 완전한 H/W 추상화 layer로서 H/W에 국한되지 않고 지원이 가능하다.
- DirectFB는 embedded system용으로 설계되었다.
DirectFB는 최소한의 resource와 overhead로 최대한의 H/W 가속화된 속도를 제공한다.
- DirectFB는 linux의 frame buffer를 기반으로 동작을 하기 때문에 frame buffer device는 반드시 구현이 되어 있어야 한다.

2. DirectFB를 위해 필요한 library
- Image loading
Libpng : PNG image format support
Libgif : GIF image format support
- Font rendering
FreeType2 : TrueType font 지원

3. 소스
- Libpng 1.2.5
http://www.libpng.org/pub/png/libpng.html

- Libjpeg 6b(jpeg-6b)
http://freshmeat.net/projects/libjpeg/

- FreeType2 2.1.7
http://sourceforge.net/project/showfiles.php?group_id=3157

- DirectFB 0.9.20 (현재는 1.0 이상을 쓰는것을 강추)
http://www.directfb.org/download/DirectFB/DFB++-0.9.20.tar.gz

4. porting 환경.
- Host : Fedora4
- Cross compiler : sh4 cross compiler(stlinux 2.2)
- Target CPU : sti710x-SH4 core
- Target kernel : 2.6.17.14_stm22_0039

5. compile 과정
- 반투명 windows와 graphics, True Type font를 지원하는 directFB 완성
- Libpng

참고 site
$ tar –zxvf libpng-1.2.5.tar.gz 
- 압축화일을 푼다
$ cp scripts/makefile.linux Makefile 
- 우선 linux용 makefile을 rename 한다. 
- Makefile에 다음을 추가한다.
# added by shkim for arm-linux compiler

LD=sh4-linux-ld
CC=sh4-linux-gcc
CXX=sh4-linux-g++
RANLIB=sh4-linux-ranlib
AR=sh4-linux-ar
OBJDUMP=sh4-linux-objdump
OBJCOPY=sh4-linux-objcopy
CROSSCOMPILE=/opt/STM/STLinux-2.2/devkit/target_full/bin
CROSS_EXTRADIR=/opt/STM/STLinux-2.2/devkit/target_full/usr
LIBRARY_PATH/opt/STM/STLinux-2.2/devkit/target_full/lib
C_INCLUDE_PATH/opt/STM/STLinux-2.2/devkit/target_full/usr/include
CPLUS_INCLUDE_PATH=/opt/STM/STLinux-2.2/devkit/target_full/usr/include
ZLIBLIB/opt/STM/STLinux-2.2/devkit/target_full/usr/lib
ZLIBINC/opt/STM/STLinux-2.2/devkit/target_full/usr/include

$ make clean
$make all prefix=/usr/imglib 
- png library compile

$ make install prefix=/usr/imglib 
- library를 install 한다.

- Libjpeg
$ ./ltconfig --with-gcc --with-gnu-ld ltmain.sh
$ ./configure --prefix=/opt/STM/STLinux-2.2/devkit/target_full/usr/imglib --enable-shared --target=sh4-linux
- compiler & linker를 설정한다. 
- compile 환경을 설정한다. 
- Makefile에 다음을 추가 한다.
CC=sh4-linux-gcc
LD=sh4-linux-ld
AR=sh4-linux-ar
$ make clean
$ make 

- jpeg library compile
$ make install

- FreeType2
$ DESTDIR=/usr/imglib ./configure --prefix=/usr/imglib --build=i386-linux --host=sh4-linux
$ make clean
$ make
$ make install

- DirectFB
$ LDFLAGS=-L/usr/imglib/lib ./configure --prefix=/usr/imglib --with-gfxdrivers=st --enable-sdl=no --disable-debug --disable-joystick --disable-cdrom --enable-shared --build=i386-linux --host=sh4-linux 
$ make clean
$ make
$ make install
$ PKG_CONFIG_PATH=/usr/imglib/lib/pkgconfig
$ export PKG_CONFIG_PATH

- DirectFB Example
LDFLAGS=-L/usr/imglib/lib ./configure --prefix=/usr/imglib --with-gfxdrivers=st --enable-sdl=no --disable-debug --disable-joystick --disable-cdrom --enable-shared --build=i386-linux --host=sh4-linux
$ make clean
$ make
$ make install 
STLinux 2008. 12. 8. 19:42

dbus 1.03 for vlc 0.9.8.a (1)

fedora4 에서 크로스 컴파일을 하기 위해 configure를 하는 중에 -lsocket 옵션에서 에러를 내뱉었다..

http://kldp.org/node/1377

찾아보니 Sun 계열 유닉스에서 작업하는 게 아니면, -lnsl -lsocket 옵션을 주지 말고 컴파일하라는 것.

하지만 타겟보드에서 다시 .configure 해보니 이상없이 잘된다..그래서 그냥 pass..

사용한 커맨드: ./configure --host=sh4-linux --build=sh4-linux --prefix=/usr/local

make && make install

타겟보드에서 컴파일을 하니..한세월이다..

STLinux/DirectFB 2008. 12. 1. 13:35

DirectFB 1.0.1 For SH4

1. stlinux 사이트에서 DirectFB 1.0.1을 다운
2. 압축을 해제하면 소스와 함께 *.patch 파일들이 나온다
3. patch 폴더를 생성후 *.patch 파일들을 옮겨놓는다
4. DirectFb1.0.1 폴더로 이동후 다음의 패치 커맨드를 실행
5. for i in ./../patch/*.patch; do patch -p0 -v < "$i"; done

STLinux/Enigma2 2008. 12. 1. 12:18

enigma2 Building for SH4


STLinux(SH4)에 enigma2를 포팅하기 위해서는 STLinux의 Target System에 추가적인 라이브러리가 필요하다.

enigma2 빌드에 필요한 필수 라이브러리 등은 다음과 같다.

1. zlib-1.2.3 (이건 사실 이미 설치가 되어있다)
2. libxml2 2.6.30
3. fribidi 0.10.9
4. libsigc++ 1.2.7
5. libdvbsi++ 0.3.3
6. libxslt 1.1.16
7. libxmlccwrap 0.0.12
8. enigma2 ( dreambox의 공개 cvs 서버에서 받을수 있다)
9. Python 2.4(2.5도 지원)
10. swig

위의 라이브러리가 모두 설치되어야 하고..

mips기반의 dreambox에 enigma2는 open-embedded 프로젝트 기반으로 작성되어 있기에 STLinux에 맞게 일부 Makefile 및 Configure 파일의 수정이 불가피 하다.

또한 SH4 기반으로 크로스 컴파일되어야 하므로...다음과 같은 옵션이 필요하다.

필자는 STLinux의 Target Filesystem의 위치가 /opt/STM/STLinux-2.2/devkit/sh4/target_full 이므로 아래와 같이 설정하였다.

export KDIR=/root/linux-2.6.17.14_stm22_0041
export PREFIX=/opt/STM/STLinux-2.2/devkit/sh4/target_full/usr/local
export LD_LIBRARY_PATH=$PREFIX/lib
export PKG_CONFIG_PATH=$LD_LIBRARY_PATH/pkgconfig:/opt/STM/STLinux-2.2/devkit/sh4/target_full/usr/lib/pkgconfig:/opt/STM/STLinux-2.2/devkit/sh4/target_full/usr/local/lib/pkgconfig
export STRIP=sh4-linux-strip
export COMPILER=sh4-linux-gcc
export HOST=sh4-linux
export BUILD=i386-linux

또한 대부분의 오픈소스 라이브러리들은 다음과 pkg_config_path에서 지정되있는 폴더에서 .pc(패키지 설정)파일로 부터 필요한 라이브러리의 위치를 받아서 사용하게 되므로 Configure에 들어갈 PATH를 주의해서 입력해야한다.

수정이 필요한 Makefile 및 Configure 파일은 다음과 같다.
1. libxml2/example/Makefile
2. libxml2/libxml/Makefile
3. libxmlccwrap/xmlccwrap/Makefile
4. libxmlccwrap/testlib/Makefile
5. libxslt/Configure
6. enigma2/Configure
7. enigma2/main/Makefile
8. enigma2/lib/gdi/Makefile

수정해야 될 내용은 주로 컴파일러에 필요한 CPP_FLAGS 와 LIBS(링크에 필요), INCLUDES(헤더파일의 위치를 지정)들 이다..

이 모든것들이 완벽히 설정이 된다면 몇가지 튜닝이 필요한 옵션등이 없기에 에러가 날뿐 큰 문제 없이 Enigma2를 빌드할수 있다.