kernel/kernel-rt
Jiping Ma 652b71b18b CentOS: Regenerate the initramfs during drivers update
The driver version included in the initramfs may be out-of-sync with the
version included in the root file-system's /lib/modules/<kver>
directory, if it does not regenerate initramfs after out-of-tree driver
update. This would cause an incorrect version of the driver to be
used.

This commit makes sure initramfs image will be regenerated after
out-of-tree driver updates, which drivers are loaded during
initramfs stage. It includes ice, i40e, iavf, bnxt-en and
mlnx-ofa_kernel drivers.

The initramfs will not be regenerated for the out-of-tree modules except
ice after commit 6764889c7360803549a0e4762198d7b84f2d31f8
(Drop weak-modules) during the rpm package updates. We can add dracut
for every out-of-tree module in post and postun, that will cause the
package installation/update time becoming very large. So here we use
file-based per-transaction triggers in the kernel package's spec file,
which allow the update procedure to run dracut once per transaction.

Testing:
- An ISO image can be built out successfully.
- Installation of the ISO image is successful with standard and
  low-latency profiles.
- Install/uninstall these drivers rpm packages successfully.
- Apply the designer patch that include kernel test pass(rt and std).
- Remove the designer patch that include kernel test pass(rt and std).

Closes-Bug: 1983524

Depends-On: https://review.opendev.org/c/starlingx/compile/+/853140
Fixes: 6764889c7360("Drop weak-modules call from kmod RPM scripts")

Signed-off-by: Jiping Ma <jiping.ma2@windriver.com>
Change-Id: I52fa03e28da4b25d511c85c49e7b31498e769f4d
2022-08-28 21:06:41 -04:00
..