LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Cross-compile cherokee for ARM (https://www.linuxquestions.org/questions/linux-software-2/cross-compile-cherokee-for-arm-938284/)

xbyte1024 04-05-2012 08:43 AM

Cross-compile cherokee for ARM
 
Hi all.
I have to install cherokee on an ARM machine (mini2440) but the repository for openembedded is very old and I have some problems.
So I want to cross-compile cherokee in my machine.
On cherokee-project site there are instructions how to cross compile for windows.
Based on friendlyARM forum i found and adapted this script:
Code:

#!/bin/bash
# Copyright (c) 2009 Harald Klein <hari@vt100.at>
# Licensed under the terms of the GNU Public license version 3 (see www.fsf.org for details)

# settings
# set -x
DEST=/home/byte/friendly/cherokee

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/byte/friendly/arm-2008q3/bin/
NMAKE=4
pushd .

cd ${DEST}/cherokee-1.2.99b/

echo " ****************** Configuring Cherokee  ********************* "
make distclean
./configure --localstatedir=/var \
            --exec-prefix=${DEST}/output/cherokee \
            --prefix=/home/byte/friendly/cherokee/bui \
            --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/byte/friendly/arm-2008q3/arm-none-linux-gnueabi/libc/armv4t/lib"
            CFLAGS="-march=armv4t -mtune=arm920t -Os"

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

But it tries to create /home/cherokee
Why?
To be honest I haven't understood what all paths do.
Anyone can understand what should change to successfully cross-compile the script?


All times are GMT -5. The time now is 02:48 PM.