Skip to content

Commit

Permalink
use linux-firmware package for mainline images
Browse files Browse the repository at this point in the history
  • Loading branch information
Joshua-Riek committed Sep 17, 2023
1 parent 624f89b commit 4284312
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
11 changes: 2 additions & 9 deletions scripts/build-rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,12 @@ apt-get -y update && apt-get -y upgrade && apt-get -y dist-upgrade
# Download and install generic packages
apt-get -y install dmidecode mtd-tools i2c-tools u-boot-tools cloud-init \
bash-completion man-db manpages nano gnupg initramfs-tools armbian-firmware \
bash-completion man-db manpages nano gnupg initramfs-tools mmc-utils rfkill \
ubuntu-drivers-common ubuntu-server dosfstools mtools parted ntfs-3g zip atop \
p7zip-full htop iotop pciutils lshw lsof landscape-common exfat-fuse hwinfo \
net-tools wireless-tools openssh-client openssh-server wpasupplicant ifupdown \
pigz wget curl lm-sensors bluez gdisk usb-modeswitch usb-modeswitch-data make \
gcc libc6-dev bison libssl-dev flex flash-kernel fake-hwclock rfkill wireless-regdb \
mmc-utils
gcc libc6-dev bison libssl-dev flex flash-kernel fake-hwclock wireless-regdb
# Remove cryptsetup and needrestart
apt-get -y remove cryptsetup needrestart
Expand Down Expand Up @@ -235,9 +234,6 @@ true > ${chroot_dir}/etc/machine-id
# Do not create bak files for flash-kernel
echo "NO_CREATE_DOT_BAK_FILES=true" >> ${chroot_dir}/etc/environment

# Fix Intel AX210 not working after linux-firmware update
[ -e ${chroot_dir}/usr/lib/firmware/iwlwifi-ty-a0-gf-a0.pnvm ] && mv ${chroot_dir}/usr/lib/firmware/iwlwifi-ty-a0-gf-a0.{pnvm,bak}

# Umount temporary API filesystems
umount -lf ${chroot_dir}/dev/pts 2> /dev/null || true
umount -lf ${chroot_dir}/* 2> /dev/null || true
Expand Down Expand Up @@ -370,9 +366,6 @@ chroot ${chroot_dir} /bin/bash -c "dconf update"
mkdir -p ${chroot_dir}/etc/initramfs-tools/conf-hooks.d
cp ${overlay_dir}/etc/initramfs-tools/conf-hooks.d/plymouth ${chroot_dir}/etc/initramfs-tools/conf-hooks.d/plymouth

# Fix Intel AX210 not working after linux-firmware update
[ -e ${chroot_dir}/usr/lib/firmware/iwlwifi-ty-a0-gf-a0.pnvm ] && mv ${chroot_dir}/usr/lib/firmware/iwlwifi-ty-a0-gf-a0.{pnvm,bak}

# Update initramfs
chroot ${chroot_dir} /bin/bash -c "update-initramfs -u"

Expand Down
4 changes: 3 additions & 1 deletion scripts/config-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,11 @@ for type in $target; do
fi
fi

# Disable ap6275p bluetooth service on mainline
if [[ ${MAINLINE} == "Y" ]]; then
chroot ${chroot_dir} /bin/bash -c "systemctl disable ap6275p-bluetooth"
chroot ${chroot_dir} /bin/bash -c "apt-get -y install linux-firmware"
else
chroot ${chroot_dir} /bin/bash -c "apt-get -y install armbian-firmware"
fi

# Install the bootloader
Expand Down

0 comments on commit 4284312

Please sign in to comment.