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
Observer dnovick
Observer
5,017 Views
Registered: ‎06-16-2016

Petalinux: building with kernel patch fails

Jump to solution

I am working a project where I'll be booting Linux as a secondary OS (after a TZ OS boots primary). This requires that I change some code in platsmp.c...which I did. I then proceeded to create a patch as instructed in another post that had a similar issue. This worked fine.

 

From there, I tried to follow the instructions on how to get this patch integrated into the petalinux build. These were taken from the petalinux documentation. Here's what I did:

 

- I was told to copy my patch to project-spec/meta-user/recipes-kernel/linux. I didn't have such a directory, so I created it and copied the patch.

- I then created the .bbappend file as instructed. I have attached it for reference. Basically, it just points to the file, and adds the path.

 

Unfortunately, when I go ahead and try to build, I get an error and the build fails. The error starts with:

"ERROR: ExpansionError during parsing /bunch-o-paths/linux-xlnx_4.6.bb: Failure expanding variable PKG_kernel-base"

 

and ends with "invalid syntax (PKG_kernel-base, line 1). It appears that this is during the dependency build step.

 

I would like to suspect that something I did is wrong, but I've checked my work, and it matches the instructions.

 

I'm getting excitedly close to getting this project working...something I've been at for quite some time....so any help on this issue would be greatly appreciated.

 

Thanks,

Dave

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
9,338 Views
Registered: ‎04-17-2011

Re: Petalinux: building with kernel patch fails

Jump to solution
Refer Chapter - 2 page - 80 of the document https://www.xilinx.com/support/documentation/sw_manuals/xilinx2016_4/ug1144-petalinux-tools-reference-guide.pdf
Regards,
Debraj
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
3 Replies
Moderator
Moderator
9,339 Views
Registered: ‎04-17-2011

Re: Petalinux: building with kernel patch fails

Jump to solution
Refer Chapter - 2 page - 80 of the document https://www.xilinx.com/support/documentation/sw_manuals/xilinx2016_4/ug1144-petalinux-tools-reference-guide.pdf
Regards,
Debraj
----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.

Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------
0 Kudos
Observer dnovick
Observer
4,970 Views
Registered: ‎06-16-2016

Re: Petalinux: building with kernel patch fails

Jump to solution

So, yes, these are the instructions I tried to follow. Of course, the examples given are for a u-boot and utility patch. Because I need to patch the Linux kernel, I had to extrapolate a bit.

 

For example, I had no folder for kernel recipes....so created one called recipes-kernel. From an example I saw on the forum, I also created a linux directory under that. I also didn't know exactly what my bbappend file and patch should be called, so I called the bbappend linux-xlnx_%.bbappend and left my patch the same name as it was created with by git.

 

The only thing that was different the first time around was that I didn't have a dedicated files directory, and my FILESEXTRAPATHS param didn't point at it.

 

So, I tried again with these small changes....and I still get the same error. Are there some naming conventions I must follow for this to work for Linux kernel patches?

 

Dave

0 Kudos
Observer dnovick
Observer
4,969 Views
Registered: ‎06-16-2016

Re: Petalinux: building with kernel patch fails

Jump to solution

Ah....Wait! I just figured out the problem. My bbappend had an error. I had SRC_URI not SRC_URI_append for the path to the patch.

 

All is well now. I'll mark the response as OK.

 

Dave

0 Kudos