[LEDE-DEV] Supporting RT linux

Philip Prindeville philipp_subx at redfish-solutions.com
Tue May 16 17:14:07 PDT 2017


I was trying to apply the linux 4.9.20-rt16 patchset…  This is as far as I got.  I applied it as 000-…


Applying /home/philipp/bertram/lede/target/linux/generic/patches-4.9/721-phy_packets.patch using plaintext: 
patching file include/linux/netdevice.h
Hunk #1 succeeded at 1409 (offset 12 lines).
Hunk #2 succeeded at 1439 (offset 12 lines).
Hunk #3 succeeded at 1726 (offset 12 lines).
Hunk #4 succeeded at 1798 (offset 12 lines).
patching file include/linux/skbuff.h
Hunk #1 succeeded at 2341 (offset 7 lines).
Hunk #2 succeeded at 2465 (offset 7 lines).
patching file net/Kconfig
patching file net/core/dev.c
Hunk #1 succeeded at 2939 (offset 8 lines).
patching file net/core/skbuff.c
Hunk #1 FAILED at 64.
Hunk #2 succeeded at 540 (offset 11 lines).
1 out of 2 hunks FAILED -- saving rejects to file net/core/skbuff.c.rej
patching file net/ethernet/eth.c
Patch failed!  Please fix /home/philipp/bertram/lede/target/linux/generic/patches-4.9/721-phy_packets.patch!
Makefile:24: recipe for target '/home/philipp/bertram/lede/build_dir/target-x86_64_musl_powercode-bmu/linux-x86_64/linux-4.9.20/.prepared_7c7bcc1dee2fd1eac744dc0a5c09bca2' failed
make[3]: *** [/home/philipp/bertram/lede/build_dir/target-x86_64_musl_powercode-bmu/linux-x86_64/linux-4.9.20/.prepared_7c7bcc1dee2fd1eac744dc0a5c09bca2] Error 1
make[3]: Leaving directory '/home/philipp/bertram/lede/target/linux/x86'
Makefile:13: recipe for target 'prepare' failed
make[2]: *** [prepare] Error 2
make[2]: Leaving directory '/home/philipp/bertram/lede/target/linux'
target/Makefile:23: recipe for target 'target/linux/prepare' failed
make[1]: *** [target/linux/prepare] Error 2
make[1]: Leaving directory '/home/philipp/bertram/lede'
/home/philipp/bertram/lede/include/toplevel.mk:206: recipe for target 'target/linux/prepare' failed
make: *** [target/linux/prepare] Error 2


Here’s what it takes to make the existing patches apply on top of it (I named the patchset as 000-linux-rt-4.9.20-rt16.patch):

diff --git a/target/linux/generic/patches-4.9/721-phy_packets.patch b/target/linux/generic/patches-4.9/721-phy_packets.patch
index 5b4ff07..5acf1d2 100644
--- a/target/linux/generic/patches-4.9/721-phy_packets.patch
+++ b/target/linux/generic/patches-4.9/721-phy_packets.patch
@@ -114,9 +114,9 @@
 --- a/net/core/skbuff.c
 +++ b/net/core/skbuff.c
 @@ -64,6 +64,7 @@
- #include <linux/errqueue.h>
  #include <linux/prefetch.h>
  #include <linux/if_vlan.h>
+ #include <linux/locallock.h>
 +#include <linux/if.h>
  
  #include <net/protocol.h>


and that’s it… well, that and some quilt refreshes to update the line numbers, of course…

I also needed to set CONFIG_PREEMPT_RTB=y and CONFIG_RCU_BOOST=n as this was additional config state that gets injected by the patchset.

I booted the kernel but it panicked about 20 seconds in.  It might be something trivial.  I’ll follow up with more info as soon as I finish digging...

Thanks,

-Philip





More information about the Lede-dev mailing list