embedded linux - When we build a kernel and busy box, we need toolchain only for busybox not for kernel? -


am correct while making small linux system embedded device, need kernel build based on configuration set default toolchain. whereas rootfs requires toolchain ? since architecture set in kernel there no need of toolchains. whereas busy box makes binary. thus, needs toolchain. please correct me have doubt here.

toolchain plays important role in embedded system development. in compiling , building required cross tool chain specific architecture.tools chain not default.you have set during configuration or while passing make command have specify tool chain prefix.

make cross_compile=arm-none-linux-gnueabi-

the same tool chain should used in compiling , building busybox. if compile busybox statically.then no need worry shared library. if compiled busy box dynamically toolchain plays important role in rootfs. here need copy libraries of toolchain rootfs /lib folder .

what library need copied can known type following command.

strings _install/bin/busybox | grep ^lib shows list library should kept in /lib of rootfs.

this command says, “get strings file, , show lines begin lib.” program ldd can’t used, because program has been cross-compiled , won’t run on development host. these files should fetched sysroot directory of toolchain. modern toolchains have been configured sysroot, directory contains files toolchain appear on root file system of system targeted toolchain. check if toolchain has sysroot support, try following:

$ arm-linux-gcc -print-sysroot

/arm-unknown-linux-gnueabi/bin/arm-linux-gcc if valid path, files should copied from. if no path displayed, use find locate sysroot directory in , or use find libc.so:

$ find . -name libc.so after you’ve located libc , libm, create (your rootfs)/lib directory , copy them there. files symlinks other files, sure gather them all. next file dynamic loader, called ld-linux-, resides in lib directory along libc.so.*. copy /lib directory. system has shared libraries , loader, busybox can run.

so if want compile apps or program should have compile tool chain compiled busybox.


Comments

Popular posts from this blog

html5 - What is breaking my page when printing? -

c# - must be a non-abstract type with a public parameterless constructor in redis -

ajax - PHP/JSON Login script (Twitter style) not setting sessions -