Skip to content
This repository has been archived by the owner on Jan 13, 2020. It is now read-only.

Commit

Permalink
Ensure Kernel version is compatible with target XRT version.
Browse files Browse the repository at this point in the history
  • Loading branch information
JGoutin committed Oct 3, 2019
1 parent 76454a6 commit a484206
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Role Variables
Default to `true`.
* **xilinx_xrt_version**: If *aws_fpga_xrt* is `true`, Xilinx XRT version to install.
Default to `2019.1`.
* **xilinx_xrt_ensure_compatible_kernel**: If `true`, ensure the Linux kernel installed is compatible. Default to `true`.

* **aws_fpga_driver**: FPGA driver name. If specified, install and enable the specified Linux kernel driver.
See [AWS FPGA linux kernel drivers](https://github.com/aws/aws-fpga/tree/master/sdk/linux_kernel_drivers) for the list of available drivers.
Expand Down
9 changes: 9 additions & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,12 @@ xilinx_xrt_packages:

s3_dev_ami_url: "https://aws-fpga-developer-ami.s3.amazonaws.com/"
xrt_package: "{{ xilinx_xrt_packages[xilinx_xrt_version | string] }}"

# Linux kernel version compatibles with AWS XRT
# From https://github.com/aws/aws-fpga/blob/master/RELEASE_NOTES.md
xilinx_xrt_ensure_compatible_kernel: true
aws_xrt_kernels:
'2019.1': 3.10.0-957
'2018.3': 3.10.0-957
'2018.2': 3.10.0-957
aws_linux_kernel_version: "{{ aws_xrt_kernels[xilinx_xrt_version | string] }}"
14 changes: 12 additions & 2 deletions meta/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,20 @@ galaxy_info:
- ec2

dependencies:
- role: accelize.linux_kernel
vars:
kernel_version: "{{ aws_linux_kernel_version }}"
when:
# Managed by "accelize.xilinx_xrt" if not RHEL/CentOS 7
- ansible_os_family == 'RedHat'
- ansible_distribution_major_version == "7"
- xilinx_xrt_ensure_compatible_kernel | bool

- role: accelize.xilinx_xrt
when:
- aws_fpga_xrt | bool
# AWS provides special packages for CentOS 7
- ansible_os_family == 'Debian'
# AWS provides special packages for RHEL/CentOS 7
- "ansible_os_family != 'RedHat' or
ansible_distribution_major_version != '7'"
vars:
xilinx_xrt_aws: true
2 changes: 2 additions & 0 deletions molecule/default/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@
- role: ansible-role-aws-fpga
vars:
aws_fpga_xrt: false
xilinx_xrt_ensure_compatible_kernel: false
reboot_on_kernel_update: false
1 change: 1 addition & 0 deletions molecule/default/requirements.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
---
- accelize.xilinx_xrt
- accelize.linux_kernel

0 comments on commit a484206

Please sign in to comment.