diff options
| author | Ahmed Abdelhalim <[email protected]> | 2026-02-27 01:19:36 +0100 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2026-02-27 01:19:36 +0100 |
| commit | b939d370f2720f761ac7c6dfe0041ebfd64c1b79 (patch) | |
| tree | 30dedc5a8da97d826969369e5b7ada12bf667c90 /roles/bootstrap | |
| parent | a0d80d2f27c868dbf5cbfa054bc3190fe4a83666 (diff) | |
Add boot args that allow gpu and other mac locked features on linux
Diffstat (limited to 'roles/bootstrap')
| -rw-r--r-- | roles/bootstrap/defaults/main.yml | 3 | ||||
| -rw-r--r-- | roles/bootstrap/meta/argument_specs.yml | 9 | ||||
| -rw-r--r-- | roles/bootstrap/tasks/install-archlinux.yml | 18 | ||||
| -rw-r--r-- | roles/bootstrap/templates/refind.conf.j2 | 5 | ||||
| -rw-r--r-- | roles/bootstrap/templates/refind_linux.conf.j2 | 2 |
5 files changed, 23 insertions, 14 deletions
diff --git a/roles/bootstrap/defaults/main.yml b/roles/bootstrap/defaults/main.yml index 552f54e..bf3753f 100644 --- a/roles/bootstrap/defaults/main.yml +++ b/roles/bootstrap/defaults/main.yml @@ -1,2 +1,3 @@ --- -bootstrap_broadcom_wl: false +bootstrap_mac: false +bootstrap_mac_boot_args: "acpi_osi=Darwin i915.modeset=1 acpi_mask_gpe=0x06" diff --git a/roles/bootstrap/meta/argument_specs.yml b/roles/bootstrap/meta/argument_specs.yml index 00c7b31..1744925 100644 --- a/roles/bootstrap/meta/argument_specs.yml +++ b/roles/bootstrap/meta/argument_specs.yml @@ -14,8 +14,13 @@ argument_specs: type: "dict" required: true description: "Check partition_root argument in role: partition, required options: mount_path" - bootstrap_broadcom_wl: + bootstrap_mac: type: "bool" required: false default: false - description: "Install broadcom-wl driver (required for BCM4360 on Intel 2012 Macs)" + description: "Install broadcom-wl driver/spoof_osx (required for Intel 2012 Macs)" + bootstrap_mac_boot_args: + type: "str" + required: false + default: "acpi_osi=Darwin i915.modeset=1 acpi_mask_gpe=0x06" + description: "Extra kernel boot arguments appended to rEFInd boot entries when bootstrap_mac is true" diff --git a/roles/bootstrap/tasks/install-archlinux.yml b/roles/bootstrap/tasks/install-archlinux.yml index 5affa1c..02ba1f3 100644 --- a/roles/bootstrap/tasks/install-archlinux.yml +++ b/roles/bootstrap/tasks/install-archlinux.yml @@ -46,20 +46,16 @@ changed_when: true - name: "Configure rEFInd boot options" - ansible.builtin.copy: + ansible.builtin.template: + src: "refind_linux.conf.j2" dest: "{{ mnt_root_path }}/boot/refind_linux.conf" mode: "0644" - content: | - "Boot with defaults" "root=PARTLABEL={{ partition_root.name }} rw console=tty1" - "Boot to terminal" "root=PARTLABEL={{ partition_root.name }} rw console=tty1 systemd.unit=multi-user.target" - name: "Configure rEFInd settings" - ansible.builtin.copy: + ansible.builtin.template: + src: "refind.conf.j2" dest: "{{ mnt_boot_path }}/EFI/refind/refind.conf" mode: "0644" - content: | - timeout 5 - textonly true # NOTE: this is skipped because the docker test doesn't have proper EFI/refind directory created tags: ["molecule-notest"] @@ -88,7 +84,7 @@ ansible.builtin.command: cmd: "arch-chroot {{ mnt_root_path }} pacman -S --noconfirm broadcom-wl" changed_when: true - when: bootstrap_broadcom_wl + when: bootstrap_mac - name: "Blacklist modules conflicting with broadcom-wl" ansible.builtin.copy: @@ -100,7 +96,7 @@ blacklist b43 blacklist ssb blacklist bcma - when: bootstrap_broadcom_wl + when: bootstrap_mac - name: "Load wl module at boot" ansible.builtin.copy: @@ -108,4 +104,4 @@ mode: "0644" content: | wl - when: bootstrap_broadcom_wl + when: bootstrap_mac diff --git a/roles/bootstrap/templates/refind.conf.j2 b/roles/bootstrap/templates/refind.conf.j2 new file mode 100644 index 0000000..995ae1e --- /dev/null +++ b/roles/bootstrap/templates/refind.conf.j2 @@ -0,0 +1,5 @@ +timeout 5 +textonly true +{% if bootstrap_mac %} +spoof_osx_version 12.7 +{% endif %} diff --git a/roles/bootstrap/templates/refind_linux.conf.j2 b/roles/bootstrap/templates/refind_linux.conf.j2 new file mode 100644 index 0000000..c5e9942 --- /dev/null +++ b/roles/bootstrap/templates/refind_linux.conf.j2 @@ -0,0 +1,2 @@ +"Boot with defaults" "root=PARTLABEL={{ partition_root.name }} rw console=tty1{% if bootstrap_mac %} {{ bootstrap_mac_boot_args }}{% endif %}" +"Boot to terminal" "root=PARTLABEL={{ partition_root.name }} rw console=tty1 systemd.unit=multi-user.target{% if bootstrap_mac %} {{ bootstrap_mac_boot_args }}{% endif %}" |
