1.查看文件需要依赖什么动态库
linux@ubuntu:/home/work/imgae/lighttp/lighttpd-1.4.58/install$ aarch64-linux-gnu-readelf -d sbin/lighttpd
Dynamic section at offset 0x4bdf8 contains 25 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libdl.so.2]
0x0000000000000001 (NEEDED) Shared library: [libc.so.6]
0x000000000000000c (INIT) 0x408b60
0x000000000000000d (FINI) 0x43c144
0x0000000000000019 (INIT_ARRAY) 0x45bde8
0x000000000000001b (INIT_ARRAYSZ) 8 (bytes)
0x000000000000001a (FINI_ARRAY) 0x45bdf0
0x000000000000001c (FINI_ARRAYSZ) 8 (bytes)
0x000000006ffffef5 (GNU_HASH) 0x400260
0x0000000000000005 (STRTAB) 0x404ae8
0x0000000000000006 (SYMTAB) 0x401008
0x000000000000000a (STRSZ) 11446 (bytes)
0x000000000000000b (SYMENT) 24 (bytes)
0x0000000000000015 (DEBUG) 0x0
0x0000000000000003 (PLTGOT) 0x45bfe8
0x0000000000000002 (PLTRELSZ) 3576 (bytes)
0x0000000000000014 (PLTREL) RELA
0x0000000000000017 (JMPREL) 0x407d68
0x0000000000000007 (RELA) 0x407cd8
0x0000000000000008 (RELASZ) 144 (bytes)
0x0000000000000009 (RELAENT) 24 (bytes)
0x000000006ffffffe (VERNEED) 0x407c88
0x000000006fffffff (VERNEEDNUM) 2
0x000000006ffffff0 (VERSYM) 0x40779e
0x0000000000000000 (NULL) 0x0
编译:
./configure --prefix=/home/work/imgae/lighttp/lighttpd-1.4.58/install --host=mipsel-linux-gnu --disable-lfs --disable-ipv6 --without-openssl --without-kerberos5 --without-pcre --without-zlib --without-bzip2 --without-lua "CC=aarch64-linux-gnu-gcc"
make
make install
配置:
cd /home/djstava/Downloads/lighttpd-1.4.35/install
mkdir -p cache cgi-bin config log sockets vhosts webpages
cp -rf lighttpd-1.4.35/doc/config/config.d lighttpd-1.4.35/doc/config/lighttpd.conf li
修改配置文件 config/lighttpd.conf
var.log_root = "/home/djstava/Downloads/lighttpd-1.4.35/install/log"
var.server_root = "/home/djstava/Downloads/lighttpd-1.4.35/install"
var.state_dir = "/home/djstava/Downloads/lighttpd-1.4.35/install"
var.home_dir = "/home/djstava/Downloads/lighttpd-1.4.35/install"
var.conf_dir = "/home/djstava/Downloads/lighttpd-1.4.35/install/config"
server.document-root = server_root + "/webpages"
#server.username = "lighttpd"
#server.groupname = "lighttpd"