移植glib库,procps到arm平台

移植glib
export OBJ_PATH=/home/Richard/windisks/e/apps/platform/dm81xx/usr
export PKG_CONFIG_PATH=$OBJ_PATH/lib/pkgconfig
export OBJ_HOST=arm-none-linux-gnueabi


1.移植zlib
export CHOST=$OBJ_HOST
./configure --prefix=$OBJ_PATH

2.移植libffi
./configure --prefix=$OBJ_PATH --host=$OBJ_HOST

3. 移植ncurses

./configure --prefix=$OBJ_PATH --host=$OBJ_HOST

3. 移植python
 (1)安装到本地
 (2)
 export CFLAGS=-I$OBJ_PATH/include/ncurses
 export LDFLAGS="-L$OBJ_PATH/lib -lncurses"
 
 ./configure --prefix=$OBJ_PATH --host=$OBJ_HOST --build=x86_64 --disable-ipv6 --cache-file=python.cache
    cache文件
     echo "ac_cv_file__dev_ptmx=yes" >python.cache
     echo "ac_cv_file__dev_ptc=yes">>python.cache

3. 移植xml2
./configure --prefix=$OBJ_PATH --host=$OBJ_HOST --with-python=no

修改python/Makefile(如果有--with-python=no不用设置,否则以下配置)
PYTHON =/home/Richard/windisks/e/apps/platform/dm81xx/usr/bin/python3
PYTHON_INCLUDES = /home/Richard/windisks/e/apps/platform/dm81xx/usr/include/python3.3m
PYTHON_LIBS = -L/home/Richard/windisks/e/apps/platform/dm81xx/usr/lib -lpthread -ldl -lutil -lm -lpython3.3m
PYTHON_SITE_PACKAGES =/home/Richard/windisks/e/apps/platform/dm81xx/usr/lib/python3.3/site-packages


4.移植expat
./configure --prefix=$OBJ_PATH --host=$OBJ_HOST

5.移植dbus
修改 configure
export LIBXML_CFLAGS=-I$OBJ_PATH/include/libxml2
export LIBXML_LIBS="-L$OBJ_PATH/lib -lxml2"
export PKG_CONFIG=$OBJ_PATH/lib/pkgconfig
./configure --prefix=$OBJ_PATH --host=$OBJ_HOST --enable-abstract-sockets --with-xml=libxml


6.移植glib
 unset CFLAGS
 unset LDFLAGS
 unset PKG_CONFIG
 
(1)建立arm-none-linux-gnueabi.cache文件,内容如下
echo "ac_cv_type_long_long=yes" > $OBJ_HOST.cache
echo "glib_cv_stack_grows=no" >> $OBJ_HOST.cache
echo "glib_cv_uscore=no">> $OBJ_HOST.cache
echo "ac_cv_func_posix_getpwuid_r=yes">> $OBJ_HOST.cache
echo "ac_cv_func_posix_getgrgid_r=yes">> $OBJ_HOST.cache
(2)
LDFLAGS =-L$(top_srcdir)/gmodule/.libs/ -lgmodule-2.0
export LDFLAGS="-L`pwd`/gmodule/.libs/ -lgmodule-2.0"::
./configure --prefix=$OBJ_PATH --host=$OBJ_HOST --cache-file=$OBJ_HOST.cache

(3)
make
make install



7.移植procps

export DESTDIR=$OBJ_PATH/../
export CC=$OBJ_HOST-gcc
运行top
export TERMINFO=/etc/terminfo
export TERM=vt102


你可能感兴趣的:(linux笔记)