From bd2cb308854a5ec9f438c0604a47a5eef6880d92 Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Mon, 11 Aug 2025 00:33:36 +0200 Subject: Fix raspberry install correct kernel/firmware using rpi-update It can't be tested on mocked debian docker container, therefore disabling the testing for it --- roles/bootstrap/tasks/install-raspberry.yml | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'roles/bootstrap/tasks/install-raspberry.yml') 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: -- cgit v1.2.3