mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
bcm2711/grub: add busybox (for initrd grep/sed) so initramfs-growroot works again on Debian
- bcm2711: bomb early when `RELEASE` is set and not supported
This commit is contained in:
committed by
igorpecovnik
parent
5f2a1af219
commit
ba413c9b25
@@ -72,27 +72,25 @@ extension_prepare_config__prepare_rpi_flash_kernel() {
|
||||
display_alert "Preparing bcm2711" "${RELEASE}, distro kernel?: ${RASPI_DISTRO_KERNEL}" "info"
|
||||
declare -g RASPI_DISTRO_KERNEL="${RASPI_DISTRO_KERNEL:-no}" # Include a distro-built kernel?
|
||||
declare -g SERIALCON="${RASPI_SERIALCON:-tty1}" # HDMI etc, not serial. most people don't have UART on rpi
|
||||
|
||||
local usable_releases="jammy|kinetic|lunar"
|
||||
|
||||
if [[ "$RELEASE" =~ ^(${usable_releases})$ ]]; then
|
||||
declare -g FK__EXTRA_PACKAGES="rpi-eeprom linux-firmware linux-firmware-raspi pi-bluetooth libraspberrypi-bin cloud-initramfs-growroot"
|
||||
# if RELEASE is set, make sure it is one of the ones we support.
|
||||
if [[ -n "${RELEASE}" ]]; then
|
||||
if [[ "$RELEASE" =~ ^(${usable_releases})$ ]]; then
|
||||
declare -g FK__EXTRA_PACKAGES="rpi-eeprom linux-firmware linux-firmware-raspi pi-bluetooth libraspberrypi-bin cloud-initramfs-growroot busybox"
|
||||
FK__EXTRA_PACKAGES="${FK__EXTRA_PACKAGES} raspi-config" # Add raspi-config for those releases that have it; it might be useful.
|
||||
|
||||
if [[ "$RELEASE" =~ ^(jammy|kinetic)$ ]]; then # Add raspi-config for those releases that have it; it might be useful.
|
||||
declare -g FK__EXTRA_PACKAGES="${FK__EXTRA_PACKAGES} raspi-config"
|
||||
fi
|
||||
|
||||
if [[ "${RASPI_DISTRO_KERNEL}" == "yes" ]]; then # and firmware.
|
||||
unset KERNELSOURCE # Make sure Armbian will not try to compile from source.
|
||||
declare -g FK__KERNEL_PACKAGES="${FK__KERNEL_PACKAGES} linux-tools-raspi linux-raspi linux-image-raspi "
|
||||
# Ubuntu Impish+ split the kernel modules, add the extra ones too.
|
||||
if [[ "$RELEASE" =~ ^(jammy|kinetic)$ ]]; then
|
||||
declare -g FK__KERNEL_PACKAGES="${FK__KERNEL_PACKAGES} linux-modules-extra-raspi"
|
||||
if [[ "${RASPI_DISTRO_KERNEL}" == "yes" ]]; then # and firmware.
|
||||
unset KERNELSOURCE # Make sure Armbian will not try to compile from source.
|
||||
declare -g FK__KERNEL_PACKAGES="${FK__KERNEL_PACKAGES} linux-tools-raspi linux-raspi linux-image-raspi "
|
||||
# Ubuntu Impish+ split the kernel modules, add the extra ones too.
|
||||
if [[ "$RELEASE" =~ ^(jammy|kinetic)$ ]]; then
|
||||
declare -g FK__KERNEL_PACKAGES="${FK__KERNEL_PACKAGES} linux-modules-extra-raspi"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [[ "${BUILDING_IMAGE}" == "yes" ]]; then
|
||||
display_alert "Can't use release for ${BOARD}. Try: ${usable_releases}" "${RELEASE}" "err"
|
||||
exit 27
|
||||
else
|
||||
exit_with_error "Can't use release '${RELEASE}' for ${BOARD}. Try: '${usable_releases}'" "'${RELEASE}' not supported"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ function extension_prepare_config__prepare_grub-riscv64() {
|
||||
exit_with_error "${DISTRIBUTION} is not supported yet"
|
||||
fi
|
||||
|
||||
add_packages_to_image efibootmgr efivar cloud-initramfs-growroot os-prober "grub-efi-${ARCH}-bin" "grub-efi-${ARCH}"
|
||||
add_packages_to_image efibootmgr efivar cloud-initramfs-growroot busybox os-prober "grub-efi-${ARCH}-bin" "grub-efi-${ARCH}"
|
||||
|
||||
display_alert "Activating" "GRUB with SERIALCON=${SERIALCON}; timeout ${UEFI_GRUB_TIMEOUT}; target=${UEFI_GRUB_TARGET}" ""
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@ function extension_prepare_config__prepare_grub_standard() {
|
||||
declare -g EXTRA_BSP_NAME="${EXTRA_BSP_NAME}-grub" # Unique bsp name.
|
||||
declare -g UEFI_GRUB_TARGET_BIOS="" # Target for BIOS GRUB install, set to i386-pc when UEFI_ENABLE_BIOS_AMD64=yes and target is amd64
|
||||
|
||||
packages+=(efibootmgr efivar cloud-initramfs-growroot) # Use growroot, add some efi-related packages
|
||||
packages+=(os-prober "grub-efi-${ARCH}-bin") # This works for Ubuntu and Debian, by sheer luck; common for EFI and BIOS
|
||||
packages+=(efibootmgr efivar cloud-initramfs-growroot busybox) # Use growroot(+busybox for it to work on Bookworm), add some efi-related packages
|
||||
packages+=(os-prober "grub-efi-${ARCH}-bin") # This works for Ubuntu and Debian, by sheer luck; common for EFI and BIOS
|
||||
|
||||
# BIOS-compatibility for amd64
|
||||
if [[ "${ARCH}" == "amd64" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user