device-google-x64cros: move gpu fw to initramfs-extra (MR 5730)

oem-* packages put fw into the initramfs, which allows for display/gpu
to work properly early during boot. On x64cros, there's not enough space
in the boot partition to hold gpu firmware so this patch duplicates some
things from oem-* packages in order to put the fw into initramfs-extra

[ci:skip-build]: already built successfully in CI
This commit is contained in:
Clayton Craft 2024-10-23 11:14:09 -07:00
parent 439bd8e869
commit 7b01c66a34
No known key found for this signature in database
GPG Key ID: 4A4CED6D7EDF950A
3 changed files with 34 additions and 6 deletions

View File

@ -0,0 +1 @@
/lib/firmware/amdgpu

View File

@ -0,0 +1,2 @@
# DMC fw is required on newer GPUs to enable lower power states
/lib/firmware/i915/*_dmc*

View File

@ -4,7 +4,7 @@
# Co-Maintainer: Jenneron <jenneron@protonmail.com> # Co-Maintainer: Jenneron <jenneron@protonmail.com>
pkgname=device-google-x64cros pkgname=device-google-x64cros
pkgdesc="Google Chromebooks with x64 CPU" pkgdesc="Google Chromebooks with x64 CPU"
pkgver=10 pkgver=11
pkgrel=0 pkgrel=0
url="https://postmarketos.org" url="https://postmarketos.org"
license="MIT" license="MIT"
@ -22,17 +22,27 @@ install="$pkgname.post-install $pkgname.post-upgrade"
subpackages=" subpackages="
$pkgname-kernel-lts:kernel_lts $pkgname-kernel-lts:kernel_lts
$pkgname-kernel-edge:kernel_edge $pkgname-kernel-edge:kernel_edge
$pkgname-firmware-intel:firmware_intel
$pkgname-firmware-amd:firmware_amd
"
source="
00-amdgpu-firmware.files
00-i915-firmware.files
deviceinfo
modules-initfs
" "
source="deviceinfo modules-initfs"
# TODO: package iwlwifi-7265D-29.ucode separetely, so we don't depend # TODO: package iwlwifi-7265D-29.ucode separetely, so we don't depend
# on linux-firmware-other # on linux-firmware-other
_pmb_recommends=" _pmb_recommends="
amd-ucode
intel-ucode
linux-firmware-amdgpu
linux-firmware-i915
linux-firmware-intel
linux-firmware-other linux-firmware-other
linux-firmware-rtl_nic linux-firmware-rtl_nic
linux-firmware-rtw88 linux-firmware-rtw88
oem-intel "
oem-amd
"
build() { build() {
devicepkg_build $startdir $pkgname devicepkg_build $startdir $pkgname
@ -54,7 +64,22 @@ kernel_lts() {
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
} }
firmware_amd() {
install_if="$pkgname=$pkgver-r$pkgrel linux-firmware-amdgpu"
install -Dm644 00-amdgpu-firmware.files \
-t "$subpkgdir"/usr/share/mkinitfs/files-extra
}
firmware_intel() {
install_if="$pkgname=$pkgver-r$pkgrel linux-firmware-i915"
install -Dm644 00-i915-firmware.files \
-t "$subpkgdir"/usr/share/mkinitfs/files-extra
}
sha512sums=" sha512sums="
321fc9e39cfffe88439ddd9530637a8f5c50304374f99161b8029bb13757ac46bf8e82db585698ec8f0b5e5bad2e800de7fec3608e71d161b3f17aa24d7db8a4 deviceinfo 38c53d91a60d0402d4cc5428d65e1e8c26360c481c70b34593b1812c87241c32e91904a3bd31fbfe507f7fdb8b50c909eaad8c4c3a37ca962760567329f7f6ee 00-amdgpu-firmware.files
c17f5c505e0e280a9e51ac1b4264e7703b744fd3831d75ce95f41be4755ae4ccd24b7ca09ba1e236df499a5e748c64a0d2054c9d55d8c8c713fa8c5646ed9a3c 00-i915-firmware.files
514ff5c946633dccaa569fed51743c669ea9942af4dd891ad001ba08bba07fca92503e29304f3eb71c16bc2f2436e1879ff0bf56d99666e4dcf9635c8605da2e deviceinfo
1b3bbfcdc6642488304653aef996dddf7a354e7279f2c735ac7aec404e598948423630fcaa2cac87e2c0aef033ecfc57a7a91154f9dac9a85411db7bad62e677 modules-initfs 1b3bbfcdc6642488304653aef996dddf7a354e7279f2c735ac7aec404e598948423630fcaa2cac87e2c0aef033ecfc57a7a91154f9dac9a85411db7bad62e677 modules-initfs
" "