Skip to contentSkip to conversation

genericarm64.wks: reorder partitions

PATCH New [email protected] 1 participant 2 messages Mar 7, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 genericarm64.wks: reorder partitions

From: Ross Burton <[email protected]>

Put the root partition at the end of the disk so that it can be easily resized.

---
 meta-yocto-bsp/wic/genericarm64.wks.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta-yocto-bsp/wic/genericarm64.wks.in +2 -2
index 417d4d88104..ee7da87ded8 100644
@@ -4,8 +4,8 @@
 
 part /boot --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER},initrd=${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES}" --label boot --active --align 1024 --use-uuid
 
-part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuid
-
 part swap --size 44 --label swap --fstype=swap --use-uuid
 
+part / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuid
+
 bootloader --ptable gpt --timeout=5 --append="rootwait rootfstype=ext4"
Signature · 1 line
2.34.1
#1 lore raw

PATCH 2/2 genericarm64: clean up kernel modules and firmware

From: Ross Burton <[email protected]>

Don't install _all_ of the firmware, as that's huge (almost 1GB). Instead install a few pieces of firmware for common hardware.

Also use the same list of packages to populate the initramfs, so there's no need to manually sync the package lists (as initramfs doesn't install the MACHINE_EXTRA_RRECOMMENDS automatically).

---
 meta-yocto-bsp/conf/machine/genericarm64.conf | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)
meta-yocto-bsp/conf/machine/genericarm64.conf +8 -6
index 83f1aca137a..7c4c76ffe0c 100644
@@ -1,6 +1,6 @@
 #@TYPE: Machine
 #@NAME: genericarm64
-#@DESCRIPTION: Generic Arm64 machine for typical SystemReady platforms, which
+#@DESCRIPTION: Generic Arm64 machine for typical SystemReady IR/ES platforms, which
 #have working firmware and boot via EFI.
 
 require conf/machine/include/arm/arch-armv8a.inc
@@ -10,15 +10,17 @@ DEFAULTTUNE = "armv8a-crc"
 
 MACHINE_FEATURES = "acpi alsa bluetooth efi keyboard pci qemu-usermode rtc screen usbhost vfat wifi"
 
-# Install all the kernel modules and all the firmware
-MACHINE_EXTRA_RRECOMMENDS += "kernel-modules linux-firmware"
-
 KERNEL_IMAGETYPE = "Image"
 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
 
-# Use an initramfs and populate it with the kernel modules
+# Install all the kernel modules into the rootfs
+MACHINE_EXTRA_RRECOMMENDS += "kernel-modules"
+# Install selected pieces of firmware
+MACHINE_EXTRA_RRECOMMENDS += "linux-firmware-wl12xx linux-firmware-wl18xx linux-firmware-rtl-nic"
+
+# Use an initramfs and populate it with the kernel modules and key firmware
 INITRAMFS_IMAGE ?= "core-image-initramfs-boot"
-PACKAGE_INSTALL:append:pn-core-image-initramfs-boot = " kernel-modules"
+PACKAGE_INSTALL:append:pn-core-image-initramfs-boot = " ${MACHINE_EXTRA_RRECOMMENDS}"
 
 IMAGE_FSTYPES ?= "wic"
 WKS_FILE ?= "genericarm64.wks.in"
Signature · 1 line
2.34.1