Add genericarm64 MACHINE
PATCH v4 1/1 Add genericarm64 MACHINE
From: Ross Burton <[email protected]>
This is a new 64-bit "generic" Arm machine, that expects the hardware to be SystemReady compatible.
--- .../conf/templates/default/local.conf.sample | 1 + meta-yocto-bsp/README.hardware.md | 18 ++++++++++- meta-yocto-bsp/conf/machine/genericarm64.conf | 31 +++++++++++++++++++ .../linux/linux-yocto_6.6.bbappend | 5 +++ meta-yocto-bsp/wic/genericarm64.wks.in | 11 +++++++ 5 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 meta-yocto-bsp/conf/machine/genericarm64.conf create mode 100644 meta-yocto-bsp/wic/genericarm64.wks.in
meta-poky/conf/templates/default/local.conf.sample +1 -0
@@ -31,6 +31,7 @@ # demonstration purposes: # #MACHINE ?= "beaglebone-yocto" +#MACHINE ?= "genericarm64" #MACHINE ?= "genericx86" #MACHINE ?= "genericx86-64" #
meta-yocto-bsp/README.hardware.md +17 -1
@@ -28,6 +28,7 @@ Hardware Reference Boards The following boards are supported by the meta-yocto-bsp layer: * Texas Instruments Beaglebone (beaglebone-yocto) + * General 64-bit Arm SystemReady platforms (genericarm64) * General IA platforms (genericx86 and genericx86-64) For more information see the board's section below. The appropriate MACHINE
@@ -55,7 +56,8 @@ Consumer Devices The following consumer devices are supported by the meta-yocto-bsp layer: - * Intel x86 based PCs and devices (genericx86) + * Arm-based SystemReady devices (genericarm64) + * Intel x86 based PCs and devices (genericx86 and genericx86-64) For more information see the device's section below. The appropriate MACHINE variable value corresponding to the device is given in brackets.
@@ -126,6 +128,20 @@ USB Device: dd command to write the image to a USB stick. +SystemReady Arm Platforms +========================= + +The genericarm64 MACHINE is designed to work on standard SystemReady IR/SR +compliant boards with preinstalled firmware. + +The genericarm64 MACHINE is currently tested on the following platforms: + + * Texas Instruments BeaglePlay (IR) + +The images built are EFI bootable disk images and can be written directly to a +SD card for booting, for example. + + Texas Instruments Beaglebone (beaglebone-yocto) ===============================================
meta-yocto-bsp/conf/machine/genericarm64.conf new file +31 -0
@@ -0,0 +1,31 @@ +#@TYPE: Machine +#@NAME: genericarm64 +#@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 + +# Arm Base System Architecture says v8.0+ is allowed, but FEAT_CRC32 is required +DEFAULTTUNE = "armv8a-crc" + +MACHINE_FEATURES = "acpi alsa bluetooth efi keyboard pci qemu-usermode rtc screen usbhost vfat wifi" + +KERNEL_IMAGETYPE = "Image" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" + +# 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-wlcommon 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 linux-firmware-rtl-nic" + +IMAGE_FSTYPES ?= "wic" +WKS_FILE ?= "genericarm64.wks.in" + +EFI_PROVIDER ?= "${@bb.utils.contains("DISTRO_FEATURES", "systemd", "systemd-boot", "grub-efi", d)}" + +# Try to bring up one physical serial console, or a virtualized serial console +SERIAL_CONSOLES ?= "115200;ttyAMA0 115200;hvc0"
meta-yocto-bsp/recipes-kernel/linux/linux-yocto_6.6.bbappend +5 -0
@@ -1,19 +1,24 @@ +KBRANCH:genericarm64 = "v6.6/standard/base" KBRANCH:genericx86 = "v6.6/standard/base" KBRANCH:genericx86-64 = "v6.6/standard/base" KBRANCH:beaglebone-yocto = "v6.6/standard/beaglebone" +KMACHINE:genericarm64 ?= "genericarm64" KMACHINE:genericx86 ?= "common-pc" KMACHINE:genericx86-64 ?= "common-pc-64" KMACHINE:beaglebone-yocto ?= "beaglebone" +SRCREV_machine:genericarm64 ?= "e064a7d658a30b027b999183e21cd37305caff2a" SRCREV_machine:genericx86 ?= "332d4668fcc32826907d4f3c4938845206006089" SRCREV_machine:genericx86-64 ?= "332d4668fcc32826907d4f3c4938845206006089" SRCREV_machine:beaglebone-yocto ?= "332d4668fcc32826907d4f3c4938845206006089" +COMPATIBLE_MACHINE:genericarm64 = "genericarm64" COMPATIBLE_MACHINE:genericx86 = "genericx86" COMPATIBLE_MACHINE:genericx86-64 = "genericx86-64" COMPATIBLE_MACHINE:beaglebone-yocto = "beaglebone-yocto" +LINUX_VERSION:genericarm64 = "6.6.18" LINUX_VERSION:genericx86 = "6.6.15" LINUX_VERSION:genericx86-64 = "6.6.15" LINUX_VERSION:beaglebone-yocto = "6.6.15"
meta-yocto-bsp/wic/genericarm64.wks.in new file +11 -0
@@ -0,0 +1,11 @@ +# short-description: Create an EFI disk image +# long-description: Creates a partitioned EFI disk image that the user +# can directly dd to boot media. + +part /boot --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER},initrd=${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES}" --label boot --active --align 1024 --use-uuid + +part swap --size 32 --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
Quoted 15 lines · Ross Burton
From: Ross Burton <[email protected]>
This is a new 64-bit "generic" Arm machine, that expects the hardware to be SystemReady compatible.
Signed-off-by Ross Burton <[email protected]>--- .../conf/templates/default/local.conf.sample | 1 + meta-yocto-bsp/README.hardware.md | 18 ++++++++++- meta-yocto-bsp/conf/machine/genericarm64.conf | 31 +++++++++++++++++++ .../linux/linux-yocto_6.6.bbappend | 5 +++ meta-yocto-bsp/wic/genericarm64.wks.in | 11 +++++++ 5 files changed, 65 insertions(+), 1 deletion(-)create mode 100644
meta-yocto-bsp/conf/machine/genericarm64.confcreate mode 100644 meta-yocto-bsp/wic/genericarm64.wks.in
...
Quoted 24 lines
meta-yocto-bsp/README.hardware.md +14
-0+SystemReady Arm Platforms +========================= + +The genericarm64 MACHINE is designed to work on standard SystemReady IR/SR +compliant boards with preinstalled firmware. + +The genericarm64 MACHINE is currently tested on the following platforms: + + * Texas Instruments BeaglePlay (IR) + +The images built are EFI bootable disk images and can be written directly to a +SD card for booting, for example. + + Texas Instruments Beaglebone (beaglebone-yocto) ===============================================meta-yocto-bsp/conf/machine/genericarm64.conf new file +1
-0@@ -0,0 +1,31 @@ +#@TYPE: Machine
meta-yocto-bsp/conf/machine/genericarm64.conf line 11
Quoted 10 lines
meta-yocto-bsp/conf/machine/genericarm64.conf new file +10
-0+#@NAME: genericarm64 +#@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 + +# Arm Base System Architecture says v8.0+ is allowed, but FEAT_CRC32 is required +DEFAULTTUNE = "armv8a-crc" + +MACHINE_FEATURES = "acpi alsa bluetooth efi keyboard pci qemu-usermode rtc screen usbhost vfat wifi"
SystemReady IR supports u-boot booting, as far as I'm aware, but this looks like it now requires (vs allows) EFI. Is this the case, or am I reading it wrong?
meta-yocto-bsp/conf/machine/genericarm64.conf line 23
Quoted 12 lines
meta-yocto-bsp/conf/machine/genericarm64.conf new file +12
-0+ +KERNEL_IMAGETYPE = "Image" +PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" + +# 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-wlcommon 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 linux-firmware-rtl-nic"
Is initramfs loading required? Or is this for a specific
Quoted 15 lines
meta-yocto-bsp/conf/machine/genericarm64.conf new file +8
-0+ +IMAGE_FSTYPES ?= "wic" +WKS_FILE ?= "genericarm64.wks.in" + +EFI_PROVIDER ?= "${@bb.utils.contains("DISTRO_FEATURES", "systemd", "systemd-boot", "grub-efi", d)}" + +# Try to bring up one physical serial console, or a virtualized serial console +SERIAL_CONSOLES ?= "115200;ttyAMA0 115200;hvc0"meta-yocto-bsp/wic/genericarm64.wks.in new file +0
-0
meta-yocto-bsp/wic/genericarm64.wks.in line 5
Quoted 5 lines
meta-yocto-bsp/wic/genericarm64.wks.in new file +5
-0@@ -0,0 +1,11 @@ +# short-description: Create an EFI disk image +# long-description: Creates a partitioned EFI disk image that the user +# can directly dd to boot media. + +part /boot --source bootimg-efi --sourceparams="loader=${EFI_PROVIDER},initrd=${INITRAMFS_IMAGE}-${MACHINE}.${INITRAMFS_FSTYPES}" --label boot --active --align 1024 --use-uuid
This makes me thing that the initrd IS required as is EFI.
Quoted 6 lines
meta-yocto-bsp/wic/genericarm64.wks.in new file +6
-0+ +part swap --size 32 --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"
Quoted 48 lines · Mark Hatle
Quoted 15 lines · Ross Burton
From: Ross Burton <[email protected]>
This is a new 64-bit "generic" Arm machine, that expects the hardware to be SystemReady compatible.
Signed-off-by Ross Burton <[email protected]>--- .../conf/templates/default/local.conf.sample | 1 + meta-yocto-bsp/README.hardware.md | 18 ++++++++++- meta-yocto-bsp/conf/machine/genericarm64.conf | 31 +++++++++++++++++++ .../linux/linux-yocto_6.6.bbappend | 5 +++ meta-yocto-bsp/wic/genericarm64.wks.in | 11 +++++++ 5 files changed, 65 insertions(+), 1 deletion(-)create mode 100644
meta-yocto-bsp/conf/machine/genericarm64.confcreate mode 100644 meta-yocto-bsp/wic/genericarm64.wks.in...
Quoted 29 lines
meta-yocto-bsp/README.hardware.md +14
-0+SystemReady Arm Platforms +========================= + +The genericarm64 MACHINE is designed to work on standard SystemReady IR/SR +compliant boards with preinstalled firmware. + +The genericarm64 MACHINE is currently tested on the following platforms: + + * Texas Instruments BeaglePlay (IR) + +The images built are EFI bootable disk images and can be written directly to a +SD card for booting, for example. + + Texas Instruments Beaglebone (beaglebone-yocto) ===============================================meta-yocto-bsp/conf/machine/genericarm64.conf new file +7
-0@@ -0,0 +1,31 @@ +#@TYPE: Machine +#@NAME: genericarm64 +#@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 +
Quoted 8 lines
meta-yocto-bsp/conf/machine/genericarm64.conf line 11
Quoted 4 lines
meta-yocto-bsp/conf/machine/genericarm64.conf new file +4
-0+# Arm Base System Architecture says v8.0+ is allowed, but FEAT_CRC32 is required +DEFAULTTUNE = "armv8a-crc" + +MACHINE_FEATURES = "acpi alsa bluetooth efi keyboard pci qemu-usermode rtc screen usbhost vfat wifi"SystemReady IR supports u-boot booting, as far as I'm aware, but this looks like it now requires (vs allows) EFI. Is this the case, or am I reading it wrong?
IR supports U-Boot because U-Boot does (a subset of) UEFI.
As a tangent, ES is a harder ask for us but not out of the question.
Signature · 1 line
Tom
Quoted 6 lines · On Thu, Feb 29, 2024 at 04:24:40PM +0000, [email protected] wrote:
From: Ross Burton <[email protected]>
This is a new 64-bit "generic" Arm machine, that expects the hardware to be SystemReady compatible.
Signed-off-by Ross Burton <[email protected]>
Looking good, just a few consistency things:
[snip]
Quoted 1 line
+The genericarm64 MACHINE is designed to work on standard SystemReady IR/SR
[snip]
Quoted 1 line
+#@DESCRIPTION: Generic Arm64 machine for typical SystemReady IR/ES platforms, which
Probably should just say IR/ES/SR in both cases?
Signature · 1 line
Tom