Cherokee

From ElphelWiki

Jump to: navigation, search

With the right toolchain everything gets more easy this is how you get cherokee on your cam:

export CC=crisv32-axis-linux-uclibc-gcc
export LD=crisv32-axis-linux-uclibc-ld
export AR=crisv32-axis-linux-uclibc-ar
ac_cv_func_malloc_0_nonnull=yes \
ac_cv_func_realloc_0_nonnull=yes \
./autogen.sh \
--host=crisv32-axis-linux-uclibc \
--prefix=/mnt/flask/root/cherokee \
--enable-static \
--enable-shared=no \
--enable-static-module=all \
--disable-tls \
--enable-beta \
--enable-trace \
CC=crisv32-axis-linux-uclibc-gcc
make -j2

Since we want it to make real static.

cd cherokee
crisv32-axis-linux-uclibc-gcc -g -O2 -o cherokee main.o -static
crisv32-axis-linux-uclibc-gcc -g -O2 -o cherokee-worker main_worker.o -D_XOPEN_SOURCE=500  ./.libs/libcherokee-base.a ./.libs/libcherokee-server.a -lcrypt /mnt/dv/elphel/cherokee/cherokee/.libs/libcherokee-client.a /mnt/dv/elphel/cherokee/cherokee/.libs/libcherokee-base.a -lpthread -ldl -static
cd ..


Now install it

make install


You could remove useless stuff now, such as documentation, includes. After this, copy it to your device.

scp -r /mnt/flash/root/cherokee root@192.168.0.9:/mnt/flash/root/.


As you can see from the above everything is still compiled with debugging on, and even -O2. You could shrink it more if you specify:

CFLAGS=-Os


And strip the binaries afterward.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox