프로그램 사용/VLC2010. 2. 2. 16:48
VLC 1.0.4
ubuntu 9.10 에서 크로스 컴파일을 시도했다.

$ ./configure --disable-mmx --disable-sse --enable-run-as-root --with-tuning=no --host=sh4-linux --build=i686

$ vi configure.ac
1621 dnl
1622 dnl  Special arch tuning
1623 dnl
1624 AC_ARG_WITH(tuning,
1625 [  --with-tuning=ARCH      enable special tuning for an architecture
1626                           (default Pentium 2 on IA-32 and G4 on PPC)])
1627 if test -n "${with_tuning}"; then
1628     if test "${with_tuning}" != "no"; then
1629         CFLAGS_TUNING="-mtune=${with_tuning}"
1630     fi
1631 else
1632     if test "${SYS}" = "darwin" -a "${host_cpu}" != "powerpc"; then
1633         CFLAGS_TUNING="-march=pentium-m -mtune=prescott"
1634     elif test "${host_cpu}" = "i686" -o "${host_cpu}" = "i586" -o "${host_cpu}" = "i486" -o "${host_cpu}" = "i386"; then
1635         CFLAGS_TUNING="-mtune=pentium2"
1636     elif test "${host_cpu}" = "x86_64"; then
1637         CFLAGS_TUNING="-mtune=athlon64"
1638     elif test "${host_cpu}" = "powerpc"; then
1639         CFLAGS_TUNING="-mtune=G4";
1640     fi
1641 fi

그리고 ubuntu 에서 sudo vlc 하면
$ sudo vlc
VLC is not supposed to be run as root. Sorry. If you need to use real-time priorities and/or privileged TCP ports
you can use vlc-wrapper (make sure it is Set-UID root and cannot be run by non-trusted users first).
라는 메시지가 출력되면서 실행되지 않는다. busybox나 대부분의 embeded 에서는 root로 할테니
크로스 컴파일 시에 root로 실행가능하도록 수정하고 (--enable-run-as-root)
cpu 최적화 부분을 꺼준다음 (--disable-mmx --disable-sse --with-tuning=no)
크로스 컴파일 되서 돌아갈 host를 지정해준다. (--host=sh4-linux)

좀 특이한(?) 점인데 --host=HOST_ARCH(==i686) --target=TARGET_ARCH(==sh4-linux)
처럼 입력이 되는게 아니라 host는 프로그램이 돌아갈 플랫폼을 의미한다.
즉, 일반적인 크로스 컴파일 옵션의 host, target 옵션이 바뀌어 build, host 로 인식한다.

$ ./configure --help

System types:
  --build=BUILD     configure for building on BUILD [guessed]
  --host=HOST       cross-compile to build programs to run on HOST [BUILD]

'프로그램 사용 > VLC' 카테고리의 다른 글

vlc-1.0.5 cross compile  (3) 2010.02.09
VLC cross compile시 오류 (vlc-1.0.4)  (0) 2010.02.03
의미는 없는 Linux / Windows VLC 차이  (0) 2010.01.26
VLC로 youtube 동영상 감상하기  (0) 2010.01.26
youtube mobile on VLC  (0) 2010.01.18
Posted by 구차니