Li Zhou feaa9fddd6 kernel-rt: add initial version for debian packaging
Add kernel-rt 5.10.74 debian packaging.

The kernel-rt we are building starts as source code from the Yocto
Project kernel found at
(https://git.yoctoproject.org/cgit/cgit.cgi/linux-yocto/about/?h=v5.10/standard/preempt-rt/base).
To facilitate the creation of a Debian package of this kernel-rt we
start by making a copy of the 5.10 Debian Bullseye 'debian' folder
taken from (http://snapshot.debian.org/package/linux/5.10.28-1/) and
apply customization via the meta-data patches in debian/deb_patches
dir. In this way we can review and incorporate changes the Debian
community makes to their kernel's 'debian' folder over time.

Since there are StarlingX specific patches to the kernel not suitable to
send for merging in linux-yocto we apply these here as defined in scope
and order in the contained debian/patches/series file.

The original Debian's release use a "rt" feature to build extra kernel
packages with preempt-rt. This "rt" feature applies many patches on the
std kernel and turns it into a rt kernel. Here I don't find a proper way
to do this on linux-yocto source. So I disable the rt feature in debian
folder and build the kernel-rt source code from linux-yocto in a normal
way. Two things are done to make sure this kernel-rt building is fine:
- rename the packages' names from linux-xxx to linux-rt-xxx in the
  debian folder;
- add the right config file for kernel-rt to the proper place.

Verification:
As we are only getting the Debian work bootstrapped there is quite a few
restrictions as far as what can be tested.

- I have compared it to the kernel-rt 5.10.74 being used with stx
  centos:
  - the linux-yocto source code is same;
  - all the StarlingX specific patches are same;
  - the .config of Starlingx centos kernel-rt 5.10.74 is taken to
    Starlingx debian, coexists and overrides the default debian kenrel
    configs, and only below changes are done for it:
    - remove some CONFIGs not set by Starlingx centos kernel code
      intentionally, such as CONFIG_CC_CAN_LINK;
    - remove some CONFIGs special for Starlingx centos kernel code such
      as: CONFIG_CC_VERSION_TEXT;
    - keep the CONFIGs related with signature aligned with debian
      release, because the security feature is still in development.
- 17 debs are built successfully. Build kernel-rt image into rootfs and
  initramfs. Build the LAT ustart image from them.
- Use qemu to boot the ustart image, and the installer installs the
  rootfs successfully. The final debian system with this new kernel-rt
  boot up successfully and run some simple commands successfully.

Story: 2009221
Task: 43335
Signed-off-by: Li Zhou <li.zhou@windriver.com>
Change-Id: I59fbe9c98000fa1d57980e7e1cd45cd24aa30cda
2021-12-15 03:33:31 -05:00
..