移植netsurf3.0到nuc950上

移植netsurf3.0nuc950

.准备相关文件

 

建立工作目录

mkdir -p ${HOME}/netsurf/workspace

下载下面的源文件包到该目录下

netsurf-3.0-full-src.tar.gz

openssl-1.0.1e.tar.gz

SDL-1.2.15.tar.gz

expat-2.1.0.tar.gz

libmng-1.0.8.tar.gz

 

.建立env.sh文件

建立工作目录

 

export PKG_CONFIG_PATH=${HOME}/netsurf/workspace/inst/lib/pkgconfig::

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${HOME}/netsurf/workspace/inst/lib

export PREFIX=${HOME}/netsurf/workspace/inst

export CC=arm-linux-gcc

export TARGET=framebuffer

 

三交叉编译相关库文件

1.交叉编译expat

解压

#tar zxvf expat-2.1.0.tar.gz

进入目录cd  expat-2.1.0

配置

 

#./configure --host=arm-linux --prefix=${HOME}/netsurf/workspace/inst

 

编译

#make

安装

#make install

 

2.交叉编译sdl

解压

#tar zxvf SDL-1.2.15.tar.gz

进入目录

配置

# ./configure --prefix=${HOME}/netsurf/workspace/inst --disable-video-nanox -disable-video-qtopia --disable-static --enable-shared --disable-video-photon --disable-video-ggi --disable-video-svga --disable-video-aalib --disable-video-dummy --disable-video-dga --disable-arts --disable-esd --disable-alsa --disable-video-x11 --disable-nasm --disable-joystick --disable-input-tslib -enable-video-fbcon --host=arm-linux

 

编译安装

 

#make

#make install

 

 

3.交叉编译openssl

 

解压

#tar zxvf openssl-1.0.1e.tar.gz

进入目录,运行配置命令

./Configure --prefix=${HOME}/netsurf/workspace/inst  os/compiler:arm-linux-gcc

编译,安装

#make

#make install

 

 

4 交叉编译libmng

 

./autogen.sh

 

./configure --host=arm-linux --prefix=${HOME}/netsurf/workspace/inst

 

make

 

make install

 

 

 

 

 

四编译netsurf3.0

1.解压netsurf3.0

#tar zxvf netsurf-3.0-full-src.tar.gz

2.修改Makefile

进入目录

#cd netsurf-full-3.0

修改Makfile

export PKG_CONFIG_PATH = $(TMP_PREFIX)/lib/pkgconfig

TMP_PREFIX := $(CURDIR)/prefix-$(TARGET)

修改为

 

TMP_PREFIX := $(PREFIX)

export PKG_CONFIG_PATH ?= $(TMP_PREFIX)/lib/pkgconfig

#TMP_PREFIX  := $(CURDIR)/prefix-$(TARGET)

 

 

注释掉文件最后的

 

#       $(foreach L,$(NSLIBTARG),$(call do_clean,$(L)))

 

 

 

3.编译nsfb

 

#make

 

出现如下错误:

 

build-Linux-framebuffer/utils_utf8.o: In function `utf8_finalise':

/home/cjli/netsurf/workspace/netsurf-full-3.0/src/netsurf-3.0/utils/utf8.c:207: undefined reference to `iconv_close'

build-Linux-framebuffer/utils_utf8.o: In function `utf8_convert':

/home/cjli/netsurf/workspace/netsurf-full-3.0/src/netsurf-3.0/utils/utf8.c:329: undefined reference to `iconv'

/home/cjli/netsurf/workspace/netsurf-full-3.0/src/netsurf-3.0/utils/utf8.c:299: undefined reference to `iconv_open'

/home/cjli/netsurf/workspace/netsurf-full-3.0/src/netsurf-3.0/utils/utf8.c:309: undefined reference to `iconv_close'

/home/cjli/netsurf/workspace/netsurf-full-3.0/src/netsurf-3.0/utils/utf8.c:333: undefined reference to `iconv_close'

build-Linux-framebuffer/utils_utf8.o: In function `utf8_convert_html_chunk':

/home/cjli/netsurf/workspace/netsurf-full-3.0/src/netsurf-3.0/utils/utf8.c:378: undefined reference to `iconv'

/home/cjli/netsurf/workspace/netsurf-full-3.0/src/netsurf-3.0/utils/utf8.c:368: undefined reference to `iconv'

build-Linux-framebuffer/utils_utf8.o: In function `utf8_to_html':

/home/cjli/netsurf/workspace/netsurf-full-3.0/src/netsurf-3.0/utils/utf8.c:414: undefined reference to `iconv_open'

/home/cjli/netsurf/workspace/netsurf-full-3.0/src/netsurf-3.0/utils/utf8.c:481: undefined reference to `iconv_close'

/home/cjli/netsurf/workspace/netsurf-full-3.0/src/netsurf-3.0/utils/utf8.c:476: undefined reference to `iconv_close'

/home/cjli/netsurf/workspace/netsurf-full-3.0/src/netsurf-3.0/utils/utf8.c:414: undefined reference to `iconv_open'

/home/cjli/netsurf/workspace/netsurf-full-3.0/src/netsurf-3.0/utils/utf8.c:428: undefined reference to `iconv_close'

collect2: ld returned 1 exit status

make[1]: *** [nsfb] Error 1

make[1]: Leaving directory `/home/cjli/netsurf/workspace/netsurf-full-3.0/src/netsurf-3.0'

make: *** [/home/cjli/netsurf/workspace/netsurf-full-3.0/prefix-framebuffer/build-stamp] Error 2

修改

 # src/netsurf-3.0目录下的Makefile.default

 

# Force using glibc internal iconv implementation instead of external libiconv

# Valid options: YES, NO

NETSURF_USE_LIBICONV_PLUG := YES

改为

NETSURF_USE_LIBICONV_PLUG := NO

 

再次运行make

编译成功.

 

五安装netsurfnuc900开发板

 

1.复制nsfb到文件系统的/bin目录下,并改名为netsurf

 

#cp nsfb /extend/cjli/rootfs/bin/netsurf

 

2.复制默认网页资源

netsurf-full-3.0/src/netsurf-3.0/framebuffer/res

 

到文件系统的usr/share/netsurf目录

 

#cp –rf netsurf-full-3.0/src/netsurf-3.0/framebuffer/res   usr/share/netsurf

3. 设置资源目录

在文件系统的etc/profile文件中加入如下一行内容:

 

export NETSURFRES=/usr/share/netsurf

 

 

4.制作文件系统下载到开发板

 

 

六在nuc900上运行netsurf

 

运行命令

 

#netsurf –f linux –b 16 –w 320 –h 240

#netsurf –f  sdl –b 16 –w 320 –h 240

 

七常见编译错误及解决办法

1. error: expat.h: No such file or directory错误

错误信息:

/usr/local/arm_linux_4.3/usr/bin/../lib/gcc/arm-linux-uclibcgnueabi/4.3.4/../../../../arm-linux-uclibcgnueabi/bin/ld: cannot find -lexpat

collect2: ld returned 1 exit status

make[1]: *** [nsfb] Error 1

make[1]: Leaving directory `/home/cjli/netsurf/workspace/netsurf-full-3.0/src/netsurf-3.0'

make: *** [/home/cjli/netsurf/workspace/inst/build-stamp] Error 2

解决办法:编译安装expat

2.SDL错误

错误信息:

/usr/local/arm_linux_4.3/usr/bin/../lib/gcc/arm-linux-uclibcgnueabi/4.3.4/../../../../arm-linux-uclibcgnueabi/bin/ld: cannot find -lSDL

collect2: ld returned 1 exit status

make[1]: *** [nsfb] Error 1

make[1]: Leaving directory `/home/cjli/netsurf/workspace/netsurf-full-3.0/src/netsurf-3.0'

make: *** [/home/cjli/netsurf/workspace/inst/build-stamp] Error 2

 

 

解决办法: 编译安装SDL

 

3. mng错误

错误信息:

image/mng.c:29:20: warning: libmng.h: No such file or directory

image/mng.c:66: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'nsmng_alloc'

image/mng.c:76: error: expected ')' before 'p'

image/mng.c:89: error: expected declaration specifiers or '...' before 'mng_retcode'

image/mng.c: In function 'nsmng_broadcast_error':

image/mng.c:96: error: 'code' undeclared (first use in this function)

image/mng.c:96: error: (Each undeclared identifier is reported only once

image/mng.c:96: error: for each function it appears in.)

image/mng.c:96: error: 'MNG_OUTOFMEMORY' undeclared (first use in this function)

image/mng.c: At top level:

image/mng.c:110: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'nsmng_openstream'

image/mng.c:116: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'nsmng_readdata'

image/mng.c:149: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'nsmng_closestream'

image/mng.c:155: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'nsmng_processheader'

image/mng.c: In function 'nsmng_process_data':

image/mng.c:212: error: 'mng_retcode' undeclared (first use in this function)

image/mng.c:212: error: expected ';' before 'status'

image/mng.c:225: error: 'status' undeclared (first use in this function)

image/mng.c:225: warning: implicit declaration of function 'mng_read'

image/mng.c:225: warning: nested extern declaration of 'mng_read'

image/mng.c:228: warning: implicit declaration of function 'mng_read_resume'

image/mng.c:228: warning: nested extern declaration of 'mng_read_resume'

image/mng.c:230: error: 'MNG_NEEDMOREDATA' undeclared (first use in this function)

image/mng.c:231: error: 'MNG_NOERROR' undeclared (first use in this function)

image/mng.c:233: error: too many arguments to function 'nsmng_broadcast_error'

image/mng.c: At top level:

image/mng.c:245: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'nsmng_getcanvasline'

image/mng.c:262: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'nsmng_refresh'

image/mng.c: In function 'nsmng_animate':

image/mng.c:331: warning: implicit declaration of function 'mng_display_resume'

image/mng.c:331: warning: nested extern declaration of 'mng_display_resume'

image/mng.c: At top level:

image/mng.c:338: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'nsmng_settimer'

image/mng.c:359: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'nsmng_gettickcount'

image/mng.c:387: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'nsmng_errorproc'

image/mng.c: In function 'nsmng_create_mng_data':

image/mng.c:415: error: 'mng_retcode' undeclared (first use in this function)

image/mng.c:415: error: expected ';' before 'code'

image/mng.c:425: warning: implicit declaration of function 'mng_initialize'

image/mng.c:425: warning: nested extern declaration of 'mng_initialize'

image/mng.c:425: error: 'nsmng_alloc' undeclared (first use in this function)

image/mng.c:425: error: 'nsmng_free' undeclared (first use in this function)

image/mng.c:425: error: 'MNG_NULL' undeclared (first use in this function)

image/mng.c:425: warning: assignment makes pointer from integer without a cast

image/mng.c:436: error: 'code' undeclared (first use in this function)

image/mng.c:436: warning: implicit declaration of function 'mng_set_suspensionmode'

image/mng.c:436: warning: nested extern declaration of 'mng_set_suspensionmode'

image/mng.c:436: error: 'MNG_TRUE' undeclared (first use in this function)

image/mng.c:439: error: too many arguments to function 'nsmng_broadcast_error'

image/mng.c:444: warning: implicit declaration of function 'mng_setcb_openstream'

image/mng.c:444: warning: nested extern declaration of 'mng_setcb_openstream'

image/mng.c:444: error: 'nsmng_openstream' undeclared (first use in this function)

image/mng.c:447: error: too many arguments to function 'nsmng_broadcast_error'

image/mng.c:449: warning: implicit declaration of function 'mng_setcb_readdata'

image/mng.c:449: warning: nested extern declaration of 'mng_setcb_readdata'

image/mng.c:449: error: 'nsmng_readdata' undeclared (first use in this function)

image/mng.c:452: error: too many arguments to function 'nsmng_broadcast_error'

image/mng.c:454: warning: implicit declaration of function 'mng_setcb_closestream'

image/mng.c:454: warning: nested extern declaration of 'mng_setcb_closestream'

image/mng.c:454: error: 'nsmng_closestream' undeclared (first use in this function)

image/mng.c:457: error: too many arguments to function 'nsmng_broadcast_error'

image/mng.c:459: warning: implicit declaration of function 'mng_setcb_processheader'

image/mng.c:459: warning: nested extern declaration of 'mng_setcb_processheader'

image/mng.c:459: error: 'nsmng_processheader' undeclared (first use in this function)

image/mng.c:462: error: too many arguments to function 'nsmng_broadcast_error'

image/mng.c:467: warning: implicit declaration of function 'mng_setcb_getcanvasline'

image/mng.c:467: warning: nested extern declaration of 'mng_setcb_getcanvasline'

image/mng.c:467: error: 'nsmng_getcanvasline' undeclared (first use in this function)

image/mng.c:470: error: too many arguments to function 'nsmng_broadcast_error'

image/mng.c:472: warning: implicit declaration of function 'mng_setcb_refresh'

image/mng.c:472: warning: nested extern declaration of 'mng_setcb_refresh'

image/mng.c:472: error: 'nsmng_refresh' undeclared (first use in this function)

image/mng.c:475: error: too many arguments to function 'nsmng_broadcast_error'

image/mng.c:477: warning: implicit declaration of function 'mng_setcb_gettickcount'

image/mng.c:477: warning: nested extern declaration of 'mng_setcb_gettickcount'

image/mng.c:477: error: 'nsmng_gettickcount' undeclared (first use in this function)

image/mng.c:480: error: too many arguments to function 'nsmng_broadcast_error'

image/mng.c:482: warning: implicit declaration of function 'mng_setcb_settimer'

image/mng.c:482: warning: nested extern declaration of 'mng_setcb_settimer'

image/mng.c:482: error: 'nsmng_settimer' undeclared (first use in this function)

image/mng.c:485: error: too many arguments to function 'nsmng_broadcast_error'

image/mng.c:489: warning: implicit declaration of function 'mng_setcb_errorproc'

image/mng.c:489: warning: nested extern declaration of 'mng_setcb_errorproc'

image/mng.c:489: error: 'nsmng_errorproc' undeclared (first use in this function)

image/mng.c:492: error: too many arguments to function 'nsmng_broadcast_error'

image/mng.c: In function 'nsmng_convert':

image/mng.c:542: error: 'mng_retcode' undeclared (first use in this function)

image/mng.c:542: error: expected ';' before 'status'

image/mng.c:554: error: too many arguments to function 'nsmng_broadcast_error'

image/mng.c:587: error: 'status' undeclared (first use in this function)

image/mng.c:587: warning: implicit declaration of function 'mng_display'

image/mng.c:587: warning: nested extern declaration of 'mng_display'

image/mng.c:588: error: 'MNG_NOERROR' undeclared (first use in this function)

image/mng.c:588: error: 'MNG_NEEDTIMERWAIT' undeclared (first use in this function)

image/mng.c:590: error: too many arguments to function 'nsmng_broadcast_error'

image/mng.c: In function 'nsjpng_convert':

image/mng.c:603: error: 'mng_retcode' undeclared (first use in this function)

image/mng.c:603: error: expected ';' before 'status'

image/mng.c:606: error: 'mng_handle' undeclared (first use in this function)

image/mng.c:606: error: expected ';' before 'handle'

image/mng.c:616: error: too many arguments to function 'nsmng_broadcast_error'

image/mng.c:648: error: 'status' undeclared (first use in this function)

image/mng.c:649: error: 'MNG_NOERROR' undeclared (first use in this function)

image/mng.c:649: error: 'MNG_NEEDTIMERWAIT' undeclared (first use in this function)

image/mng.c:651: error: too many arguments to function 'nsmng_broadcast_error'

image/mng.c:662: error: 'handle' undeclared (first use in this function)

image/mng.c:664: warning: implicit declaration of function 'mng_cleanup'

image/mng.c:664: warning: nested extern declaration of 'mng_cleanup'

image/mng.c: In function 'nsmng_destroy':

image/mng.c:682: error: 'mng_handle' undeclared (first use in this function)

image/mng.c:682: error: expected ';' before 'handle'

image/mng.c:684: error: 'handle' undeclared (first use in this function)

make[1]: *** [build-Linux-framebuffer/image_mng.o] Error 1

make[1]: Leaving directory `/home/cjli/netsurf/workspace/netsurf-full-3.0/src/netsurf-3.0'

make: *** [/home/cjli/netsurf/workspace/inst/build-stamp] Error 2

 

解决办法:编译安装libmng

 

 

 

4.运行时错误

./nsfb -f linux  -b 16 -w 320 -h 240

出现如下错误

Can't modify /lib/libssl.so.1.0.0's text section. Use GCC option -fPIC for shared objects, please.

 

 

openssl编译成静态库,不要使用编译器中库文件,使用自己编译的库文件.

 

重新编译

 

 

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值