2008-03-10 19:04:54     Compiling lighttpd for bfin

Document created by Aaronwu Employee on Aug 5, 2013
Version 1Show Document
  • View in full screen mode

2008-03-10 19:04:54     Compiling lighttpd for bfin

Philippe Le Gal (FRANCE)

Message: 52292    Hi

 

I try to compile lighttpd with the help of that doc :

http://svn.astfin.org/software/baps/trunk/lighttpd.mk

 

I succeded to build and download all the necessary files on the target but when I launch lighttpd, I've some strange written text.

 

When I strace lighttpd I've the following messages :

 

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

 

root:/bin> strace lighttpd

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4fc000

stat("/etc/ld.so.cache", 0x2dfb30)      = -1 ENOENT (No such file or directory)

open("/lib/libdl.so.0", O_RDONLY)       = 3

fstat(3, {st_mode=S_IFREG|0755, st_size=9404, ...}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4f2000

read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0j\0\1\0\0\0h\v\0\000"..., 4096) = 4096

mmap2(NULL, 8028, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE|MAP_EXECUTABLE, 3, 0) = 0x17c000

mmap2(NULL, 4508, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x438000

pread64(3, "\6 R0\"\10\f\34J2R\254B\f\372\27\0062Ih\10`\2\345\n\0Q"..., 4504, 4096) = 4504

close(3)                                = 0

munmap(0x4f2000, 4096)                  = 0

open("/lib/libgcc_s.so.1", O_RDONLY)    = 3

fstat(3, {st_mode=S_IFREG|0755, st_size=46116, ...}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4f2000

read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0j\0\1\0\0\0\230\36\0"..., 4096) = 4096

mmap2(NULL, 42984, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE|MAP_EXECUTABLE, 3, 0) = 0x2e0000

mmap2(NULL, 4132, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x43a000

pread64(3, "\350\240\7\10\363\27h\241\10\223\324/\0162\0362\10\344"..., 4012, 40960) = 4012

close(3)                                = 0

munmap(0x4f2000, 4096)                  = 0

open("/lib/libc.so.0", O_RDONLY)        = 3

fstat(3, {st_mode=S_IFREG|0755, st_size=223372, ...}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x4f2000

read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0j\0\1\0\0\0\220\273"..., 4096) = 4096

mmap2(NULL, 215940, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE|MAP_EXECUTABLE, 3, 0) = 0x300000

mmap2(NULL, 17472, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2f0000

pread64(3, "an rpc server\n\0\0couldn\'t registe"..., 8936, 212992) = 8936

close(3)                                = 0

munmap(0x4f2000, 4096)                  = 0

open("/lib/libc.so.0", O_RDONLY)        = 3

fstat(3, {st_mode=S_IFREG|0755, st_size=223372, ...}) = 0

close(3)                                = 0

open("/lib/libc.so.0", O_RDONLY)        = 3

fstat(3, {st_mode=S_IFREG|0755, st_size=223372, ...}) = 0

close(3)                                = 0

ioctl(0, SNDCTL_TMR_TIMEBASE or TCGETS, {B57600 opost isig icanon echo ...}) = 0

ioctl(1, SNDCTL_TMR_TIMEBASE or TCGETS, {B57600 opost isig icanon echo ...}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS|0x4000000, 0, 0) = 0x4f2000

time(NULL)                              = 3282

getuid32()                              = 0

time(NULL)                              = 3282

write(2, "1970-01-01 00:54:42: (server.c.5"..., 861970-01-01 00:54:42: (server.c.548) No configurat

) = 86

_exit(-1)                               = ?

Process 137 detached

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

 

I think that I've a problem with the dynamic libs.

 

Here is my compilation configuration command :

./configure --host=bfin-linux-uclibc --disable-ipv6 --prefix=/tmp/bfin

 

I compile with blackfin-toolchain-07r1.1

 

Any idea ?

 

Thx

 

Philippe

QuoteReplyEditDelete

 

 

2008-03-10 19:19:01     Re: Compiling lighttpd for bfin

Mark T (UNITED STATES)

Message: 52293    Philippe,

We have lighttpd in astinf (no baps) and working just fine. Perhaps you are just missing some libs which could be added manually. You can try using Astfin2 just to confirm. What hardware do you use?

 

Cheers,

Mark

QuoteReplyEditDelete

 

 

2008-03-10 19:20:22     Re: Compiling lighttpd for bfin

Mike Frysinger (UNITED STATES)

Message: 52294    what strange text ?  the partial error message seems pretty obvious:

(server.c.548) No configurat

 

did you make a configuration file ?

 

if you were missing libraries, it wouldnt have even executed ...

QuoteReplyEditDelete

 

 

2008-03-10 19:39:09     Re: Compiling lighttpd for bfin

Philippe Le Gal (FRANCE)

Message: 52295    Hi Mark

 

Thanks for your quick answer.

I'll have a look at astinf.

For the moment I use the BF537 Stamp board for my dev.

 

Here are the libs I downloaded (ftp) to the  target :

mod_accesslog.so   mod_evasive.so        mod_mysql_vhost.so  mod_simple_vhost.so

mod_access.so      mod_evhost.so         mod_proxy.so        mod_ssi.so

mod_alias.so       mod_expire.so         mod_redirect.so     mod_staticfile.so

mod_auth.so        mod_extforward.so     mod_rewrite.so      mod_status.so

mod_cgi.so         mod_fastcgi.so        mod_rrdtool.so      mod_trigger_b4_dl.so

mod_cml.so         mod_flv_streaming.so  mod_scgi.so         mod_userdir.so

mod_compress.so    mod_indexfile.so      mod_secdownload.so  mod_usertrack.so

mod_dirlisting.so  mod_magnet.so         mod_setenv.so       mod_webdav.so

 

Philippe

QuoteReplyEditDelete

 

 

2008-03-10 19:42:47     Re: Compiling lighttpd for bfin

Philippe Le Gal (FRANCE)

Message: 52296    Hi Mike

 

Thanks for your message

 

Here is the strange message I get :

 

root:/bin> lighttpd -f /etc/lighttpd.conf

1970-0m-u1 0n:m3a0p: (ooff gnioenc-9m1m appnend  omfegmioer ye cblyg tppr.oocfefsise :1C4n0o  (lloi)

 

I put a config file (the lighttpd example one) in /etc.

 

I think I've to patch lighttpd with Mike Taht patch (lighttp for Asterix) :

http://svn.astfin.org/software/baps/trunk/patch/lighttpd.patch

 

What do U think of that ?

 

Philippe

QuoteReplyEditDelete

 

 

2008-03-10 19:46:21     Re: Compiling lighttpd for bfin

Philippe Le Gal (FRANCE)

Message: 52297    I'm going to bed now...

I'll read your answers tomorrow !

 

Thx

 

Philippe

QuoteReplyEditDelete

 

 

2008-03-10 22:46:29     Re: Compiling lighttpd for bfin

Mike Frysinger (UNITED STATES)

Message: 52300    that looks like a kernel message being intermingled with a message from lighttpd

 

run `dmesg -n 1` on your board before executing lighttpd and that will prevent the kernel from writing kernel messages to your serial console at the same time (you can still read them by doing `dmesg`)

 

the other option is to telnet in and execute lighttpd from that session ... the kernel wont dump messages into a telnet session, just the console

QuoteReplyEditDelete

 

 

2008-03-11 14:17:02     Re: Compiling lighttpd for bfin

Philippe Le Gal (FRANCE)

Message: 52344    Hi Mike,

 

Yes, it was a problem of messages to the serial console.

Now I can play with lighttpd.

 

But a last problem : I've to run lighttpd with the -D option, because without I cannot daemonize lightttpd : it's stop without any error message.

 

Any idea ?

 

Philippe

QuoteReplyEditDelete

 

 

2008-03-11 14:28:45     Re: Compiling lighttpd for bfin

Mike Frysinger (UNITED STATES)

Message: 52346    just background it using &

QuoteReplyEditDelete

 

 

2008-03-11 16:27:10     Re: Compiling lighttpd for bfin

Pawel Pastuszak (CANADA)

Message: 52349    Hi Philippe,

 

run like this

lighttpd -f /etc/lighttpd.conf -D >/dev/null 2>/dev/null &

 

make sure that you add this line in your rc if you run it from command line and you press Control-C it will kill its self since its hands a handler for control-c

 

 

Pawel

QuoteReplyEditDelete

 

 

2008-03-11 16:47:03     Re: Compiling lighttpd for bfin

Philippe Le Gal (FRANCE)

Message: 52351    Oooops... So simple...

Attachments

    Outcomes