diff --git a/ansible/roles/ovos_hardware_mark2/tasks/main.yml b/ansible/roles/ovos_hardware_mark2/tasks/main.yml index acf317a0..c1446276 100644 --- a/ansible/roles/ovos_hardware_mark2/tasks/main.yml +++ b/ansible/roles/ovos_hardware_mark2/tasks/main.yml @@ -8,5 +8,9 @@ - name: Include vocalfusion.yml ansible.builtin.import_tasks: vocalfusion.yml +- name: Include touchscreen.yml + ansible.builtin.import_tasks: touchscreen.yml + when: "'attiny1614' in ovos_installer_i2c_devices" + - name: Include wireplumber.yml ansible.builtin.import_tasks: wireplumber.yml diff --git a/ansible/roles/ovos_hardware_mark2/tasks/prepare.yml b/ansible/roles/ovos_hardware_mark2/tasks/prepare.yml index 5b422eaa..c39ad23a 100644 --- a/ansible/roles/ovos_hardware_mark2/tasks/prepare.yml +++ b/ansible/roles/ovos_hardware_mark2/tasks/prepare.yml @@ -10,3 +10,12 @@ - /opt/sj201 - "{{ ovos_installer_user_home }}/.config/systemd/user" - "{{ ovos_installer_user_home }}/.config/wireplumber/main.lua.d" + +- name: Check for /boot/firmware directory + ansible.builtin.stat: + path: /boot/firmware + register: _boot_config_status + +- name: Set _boot_directory fact + ansible.builtin.set_fact: + _boot_directory: "{{ '/boot/firmware' if _boot_config_status.stat.exists | bool else '/boot' }}" diff --git a/ansible/roles/ovos_hardware_mark2/tasks/touchscreen.yml b/ansible/roles/ovos_hardware_mark2/tasks/touchscreen.yml new file mode 100644 index 00000000..bf62c6a4 --- /dev/null +++ b/ansible/roles/ovos_hardware_mark2/tasks/touchscreen.yml @@ -0,0 +1,10 @@ +--- +- name: Manage touchscreen, DevKit vs Mark II + ansible.builtin.lineinfile: + path: "{{ _boot_directory }}" + regexp: "^{{ item.overlay }}" + line: "{{ item.overlay }}" + state: "{{ item.state }}" + loop: + - {"overlay": "dtoverlay=vc4-kms-v3d", "state": "absent" } + - {"overlay": "dtoverlay=vc4-fkms-v3d", "state": "present" } diff --git a/ansible/roles/ovos_hardware_mark2/tasks/vocalfusion.yml b/ansible/roles/ovos_hardware_mark2/tasks/vocalfusion.yml index ae2be32d..1fafd7a4 100644 --- a/ansible/roles/ovos_hardware_mark2/tasks/vocalfusion.yml +++ b/ansible/roles/ovos_hardware_mark2/tasks/vocalfusion.yml @@ -25,7 +25,7 @@ vars: _is_rpi5: "{{ '-pi5' if 'Raspberry Pi 5' in ovos_installer_raspberrypi else '' }}" ansible.builtin.lineinfile: - path: /boot/firmware/config.txt + path: "{{ _boot_directory }}" regexp: "^{{ item }}=" line: "{{ item }}{{ _is_rpi5 }}" loop: diff --git a/ansible/site.yml b/ansible/site.yml index 78712e95..04f118a3 100644 --- a/ansible/site.yml +++ b/ansible/site.yml @@ -31,7 +31,7 @@ - ansible_distribution == "Debian" - ansible_distribution_major_version is version('11', '>=') - "'Raspberry Pi 4' in ovos_installer_raspberrypi or 'Raspberry Pi 5' in ovos_installer_raspberrypi" - - "'tas5806' in ovos_installer_i2c_devices" + - ovos_installer_i2c_devices in ["tas5806", "attiny1614"] - ansible_architecture == "aarch64" - role: ovos_installer