diff options
Diffstat (limited to 'poky/documentation/bsp-guide/bsp.rst')
-rw-r--r-- | poky/documentation/bsp-guide/bsp.rst | 117 |
1 files changed, 52 insertions, 65 deletions
diff --git a/poky/documentation/bsp-guide/bsp.rst b/poky/documentation/bsp-guide/bsp.rst index c78fbeb68f..f92b1177b7 100644 --- a/poky/documentation/bsp-guide/bsp.rst +++ b/poky/documentation/bsp-guide/bsp.rst @@ -64,8 +64,8 @@ Here is an example that clones the Raspberry Pi BSP layer:: In addition to BSP layers, the ``meta-yocto-bsp`` layer is part of the shipped ``poky`` repository. The ``meta-yocto-bsp`` layer maintains -several "reference" BSPs including the ARM-based Beaglebone, MIPS-based -EdgeRouter, and generic versions of both 32-bit and 64-bit IA machines. +several "reference" BSPs including the ARM-based Beaglebone and generic +versions of both 32-bit and 64-bit IA machines. For information on typical BSP development workflow, see the :ref:`bsp-guide/bsp:developing a board support package (bsp)` @@ -764,29 +764,13 @@ workflow. .. note:: - - There are four hardware reference BSPs in the Yocto + - There are three hardware reference BSPs in the Yocto Project release, located in the ``poky/meta-yocto-bsp`` BSP layer: - Texas Instruments Beaglebone (``beaglebone-yocto``) - - Ubiquiti Networks EdgeRouter Lite (``edgerouter``) - - - Two general IA platforms (``genericx86`` and ``genericx86-64``) - - - There are three core Intel BSPs in the Yocto Project - release, in the ``meta-intel`` layer: - - - ``intel-core2-32``, which is a BSP optimized for the Core2 - family of CPUs as well as all CPUs prior to the Silvermont - core. - - - ``intel-corei7-64``, which is a BSP optimized for Nehalem - and later Core and Xeon CPUs as well as Silvermont and later - Atom CPUs, such as the Baytrail SoCs. - - - ``intel-quark``, which is a BSP optimized for the Intel - Galileo gen1 & gen2 development boards. + - Two generic IA platforms (``genericx86`` and ``genericx86-64``) When you set up a layer for a new BSP, you should follow a standard layout. This layout is described in the ":ref:`bsp-guide/bsp:example filesystem layout`" @@ -1194,7 +1178,7 @@ Use these steps to create a BSP layer: - *Create a Kernel Recipe:* Create a kernel recipe in ``recipes-kernel/linux`` by either using a kernel append file or a - new custom kernel recipe file (e.g. ``yocto-linux_4.12.bb``). The BSP + new custom kernel recipe file (e.g. ``linux-yocto_4.12.bb``). The BSP layers mentioned in the previous step also contain different kernel examples. See the ":ref:`kernel-dev/common:modifying an existing recipe`" section in the Yocto Project Linux Kernel Development Manual for @@ -1250,21 +1234,18 @@ There are one or more machine configuration files in the For example, the machine configuration file for the `BeagleBone and BeagleBone Black development boards <https://beagleboard.org/bone>`__ is -located in the layer ``poky/meta-yocto-bsp/conf/machine`` and is named -``beaglebone-yocto.conf``:: +located in :yocto_git:`poky/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf +</poky/tree/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf>`:: #@TYPE: Machine #@NAME: Beaglebone-yocto machine #@DESCRIPTION: Reference machine configuration for http://beagleboard.org/bone and http://beagleboard.org/black boards PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" - XSERVER ?= "xserver-xorg \ - xf86-video-modesetting \ - " MACHINE_EXTRA_RRECOMMENDS = "kernel-modules kernel-devicetree" - EXTRA_IMAGEDEPENDS += "u-boot" + EXTRA_IMAGEDEPENDS += "virtual/bootloader" DEFAULTTUNE ?= "cortexa8hf-neon" include conf/machine/include/arm/armv7a/tune-cortexa8.inc @@ -1272,19 +1253,20 @@ located in the layer ``poky/meta-yocto-bsp/conf/machine`` and is named IMAGE_FSTYPES += "tar.bz2 jffs2 wic wic.bmap" EXTRA_IMAGECMD:jffs2 = "-lnp " WKS_FILE ?= "beaglebone-yocto.wks" - IMAGE_INSTALL:append = " kernel-devicetree kernel-image-zimage" - do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot" + MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-image kernel-devicetree" + 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_CHECK = "${SERIAL_CONSOLES}" + SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyO0 115200;ttyAMA0" PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" - PREFERRED_VERSION_linux-yocto ?= "5.0%" + PREFERRED_VERSION_linux-yocto ?= "6.1%" KERNEL_IMAGETYPE = "zImage" KERNEL_DEVICETREE = "am335x-bone.dtb am335x-boneblack.dtb am335x-bonegreen.dtb" KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" + PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot" + SPL_BINARY = "MLO" UBOOT_SUFFIX = "img" UBOOT_MACHINE = "am335x_evm_defconfig" @@ -1293,7 +1275,24 @@ located in the layer ``poky/meta-yocto-bsp/conf/machine`` and is named 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 example, machine-dependent packages, machine tunings, the type of kernel @@ -1313,11 +1312,6 @@ Project Reference Manual. "virtual/xserver" is "xserver-xorg", available in ``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`: A list of machine-dependent packages not essential for booting the image. Thus, the build does not fail if the packages do not exist. @@ -1335,12 +1329,15 @@ Project Reference Manual. needed in the root filesystem. In this case, the U-Boot recipe must 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 use tunings to optimize machine, CPU, and application performance. These features, which are collectively known as "tuning features", - are set in the :term:`OpenEmbedded-Core (OE-Core)` layer (e.g. - ``poky/meta/conf/machine/include``). In this example, the default - tuning file is ``cortexa8hf-neon``. + are set in the :term:`OpenEmbedded-Core (OE-Core)` layer. In this + example, the default tuning file is :oe_git:`tune-cortexa8 + </openembedded-core/tree/meta/conf/machine/include/arm/armv7a/tune-cortexa8.inc>`. .. note:: @@ -1360,13 +1357,7 @@ Project Reference Manual. - :term:`WKS_FILE`: The location of the :ref:`Wic kickstart <ref-manual/kickstart:openembedded kickstart (\`\`.wks\`\`) reference>` file used - 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. + by the OpenEmbedded build system to create a partitioned image. - ``do_image_wic[depends]``: A task that is constructed during the build. In this example, the task depends on specific tools in order @@ -1384,7 +1375,7 @@ Project Reference Manual. - :term:`PREFERRED_VERSION_linux-yocto <PREFERRED_VERSION>`: 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`: The type of kernel to build for the device. In this case, the @@ -1449,39 +1440,35 @@ The kernel recipe used to build the kernel image for the BeagleBone device was established in the machine configuration:: PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" - PREFERRED_VERSION_linux-yocto ?= "5.0%" + PREFERRED_VERSION_linux-yocto ?= "6.1%" The ``meta-yocto-bsp/recipes-kernel/linux`` directory in the layer contains metadata used to build the kernel. In this case, a kernel append file -(i.e. ``linux-yocto_5.0.bbappend``) is used to override an established -kernel recipe (i.e. ``linux-yocto_5.0.bb``), which is located in +(i.e. ``linux-yocto_6.1.bbappend``) is used to override an established +kernel recipe (i.e. ``linux-yocto_6.1.bb``), which is located in :yocto_git:`/poky/tree/meta/recipes-kernel/linux`. Following is the contents of the append file:: - KBRANCH:genericx86 = "v5.0/standard/base" - KBRANCH:genericx86-64 = "v5.0/standard/base" - KBRANCH:edgerouter = "v5.0/standard/edgerouter" - KBRANCH:beaglebone-yocto = "v5.0/standard/beaglebone" + KBRANCH:genericx86 = "v6.1/standard/base" + KBRANCH:genericx86-64 = "v6.1/standard/base" + KBRANCH:beaglebone-yocto = "v6.1/standard/beaglebone" KMACHINE:genericx86 ?= "common-pc" KMACHINE:genericx86-64 ?= "common-pc-64" KMACHINE:beaglebone-yocto ?= "beaglebone" - SRCREV_machine:genericx86 ?= "3df4aae6074e94e794e27fe7f17451d9353cdf3d" - SRCREV_machine:genericx86-64 ?= "3df4aae6074e94e794e27fe7f17451d9353cdf3d" - SRCREV_machine:edgerouter ?= "3df4aae6074e94e794e27fe7f17451d9353cdf3d" - SRCREV_machine:beaglebone-yocto ?= "3df4aae6074e94e794e27fe7f17451d9353cdf3d" + SRCREV_machine:genericx86 ?= "6ec439b4b456ce929c4c07fe457b5d6a4b468e86" + SRCREV_machine:genericx86-64 ?= "6ec439b4b456ce929c4c07fe457b5d6a4b468e86" + SRCREV_machine:beaglebone-yocto ?= "423e1996694b61fbfc8ec3bf062fc6461d64fde1" COMPATIBLE_MACHINE:genericx86 = "genericx86" COMPATIBLE_MACHINE:genericx86-64 = "genericx86-64" - COMPATIBLE_MACHINE:edgerouter = "edgerouter" COMPATIBLE_MACHINE:beaglebone-yocto = "beaglebone-yocto" - LINUX_VERSION:genericx86 = "5.0.3" - LINUX_VERSION:genericx86-64 = "5.0.3" - LINUX_VERSION:edgerouter = "5.0.3" - LINUX_VERSION:beaglebone-yocto = "5.0.3" + LINUX_VERSION:genericx86 = "6.1.30" + LINUX_VERSION:genericx86-64 = "6.1.30" + LINUX_VERSION:beaglebone-yocto = "6.1.20" This particular append file works for all the machines that are part of the ``meta-yocto-bsp`` layer. The relevant statements are |