Hello everyone,
First thank for your firmware kong and thank to o.Charuel for this tutorial.
compil env :
* Debian 8.2
* packets : gcc g++ binutils patch bzip2 flex bison make gettext unzip zlib1g-dev libc6 subversion
* Have a standard user sudoer
Login with standard user (NOT ROOT)
# Go in home directory
cd
# create a directory for the toolchain
mkdir toolchains && cd toolchains
# Download the toolchains (with ftp of dd-wrt, 1.8 Go)
# Export the toolchains on your PATH (you have to make it every time you close your terminal)
export GCCMIPS=~/toolchains/toolchain-mipsel_74kc+dsp2_gcc-5.1.0_musl-1.1.9/bin
export PATH=$GCCMIPS:$PATH
# test :
mipsel-linux-uclibc-gcc --version
# must return : `mipsel-linux-uclibc-gcc (OpenWrt GCC 5.1.0 r45933) 5.1.0 ....`
It's OK !
cross compile mini_httpd.
# Go in home directory
cd
# Download code source of mini_httpd.
# Remove the 359 line of the Makefile
cd mini_httpd-1.21 && sudo sed -i '359d' mini_httpd.c
# Add the compiler in the Makefile
sed -i 's/CC =.*/CC = mipsel-linux-uclibc-gcc/' Makefile
# Compil
make mini_httpd
# After some seconds, you have a binary OK
file mini_httpd
# must return : `mini_httpd: ELF 32-bit LSB executable, MIPS, MIPS32 rel2 version 1, dynamically linked, interpreter /lib/ld-musl-mipsel-sf.so.1, stripped`
Recent comments