Edge-V:如何将内核打上实时补丁? How to add RT patches?

自动配置和推荐的内核分支是khadas-edge-4.4.y,其中Makefile显示版本是4.4.194,这个版本在https://wiki.linuxfoundation.org/realtime/start 是没有匹配的,也就是无法安装上实时补丁。

想请问有什么思路能让Edge-V打上实时补丁,或者直接更新实时内核?

The auto-configured and recommended kernel branch is khadas-edge-4.4.y, where the Makefile shows that the version is 4.4.194, this version does not match realtime:start [Wiki], that is, it cannot be installed real-time patching.

I would like to ask if there are any ideas to make Edge-V patched in real time, or update the real-time kernel directly?

@liuliyuan 实时补丁是啥意思?主线的补丁么?

如果你是指主线的内核,你可以编译一个主线固件,目前是5.16的内核

你好,frank,我在khadas官方git上没有找到相应的5.16内核版本(https://github.com/khadas/linux/branches/all),

Edge-V主芯片时RK3399的,我的目的是想在Edge-V的板子上使用可以安装实时补丁( PREEMPT_RT patches)的内核版本,但我看官方git上没有找到Edge可以安装实时补丁的内核版本。

@liuliyuan 主线的固件是另外一种编译方法。我们会直接拉取从linux主线拉取对应版本的源码。然后打上基础补丁,编译出固件。

这也意味着很多4.4版本上的功能可能在主线是没有的。

感谢回答,但是我如何能确定我在manline上选择的是哪一份内核版本,似乎从操作上并没有提示,或者可以指定对应版本?(第一次接触khadas的板子,疑问较多,请谅解)。

Choose Khadas board:

  1. Edge - Khadas Edge with Rockchip RK3399 SoC
  2. VIM1 - Khadas VIM1 with Amlogic S905X SoC
  3. VIM2 - Khadas VIM2 with Amlogic S912 SoC
  4. VIM3 - Khadas VIM3 with Amlogic A311D SoC
  5. VIM3L - Khadas VIM3L with Amlogic S905D3 SoC
  6. Generic - Generic image (VIM1 VIM2 VIM3 VIM3L Edge) EXPERIMENTAL

Which board would you like? [2] 1
=> Edge

Choose uboot version:

  1. uboot-2017.09 - U-boot 2017.09
  2. uboot-mainline - U-boot Mainline

Which uboot version would you like? [1] 2
=> mainline

Choose linux version:

  1. linux-mainline

only one choose => mainline

Choose distribution:

  1. Ubuntu - Ubuntu
  2. Debian - Debian

Which distribution would you like? [1] 1
=> Ubuntu

Choose Ubuntu release:

  1. bionic - Ubuntu 18.04
  2. focal - Ubuntu 20.04

Which Ubuntu release would you like? [2] 2
=> focal

Choose Ubuntu type:

  1. server - Headless Image With Essential Packages
  2. minimal - Minimal Image With Very Basic Packages
  3. xfce - Desktop Image With XFCE Desktop
  4. lxde - Desktop Image With LXDE Desktop
  5. gnome - Desktop Image With GNOME Desktop

Which Ubuntu type would you like? [1] 5
=> gnome

Set architecture to ‘arm64’ by default.
=> arm64

Choose install type:
only one choose => SD-USB

Compress image? [N|y] y

=> yes

== ENV CONFIG =======================
VERSION=1.0.10
KHADAS_BOARD=Edge
LINUX=mainline
UBOOT=mainline
DISTRIBUTION=Ubuntu
DISTRIB_RELEASE=focal
DISTRIB_TYPE=gnome
DISTRIB_ARCH=arm64
INSTALL_TYPE=SD-USB
COMPRESS_IMAGE=yes

== ONE LINE CONFIG ==================
source setenv.sh -q -s KHADAS_BOARD=Edge LINUX=mainline UBOOT=mainline DISTRIBUTION=Ubuntu DISTRIB_RELEASE=focal DISTRIB_TYPE=gnome DISTRIB_ARCH=arm64 INSTALL_TYPE=SD-USB COMPRESS_IMAGE=yes

Environment setup done. Type ‘make’ to build.

@liuliyuan 不是在这里配置的,这里只能指定编译主线固件,指定版本的地方在这里

对应的版本的补丁

对应的内核配置

在这里,你可以看到有好几个版本的补丁。最新的版本就是5.16正式版。所以配置里面默认也是配置的5.16

感谢frank!我先尝试一下,后续有进展给您回复。

另外有一个小小的建议,如果可以的话,希望khadas能新增一些RT的分支,或者提供一些可在fenxi中配置的RT版本。

做运动控制的机器人比较依赖带有RT的内核,后续也许有很多市场机会。

@liuliyuan 感谢你提出的建议,我们会认真考虑这个建议。 :smiley: 有任何其他问题欢迎再问。