Build latest Fedora kernel with ACS overrides patch applied
Find a file
2019-11-13 21:42:24 -06:00
mitogen@4fedf88d38 add mitogen submodule - strategy plugin 2019-07-27 23:20:06 -05:00
payload renamed ACS patch to imply linux 5.0+ support 2019-04-06 11:21:43 -05:00
.gitmodules add mitogen submodule - strategy plugin 2019-07-27 23:20:06 -05:00
ansible.cfg add mitogen submodule - strategy plugin 2019-07-27 23:20:06 -05:00
hosts-local local inventory - set python3 2019-11-13 21:42:24 -06:00
playbook.yml change to fedora 30 target 2019-07-12 23:59:21 -05:00
README.md initial commit 2019-02-25 21:48:16 -06: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/

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$