php sql

Xristos
Hello

I have a mini2440 and I have the question. Is there a way to run php and
sql (or MySQL). It would be good for me if I had a database and a way to
manage it.
Even if there is not php sql (or it is too much for the board) is there
another database i can use?

Thanks for help
Byte

davef
A fellow worker is playing with Cherokee on a Linux PC, prior to
cross-compiling it for the mini2440 dev board.  He says it can run PHP, but
don't know about MySQL.

Might be worth a look.

andres
i need it too can you tellme how i doit or where i can find some info,
thanks

Vinicius 'hex' Kamakura
i'd go with www.sqlite.org

felipe
ok   thankz im gonna check it

andres
hi i tried to install cherokee but i couldnt did it because this messenge
show in my screen: no acceptable C compiler found in
$PATH
See `config.log' for more details.

I have been reading and i have to install gcc or tell the mini where its
but i dont have any idea, and what i find in internet dont helpme

please any idea how can i install this

thanks

davef
The C compiler is on the downloads page.

ARM-Linux GCC 4.3.2

jürgen
PHP5 has sqlite already embedded

andres
Hi i downloaded it but when i was extracting a lot of mistakes appearsme,
what can i do? there is another source where i can downloadit or that
archive cant extract? how can i install it?

How made your friend to install cherokee?

Help me please!

davef
He has written a script to do it via NFS.

I plan to modify his script, test it and then write a procedure probably
towards the end of next week . . . or the week after.

Dave

andres
thanks im gona keep trying while i wait for you thank you

andres
hi  i have already install the compiller The arm-linux-gcc-4.3.2
but now what? how can i make the cross compilacion and install this
webserver in my mini2440?

im using ubuntu 9.10

    thanks

Dave Festing
Attachment: dave_mini2440-bootstrap-cherokee (1.46 KB)
Andres,

I have managed to compile Cherokee using this script, BUT have not tried to
run it on the platform.  No idea of whether it works or not.

Have a go and lets see what problems you turn up next.

Good luck!

Add the file extension .sh

andres
forgiveme but i dont know how can i use it?, where should i add and how?

i have been trying installing buildroot to make the crosscompiling but im
so lose,i installed it but i don have idea how to use it. heelp!

and thanks for the help you have bring me

Dave Festing
Andres,

Take the file I sent and add the extension .sh

For some reason I couldn't attach a file that had the extension .sh on it.

So, you will have a file called <dave_mini2440-bootstrap-cherokee.sh>

Place this in your home folder on the linux host machine and then using
your terminal navigate to where you placed the file and:

sudo ./dave_mini2440-bootstrap-cherokee.sh>  then your password

This process is called executing a script.  Read through the script and you
will see where the output is placed.  

You will have to read through the documentation on the Cherokee site for
insight into how to set up and run Cherokee.

Why do you want to run Cherokee?  Is Boa, which is in the factory distro,
not capable enough for you?

The books link seems to be missing on the Wiki.  Search for <Building
Embedded Linux Systems.pdf> on the internet.

I don't use buildroot.  I would suggest you read how to compile programs in
the above book, Chapter 4 and section 4.2

andres
Dave

i do what you toldme copy the archive to my home directory and put .sh in
his name but when i execute your instruccion appearsme this messenge:

sudo: ./dave_mini2440-bootstrap-cherokee.sh: command not found

if you have problems to save with that extension why dont you modificate
one archive that already have this extension and save (obviosly make a
respald of that archive) i have made this and its works me, but with
another type of extension.

this night im gonna read what you suggestme and tell you, why dont boa
server?
because its too week for what we need.

ok thanks for your help

Dave Festing
I am running Ubuntu 9.04 and it worked OK.  Maybe the #!/bin/bash needs to
be:

#!/bin/sh or #!/bin/ash on your machine.  I assume you need to use sudo on
your linux host to access the root directory.

Failing that just type in each line manually, hit enter at the end of each
command.  Each export command will stay in force as long as you keep the
terminal session open.


***
DEST=~/mini2440-bootstrap

export ac_cv_func_malloc_0_nonnull=yes
export ac_cv_func_realloc_0_nonnull=yes
export ac_cv_func_shm_open=no 
export ac_cv_lib_rt_shm_open=no

export CROSS_COMPILE=arm-none-linux-gnueabi-
export CC=${CROSS_COMPILE}"gcc"
export CXX=${CROSS_COMPILE}"g++" 
export AR=${CROSS_COMPILE}"ar" 
export AS=${CROSS_COMPILE}"as" 
export RANLIB=${CROSS_COMPILE}"ranlib" 
export LD=${CROSS_COMPILE}"ld"
export STRIP=${CROSS_COMPILE}"strip"
export PATH=$PATH:/home/davef/mini2440-bootstrap/../
NMAKE=4

cd ${DEST}/cherokee-0.99.44/

echo " ****************** Configuring Cherokee  ********************* "
make distclean
./configure --localstatedir=/var \
            --exec-prefix=${DEST}/output/cherokee \
            --prefix=/home/cherokee \
            --with-wwwroot=/www \
            --enable-static-module=all \
            --enable-shared=no \
            --enable-static \
            --disable-pam \
            --disable-ipv6 \
            --disable-tls \
            --disable-largefile \
            --host=arm-linux \
            --target=arm-linux \
            LDFLAGS="-s -lcrypt -lpthread -ldl
-L/home/davef/mini2440-bootstrap/arm-2008q3/arm-none-linux-gnueabi/linc/armv4t/l
ib"
            CFLAGS="-march=armv4t -mtune=arm920t -Os"

make -j4 LDFLAGS="-all-static" 
make install
***

You do know that \ means just continue typing.  I would copy and save the
whole part that starts with .configure all the way down to -Os" as you
don't want to type that whole command more than once!

Have a go.

andres
Hi then do i write this in my console terminal of my desktop pc?   (in this
moment im not in my office i can do the test now) 

making this will be cherokee running in my mini 2440? 

this path ? what is it this path for?
i know i have to change it but first i need to know that.
export PATH=$PATH:/home/davef/mini2440-bootstrap/../

thanks for your help forgive my (maybe) simple doubts but im a beginner
thanks again.

Dave Festing
Yes.

Yes, this will cross-compile Cherokee to run on your mini2440.

In this case <Path> tells the computer where your working directory is. 
Usually <PATH> is used to tell the computer where your compiler and
compiler tools are located.  Yes, you have to change it for your personal
directory setup.

You should find your executable files in
/mini2440-bootstrap/cherokee-0.99.44/

somewhere.

I haven't done any more then this.

andres
the compiler its where i download the ARM-Linux GCC 4.3.2 or where i
installit??


friend parce (in my country parce meants a good friend) thank you
im gonna check it tomorrow at first hour and i tell you if its works its
gonna be wonderful i going to be in doubt with you add my msn
andrewt12357@hotmail.com may be i could you return the favor thanks friend

andres
i forgot the compiling is made for serial port right??
thanks

Dave Festing
Where ever you extracted the 4.3.2 to.

Serial port?  There are many ways to download your program to the
FRiendlyArm platform.  Serial is not one that I would use.  I just copy the
program to a USB flashdrive, stick it into the USB port and copy it across
to my file system.

If you are doing a lot of development then NFS seems more appropriate.

Honestly, I think you need to do a few months of reading and playing around
with, say compiling a hello.c or flash a LED or something, so that you
become familiar with the Linux system.

I would STRONGLY suggest you tackle some of the basics and wait for a
tutorial to be written about what you want to do.  There are going to be
many more problems ahead of you.

andres
hi again

i want to tell you the steps what i made (for find some mistakes)

i do what you said: copy this code in the main console, i change the path
for the place where the compiler is, this was the changes:


DEST=~/mini2440-bootstrap

export ac_cv_func_malloc_0_nonnull=yes
export ac_cv_func_realloc_0_nonnull=yes
export ac_cv_func_shm_open=no 
export ac_cv_lib_rt_shm_open=no

export CROSS_COMPILE=arm-none-linux-gnueabi-
export CC=${CROSS_COMPILE}"gcc"
export CXX=${CROSS_COMPILE}"g++" 
export AR=${CROSS_COMPILE}"ar" 
export AS=${CROSS_COMPILE}"as" 
export RANLIB=${CROSS_COMPILE}"ranlib" 
export LD=${CROSS_COMPILE}"ld"
export STRIP=${CROSS_COMPILE}"strip"
export PATH=$PATH:/home/felipe/mini2440-bootstrap/../         HERE
NMAKE=4
pushd .

cd ${DEST}/cherokee-0.99.44/

echo " ****************** Configuring Cherokee  ********************* "
make distclean
./configure --localstatedir=/var \
            --exec-prefix=${DEST}/output/cherokee \
            --prefix=/home/cherokee \
            --with-wwwroot=/www \
            --enable-static-module=all \
            --enable-shared=no \
            --enable-static \
            --disable-pam \
            --disable-ipv6 \
            --disable-tls \
            --disable-largefile \
            --host=arm-linux \
            --target=arm-linux \
            LDFLAGS="-s -lcrypt -lpthread -ldl -L/home/felipe/mini2440-
bootstrap/arm-2008q3/arm-none-linux-gnueabi/linc/armv4t/lib"
            CFLAGS="-march=armv4t -mtune=arm920t -Os"
AND HERE

make -j4 LDFLAGS="-all-static" 
make install
popd

it was necessary to leave and space at the end of the text to run the
archive.

to execute it i made it step in this directory
root@felipe-desktop:/home/felipe/cherokee-0.99.44#

its created me a carpet mini2440-bootstrap in root directory.
inside this carpet i found this: bin lib sbin

is it really what suppose to be created?

i copy this file to mini2440
but how can i execute this files?
i tried by difrerents comands but i cannt doit

HELP ME PLEASE we almost finish
thanks for all your help

davef
Almost finished!  I doubt it.

However, I am at work so will not get a chance to look at this until
tonight.

I do not remember finding bin lib sbin in my mini2440-bootstrap directory.

The files you are looking for are:
cherokee
cherokee-worker
cherokee-admin

The one, I think, you want is cherokee-worker.  About 3Mb.

I believe you then just copy this file to, for example, /home on the
FriendlyArm and in the terminal application navigate to where
cherokee-worker is located and type <cherokee>  

You also need to place cherokee.conf in another diectory called
/etc/cherokee

I will have another play with it this evening (New Zealand time).

Does <carpet>  = folder?

Dave

andres
yes carpet = folder jejeje (forgive my bad english)
archive=files
and yes "bin lib sbin" these are folders.

inside bin i found this archives: cget, cherokee-config cherokee-panic
cherokee-tweak

inside lib this :

(
brltty                                libattr.so.1.1.0          
libcrypto.so.0.9.8      libgcrypt.so.11.5.2      libncursesw.so.5.7        
libnss_nis.so.2          libproc-3.2.8.so      libsysfs.so.2.0.1    
libx86.so.1
cpp                                   libblkid.so.1             
libcrypt.so.1           libglib-2.0.so.0         libnsl-2.10.1.so          
libnss_winbind.so.2      libpthread-2.10.1.so  libthread_db-1.0.so  
libxtables.so.2
dbus-1.0                              libblkid.so.1.1.0          libc.so.6 
             libglib-2.0.so.0.2200.3  libnsl.so.1               
libnss_wins.so.2         libpthread.so.0       libthread_db.so.1    
libxtables.so.2.0.0
firmware                              libbrlapi.so.0.5          
libdbus-1.so.3          libgpg-error.so.0        libnss_compat-2.10.1.so   
libntfs-3g.so.54         libreadline.so.5      libtic.so.5          
libz.so.1
i486                                  libbrlapi.so.0.5.3        
libdbus-1.so.3.4.0      libgpg-error.so.0.4.0    libnss_compat.so.2        
libntfs-3g.so.54.0.0     libreadline.so.5.2    libtic.so.5.7        
libz.so.1.2.3.3
i586                                  libBrokenLocale-2.10.1.so 
libdevmapper.so.1.02.1  libhistory.so.5          libnss_dns-2.10.1.so      
libpamc.so.0             libreadline.so.6      libticw.so.5         
linux-sound-base
i686                                  libBrokenLocale.so.1      
libdl-2.10.1.so         libhistory.so.5.2        libnss_dns.so.2           
libpamc.so.0.82.1        libreadline.so.6.0    libticw.so.5.7        lsb
init                                  libbsd.so.0                libdl.so.2
             libhistory.so.6          libnss_files-2.10.1.so    
libpam_misc.so.0         libresolv-2.10.1.so   libudev.so.0         
modules
klibc-IVI64Rw9vcD2pCELnFiJgX5AtWY.so  libbsd.so.0.1.4           
libe2p.so.2             libhistory.so.6.0        libnss_files.so.2         
libpam_misc.so.0.82.0    libresolv.so.2        libudev.so.0.5.0     
security
ld-2.10.1.so                          libbz2.so.1               
libe2p.so.2.3           libiptc.so.0             libnss_hesiod-2.10.1.so   
libpam.so.0              librt-2.10.1.so       libulockmgr.so.1     
terminfo
ld-linux.so.2                         libbz2.so.1.0             
libexpat.so.1           libiptc.so.0.0.0         libnss_hesiod.so.2        
libpam.so.0.82.1         librt.so.1            libulockmgr.so.1.0.1  tls
libacl.so.1                           libbz2.so.1.0.4           
libexpat.so.1.5.2       libiw.so.29              libnss_mdns4_minimal.so.2 
libparted-1.8.so.12      libSegFault.so        libusb-0.1.so.4       udev
libacl.so.1.1.0                       libc-2.10.1.so            
libexpatw.so.1          libkeyutils-1.2.so       libnss_mdns4.so.2         
libparted-1.8.so.12.0.0  libselinux.so.1       libusb-0.1.so.4.4.4   ufw
libanl-2.10.1.so                      libcap.so.2               
libexpatw.so.1.5.2      libkeyutils.so.1         libnss_mdns6_minimal.so.2 
libpcprofile.so          libsepol.so.1         libusplash.so.0      
xtables
libanl.so.1                           libcap.so.2.16            
libext2fs.so.2          libm-2.10.1.so           libnss_mdns6.so.2         
libpcre.so.3             libslang.so.2         libutil-2.10.1.so
libatasmart.so.4                      libcidn-2.10.1.so         
libext2fs.so.2.4        libmemusage.so           libnss_mdns_minimal.so.2  
libpcre.so.3.12.1        libslang.so.2.1.4     libutil.so.1
libatasmart.so.4.0.2                  libcidn.so.1              
libfuse.so.2            libm.so.6                libnss_mdns.so.2          
libpcsclite.so.1         libssl.so.0.9.8       libuuid.so.1
libatm.so.1                           libcom_err.so.2           
libfuse.so.2.7.4        libncurses.so.5          libnss_nis-2.10.1.so      
libpcsclite.so.1.0.0     libss.so.2            libuuid.so.1.3.0
libatm.so.1.0.0                       libcom_err.so.2.1         
libgcc_s.so.1           libncurses.so.5.7        libnss_nisplus-2.10.1.so  
libpopt.so.0             libss.so.2.0          libwrap.so.0
libattr.so.1                          libcrypt-2.10.1.so        
libgcrypt.so.11         libncursesw.so.5         libnss_nisplus.so.2       
libpopt.so.0.0.0         libsysfs.so.2         libwrap.so.0.7.6
)

and inside sbin:


cherokee  cherokee-admin  cherokee-worker

THE ARCHIVES WE NEED!!

i did what you tellme put a cherokee-worker in home
and create a file in /etc name cherokee there i put this files
cherokee cherokee-admin and cherokee.conf

after that i went to /home and wrote the command cherokee (in console)
but appearsme this:

-/bin/sh: cherokee: not found
also tried typing:
./cherokee
-/bin/sh: cherokee: not found

what should i do now?
what have i to do with the other files? (i only copy this files in the
2440)

thanks!!!

andres
hi , help please to finish these , while i would like to learn more about
this, there are another links where i can find some info? or how should i
look for in google, again thanks for all your help

davef
Still at work!

Forget about the files in lib, you have done a static compilation.

I would not put cherokee-admin in /etc/cherokee . . . but I can't tell you
where to put it!

There is a relationship between cherokee and cherokee-worker that I do not
fully understand.  I was told one was a "wrapper" for the main executable. 
The Cherokee website has some documentation on using these files which seem
to say that you "just need to call one or other" and "don't call one of
them unless you are doing development".

Now your:

./cherokee
-/bin/sh: cherokee: not found

Check cherokee.conf and see where it expects to find the main executable
and the cherokee.conf files.

I might have more answers in 2-3 hours.

davef
***
Check cherokee.conf and see where it expects to find the main executable
and the cherokee.conf files.
***

Probably, should say:

Check cherokee.conf and see where it expects to find the cherokee.conf
file.

Problems with:
/bin/sh

Think there was another thread that talked about this issue.  I assume you
are using the distro version of BusyBox.

davef
Home from work.

Now, I see in <cherokee-conf> not cherokee.conf

there is a line that says:

exec_prefix=/home/user/mini2440-bootstrap/output/cherokee

Try making a directory by that name on the FriendlyArm and drop your three
executables in there.

Appears to be a problem with the script.

Check that cherokee-conf is in home/cherokee

davef
Then it says:

exec_prefix_set=no

I am confused!

davef
I copied the entire contents of /mini2440-bootstrap/output/cherokee to
/home/cherokee on the FriendlyArm.  Don't move or change anything, if I
suggested to do that before.  The whole folder is 14M, which only leaves 6M
of storage on the factory distro 2.6.32.2 with pictures and videos removed.

My /mini2440-bootstrap/output/cherokee/lib is very different to yours.  I
have only 8 files:

libcherokee-base.a
libcherokee-base.la
libcherokee-client.a
libcherokee-client.la
libcherokee-config.a
libcherokee-config.la
libcherokee-server.a
libcherokee-server.la

and two directories:

cherokee (with nothing in it)
pkconfig (with one file cherokee.pc)


In /mini2440-bootstrap/output/cherokee/sbin do:

file cherokee
file cherokee-worker
file cherokee-admin

and ensure they say:

ELF 32-bit LSB executable, ARM, version 1 (SYSN), statically linked, for
GNU/Linux 2.6.14, not stripped

When I try to run the program I get <Illegal instruction>.  I will talk to
my parce about how to get this program running . . . tomorrow.

andres
hi

/mini2440-bootstrap/output/cheroke folder inside are found 

*bin folder this folder has this files inside:
cget, cherokee-config, cherokee-panic, cherokee-tweak

*lib this has:
-cherokee (is a folder) empty (as you)
-pkgconfig(folder) with a file cherokee.pc
 and this files: (they are not than as a copy before i made a mistake)
-libcherokee-base.a
-libcherokee.base.la
-libcherokee-client.a
-libcherokee-client.la
-libcherokee-config.a
-libcherokee-configa.la
-libcherokee-server.a
-libcherokee-server.la

*sbin has:
-cherokee
-cherokee-admin
-cherokee-worker

we have the same folders with the same files!

then should i copy the entere folder: mini2440-bootstrap/output/cherokee/

to /home of my mini2440?
how can install cherooke?

im going to read what you tellme above


installing the compiler arm i made following the steps of this link, this
page also has some examples of hellow word, is it what you tellme above
that i should study?


http://equallybad.blogspot.com/2010/02/project-how-to-setup-default-dev-...

thanks

davef
Good morning.

Did you do:

file cherokee as I suggested above?

I was suggesting that you do a few tutorials to gain confidence in tackling
something like getting Cherokee to run on your platform.

I suspect that there are still a few problems with the script.

If I go to the /home directory on my Linux host pc I see a directory called
/cherokee  In it there are three folders etc include share  Looking at the
dates they appear to be the result of the cross-compilation.

Also, if I go to the root directory on the Linux host pc I see another
directory called /www  In it there some images.  These also were generated
at the same time.

At first I thought these were the result of installing Cherokee on the host
but I now I think these folders need to be included into what is copied to
the target.

Here is the latest suggestion from my friend . . .
****
The cherokee.conf is always stored in /installed folder/cherokee/etc. 
Hence, if you specified prefix=/home/cherokee (in the script), you will
need to copy the /home/cherokee to target's /etc folder. At target, go to
/etc/cherokee/sbin and run cherokee which will look for
/etc/cherokee/etc/cherokee/cherokee.conf. 
****

I think there is another problem here as there is no /etc/cherokee/sbin on
my traget.  sbin is at /home/cherokee  I asked him if this is correct.

Hope to have more answers in about 4 hours.

andres
ensure that the files cherokee, cherokee-admin and cherokee-worker say:

ELF 32-bit LSB executable, ARM, version 1 (SYSN), statically linked, for
GNU/Linux 2.6.14, not stripped.


i couldnt do it because when i tryed to open it with gedit appears me this
message:

"Compruebe que no está intentando abrir un archivo binario."
"check you are not trying to open a binary file".

how can i modify this files then?

about the script i think the mistake could be in this line:

--disable-tls \
when we are configuring the cherokee

the right line shouldnt be this?
--disable-nls

then what files should i copy to the mini2440? is it everything found in:
mini2440-bootstrap/output/cheroke

how can i execute it?

friend thanks a lot

andres
remeber that you tellme dont make any changes in the files

andres
hi i made this:

i copy the folder cherokee to home folder in mini2440 (this folder has
inside bin, lib, sbin with all the files)

and in the folder /etc in mini2440  made a folder cherokee with this files:
cherokee, cherokee.conf

step in /etc/cherokee executed the command ./cherokee
but appears me this: Ilegal instruccion.

I dont know if i understand succesful what youre friend told us to do

so what should i do?

thanks

andres
hi again jejej 

i tried to check your doubt:

"think there is another problem here as there is no /etc/cherokee/sbin on
my traget.  sbin is at /home/cherokee  I asked him if this is correct."

so i move the folder sbin from  home/cherokee (on mini2440) to
/etc/cherokee

after that again try with this command
./cherokee

but the result was the same
ilegall instruccion

davef
I wasn't asking you to modify any files.

You are only checking that those files have been cross-compiled and are
static.

Why do you think --disable-tls should be -disable-nls?

OK, some feedback from my friend . . .

    seems there should be lots of files in lib

He has Cherokee working on an ARM9 in-house platform, so I think we only
need to get the script correct or ?? 

What size are your cherokee cherokee-worker and cherokee-admin files?

andres
i think that this line shoulbe in this way for what i found in this link

http://www.cherokee-project.com/doc/basics_installation_unix.html

in advance parameters, and i look for more configuration writing help and i
didnt find anything with tls, the line most  similar i found was that

the folder sbin side is:6.2Mb
cherokee: 596,3 KiB
cherokee-worker: 2.8mb
cherokee-admin: 2,8 MiB
 
yes couldbe the script, i hope your friend could send it to you

I think we most try with that script and maybe if we dont have success i
suggest that you ask to your friend the files that was generete with that
script

davef
Evidently, in the folder where you did the compilation do:
 .configure -h or --h

and you will see lots more switches that you can apply.

I will be seeing him about 6PM (8 hours from now) and we are going to sort
this issue out.

BFN

andres
hi
when i made the compilation i was step here:
home/felipe/cherokee

so i step in this location and executed .configure
but this was appearsme .configure -h :command no found
and the same with --h

im from Colombia and in this moment its 17:41

davef
on the linux host?

andres
in my desktop pc

davef
Sorry, wrong command.

Have a look in the source code and in a file called INSTALL.

andres
Friend im so tired im going to sleep now, im in my house so i dont have the
mini2440 in this moment, but before that i want to know what should i do
tomorow?

where do i look for in that file in mini2440 or in my desktop pc
and where is this file?

what do i do with this?

how can we finish the installing cherokee in mini2440

is it wrong script that we use to compile?

thanks for all your help

davef
The file in the desktop PC where you extracted cherokee.

You just look in the file (using gedit) and you should see what switches or
options you really have for configuring cherokee.  For example is there
really a -disable--tls option.

I will have a look in 2 hours and write some notes before I go to bed.

I will be sitting with my friend for an hour tonight trying to figure out
how to complete the installation and correct the errors in the script.

Dave Festing
To re-cap:

In your source directory type:

   sudo ./configure -h

and you find all the available options.  Note. there is no mention of
-disable-tls


In your source directory type:

   gedit INTSALL

and you will find a lot more information.

I completely cleaned everything out and re-run the script.  

On the host:

Again in /mini2440-bootstrap/output/cherokee there are 3 directories called
bin lib sbin.  Also, in /home there is a folder called cherokee with
directories called etc include share

From /home I copied these 3 directories to
/mini2440-bootstrap/output/cherokee (need to fix the script).

sudo cp -r -a cherokee/etc /home/user/mini2440-bootstrap/output/cherokee
sudo cp -r -a cherokee/incude /home/user/mini2440-bootstrap/output/cherokee
sudo cp -r -a cherokee/share /home/user/mini2440-bootstrap/output/cherokee

The output/cherokee directory is 19M and has 877 items.

Andres, my apologies on this line:

LDFLAGS="-s -lcrypt -lpthread -ldl -L/home/felipe/mini2440-
bootstrap/arm-2008q3/arm-none-linux-gnueabi/linc/armv4t/lib"

It should be: 

LDFLAGS="-s -lcrypt -lpthread -ldl -L/home/felipe/mini2440-
bootstrap/arm-2008q3/arm-none-linux-gnueabi/libc/lib"

(BUT IT DOESN'T MAKE ANY DIFFERNCE, see below)

You do have this toolchain (arm-2008q3) in /mini2440-bootstrap?

Now, I didn't need to make any changes to my script so after re-compilation
and putting it on the target, of course, I get the same result <Illegal
instruction>

The only differences between my friend's toolchain and mine are:

- he is using a much older kernel version and
- he has a different library setup (he has his toolchain in /usr/arm)

As I was curious why your incorrect LDFLAGS line would even compile I put
an non-existent folder name in my LDFLAGS line and re-compiled.  I noticed
a message saying that if a cross-compiler was available then it would use
it.  Which brings me to another issue:

- in my .profile file (on the host)I have a line:

EXPORT PATH=/home/user/mini2440-bootstrap/arm-2008q3/bin:$PATH

You must do this as your files say they are cross-compiled.

I will get a copy of his files and run them on my dev board tomorrow night.
I have seen it running on his ARM platform so I know someone can do it:)

andres
ok friend i wait for you thanks

andres
hi again

about this:

"You do have this toolchain (arm-2008q3) in /mini2440-bootstrap? "
i didnt have this folder until the compilation was made.

do i have to download this toolchain? where i get it?

when i was styding your script i understand about LDFLAGS but i didnt
understand why did you call this line

i only install ARM-Linux GCC 4.3.2

thanks

davef
As mentioned above:

during compilation "I noticed a message saying that if a cross-compiler was
available then it would use it."

You must have a path in your .profile or bashrc which says: 

EXPORT PATH=/path/to/your/cross/compiler/bin:$PATH

and that part in LDFLAGS is ignored.  So, you use the 4.3.2 toolchain. 
That is OK.

You can now appreciate the difficulties in even getting a simple script to
work for more than one person. For example, those first four lines:

export ac_cv_func_malloc_0_nonnull=yes
export ac_cv_func_realloc_0_nonnull=yes
export ac_cv_func_shm_open=no 
export ac_cv_lib_rt_shm_open=no

mean nothing to me, I have to accept that they are needed.

Now, something I did question and will now try are these lines:

 --host=arm-linux
 --target=arm-linux

I thought host would be <i386> and target arm-none-linux-gnueabi. At least
they shouldn't be the same.

I will investigate.

andres
when i was install the compiler the guide i use for it tell me this:

sudo gedit /etc/bash.bashrc  (and add this line:
PATH=$PATH:/usr/local/arm/4.3.2/bin) 

so should i change this  line

export PATH=$PATH:/home/felipe/mini2440-bootstrap/../

for this one

export PATH=$PATH:

right?


and if thats ok then this line is gonna change too, isnt it?

 LDFLAGS="-s -lcrypt -lpthread -ldl
-L/home/felipe/mini2440-bootstrap/arm-2008q3/arm-none-linux-gnueabi/linc/armv4t/
lib"

for this

 LDFLAGS="-s -lcrypt -lpthread -ldl
-L/usr/local/arm/4.3.2/bin-none-linux-gnueabi/linc/armv4t/lib"

i want to be sure about this

this is the link that i use to install it

http://equallybad.blogspot.com/2010/02/project-how-to-setup-default-dev-...


thanks

andres
excuse me i made a mistake, i reply to you my messeage
when i was install the compiler the guide i use for it tell me this:

sudo gedit /etc/bash.bashrc  (and add this line:
PATH=$PATH:/usr/local/arm/4.3.2/bin) 

so should i change this  line

export PATH=$PATH:/home/felipe/mini2440-bootstrap/../

for this one

export PATH=$PATH:/usr/local/arm/4.3.2/bin

right?


and if thats ok then this line is gonna change too, isnt it?

 LDFLAGS="-s -lcrypt -lpthread -ldl
-L/home/felipe/mini2440-bootstrap/arm-2008q3/arm-none-linux-gnueabi/linc/armv4t/

lib"

for this

 LDFLAGS="-s -lcrypt -lpthread -ldl
-L/usr/local/arm/4.3.2/bin-none-linux-gnueabi/linc/armv4t/lib"

i want to be sure about this

this is the link that i use to install it

http://equallybad.blogspot.com/2010/02/project-how-to-setup-default-dev-...


thanks

davef
You have missed some important information I have been trying to tell you.

1.  The line LDFLAGS is incorrect there is no ../linc/armv4t/lib  see
corrected line above.

***
LDFLAGS="-s -lcrypt -lpthread -ldl -L/home/felipe/mini2440-
bootstrap/arm-2008q3/arm-none-linux-gnueabi/libc/lib"
***

2.  This part of LDFLAGS appears to be ignored.


export PATH=$PATH:/home/felipe/mini2440-bootstrap/../

I don't know what this line even does in the script.

The most important thing is the source being cross-compiled.  It appears to
be.

In bash.bashrc you need to use the path to your toolchain . . .

export PATH=$PATH:/usr/local/arm/4.3.2/bin

would be correct if that is where you extracted 4.3.2

I am going to talk to another guy about the script.

andres
ok
i dint made that change before because you tellme it didnt change anything,
but ok i understand, then this night will you work on this with your friend
who already make running cherokee in mini2440?

davef
After a one hour conservation with a OpenEmbedded/script guru he has
basically told me that I am "really trying to do things the hard way"

He says, "I should get a bigger Linux PC and use OpenEmbedded" and "stop
hitting my head against a brick wall".  OpenEmbedded has a Cherokee
project.

I will get the files from my friend and try running them on the mini2440.

Don't hold your breath!

davef
I was told <Illegal instruction> probably means there are compiled for the
an incorrect machine/architecture.

andres
thanks friend

andres
Then yours friend advice is change mini2440 and work with another pc? but
what is it the other Embedded tecnollogy that already works with cherokee?
is it a normal computer of 32 bits?

jm2222
Just in case you can install *deb packages cherokee compiled for armel can
be downloaded from here:
http://packages.debian.org/lenny/cherokee

davef
Go to OpenEmbedded and they have a Cherokee project listed.

http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/cherokee

My friend's advice is to stop doing these projects from "scratch" and learn
how to use OpenEmbedded.  My other friend is staying learn to do it the
hard way.

I need to take a poll.

From what I understand, if you do NOT need to know how to fix things when
they go wrong than use OpenEmbedded.  There is good support on existing
OpenEmbedded projects.  You have another "
learning curve", but perhaps a more useful development system.  Are you
doing this as a hobby or work?

Evidently, for OpenEmbedded you need a BIG Linux box and probably
broadband. 

Thanks jm2222 for yet another toolset to learn :)

Running Cherokee on a PC is pretty straight-forward.  In fact <apt-get
install cherokee> (Ubuntu) does it, I think.

andres
jim and how can i install it? simply ./install or ./configure?

andres
im doing for both work and hobby i like what im doing :) ejeje

davef
Andres,

There was a problem in the script.  There needs to be a \ at the end of the
LDFLAGS lines before CFLAGS.

Well, this time I get much smaller files and doing:

cherokee         603827
cherokee-admin  1233199
cherokee-worker 1230919 

readelf -a cherokee

and at the bottom of the terminal output it says that it is now compiled
for the v4t, which our machine is.  So looking better.

Copied to the dev board and the <Illegal instruction> message has
disappeared, but now there is another problem:
<corrupted double-linked list> 

Off to find a fix for that one.

New script:

*****
#!/bin/bash

DEST=~/mini2440-bootstrap

export ac_cv_func_malloc_0_nonnull=yes
export ac_cv_func_realloc_0_nonnull=yes
export ac_cv_func_shm_open=no 
export ac_cv_lib_rt_shm_open=no

export CROSS_COMPILE=arm-none-linux-gnueabi-
export CC=${CROSS_COMPILE}"gcc"
export CXX=${CROSS_COMPILE}"g++" 
export AR=${CROSS_COMPILE}"ar" 
export AS=${CROSS_COMPILE}"as" 
export RANLIB=${CROSS_COMPILE}"ranlib" 
export LD=${CROSS_COMPILE}"ld"
export STRIP=${CROSS_COMPILE}"strip"
export PATH=$PATH:/home/user/mini2440-bootstrap/arm-2008q3/bin
NMAKE=4
pushd .

cd ${DEST}/cherokee-0.99.44/

echo " ****************** Configuring Cherokee  ********************* "
make distclean
./configure --localstatedir=/var \
            --exec-prefix=${DEST}/output/cherokee \
            --prefix=/home/cherokee \
            --with-wwwroot=/www \
            --enable-static-module=all \
            --enable-shared=no \
            --enable-static \
            --disable-pam \
            --disable-ipv6 \
            --disable-tls \
            --disable-largefile \
            --host=arm-linux \
            --target=arm-linux \
            LDFLAGS="-s -lcrypt -lpthread -ldl \
                     -L/home/davef/mini2440-bootstrap/arm-2008q3/ \
                      arm-none-linux-gnueabi/libc/lib" \ 
            CFLAGS="-march=armv4t -mtune=arm920t -Os"

make -j4 LDFLAGS="-all-static" 
make install
popd

******

andres
jaaja ok friend thanks alot , did you really made a poll, i want to know
too more opinions about this.

andres
before i start to my compiling i want to know 2 things

1. Did you really erase the folders that was create with the last compiling

i refer of www and cherokee-0.99.44 folders both located in /


and i would like to copy the script again but with my path compiler:




*****
#!/bin/bash

DEST=~/mini2440-bootstrap

export ac_cv_func_malloc_0_nonnull=yes
export ac_cv_func_realloc_0_nonnull=yes
export ac_cv_func_shm_open=no 
export ac_cv_lib_rt_shm_open=no

export CROSS_COMPILE=arm-none-linux-gnueabi-
export CC=${CROSS_COMPILE}"gcc"
export CXX=${CROSS_COMPILE}"g++" 
export AR=${CROSS_COMPILE}"ar" 
export AS=${CROSS_COMPILE}"as" 
export RANLIB=${CROSS_COMPILE}"ranlib" 
export LD=${CROSS_COMPILE}"ld"
export STRIP=${CROSS_COMPILE}"strip"
export PATH=$PATH:/usr/local/arm/4.3.2/bin    #this is the route of mi path
NMAKE=4                                   #compiler i see it in bash.bashrc
pushd .

cd ${DEST}/cherokee-0.99.44/

echo " ****************** Configuring Cherokee  ********************* "
make distclean
./configure --localstatedir=/var \
            --exec-prefix=${DEST}/output/cherokee \
            --prefix=/home/cherokee \
            --with-wwwroot=/www \
            --enable-static-module=all \
            --enable-shared=no \
            --enable-static \
            --disable-pam \
            --disable-ipv6 \
            --disable-tls \
            --disable-largefile \
            --host=arm-linux \
            --target=arm-linux \
            LDFLAGS="-s -lcrypt -lpthread -ldl \
                     -L/usr/local/arm/4.3.2/bin \   #i change it, is it ok 
                      arm-none-linux-gnueabi/libc/lib" \ #or should i only
            CFLAGS="-march=armv4t -mtune=arm920t -Os" 

#change davef for felipe

make -j4 LDFLAGS="-all-static" 
make install
popd

******

friend thanks a lot

davef
It was a long evening.  My friend sent me his cherokee files and I got the
same error as with my files.

Your script looks correct to me.

I expect that when you do:

readelf -a cherokee

you will see at the bottom of the terminal output:

File attributes:
Tag_CPU_name: "4T"
Tag_CPU_arch: v4T

This is a good sign.

However, I also expect that when you try to run it you will get:

<corrupted double-linked list> 

We could NOT find a solution for this.

When my friend tries to run cherokee on his mini2440 dev board maybe we
will make more progress!

andres
hi
isnt it have another way to install programs in the mini2440? 

friend thanks for all your help

andres
in another topic they say its posible to install debin in it, but has it
graphical environment, may be it could be the solution, and with the
apt-get make a good and easy solution.

what do you know about that?

andres
hi

why dont you ask to your friend to send you his compiles folders (its not
script) and try to install it?

davef
My friend is coming around tomorrow night and we are going to try to sort
this out on one Linux box/mini2440 dev board combination.

Ask again in a few days if you don't heard back from me.

andres
hi friend, i wanted to start again, and when i install the compiller i
realize of this:


felipe@felipe-desktop:/opt/FriendlyARM/mini2440/examples/comtest$
arm-linux-gcc -v
Using built-in specs.
Target: arm-none-linux-gnueabi
Configured with: /scratch/julian/lite-respin/linux/src/gcc-4.3/configure
--build=i686-pc-linux-gnu --host=i686-pc-linux-gnu
--target=arm-none-linux-gnueabi --enable-threads --disable-libmudflap
--disable-libssp --disable-libstdcxx-pch --with-gnu-as --with-gnu-ld
--enable-languages=c,c++ --enable-shared --enable-symvers=gnu
--enable-__cxa_atexit --with-pkgversion='Sourcery G++ Lite 2008q3-72'
--with-bugurl=https://support.codesourcery.com/GNUToolchain/ --disable-nls
--prefix=/opt/codesourcery
--with-sysroot=/opt/codesourcery/arm-none-linux-gnueabi/libc
--with-build-sysroot=/scratch/julian/lite-respin/linux/install/arm-none-linux-gn
ueabi/libc
--with-gmp=/scratch/julian/lite-respin/linux/obj/host-libs-2008q3-72-arm-none-li
nux-gnueabi-i686-pc-linux-gnu/usr
--with-mpfr=/scratch/julian/lite-respin/linux/obj/host-libs-2008q3-72-arm-none-l
inux-gnueabi-i686-pc-linux-gnu/usr
--disable-libgomp --enable-poison-system-directories
--with-build-time-tools=/scratch/julian/lite-respin/linux/install/arm-none-linux
-gnueabi/bin
--with-build-time-tools=/scratch/julian/lite-respin/linux/install/arm-none-linux
-gnueabi/bin
Thread model: posix
gcc version 4.3.2 (Sourcery G++ Lite 2008q3-72) 

this is how its configure, i think it most be important to see, some
mistake in our script, i hope this could help us!!


bye