Build latest Fedora kernel with ACS overrides patch applied
payload | ||
ansible.cfg | ||
hosts-local | ||
playbook.yml | ||
README.md | ||
TODO.md |
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/
Example usage
jlay@workstation:~/git/ansible/build_kernel$ ansible-playbook -i hosts playbook.yml
PLAY [buildservers] ******************************************************************************************************************************************
TASK [Gathering Facts] ******************************************************************************************************************************************
ok: [delta.jlay.io]
TASK [Ensure libselinux-python is installed] ******************************************************************************************************************************************
ok: [delta.jlay.io]
TASK [Ensure fedpkg is installed] ******************************************************************************************************************************************
ok: [delta.jlay.io]
TASK [Find old mock chroots] ******************************************************************************************************************************************
ok: [delta.jlay.io]
TASK [Clean old mock chroots] ******************************************************************************************************************************************
TASK [Clean old build dir] ******************************************************************************************************************************************
changed: [delta.jlay.io]
TASK [Clone f29 kernel to /tmp/f29_kernel] ******************************************************************************************************************************************
changed: [delta.jlay.io]
TASK [Copy patch to build dir] ******************************************************************************************************************************************
changed: [delta.jlay.io]
TASK [Apply patch and build kernel (logs in /tmp/f29_kernel/results_kernel/*)] ******************************************************************************************************************************************
changed: [delta.jlay.io] => (item=./scripts/newpatch.sh acso-4.18.patch)
changed: [delta.jlay.io] => (item=/usr/bin/sed -i -e 's/%define buildid .*$/%define buildid .acspatch/' kernel.spec)
changed: [delta.jlay.io] => (item=/usr/bin/make release)
changed: [delta.jlay.io] => (item=fedpkg mockbuild)
TASK [Find RPMs in /tmp/f29_kernel/results_kernel/*/*/*.rpm] ******************************************************************************************************************************************
ok: [delta.jlay.io]
TASK [Copy RPMs to /tmp/ (local)] ******************************************************************************************************************************************
ok: [delta.jlay.io] => (item={'uid': 0, 'woth': False, 'mtime': 1545900251.552329, 'inode': 1086935, 'isgid': False, 'size': 104419185, 'roth': True, 'isuid': False, 'isreg': True, 'pw_name': 'root', 'gid': 135, 'ischr': False, 'wusr': True, 'xoth': False, 'rusr': True, 'nlink': 1, 'issock': False, 'rgrp': True, 'gr_name': 'mock', 'path': '/tmp/f29_kernel/results_kernel/4.19.12/302.acspatch.fc29/kernel-4.19.12-302.acspatch.fc29.src.rpm', 'xusr': False, 'atime': 1545932715.7957838, 'isdir': False, 'ctime': 1545926304.4206192, 'isblk': False, 'xgrp': False, 'dev': 41, 'wgrp': False, 'isfifo': False, 'mode': '0644', 'islnk': False})
[...]
PLAY RECAP ******************************************************************************************************************************************
delta.jlay.io : ok=8 changed=4 unreachable=0 failed=0
jlay@workstation:~/git/ansible/build_kernel$