Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions config/sources/families/bcm2711.conf
Original file line number Diff line number Diff line change
Expand Up @@ -180,12 +180,6 @@ function post_family_tweaks_bsp__add_hooks_to_move_kernel_initrd_and_dtb() {
run_host_command_logged chmod a+x "${destination}"/etc/initramfs/post-update.d/zzz-update-initramfs
}

function post_family_tweaks_bsp__rpi_firmware() {
display_alert "$BOARD" "Installing firmware" "info"
git clone https://github.com/pyavitz/firmware.git --depth=1 -q "${destination}"/lib/firmware/updates/brcm
rm -fdr "${destination}"/lib/firmware/updates/brcm/{.git,README.md}
}

function post_family_tweaks_bsp__add_x11_config() {
display_alert "rpi5b" "Adding X11 configuration" "info"
run_host_command_logged mkdir -p "${destination}"/etc/X11/xorg.conf.d/
Expand Down Expand Up @@ -260,6 +254,22 @@ function pre_install_distribution_specific__add_rpi_packages() {
fi
}

function pre_install_distribution_specific__ubuntu_brcm_firmware() {
# Ubuntu uses compressed "*.zst" firmware of which the kernel has issue.
if [[ "${DISTRIBUTION}" == "Ubuntu" ]]; then
declare destdir="${SDCARD}/lib/firmware/updates"
declare firmware_commit_sha1="996423a18fc9c084c494c8ce378a25c7f8f44db4" # Keep this inside this file, so hashing detect changes and bumps the version of the bsp package
declare srcdir="${SRC}/cache/sources/brcm/${firmware_commit_sha1}"

run_host_command_logged mkdir -p "${destdir}"
# Get the firmware files from the git repo
fetch_from_repo "https://github.com/pyavitz/firmware.git" "brcm" "commit:${firmware_commit_sha1}" "yes"
# Copy the files from the git repo to the destdir
run_host_command_logged cp -pr "${srcdir}/"* "${destdir}"/
rm -fdr "${SDCARD}"/lib/firmware/updates/.git
fi
}

function pre_install_distribution_specific__unblock_rfkill() {
# Create a systemd service to unblock rfkill
cat > "${SDCARD}/etc/systemd/system/unblock-rfkill.service" <<- EOT
Expand Down