Build latest Fedora kernel with ACS overrides patch applied
Find a file
2020-04-15 22:55:00 -05:00
mitogen@4fedf88d38 add mitogen submodule - strategy plugin 2019-07-27 23:20:06 -05:00
payload f31 - support 5.4.x 2019-12-27 09:13:11 -06:00
.gitmodules add mitogen submodule - strategy plugin 2019-07-27 23:20:06 -05:00
ansible.cfg disable cowsay 2020-02-19 22:38:01 -06:00
hosts-local local inventory - set python3 2019-11-13 21:42:24 -06:00
playbook.yml Update example/add reqs, support for f32 and kernel 5.6+ 2020-04-15 22:46:14 -05:00
README.md add notes 2020-04-15 22:55:00 -05:00
TODO.md initial commit 2019-02-25 21:48:16 -06:00

build-kernel

This playbook is used to automatically build a kernel with an ACS overrides patch applied. Useful to isolate PCI-e devices to their own IOMMU group for VFIO passthrough.

See this page for kernel configuration details: https://copr.fedorainfracloud.org/coprs/jlay/kernel-acspatch/

Requirements

  • Inventory with one host
    • hosts-local provided as a sample inventory for localhost
  • This host must be running Fedora (builds use mock)

Example usage

Notes

Target Fedora version is controlled by the variable fedora_version in ./playbook.yml

Patch to apply is determined by the patch_file variable, stored in ./payload/

Output:

$ ansible-playbook -i buildserver playbook.yml -b --ask-become-pass
BECOME password: 

PLAY [buildservers] *******************************************************************************************************************************************

TASK [Gathering Facts] ****************************************************************************************************************************************
ok: [buildserver]

TASK [Ensure fedpkg is installed] *****************************************************************************************************************************
changed: [buildserver]

TASK [Find old mock chroots] **********************************************************************************************************************************
ok: [buildserver]

TASK [Clean old mock chroots] *********************************************************************************************************************************

TASK [Clean old build dir] ************************************************************************************************************************************
ok: [buildserver]

TASK [Clone f32 kernel to /tmp/f32_kernel] ********************************************************************************************************************
changed: [buildserver]

TASK [Copy patch to build dir] ********************************************************************************************************************************
changed: [buildserver]

TASK [Copy newpatch.sh on master branch, for 5.6 on f31] ******************************************************************************************************
changed: [buildserver]

TASK [Apply patch and build kernel (logs in /tmp/f32_kernel/results_kernel/*)] ********************************************************************************
changed: [buildserver] => (item=./scripts/newpatch.sh acso-5.4.6.patch)
changed: [buildserver] => (item=/usr/bin/sed -i -e 's/%define buildid .*$/%define buildid .acspatch/' kernel.spec)
changed: [buildserver] => (item=/usr/bin/make release)
changed: [buildserver] => (item=fedpkg mockbuild)

TASK [Find RPMs in /tmp/f32_kernel/results_kernel/*/*/*.rpm] **************************************************************************************************
ok: [buildserver]

TASK [Copy RPMs to /tmp/ (local)] *****************************************************************************************************************************
[...]

PLAY RECAP ****************************************************************************************************************************************************
buildserver                      : ok=10   changed=6    unreachable=0    failed=0    skipped=1    rescued=0    ignored=0