1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-31 12:49:46 +00:00

bsp-guide: bsp.rst: update beaglebone example

(From yocto-docs rev: 8fb31b507c37d2c11e9dc98559bd7d145e1dce04)

Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Michael Opdenacker
2023-11-03 15:20:38 +01:00
committed by Richard Purdie
parent c329d14347
commit 73d64902fd
+35 -28
View File
@@ -1234,21 +1234,18 @@ There are one or more machine configuration files in the
For example, the machine configuration file for the `BeagleBone and For example, the machine configuration file for the `BeagleBone and
BeagleBone Black development boards <https://beagleboard.org/bone>`__ is BeagleBone Black development boards <https://beagleboard.org/bone>`__ is
located in the layer ``poky/meta-yocto-bsp/conf/machine`` and is named located in :yocto_git:`poky/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf
``beaglebone-yocto.conf``:: </poky/tree/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf>`::
#@TYPE: Machine #@TYPE: Machine
#@NAME: Beaglebone-yocto machine #@NAME: Beaglebone-yocto machine
#@DESCRIPTION: Reference machine configuration for http://beagleboard.org/bone and http://beagleboard.org/black boards #@DESCRIPTION: Reference machine configuration for http://beagleboard.org/bone and http://beagleboard.org/black boards
PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg"
XSERVER ?= "xserver-xorg \
xf86-video-modesetting \
"
MACHINE_EXTRA_RRECOMMENDS = "kernel-modules kernel-devicetree" MACHINE_EXTRA_RRECOMMENDS = "kernel-modules kernel-devicetree"
EXTRA_IMAGEDEPENDS += "u-boot" EXTRA_IMAGEDEPENDS += "virtual/bootloader"
DEFAULTTUNE ?= "cortexa8hf-neon" DEFAULTTUNE ?= "cortexa8hf-neon"
include conf/machine/include/arm/armv7a/tune-cortexa8.inc include conf/machine/include/arm/armv7a/tune-cortexa8.inc
@@ -1256,19 +1253,20 @@ located in the layer ``poky/meta-yocto-bsp/conf/machine`` and is named
IMAGE_FSTYPES += "tar.bz2 jffs2 wic wic.bmap" IMAGE_FSTYPES += "tar.bz2 jffs2 wic wic.bmap"
EXTRA_IMAGECMD:jffs2 = "-lnp " EXTRA_IMAGECMD:jffs2 = "-lnp "
WKS_FILE ?= "beaglebone-yocto.wks" WKS_FILE ?= "beaglebone-yocto.wks"
IMAGE_INSTALL:append = " kernel-devicetree kernel-image-zimage" MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-image kernel-devicetree"
do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot" do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot virtual/bootloader:do_deploy"
SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyO0" SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyO0 115200;ttyAMA0"
SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}"
PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
PREFERRED_VERSION_linux-yocto ?= "5.0%" PREFERRED_VERSION_linux-yocto ?= "6.1%"
KERNEL_IMAGETYPE = "zImage" KERNEL_IMAGETYPE = "zImage"
KERNEL_DEVICETREE = "am335x-bone.dtb am335x-boneblack.dtb am335x-bonegreen.dtb" KERNEL_DEVICETREE = "am335x-bone.dtb am335x-boneblack.dtb am335x-bonegreen.dtb"
KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot"
SPL_BINARY = "MLO" SPL_BINARY = "MLO"
UBOOT_SUFFIX = "img" UBOOT_SUFFIX = "img"
UBOOT_MACHINE = "am335x_evm_defconfig" UBOOT_MACHINE = "am335x_evm_defconfig"
@@ -1277,7 +1275,24 @@ located in the layer ``poky/meta-yocto-bsp/conf/machine`` and is named
MACHINE_FEATURES = "usbgadget usbhost vfat alsa" MACHINE_FEATURES = "usbgadget usbhost vfat alsa"
IMAGE_BOOT_FILES ?= "u-boot.${UBOOT_SUFFIX} MLO zImage am335x-bone.dtb am335x-boneblack.dtb am335x-bonegreen.dtb" IMAGE_BOOT_FILES ?= "u-boot.${UBOOT_SUFFIX} ${SPL_BINARY} ${KERNEL_IMAGETYPE} ${KERNEL_DEVICETREE}"
# support runqemu
EXTRA_IMAGEDEPENDS += "qemu-native qemu-helper-native"
IMAGE_CLASSES += "qemuboot"
QB_DEFAULT_FSTYPE = "wic"
QB_FSINFO = "wic:no-kernel-in-fs"
QB_KERNEL_ROOT = "/dev/vda2"
QB_SYSTEM_NAME = "qemu-system-arm"
QB_MACHINE = "-machine virt"
QB_CPU = "-cpu cortex-a15"
QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0 systemd.mask=systemd-networkd"
QB_OPT_APPEND = "-device virtio-rng-device"
QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no"
QB_NETWORK_DEVICE = "-device virtio-net-device,netdev=net0,mac=@MAC@"
QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0"
QB_SERIAL_OPT = ""
QB_TCPSERIAL_OPT = "-device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon"
The variables used to configure the machine define machine-specific properties; for The variables used to configure the machine define machine-specific properties; for
example, machine-dependent packages, machine tunings, the type of kernel example, machine-dependent packages, machine tunings, the type of kernel
@@ -1297,11 +1312,6 @@ Project Reference Manual.
"virtual/xserver" is "xserver-xorg", available in "virtual/xserver" is "xserver-xorg", available in
``poky/meta/recipes-graphics/xorg-xserver``. ``poky/meta/recipes-graphics/xorg-xserver``.
- :term:`XSERVER`: The packages that
should be installed to provide an X server and drivers for the
machine. In this example, the "xserver-xorg" and
"xf86-video-modesetting" are installed.
- :term:`MACHINE_EXTRA_RRECOMMENDS`: - :term:`MACHINE_EXTRA_RRECOMMENDS`:
A list of machine-dependent packages not essential for booting the A list of machine-dependent packages not essential for booting the
image. Thus, the build does not fail if the packages do not exist. image. Thus, the build does not fail if the packages do not exist.
@@ -1319,12 +1329,15 @@ Project Reference Manual.
needed in the root filesystem. In this case, the U-Boot recipe must needed in the root filesystem. In this case, the U-Boot recipe must
be built for the image. be built for the image.
At the end of the file, we also use this setings to implement
``runqemu`` support on the host machine.
- :term:`DEFAULTTUNE`: Machines - :term:`DEFAULTTUNE`: Machines
use tunings to optimize machine, CPU, and application performance. use tunings to optimize machine, CPU, and application performance.
These features, which are collectively known as "tuning features", These features, which are collectively known as "tuning features",
are set in the :term:`OpenEmbedded-Core (OE-Core)` layer (e.g. are set in the :term:`OpenEmbedded-Core (OE-Core)` layer. In this
``poky/meta/conf/machine/include``). In this example, the default example, the default tuning file is :oe_git:`tune-cortexa8
tuning file is ``cortexa8hf-neon``. </openembedded-core/tree/meta/conf/machine/include/arm/armv7a/tune-cortexa8.inc>`.
.. note:: .. note::
@@ -1344,13 +1357,7 @@ Project Reference Manual.
- :term:`WKS_FILE`: The location of - :term:`WKS_FILE`: The location of
the :ref:`Wic kickstart <ref-manual/kickstart:openembedded kickstart (\`\`.wks\`\`) reference>` file used the :ref:`Wic kickstart <ref-manual/kickstart:openembedded kickstart (\`\`.wks\`\`) reference>` file used
by the OpenEmbedded build system to create a partitioned image by the OpenEmbedded build system to create a partitioned image.
(image.wic).
- :term:`IMAGE_INSTALL`:
Specifies packages to install into an image through the
:ref:`ref-classes-image` class. Recipes
use the :term:`IMAGE_INSTALL` variable.
- ``do_image_wic[depends]``: A task that is constructed during the - ``do_image_wic[depends]``: A task that is constructed during the
build. In this example, the task depends on specific tools in order build. In this example, the task depends on specific tools in order
@@ -1368,7 +1375,7 @@ Project Reference Manual.
- :term:`PREFERRED_VERSION_linux-yocto <PREFERRED_VERSION>`: - :term:`PREFERRED_VERSION_linux-yocto <PREFERRED_VERSION>`:
Defines the version of the recipe used to build the kernel, which is Defines the version of the recipe used to build the kernel, which is
"5.0" in this case. "6.1" in this case.
- :term:`KERNEL_IMAGETYPE`: - :term:`KERNEL_IMAGETYPE`:
The type of kernel to build for the device. In this case, the The type of kernel to build for the device. In this case, the