cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
5,225 Views
Registered: ‎11-02-2016

How can I modify kernel source code in meta-xilinx kernel?

Jump to solution

Other kernel recipes in the Yocto Project store the sources in a folder according to tmp/work/<ARCH>/linux/<version>/git/.

 

With a kernel.bbappend file I could add new files to the source code, e.g. a custom device tree source file:

 

SRC_URI += "file://git/arch/arm64/boot/dts/custom_device_tree.dts"

 

In the Xilinx Layer the kernel sources seem to be stored in the tmp/work-shared directory. I found a symlink to this directory in tmp/work:

tmp/work/<ARCH>/linux-xlnx/<version>/linux-<MACHINE>-standard-build/source

 

However, adding files to this path via SRC_URI seems to have no effect (no device tree source files in the resulting tmp/work-shared directory for the kernel source):

 

SRC_URI += "file://linux-<MACHINE>-standard-build/source/arch/arm64/boot/dts/custom_device_tree.dts"

 

So I wonder what the common way is to add/modify sources to the linux-xlnx kernel via Yocto.

Any hints are highly appreciated.

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Visitor
Visitor
9,041 Views
Registered: ‎11-02-2016

I found a solution now by modifying the S variable:

 

I took linux-qoriq_4.1.bb from the freescale layer as base and copied following lines into a *.bbappend for linux-xlnx:

 

KSRC ?= ""
S = '${@base_conditional("KSRC", "", "${WORKDIR}/git", "${KSRC}", d)}'

 

The resulting kernel source is then placed like I have posted in my head post and thus can be modfied via SRC_URI easiliy.

View solution in original post

0 Kudos
1 Reply
Highlighted
Visitor
Visitor
9,042 Views
Registered: ‎11-02-2016

I found a solution now by modifying the S variable:

 

I took linux-qoriq_4.1.bb from the freescale layer as base and copied following lines into a *.bbappend for linux-xlnx:

 

KSRC ?= ""
S = '${@base_conditional("KSRC", "", "${WORKDIR}/git", "${KSRC}", d)}'

 

The resulting kernel source is then placed like I have posted in my head post and thus can be modfied via SRC_URI easiliy.

View solution in original post

0 Kudos