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: 
Adventurer
Adventurer
809 Views
Registered: ‎09-19-2017

2017.4 broken when patching kernel

My project-spec/meta-user/recipes-kernel/linux/linux-xlnx_%.bbappend file:

SRC_URI_append = " file://0001-spi-timeout.patch"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

 

my 0001-spi-timeout.patch:

From 9b23f8cff1895c6a86ad5c14f9657d1b5964f432 Mon Sep 17 00:00:00 2001
From: Mark Bishop <XXXXXX@XXXXXXXXX>
Date: Tue, 3 Apr 2018 14:22:18 -0400
Subject: [PATCH] spi timeout

Signed-off-by: Mark Bishop <XXXX@XXXXXXXX>
---
drivers/spi/spi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index 89f9c7af93ac..579769d7e52c 100644
--- a/drivers/spi/spi.c
+++ b/drivers/spi/spi.c
@@ -1004,7 +1004,7 @@ static int spi_transfer_one_message(struct spi_master *master,
ret = 0;
ms = 8LL * 1000LL * xfer->len;
do_div(ms, xfer->speed_hz);
- ms += ms + 100; /* some tolerance */
+ ms += ms + 200; /* some tolerance */

if (ms > UINT_MAX)
ms = UINT_MAX;
-- 
2.11.0

The compiled kernel is 1 megabyte smaller and doesn't boot.  I comment out the "SRC_URI_append" line and the kernel is the correct size and it boots.  Any idea?  How about some Xilinux support on this one?

 

 

0 Kudos
5 Replies
Adventurer
Adventurer
807 Views
Registered: ‎09-19-2017

Re: 2017.4 broken when patching kernel

I am using the stock 2017.4 kernel from git with my one patch:

 

$ git log
commit ee837dcdf2964ff5ab493f0cdc820fcaeebea91e
Author: Mark Bishop <XXXXXXXXX>
Date:   Tue Apr 3 14:22:18 2018 -0400

    spi timeout
    
    Signed-off-by: Mark Bishop <XXXXXXXXXXX>

commit b450e900fdb473a53613ad014f31eedbc80b1c90
Author: Sakari Ailus <sakari.ailus@linux.intel.com>
Date:   Wed Nov 1 20:22:30 2017 -0700

    imx274: Fix error handling
    
    Fix error handling in driver probe and unregister the correct control handler
    in driver remove.
    
    Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: Christian Kohn <christian.kohn@xilinx.com>
    Reviewed-by: Vishal Sagar <vishal.sagar@xilinx.com>
    Signed-off-by: Michal Simek <michal.simek@xilinx.com>

commit bd8f87ca6a415c7d90615ddaa683bdbf781114bc
Author: Vishal Sagar <vishal.sagar@xilinx.com>
Date:   Tue Nov 7 16:52:45 2017 +0530
.........
0 Kudos
Moderator
Moderator
787 Views
Registered: ‎09-12-2007

Re: 2017.4 broken when patching kernel

Can you check the log file for the kernel
Complication to see if this tells us anything.
0 Kudos
Adventurer
Adventurer
754 Views
Registered: ‎09-19-2017

Re: 2017.4 broken when patching kernel

I am working on getting some logs, but this guy is having the same problems:

 

This guy.

0 Kudos
Explorer
Explorer
751 Views
Registered: ‎03-22-2016

Re: 2017.4 broken when patching kernel

As an alternative, you can try cloning the linux-xlnx repo, checking out at the v2017.4 tag. Set that to be the kernel external source in petalinux and build it (no changes). That should give you identical results to the stock (unpatched) petalinux kernel.

 

Once that is working, patch the kernel, build, install.

 

That process worked well for me when i was cherry-picking changes to backport.

0 Kudos
Adventurer
Adventurer
748 Views
Registered: ‎09-19-2017

Re: 2017.4 broken when patching kernel

@stephenm Logs are attached.

 

What's interesting is in the comparison of log.do_patch

 

Capture.jpg

 

And if you look into the GIT code it just dies after it prints the message:

Capture.jpg

 

 

0 Kudos