From ec3d872d28c8470787650632f456ae3fb43dbd5b Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Fri, 10 Nov 2023 17:19:14 +0000 Subject: Add genericarm64 MACHINE This is a new 64-bit "generic" Arm machine, that expects the hardware to be SystemReady IR compatible. Signed-off-by: Ross Burton --- meta-yocto-bsp/README.hardware.md | 7 ++++++ meta-yocto-bsp/conf/machine/genericarm64.conf | 26 ++++++++++++++++++++++ .../recipes-kernel/linux/linux-yocto_6.6.bbappend | 9 ++++++++ meta-yocto-bsp/wic/genericarm64.wks.in | 11 +++++++++ 4 files changed, 53 insertions(+) create mode 100644 meta-yocto-bsp/conf/machine/genericarm64.conf create mode 100644 meta-yocto-bsp/wic/genericarm64.wks.in diff --git a/meta-yocto-bsp/README.hardware.md b/meta-yocto-bsp/README.hardware.md index a8f38cb21a..58ebc328b5 100644 --- a/meta-yocto-bsp/README.hardware.md +++ b/meta-yocto-bsp/README.hardware.md @@ -29,6 +29,7 @@ The following boards are supported by the meta-yocto-bsp layer: * Texas Instruments Beaglebone (beaglebone-yocto) * General IA platforms (genericx86 and genericx86-64) + * General 64-bit Arm SystemReady platforms (genericarm64) For more information see the board's section below. The appropriate MACHINE variable value corresponding to the board is given in brackets. @@ -126,6 +127,12 @@ USB Device: dd command to write the image to a USB stick. +SystemReady Arm Platforms +========================= + +TODO + + Texas Instruments Beaglebone (beaglebone-yocto) =============================================== diff --git a/meta-yocto-bsp/conf/machine/genericarm64.conf b/meta-yocto-bsp/conf/machine/genericarm64.conf new file mode 100644 index 0000000000..2ea270d8b0 --- /dev/null +++ b/meta-yocto-bsp/conf/machine/genericarm64.conf @@ -0,0 +1,26 @@ +#@TYPE: Machine +#@NAME: genericarm64 +#@DESCRIPTION: Generic Arm64 machine for typical SystemReady 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" + +# 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" +INITRAMFS_IMAGE ?= "core-image-initramfs-boot" + +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" diff --git a/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_6.6.bbappend b/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_6.6.bbappend index 8e465c241e..18f95de348 100644 --- a/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_6.6.bbappend +++ b/meta-yocto-bsp/recipes-kernel/linux/linux-yocto_6.6.bbappend @@ -1,19 +1,28 @@ KBRANCH:genericx86 = "v6.6/standard/base" +KBRANCH:genericarm64 = "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 ?= "332d4668fcc32826907d4f3c4938845206006089" 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.15" LINUX_VERSION:genericx86 = "6.6.15" LINUX_VERSION:genericx86-64 = "6.6.15" LINUX_VERSION:beaglebone-yocto = "6.6.15" + +# Use upstream defconfig for genericarm64 +KBUILD_DEFCONFIG:genericarm64 = "defconfig" +KCONFIG_MODE:genericarm64 = "--alldefconfig" diff --git a/meta-yocto-bsp/wic/genericarm64.wks.in b/meta-yocto-bsp/wic/genericarm64.wks.in new file mode 100644 index 0000000000..417d4d8810 --- /dev/null +++ b/meta-yocto-bsp/wic/genericarm64.wks.in @@ -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 / --source rootfs --fstype=ext4 --label root --align 1024 --use-uuid + +part swap --size 44 --label swap --fstype=swap --use-uuid + +bootloader --ptable gpt --timeout=5 --append="rootwait rootfstype=ext4" -- cgit v1.2.3-54-g00ecf