linux kernel - How can I extract the environment variables used when building a recipe in Yocto? -
linux kernel - How can I extract the environment variables used when building a recipe in Yocto? -
i working on kernel module project using yocto linux (version 1.3). want utilize kernel headers , compiler , libraries yocto project, develop kernel module without needing run bitbake every time. initial solution execute devshell task , extract environment variables using this:
bitbake mykernel -c devshell then in new xterm window bitbake opened me:
env | sed 's/\=\(.*\)/\="\1"/' > buildenv #put quotes around r-values in env listing ^d #(i leave devshell) then re-create development directory , source before running create of options
kernel_path=/mypathto/build/tmp/sysroots/socfpga_cyclone5/usr/src/kernel source ./buildenv && create -c $kernel_path v=1 m=`pwd` \ arch=arm cross-compile=arm-linux-gnueabihf- \ kernel_version=3.13.0-00298-g3c7cbb9 \ cc="arm-linux-gnueabihf-gcc -mno-thumb-interwork -marm" \ ld=arm-linux-gnueabihf-ld ar=arm-linux-gnueabihf-ar now questions:
am going wrong? recommended way cross-develop kernel modules? doing way because don't want open bitbake devshell , code development in there every time.
this sort of works (i can compile working modules) create script gives me error message saying kernel configuration invalid. have tried kernel_path set the kernel bundle git directory (build/tmp/work///git (which contains appears valid .config file) , similar error.
how can extract env without needing open devshell? write script extracts coworkers don't have manually. devshell command opens separate xterm window, rather dampens scriptability...
the sdk installer looking for:
bitbake your-image -c populate_sdk then, build directory go tmp/deploy/sdk
and execute generated shell script.
this script allow generate , install sdk.
not sdk allow (cross) compile kernel providing needed environment variables , tools, provide sysroot + standalone toolchain help (and mean easily) crosscompile applications autotools (as long provide makefile.am , configure.ac)
just source environment-setup-* file, got kernel directory , compile. or, application developpment based on autotools, go folder containing project (sources + makefile.am , configure.ac)
and do:
libtoolize --automake aclocal autoconf automake -a now project ready compilation:
./configure $configure_flags create make install destdir=path/to/destination/dir linux-kernel kernel-module bitbake yocto
Comments
Post a Comment