summaryrefslogtreecommitdiffstats
path: root/roles
diff options
context:
space:
mode:
Diffstat (limited to 'roles')
-rw-r--r--roles/bootstrap/tasks/install-raspberry.yml21
-rw-r--r--roles/bootstrap/templates/raspberry.config.j25
-rw-r--r--roles/bootstrap/vars/raspberry.yml (renamed from roles/bootstrap/vars/debian.yml)11
3 files changed, 25 insertions, 12 deletions
diff --git a/roles/bootstrap/tasks/install-raspberry.yml b/roles/bootstrap/tasks/install-raspberry.yml
index b287746..e7a6914 100644
--- a/roles/bootstrap/tasks/install-raspberry.yml
+++ b/roles/bootstrap/tasks/install-raspberry.yml
@@ -1,6 +1,6 @@
---
-- name: "Include distribution vars"
- ansible.builtin.include_vars: "{{ ansible_distribution | lower }}.yml"
+- name: "Include Raspberry vars"
+ ansible.builtin.include_vars: "raspberry.yml"
- name: "Ensure install dependencies are installed on live environment"
ansible.builtin.apt:
@@ -55,14 +55,19 @@
changed_when: true
with_items:
- "apt-get update"
- - "apt-get install -y --no-install-recommends {{ bootstrap_distro.packages | join(' ') }}"
+ - "apt-get install -y {{ bootstrap_distro.packages | join(' ') }}"
-- name: "Copy kernel to boot partition"
- # NOTE: Copying {{ mnt_root_path }}/boot/ doesn't work
- # NOTE: Alternative, download latest fresh from https://github.com/raspberrypi/firmware/archive/refs/heads/master.zip
- ansible.builtin.shell: |
- cp -r /boot/firmware/* {{ mnt_boot_path }}/
+- name: "Update rpi kernel and firmware"
+ ansible.builtin.command:
+ cmd: "arch-chroot {{ mnt_root_path }} rpi-update"
+ environment:
+ SKIP_BACKUP: "1"
+ WANT_64BIT: "1"
+ WANT_PI5: "1"
+ SKIP_WARNING: "1"
+ SKIP_CHECK_PARTITION: "1"
changed_when: true
+ tags: ["molecule-notest"]
- name: "Configure bootloader"
ansible.builtin.template:
diff --git a/roles/bootstrap/templates/raspberry.config.j2 b/roles/bootstrap/templates/raspberry.config.j2
index def13e0..0faa3df 100644
--- a/roles/bootstrap/templates/raspberry.config.j2
+++ b/roles/bootstrap/templates/raspberry.config.j2
@@ -9,6 +9,11 @@ arm_64bit=1
disable_overscan=1
arm_boost=1
+[pi5]
+kernel=kernel_2712.img
+dtparam=pciex1
+dtparam=pciex1_gen=2
+
[cm4]
otg_mode=1
diff --git a/roles/bootstrap/vars/debian.yml b/roles/bootstrap/vars/raspberry.yml
index a305470..9915526 100644
--- a/roles/bootstrap/vars/debian.yml
+++ b/roles/bootstrap/vars/raspberry.yml
@@ -1,12 +1,15 @@
---
bootstrap_distro:
- name: "bookworm" # => Debian 12/Raspberry OS
+ name: "bookworm" # => Debian 12
mirror_url: "http://deb.debian.org/debian"
packages:
- - "raspberrypi-kernel"
- - "raspberrypi-bootloader"
- - "firmware-brcm80211"
- "rpi-eeprom"
+ - "rpi-update"
+ - "fake-hwclock"
+ - "man-db"
+ - "manpages"
+ - "net-tools"
+ - "ntp"
bootstrap_opts: "--arch=arm64"