[yocto] Building kernel with non standard source structure

Khem Raj raj.khem at gmail.com
Tue Sep 6 10:12:20 PDT 2016


> On Aug 29, 2016, at 11:41 PM, Ottavio Campana <o.campana at videotec.com> wrote:
> 
> Hello,
> 
> I'm trying to port the kernel compilation of a bsp to yocto. My problem is that this kernel has a bunch of drivers that are out of the kernel sources tree and all the includes are hard coded with an uncommon structure.
> 
> To give you the idea, the source is organized in this way
> 
> kernel/linux/ # Where the kernel sources are (there are pointers to the other directories)
> gpldrivers/ # Some drievrs with GPL license (there are pointers to the other directories)proprietarydrivers/ # Some drivers wit non free license (there are pointers to the other directories)
> 
> Kernel and drivers are in git repository.
> 
> I started to develop a recipe inhering from kernel, I am having doubts about setting the S and B variables
> 
> S = "${WORKDIR}/git"
> B = "${WORKDIR}/git/kernel/linux"
> 
> By using this settings, if I run bitbake -c devshell I enter into a kernel-source directory that has the directories kernel, gpldrivers and proprietarydrivers correctly copied.
> 
> My problem is that at this point if I try to compile the kernel I get the error that in kernel-source there is no way to a make oldconfig.
> 
> How can I have the recipe entering into kernel/linux before copying defconfig and starting compilation?


One option perhaps is that you write a recipe for your kernel proper and then write several recipes for your external modules.
this is a well known model in yocto world, you might even find examples in metadata on external kernel module recipes. This however would mean that you will have to do some cleanups in your kernel source organization which seems quite monolithic and entangled
as you describe it.

Other option would be to write your own do_compile and do_install steps and make the assumptions of source code locations
w.r.t. ${S}


> 
> Thank you
> 
> Ottavio
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20160906/7bfff6c8/attachment.pgp>


More information about the yocto mailing list