This tutorial show how to compile and install lighttpd onto LPC31XX developer's kit. It has used references from internet. All commands, examples is tested with:
- ELDK (version 5.5 - armv5te) - Download.
- Lighttpd (version 1.4.35) - Download.
- Build environment: Ubuntu 14.04 - x86_64
We assume ARM CROSS COMPILE installed in build environment at /usr/local/eldk/5.5 and ROOTFS is allocate at /usr/local/nfs/3131nfs. Below is step by step to compile lighttpd for ARM PLATFORM.
Step 1: Configure lighttd package.
In "Terminal", go to Lighttpd directory. Use below commands to configure:
./configure --target=arm-linux-gnueabi --host=arm-linux-gnueabi --build=i686-linux CC="arm-linux-gnueabi-gcc --sysroot=/usr/local/eldk/5.5/armv5te/sysroots/armv5te-linux-gnueabi" --without-bzip2 --prefix=/usr/local/nfs/3131nfs/usr/local/lighttpdDetails of configuration's option, refer "help" document. Use "./configure --help" to show "help" document.
Step 2: Compile lighttpd package.
In "Terminal", use "make" command to compile. If your plug in used library which is placed in none standard folder or the linker cannot find, Use below flags to compile:
CFLAGS C compiler flagsThe "make" command will be:
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
make LDFLAGS=-L<lib_dir> LIBS=-l<lib_name>e.g
make LIBS=-lxmlStep 3: Install lighttpd package
Use "make install" command to install "mod_* and binary file" of lighttpd package.
* The binary files (lighttpd, lighttpd-angel) are placed in <PREFIX>/sbin
* The mod_*.so and mod_*.la files (include your module) are placed in <PREFIX>/lib
Thanks for your reading!
0 comments: