Fix usb ports on cubox-m

This commit is contained in:
2022-09-05 08:55:27 -04:00
parent 7ff5dc892f
commit ffc56dd893
4 changed files with 39 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
[Unit]
Description=Additional config to start USB ports
[Service]
Type=oneshot
ExecStart=/bin/sh -c "echo 7 > /sys/class/gpio/export;echo out > /sys/class/gpio/gpio7/direction;echo 1 > /sys/class/gpio/gpio7/value"
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,24 @@
---
#https://community.solid-run.com/t/cubox-m-quad-not-powering-usb-devices/181/6
#
#- name: debug variables
# ansible.builtin.debug:
# var: ansible_facts
# when: inventory_hostname == "cubox-m"
# create service file
- name: add fix_usb service
ansible.builtin.copy:
src: "fix_usb/fix_usb.service"
dest: /etc/systemd/system/fix_usb.service
mode: '0644'
owner: root
group: root
# start service
- name: Enable service httpd and ensure it is not masked
ansible.builtin.systemd:
name: fix_usb
enabled: yes
masked: no

View File

@@ -3,6 +3,8 @@
apt:
update_cache: yes
cache_valid_time: 3600
update_cache_retries: 10
update_cache_retry_max_delay: 20
- name: Install required packages
apt:

View File

@@ -11,6 +11,10 @@
- name: update login screen
include_tasks: motd.yml
- name: fix usb
include_tasks: fix_usb.yml
when: inventory_hostname == "cubox-m"
- name: update fstab
include_tasks: update_fstab.yml