Jump to content

How to get rt-patched kernel?


Recommended Posts

I want to build kernel applied with rt-patch. Latest rt-patch version is for 4.9.13. So, How can I get the result? I think I should edit configuration.sh and then, put the patch file to userpatches/kernel directory? I need a kernel for nanopi-neo.

 

Link to comment
Share on other sites

You don't need to edit anything. Just put the patch into:

userpatches/kernel/sun8i-dev

and (try to) recompile kernel.

 

But we are using developing branch version 4.10.1 ... there is not much support in mainline www.kernel.org ATM.

Link to comment
Share on other sites

Thank you, Igor. I got the clean previous script. and newly git clone the package (armbian lib) 

 

Like you said, put the rt-patch in userpatches/kernel/sun8i-dev

 

and #./compile.sh

Compiling kernel...                                                    │  
  │────────────────────────────────────────────────────────────────────────│  
  │                ^                                                       │  
  │ ./include/linux/compiler.h:168:42: note: in definition of macro ‘unl   │  
  │  # define unlikely(x) __builtin_expect(!!(x), 0)                       │  
  │                                           ^                            │  
  │ ./include/linux/mutex.h:223:35: warning: comparison between pointer an │  
  │   if (unlikely(__mutex_owner(lock) == current))                        │  
  │                                    ^                                   │  
  │ ./include/linux/compiler.h:168:42: note: in definition of macro ‘unl   │  
  │  # define unlikely(x) __builtin_expect(!!(x), 0)                       │  
  │                                           ^                            │  
  │ In file included from ./include/linux/cgroup-defs.h:17:0,              │  
  │                  from ./include/linux/sched.h:62,                      │  
  │                  from arch/arm/kernel/asm-offsets.c:13:                │  
  │ ./include/linux/percpu-rwsem.h: In function ‘percpu_rwsem_release’     │  
  │ ./include/linux/percpu-rwsem.h:119:14: error: ‘struct rw_semaphore     │  
  │    sem->rw_sem.owner = NULL;                                           │  
  │               ^                                                        │  
  │ In file included from ./include/linux/sched.h:62:0,                    │  
  │                  from arch/arm/kernel/asm-offsets.c:13:                │  
  │ ./include/linux/cgroup-defs.h: At top level:                           │  
  │ ./include/linux/cgroup-defs.h:141:21: error: field ‘destroy_swork’     │  
  │   struct swork_event destroy_swork;                                    │  
  │                      ^~~~~~~~~~~~~                                     │  
  │ In file included from arch/arm/kernel/asm-offsets.c:13:0:              │  
  │ ./include/linux/sched.h: In function ‘mmdrop_delayed’:                 │  
  │ ./include/linux/sched.h:2998:15: error: ‘struct mm_struct’ has no      │  
  │    call_rcu(&mm->delayed_drop, __mmdrop_delayed);                      │  
  │                ^~                                                      │  
  │   HOSTCC  scripts/selinux/mdp/mdp                                      │  
  │   HOSTCC  scripts/extract-cert                                         │  
  │ In file included from ./include/linux/fs.h:14:0,                       │  
  │                  from ./include/linux/seq_file.h:10,                   │  
  │                  from ./include/linux/pinctrl/consumer.h:17,           │  
  │                  from ./include/linux/pinctrl/devinfo.h:21,            │  
  │                  from ./include/linux/device.h:24,                     │  
  │                  from ./include/linux/dma-mapping.h:6,                 │  
  │                  from arch/arm/kernel/asm-offsets.c:15:                │  
  │ ./include/linux/radix-tree.h: At top level:                            │  
  │ ./include/linux/radix-tree.h:347:20: error: static declaration of ‘r   │  
  │  static inline void radix_tree_preload_end(void)                       │  
  │                     ^~~~~~~~~~~~~~~~~~~~~~                             │  
  │ ./include/linux/radix-tree.h:326:6: note: previous declaration of ‘r   │  
  │  void radix_tree_preload_end(void);                                    │  
  │       ^~~~~~~~~~~~~~~~~~~~~~                                           │  
  │ cc1: some warnings being treated as errors                             │  
  │ make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1                   │  
  │ make: *** [prepare0] Error 2                                           │  
  │ make: *** Waiting for unfinished jobs....                              │  
  │   HOSTCC  scripts/asn1_compiler                                        │  
  └────────────────────────────────────────────────────────────────────────┘  
    


[ error ] ERROR in function compile_kernel [ common.sh:249 ]
[ error ] Kernel was not built [ @host ]
[ o.k. ] Process terminated

 

Link to comment
Share on other sites

Well, this means patch does not fit the source and you need to adjust it. It might take few minutes or a day.

 

This will tell you which files have troubles, next you have to manually fix the patch.

cat output/debug/patching.log

 

Link to comment
Share on other sites

If you want to compile a generic kernel this would be a proper way, but not here since:

 

- decent H3 support exists only in this branch

and

- our patches are aligned only for this branch

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines