This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

mtd utilities cross compilation issue (beagbleboneblack which is running on android)

Hi experts,

I followed the instruction available at http://processors.wiki.ti.com/index.php/MTD_Utilities#MTD-Utils_Compilation to have it for Android rootfs.

I am working on am335x custom board, android J.B 4.2(kernel version 3.2).

The zlib binaries are not able to build. 

Here is the make output.

#:~/mtd_utilites/zlib/zlib_android/zlib-1.2.8$ make
arm-eabi-gcc -O3 -D_LARGEFILE64_SOURCE=1 -DHAVE_HIDDEN -I. -c -o example.o test/example.c
In file included from ./zlib.h:34:0,
from test/example.c:8:
./zconf.h:395:22: fatal error: limits.h: No such file or directory
compilation terminated.
make: *** [example.o] Error 1
user@user-HP-ProBook-4420s:~/mtd_utilites/zlib/zlib_android/zlib-1.2.8$ pwd
/home/user/mtd_utilites/zlib/zlib_android/zlib-1.2.8
user@user-HP-ProBook-4420s:~/mtd_utilites/zlib/zlib_android/zlib-1.2.8$ echo $PATH
/home/user/TI_Android_JB_4.2.2_DevKit_4.1.1/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/bin:/home/user/adt-bundle-linux-x86_64-20131030/sdk/platform-tools:/home/user/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games

#~/TI_Android_JB_4.2.2_DevKit_4.1.1/prebuilts/gcc$ find . -name limits.h
./linux-x86/host/x86_64-linux-glibc2.7-4.6/x86_64-linux/include/c++/4.6.x-google/tr1/limits.h
./linux-x86/host/x86_64-linux-glibc2.7-4.6/lib/gcc/x86_64-linux/4.6.x-google/install-tools/include/limits.h
./linux-x86/host/x86_64-linux-glibc2.7-4.6/lib/gcc/x86_64-linux/4.6.x-google/include-fixed/limits.h
./linux-x86/host/x86_64-linux-glibc2.7-4.6/sysroot/usr/include/limits.h
./linux-x86/host/x86_64-linux-glibc2.7-4.6/sysroot/usr/include/linux/limits.h
./linux-x86/host/i686-linux-glibc2.7-4.6/lib/gcc/i686-linux/4.6.x-google/install-tools/include/limits.h
./linux-x86/host/i686-linux-glibc2.7-4.6/lib/gcc/i686-linux/4.6.x-google/include-fixed/limits.h
./linux-x86/host/i686-linux-glibc2.7-4.6/i686-linux/include/c++/4.6.x-google/tr1/limits.h
./linux-x86/host/i686-linux-glibc2.7-4.6/sysroot/usr/include/limits.h
./linux-x86/host/i686-linux-glibc2.7-4.6/sysroot/usr/include/linux/limits.h
./linux-x86/arm/arm-eabi-4.6/lib/gcc/arm-eabi/4.6.x-google/install-tools/include/limits.h
./linux-x86/arm/arm-linux-androideabi-4.6/lib/gcc/arm-linux-androideabi/4.6.x-google/install-tools/include/limits.h

How to add the limits.h path to build the utilities?
What about other header files like sys/types.h, unitstd.h etc?

NOTE: I could able to see the types.h file in the host header folders not in the target(arm) related  folders.

#~/TI_Android_JB_4.2.2_DevKit_4.1.1/prebuilts/gcc$ find . -name types.h
./linux-x86/host/x86_64-linux-glibc2.7-4.6/sysroot/usr/include/sys/types.h
./linux-x86/host/x86_64-linux-glibc2.7-4.6/sysroot/usr/include/rpc/types.h
./linux-x86/host/x86_64-linux-glibc2.7-4.6/sysroot/usr/include/bits/types.h
./linux-x86/host/x86_64-linux-glibc2.7-4.6/sysroot/usr/include/linux/types.E:h
./linux-x86/host/x86_64-linux-glibc2.7-4.6/sysroot/usr/include/asm/types.h
./linux-x86/host/i686-linux-glibc2.7-4.6/sysroot/usr/include/sys/types.h
./linux-x86/host/i686-linux-glibc2.7-4.6/sysroot/usr/include/rpc/types.h
./linux-x86/host/i686-linux-glibc2.7-4.6/sysroot/usr/include/bits/types.h
./linux-x86/host/i686-linux-glibc2.7-4.6/sysroot/usr/include/linux/types.h
./linux-x86/host/i686-linux-glibc2.7-4.6/sysroot/usr/include/asm/types.h

Please can any one help me out. 

Thanks in advance.