cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Visitor
Visitor
2,071 Views
Registered: ‎07-12-2010

lighttpd sever on ml403 ---> cannot start the server

Hi,

 

I cross-compiled the light httpd server for ml403 powerpc runing on linux distribution I got from the git.xilinx.

Here are the steps I followed :

 

1-
CC=/opt/ELDK/4.2/usr/bin/ppc_4xx-gcc ./configure --build=powerpc-405-linux-gnu --host=i686-pc-linux-gnu --target=powerpc-405-linux-gnu -enable-shared --prefix=/usr --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --libdir=/usr/lib/lighttpd --mandir=/usr/share/man --without-pcre --without-zlib --without-bzip2

2-
CC=/opt/ELDK/4.2/usr/bin/ppc_4xx-gcc make CROSS_COMPILE=ppc_4xx-

3-
make DESTDIR=$PWD/_pkg install

After striping the files. I copyed them to the Ramdisk images I got from http://xilinx.wikidot.com/powerpc-linux

The directory are :

/usr/sbin where the binary file lighttpd exists

/usr/lib/lighttpd for the concerned libraries

 

I copyed a lighttp.con configuration file to /etc/lighttpd folder on the ramdisk image

 

The server need a start file that should be put under /etc/init.d

As this file doesn't exist on the Ramdisk image, I created the folder.

 

This start file looks like :

***********************************************

#!/bin/sh
#
# lighttpd     Startup script for the lighttpd server
#
# chkconfig: - 85 15
# description: Lightning fast webserver with light system requirements
#
# processname: lighttpd
# config: /etc/lighttpd/lighttpd.conf
# config: /etc/sysconfig/lighttpd
# pidfile: /var/run/lighttpd.pid
#
# Note: pidfile is assumed to be created
# by lighttpd (config: server.pid-file).
# If not, uncomment 'pidof' line.

# Source function library
. /etc/rc.d/init.d/functions

if [ -f /etc/sysconfig/lighttpd ]; then
    . /etc/sysconfig/lighttpd
fi

if [ -z "$LIGHTTPD_CONF_PATH" ]; then
    LIGHTTPD_CONF_PATH="/etc/lighttpd/lighttpd.conf"
fi

prog="lighttpd"
lighttpd="/usr/sbin/lighttpd"
RETVAL=0

start() {
    echo -n $"Starting $prog: "
    daemon $lighttpd -f $LIGHTTPD_CONF_PATH
    RETVAL=$?
    echo
    [ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
    return $RETVAL
}

stop() {
    echo -n $"Stopping $prog: "
    killproc $lighttpd
    RETVAL=$?
    echo
    [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
    return $RETVAL
}

...

***********************************************

 

I tried to start the server using these two ways without success :

 

1-

The sript fails because of this line command :

. /etc/rc.d/init.d/functions

 

There is no such file/directory on the Ramdisk image. Is there a way to add it ?

 

By greping /usr/bon and /usr/sbin, I found this function "start-stop-daemon", but I don't know how to call it !

 

2-

I tried another way by calling directly the binary file :

 

root:/usr/sbin> ./lighttpd -f /etc/lighttpd/lighttpd.conf
./lighttpd: not found

 

Strange, the lighttpd binary file exist under /usr/sbin !!

 

Any helps on these two ways please ?

 

Regards,

Lyman

0 Kudos
Reply
0 Replies