diff options
author | Michael Opdenacker <michael.opdenacker@bootlin.com> | 2023-11-03 15:20:38 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-11-06 22:52:27 +0000 |
commit | 1b37c60493bf05327b1ee831062c5cc0859c8c5a (patch) | |
tree | 00137a6b3bcfde256ea70e8f7986bebf69f322c5 /documentation | |
parent | 5abd1e19451e21e59b64538d1a9ccf9fd46eba40 (diff) | |
download | poky-1b37c60493bf05327b1ee831062c5cc0859c8c5a.tar.gz |
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>
Diffstat (limited to 'documentation')
-rw-r--r-- | documentation/bsp-guide/bsp.rst | 63 |
1 files changed, 35 insertions, 28 deletions
diff --git a/documentation/bsp-guide/bsp.rst b/documentation/bsp-guide/bsp.rst index 4b40d886a7..f92b1177b7 100644 --- a/documentation/bsp-guide/bsp.rst +++ b/documentation/bsp-guide/bsp.rst | |||
@@ -1234,21 +1234,18 @@ There are one or more machine configuration files in the | |||
1234 | 1234 | ||
1235 | For example, the machine configuration file for the `BeagleBone and | 1235 | For example, the machine configuration file for the `BeagleBone and |
1236 | BeagleBone Black development boards <https://beagleboard.org/bone>`__ is | 1236 | BeagleBone Black development boards <https://beagleboard.org/bone>`__ is |
1237 | located in the layer ``poky/meta-yocto-bsp/conf/machine`` and is named | 1237 | located in :yocto_git:`poky/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf |
1238 | ``beaglebone-yocto.conf``:: | 1238 | </poky/tree/meta-yocto-bsp/conf/machine/beaglebone-yocto.conf>`:: |
1239 | 1239 | ||
1240 | #@TYPE: Machine | 1240 | #@TYPE: Machine |
1241 | #@NAME: Beaglebone-yocto machine | 1241 | #@NAME: Beaglebone-yocto machine |
1242 | #@DESCRIPTION: Reference machine configuration for http://beagleboard.org/bone and http://beagleboard.org/black boards | 1242 | #@DESCRIPTION: Reference machine configuration for http://beagleboard.org/bone and http://beagleboard.org/black boards |
1243 | 1243 | ||
1244 | PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" | 1244 | PREFERRED_PROVIDER_virtual/xserver ?= "xserver-xorg" |
1245 | XSERVER ?= "xserver-xorg \ | ||
1246 | xf86-video-modesetting \ | ||
1247 | " | ||
1248 | 1245 | ||
1249 | MACHINE_EXTRA_RRECOMMENDS = "kernel-modules kernel-devicetree" | 1246 | MACHINE_EXTRA_RRECOMMENDS = "kernel-modules kernel-devicetree" |
1250 | 1247 | ||
1251 | EXTRA_IMAGEDEPENDS += "u-boot" | 1248 | EXTRA_IMAGEDEPENDS += "virtual/bootloader" |
1252 | 1249 | ||
1253 | DEFAULTTUNE ?= "cortexa8hf-neon" | 1250 | DEFAULTTUNE ?= "cortexa8hf-neon" |
1254 | include conf/machine/include/arm/armv7a/tune-cortexa8.inc | 1251 | 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 | |||
1256 | IMAGE_FSTYPES += "tar.bz2 jffs2 wic wic.bmap" | 1253 | IMAGE_FSTYPES += "tar.bz2 jffs2 wic wic.bmap" |
1257 | EXTRA_IMAGECMD:jffs2 = "-lnp " | 1254 | EXTRA_IMAGECMD:jffs2 = "-lnp " |
1258 | WKS_FILE ?= "beaglebone-yocto.wks" | 1255 | WKS_FILE ?= "beaglebone-yocto.wks" |
1259 | IMAGE_INSTALL:append = " kernel-devicetree kernel-image-zimage" | 1256 | MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "kernel-image kernel-devicetree" |
1260 | do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot" | 1257 | do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot virtual/bootloader:do_deploy" |
1261 | 1258 | ||
1262 | SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyO0" | 1259 | SERIAL_CONSOLES ?= "115200;ttyS0 115200;ttyO0 115200;ttyAMA0" |
1263 | SERIAL_CONSOLES_CHECK = "${SERIAL_CONSOLES}" | ||
1264 | 1260 | ||
1265 | PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" | 1261 | PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" |
1266 | PREFERRED_VERSION_linux-yocto ?= "5.0%" | 1262 | PREFERRED_VERSION_linux-yocto ?= "6.1%" |
1267 | 1263 | ||
1268 | KERNEL_IMAGETYPE = "zImage" | 1264 | KERNEL_IMAGETYPE = "zImage" |
1269 | KERNEL_DEVICETREE = "am335x-bone.dtb am335x-boneblack.dtb am335x-bonegreen.dtb" | 1265 | KERNEL_DEVICETREE = "am335x-bone.dtb am335x-boneblack.dtb am335x-bonegreen.dtb" |
1270 | KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" | 1266 | KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}" |
1271 | 1267 | ||
1268 | PREFERRED_PROVIDER_virtual/bootloader ?= "u-boot" | ||
1269 | |||
1272 | SPL_BINARY = "MLO" | 1270 | SPL_BINARY = "MLO" |
1273 | UBOOT_SUFFIX = "img" | 1271 | UBOOT_SUFFIX = "img" |
1274 | UBOOT_MACHINE = "am335x_evm_defconfig" | 1272 | UBOOT_MACHINE = "am335x_evm_defconfig" |
@@ -1277,7 +1275,24 @@ located in the layer ``poky/meta-yocto-bsp/conf/machine`` and is named | |||
1277 | 1275 | ||
1278 | MACHINE_FEATURES = "usbgadget usbhost vfat alsa" | 1276 | MACHINE_FEATURES = "usbgadget usbhost vfat alsa" |
1279 | 1277 | ||
1280 | IMAGE_BOOT_FILES ?= "u-boot.${UBOOT_SUFFIX} MLO zImage am335x-bone.dtb am335x-boneblack.dtb am335x-bonegreen.dtb" | 1278 | IMAGE_BOOT_FILES ?= "u-boot.${UBOOT_SUFFIX} ${SPL_BINARY} ${KERNEL_IMAGETYPE} ${KERNEL_DEVICETREE}" |
1279 | |||
1280 | # support runqemu | ||
1281 | EXTRA_IMAGEDEPENDS += "qemu-native qemu-helper-native" | ||
1282 | IMAGE_CLASSES += "qemuboot" | ||
1283 | QB_DEFAULT_FSTYPE = "wic" | ||
1284 | QB_FSINFO = "wic:no-kernel-in-fs" | ||
1285 | QB_KERNEL_ROOT = "/dev/vda2" | ||
1286 | QB_SYSTEM_NAME = "qemu-system-arm" | ||
1287 | QB_MACHINE = "-machine virt" | ||
1288 | QB_CPU = "-cpu cortex-a15" | ||
1289 | QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0 systemd.mask=systemd-networkd" | ||
1290 | QB_OPT_APPEND = "-device virtio-rng-device" | ||
1291 | QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no" | ||
1292 | QB_NETWORK_DEVICE = "-device virtio-net-device,netdev=net0,mac=@MAC@" | ||
1293 | QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device virtio-blk-device,drive=disk0" | ||
1294 | QB_SERIAL_OPT = "" | ||
1295 | QB_TCPSERIAL_OPT = "-device virtio-serial-device -chardev socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon" | ||
1281 | 1296 | ||
1282 | The variables used to configure the machine define machine-specific properties; for | 1297 | The variables used to configure the machine define machine-specific properties; for |
1283 | example, machine-dependent packages, machine tunings, the type of kernel | 1298 | example, machine-dependent packages, machine tunings, the type of kernel |
@@ -1297,11 +1312,6 @@ Project Reference Manual. | |||
1297 | "virtual/xserver" is "xserver-xorg", available in | 1312 | "virtual/xserver" is "xserver-xorg", available in |
1298 | ``poky/meta/recipes-graphics/xorg-xserver``. | 1313 | ``poky/meta/recipes-graphics/xorg-xserver``. |
1299 | 1314 | ||
1300 | - :term:`XSERVER`: The packages that | ||
1301 | should be installed to provide an X server and drivers for the | ||
1302 | machine. In this example, the "xserver-xorg" and | ||
1303 | "xf86-video-modesetting" are installed. | ||
1304 | |||
1305 | - :term:`MACHINE_EXTRA_RRECOMMENDS`: | 1315 | - :term:`MACHINE_EXTRA_RRECOMMENDS`: |
1306 | A list of machine-dependent packages not essential for booting the | 1316 | A list of machine-dependent packages not essential for booting the |
1307 | image. Thus, the build does not fail if the packages do not exist. | 1317 | image. Thus, the build does not fail if the packages do not exist. |
@@ -1319,12 +1329,15 @@ Project Reference Manual. | |||
1319 | needed in the root filesystem. In this case, the U-Boot recipe must | 1329 | needed in the root filesystem. In this case, the U-Boot recipe must |
1320 | be built for the image. | 1330 | be built for the image. |
1321 | 1331 | ||
1332 | At the end of the file, we also use this setings to implement | ||
1333 | ``runqemu`` support on the host machine. | ||
1334 | |||
1322 | - :term:`DEFAULTTUNE`: Machines | 1335 | - :term:`DEFAULTTUNE`: Machines |
1323 | use tunings to optimize machine, CPU, and application performance. | 1336 | use tunings to optimize machine, CPU, and application performance. |
1324 | These features, which are collectively known as "tuning features", | 1337 | These features, which are collectively known as "tuning features", |
1325 | are set in the :term:`OpenEmbedded-Core (OE-Core)` layer (e.g. | 1338 | are set in the :term:`OpenEmbedded-Core (OE-Core)` layer. In this |
1326 | ``poky/meta/conf/machine/include``). In this example, the default | 1339 | example, the default tuning file is :oe_git:`tune-cortexa8 |
1327 | tuning file is ``cortexa8hf-neon``. | 1340 | </openembedded-core/tree/meta/conf/machine/include/arm/armv7a/tune-cortexa8.inc>`. |
1328 | 1341 | ||
1329 | .. note:: | 1342 | .. note:: |
1330 | 1343 | ||
@@ -1344,13 +1357,7 @@ Project Reference Manual. | |||
1344 | 1357 | ||
1345 | - :term:`WKS_FILE`: The location of | 1358 | - :term:`WKS_FILE`: The location of |
1346 | the :ref:`Wic kickstart <ref-manual/kickstart:openembedded kickstart (\`\`.wks\`\`) reference>` file used | 1359 | the :ref:`Wic kickstart <ref-manual/kickstart:openembedded kickstart (\`\`.wks\`\`) reference>` file used |
1347 | by the OpenEmbedded build system to create a partitioned image | 1360 | by the OpenEmbedded build system to create a partitioned image. |
1348 | (image.wic). | ||
1349 | |||
1350 | - :term:`IMAGE_INSTALL`: | ||
1351 | Specifies packages to install into an image through the | ||
1352 | :ref:`ref-classes-image` class. Recipes | ||
1353 | use the :term:`IMAGE_INSTALL` variable. | ||
1354 | 1361 | ||
1355 | - ``do_image_wic[depends]``: A task that is constructed during the | 1362 | - ``do_image_wic[depends]``: A task that is constructed during the |
1356 | build. In this example, the task depends on specific tools in order | 1363 | build. In this example, the task depends on specific tools in order |
@@ -1368,7 +1375,7 @@ Project Reference Manual. | |||
1368 | 1375 | ||
1369 | - :term:`PREFERRED_VERSION_linux-yocto <PREFERRED_VERSION>`: | 1376 | - :term:`PREFERRED_VERSION_linux-yocto <PREFERRED_VERSION>`: |
1370 | Defines the version of the recipe used to build the kernel, which is | 1377 | Defines the version of the recipe used to build the kernel, which is |
1371 | "5.0" in this case. | 1378 | "6.1" in this case. |
1372 | 1379 | ||
1373 | - :term:`KERNEL_IMAGETYPE`: | 1380 | - :term:`KERNEL_IMAGETYPE`: |
1374 | The type of kernel to build for the device. In this case, the | 1381 | The type of kernel to build for the device. In this case, the |