1

I would like to activate the PREEMPTion features of my Linux Kernel. To do that I should download the right patch matching the version of the kernel I am using and that I compiled (as explained here). The version of the kernel I have is the Linux version 4.9.0 (obtained just typing uname -a from the command line and double checked in /proc/version.

In the linux kernel page (where is possible to download the patch for this purpose) I cannot find the exact matching version that I am using. Which one should I use?

Also, if you have some suggestion on how to do it properly it will be appreciated!

The other question I have is: can I continue to use the same application I have developed observing, when possible, the improvement or degradation of performance? And what about the driver I was developing? or third parts device-driver?

UPDATE:

  • I am using a Xilinx Zynq Ultrascale+ equipped with a quad core ARM 53. The board used is the zcu102 by Xilinx.

  • The source files of the kernel come from here and the file system is Linaro

Leos313
  • 5,152
  • 6
  • 40
  • 69

2 Answers2

1
  1. You can check folder "older" ( https://mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/4.9/older/ ) - there you can find files patch-4.9-rt1.patch.gz and patches-4.9-rt1.tar.gz
  2. Note, that current version in github.com/Xilinx/linux-xlnx is 4.14. Are you sure, that you have correct source code?
Roman Zaitsev
  • 1,328
  • 5
  • 20
  • 28
  • yes, I did it yesterday and it works (of course I am sure about the version).! Thank you Roman! – Leos313 Jun 06 '18 at 12:26
1

Here is the information about how to install PREEMPT_RT on ZCU102 using Petalinux 2019.1:

  1. Download and install Petalinux 2019.1 from the Xilinx website

  2. Download ZCU102 BSP 2019.1 from the Xilinx website

  3. Create a project: petalinux-create -t project -s xilinx-zcu102-v2019.1-final.bsp

  4. Unzip the PREEMPT_RT patch http://cdn.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patch-4.19-rt1.patch.gz onto the project-spec/meta-user/recipes-kernel/linux/linux-xlnx/ directory

  5. Edit the file project-spec/meta-user/recipes-kernel/linux/linux-xlnx_%.bbappend and append

    SRC_URI_append = " file://patch-4.19-rt1.patch"
    
  6. Make sure the priority for the meta-user layer is 7 in the project file project-spec/meta-user/conf/layer.conf

  7. Configure th project: petalinux-config

  8. Configure the kernel enabling full preemptive support: petalinux-config -c kernel

  9. Build: petalinux-build

  10. Generate the BOOT.BIN file: petalinux-package --boot --fsbl images/linux/zynq_fsbl.elf --u-boot images/linux/u-boot.elf

Claudio
  • 10,614
  • 4
  • 31
  • 71
  • +1 thank you! these are the right steps when using petalinux. However, I was compiling and executing all the steps manually when I first tried it (a couple of year ago I guess) – Leos313 Jul 08 '20 at 11:39