UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor koju155
Visitor
4,881 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
Visitor koju155
Visitor
8,697 Views
Registered: ‎11-02-2016

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

Jump to solution

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
Visitor koju155
Visitor
8,698 Views
Registered: ‎11-02-2016

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

Jump to solution

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