Bsp linux что это такое

Глава 3, Пакет поддержки платформы

BSP или «Board Support Package, Пакет Поддержки Платформы» это набор программного обеспечения, используемого для инициализации на плате аппаратных устройств и реализации относящихся к данной плате процедур, которые могут быть использованы ядром, а также драйверами устройств. BSP, таким образом, представляет собой уровень абстрагирования оборудования, присоединяющий оборудование к ОС, скрывая детали, относящиеся к процессору и плате. BSP скрывает относящиеся к плате и процессору детали от остальной части ОС, поэтому перенос драйверов между разными платами и процессорами становится чрезвычайно простым. Ещё одним термином, который часто используется вместо BSP, является Hardware Abstraction Layer, Уровень Абстрагирования Оборудования, или HAL. У пользователей UNIX более известным является HAL, в то время как сообщество разработчиков RTOS чаще использует BSP, особенно те, кто используют VxWorks. BSP имеет два компонента:

1. Поддержку микропроцессора: Linux имеет широкую поддержку всех ведущих процессоров на рынке встраиваемых систем, таких как MIPS, ARM, и вскоре ожидается PowerPC.

2. Процедуры, относящиеся к плате: типичный HAL для оборудования платы будет включать в себя:

a. Поддержку загрузчика

b. Поддержку карты памяти

c. Системные таймеры

d. Поддержку контроллера прерываний

e. Часы реального времени, Real-Time Clock (RTC)

f. Поддержку последовательных устройств (для отладки и консоли)

g. Поддержку шины (PCI/ISA)

h. Поддержку DMA

i. Управление питанием

В этой главе не рассматривается перенос Linux на какой-либо микропроцессор или микроконтроллер, потому что это огромная тема сама по себе; переносу Linux на разные процессоры и микроконтроллеры должна быть посвящена отдельная книга. Вернее, эта книга предполагает, что читатель имеет плату на основе одного из уже поддерживаемых процессоров. Так что она целиком посвящена вопросам, относящимся к плате. Для прояснения терминологии, мы ссылаемся на HAL, как на уровень, который сочетает в себе программное обеспечение, относящееся к плате и процессору, а на BSP, как на уровень, который имеет только код, относящийся к данной плате. Поэтому, когда мы говорим о HAL для MIPS, это означает поддержку процессоров MIPS и плат с процессорами MIPS. Когда мы говорим о BSP, мы имеем в виду программное обеспечение, которое не имеет программного обеспечения поддержки процессора, а только дополнительное программное обеспечение для поддержки данной платы. HAL может быть понят как надмножество всех поддерживаемых BSP и дополнительно включает в себя программное обеспечение, относящееся к процессору.

Как уже упоминалось в Главе 2, ни HAL Linux, ни BSP, не имеет какого-либо стандарта. Следовательно, очень трудно объяснять HAL для нескольких архитектур. Эта глава погружает в BSP Linux и вопросы переноса для архитектуры на основе MIPS; где это необходимо, обсуждение может перекинуться на другие процессоры. Для упрощения мы используем вымышленную плату EUREKA на базе MIPS, имеющую следующий набор аппаратных компонентов:

▪ 32-х разрядный процессор MIPS

▪ 4 Мб флеш-памяти

▪ Программируемый контроллер на основе 8259

▪ Шину PCI с такими подключенными к ней устройствами, как сетевая и звуковая карта

▪ Микросхему-таймер для генерации тактовой частоты системы

▪ Последовательный порт, который может быть использован для консоли и удалённой отладки

Источник

Linux / Embedded Linux – понимание ядра и дополнительных компонентов BSP

* tldr; Я хотел бы вообще понять, как работает мир linux / embedded linux. Что мне нужно сделать, чтобы взять Linux-магистраль и скомпилировать / развернуть ее на плате с разными процессорами и периферийными устройствами.

Как я сейчас вижу работу:

Шаги для запуска Linux на произвольной плате:

  • Получите источники для uBoot (для встроенных) или GRUB (рабочий стол / x86 SOM)
  • Измените uBoot или GRUB для конкретной системы, напишите код для инициализации конкретного чипа и получите необходимые интерфейсы для работы с памятью и консолью
  • Измените файл uBoot / GRUB config.txt, чтобы настроить код, написанный выше.
  • скомпилировать их и развернуть на борт, проверить, что консоль загрузчика подходит и может взаимодействовать с ней
  • Получить основные источники ядра
  • «make config» для выбора драйверов и модулей, которые будут доступны (в этот момент эти выборы изменят источник – везде, где хранятся эти настройки, больше не будет соответствовать git-клон от основной линии) (Отслеживайте этот .config-файл в исходном элементе управления для будущая ссылка)
  • Получите такие инструменты, как Busybox или настольный вариант? Установить в исходных каталогах
  • Получить ucLibc или другие библиотеки и установить в исходные каталоги
  • Компилировать исходный код ядра с помощью кросс-компилятора toolchain для конкретного чипа
  • Создать файлы дерева файлов .dtb для платы (как встроенный / рабочий стол, так и рабочий стол не используется?) Это подключает драйверы к физическим контактам
  • Для загрузки скомпилированного образа ядра используйте Uboot / GRUB и TFTP / последовательную консоль или карту памяти и т. Д.
  • Загрузите и проверьте доступ к оболочке через последовательный / SSH и т. Д. В зависимости от конфигурации драйверов и дерева устройств.
  • Измените uEnv.txt (embedded) или mysteryfile.txt (рабочий стол) для конкретных конфигураций платы? Это по существу сценарий, который блокирует или добавляет шаги запуска ядра? Что такое рабочий стол?
  • apt-get желаемые пакеты и драйверы
  • написать драйверы и код приложения и тест (вручную загрузить драйверы)
  • Добавьте файлы дерева устройств для учета оборудования и драйверов, реализованных выше (они отделены от созданного встроенного BSP)
  • Чтобы включить их в образ ядра, создайте ядро ​​и создайте файловую структуру со всеми этими источниками и модами конфигурационных файлов в папке strcuture (дополнения / модемы к Linux mainline)
  • Может иметь отдельную папку для Linux mainline и mods, копировать моды, непосредственно перезаписывая / добавляя файлы в mainline в третьей промежуточной папке. Это позволит управлять всеми дополнениями и моделями без основной линии отдельно.

Если вы можете получить базовую систему, в которую вы можете включить SSH, и на этом этапе у вас есть драйверы для всех общих компонентов (видео, USB, мышь и т. Д.), Тогда вы можете в значительной степени сделать что-нибудь на этом этапе (установите сервер X11, LXDE, сети и т. д.)? Какие драйверы должны обрабатываться загрузчиком / BIOS, а какие из них являются чисто в домене ядра?

Существуют файлы Kconfig для настройки сборки ядра. Это имеет смысл, и ядро ​​разработки модулей ядра, которое я видел, похоже, хорошо описывает это.

Существуют также файлы, такие как uEnv.txt и config.txt, которые обрабатывают конфигурацию времени выполнения и какие устройства должны быть загружены. Есть также капли дерева устройств, которые также определяют, какие устройства должны быть загружены?

Как магические строки в этих файлах связаны с ядром, являются ли эти модификации основной линией для конкретной платы? Что-то нужно прочитать, чтобы определить, должен ли быть включен HDMI или нет, и это не может быть тот же самый код, что и на настольной версии Linux.

Как только водители находятся на магистрали, они все еще развиваются независимо от магистрали? Например, я использовал пару драйверов, но есть заметки, которые они теперь включены в магистраль, означает ли это, что больше невозможно напрямую загружать самостоятельно? Последующие шаги загрузили заголовки для моей платы, источника, а затем скомпилировали ее и установили. Если это на главной линии, мне нужно оттуда оттуда вместо этого?

Фон и конкретные мысли

Я EE и имею опыт работы с микроконтроллерами и разработкой Windows, но не имею большого опыта работы с Linux. Кадрирование моего вопроса: «Если бы я начал с этого произвольного (с доступным компилятором Linux) процессора, и эти периферийные устройства, как мне (и каковы мои настройки) для создания выпуска Linux»,

Читайте также:  Download get the windows 10 app

Загрузчик:

Я смог найти конкретную документацию RPI2 и BBB (Beaglebone Black) и инструкции, но когда вы переходите на более сложные темы, такие как загрузчик, есть только несколько крошек, чтобы смутно описать, что происходит. Например, RPI2 имеет трехступенчатый загрузчик (из которого он не читает, что он не похож на полностью основанный на uBoot), и у BBB есть более «традиционный» загрузчик на основе uBoot. Теперь у нового BBx15 есть перемычки, где вы можете выбрать, с чего хотите загрузиться.

Настольные системы используют GRUB (IIRC), а встроенные системы обычно используют uBoot. Я прочитал, что RPI использует GPU во время загрузки и считывает загрузчик первого этапа с отдельного ПЗУ. И это вся информация. Если вы хотите открутить собственную версию доски (ради обсуждения, это не очень практично), то помимо uBoot, что происходит? У uBoot для BBx15 есть дополнительные модификации, позволяющие выбрать загрузку перемычки?

Означает ли Linux что-нибудь о постановке загрузки или не замечает ли это после его запуска? BBB использует uBoot для загрузки изображения с eMMC в ОЗУ, RPI2 использует трехступенчатый загрузчик. Я предполагаю, что BBB использует процессор ARM для этого, но RPI2 использует GPU. Я думал о включении питания, которое начинает запускать процессор ARM, что им нужно будет изменить, чтобы выполнить эту процедуру загрузки? Включает ли GPU ARM в сброс до тех пор, пока он не завершит свой код ПЗУ? Поскольку GPU является частью процедуры загрузки, это означает, что код, который он выполняет, извлекается из кода uBoot, чтобы другие системы без этого GPU должны были затем выполняться в коде uBoot? Вся эта процедура подразумевает, что если вы модифицируете загрузчик второго или третьего этапа, вы можете полностью запустить Linux с одного GPU (если ядро ​​было скомпилировано с помощью инструментальной цепочки GPU)?

Является ли загрузчик третьего этапа и config.txt на самом деле просто uBoot?

Что касается заголовков для используемой платы. Являются ли они только заголовками главной линии с включенными драйверами или есть что-то еще. «Заголовки» – это только заголовки главной линии, если это то, с чего вы начали работать?

Для разработки встроенного микроконтроллера я использую слой HAL. В HAL есть заглушки функций, где вы настраиваете периферийные устройства, а затем указываете драйверы на эти ресурсы. Пакет поддержки платы обычно имеет эти HAL-заглушки, уже закодированные для рассматриваемой платы. Я уверен, что здесь должны быть некоторые параллели с разработкой Linux, но я не могу понять, где находятся эти подразделения.

Есть такие пакеты, как Buildroot и Yocto. Являются ли они только основной линией Linux с интерфейсом для автоматизации выбора процессора ARM и драйверов для включения?

Из моего небольшого опыта работы с аппаратным обеспечением маршрутизатора, с которым я играл, могу сказать, что это немое маленькое оборудование, собранное только для того, чтобы сделать что-то одно.

На аппаратном уровне это просто:

U-Boot имеет не только загрузчик, но и BIOS на ПК. Таким образом, это не только загрузчик, но и инициализирует все оборудование. При запуске CPU выполняет его непосредственно (например, от FLASH), и он решает, что делать дальше, но обычно он перемещается в память. Затем он делает то, что ему нужно: считывает конфигурацию из флеш-ролика, затем загружает изображение по указанному адресу и передает туда контроль. Ничего особенного, но это важно знать.

U-Boot (встроенный в оборудование маршрутизатора) не имеет доступа к корневой файловой системе вообще. Вместо этого есть выделенное пространство для изображения всего ядра (обычно сжатого). Итак, по крайней мере на маршрутизаторах – нет файла / boot / vmlinuz.

RPI действительно использует свою собственную проприетарную последовательность загрузки. У них есть закрытые исходные двоичные файлы, которые пользователь ставит на SD-флешку. Код инициализации первого этапа жестко закодирован в CPU или где-то там на борту. И они запускают ядро ​​ARM после GPU, и весь код делается для GPU. Подробнее об этом, может быть, вы уже нашли, но если нет: https://raspberrypi.stackexchange.com/questions/10489/how-does-raspberry-pi-boot

Поэтому, поскольку я немного повеселился с маршрутизаторами и полностью переработал их на своих небольших серверах из исходного кода, я могу перечислить свою собственную последовательность построения:

  • Получите и создайте u-boot для платформы
  • Построить ядро ​​Linux
  • Создание пользовательского пространства (ядро и пользовательское пространство обычно разделяются, даже на flash)
  • Вспышка, что u-boot во flash на программиста
  • Вспышка припоя на плате
  • Подключение к плате через UART
  • Загрузите его, проверьте u-boot на все аппаратное обеспечение
  • Ядро tftp, пишите во флэш-память внутри платы
  • tftp rootfs, пишите во флеш внутри платы
  • сбросить, проверить все работает нормально
  • тонкая настройка rootfs: установка разрешений, предварительная настройка конфигурации по умолчанию через tftp
  • сбрасывать все изображение, мигать на многих устройствах

Ядро Linux может или не может поддерживать ваш совет. Пожалуйста, проверьте это. Вы не сможете просто взять последнее ядро ​​и построить его, например, для своего маршрутизатора. То же самое с RPi: у них есть собственное дерево ядра. Это часто случается во встроенном мире, лишь немногие (и обычно общие) платформы напрямую поддерживаются ядром Linux. Будьте готовы к этому.

Что касается пользовательского пространства, вы можете выбрать все, что вам нужно, сбалансировать свои потребности между тем, что вам нужно, и сколько места осталось. Обычно во встроенных, вы либо сжимаете что угодно, либо снимаете ненужные вещи, либо и то, и другое.

Надеюсь, это прояснит ситуацию. Если у вас есть дополнительные вопросы – добро пожаловать в комментарии! 🙂

Источник

Bsp linux что это такое

Copyright В© 2010-2012 Linux Foundation

Permission is granted to copy, distribute and/or modify this document under the terms of the Creative Commons Attribution-Non-Commercial-Share Alike 2.0 UK: England & Wales as published by Creative Commons.

Revision History
Revision 0.9 24 November 2010
The initial document draft released with the Yocto Project 0.9 Release.
Revision 1.0 6 April 2011
Released with the Yocto Project 1.0 Release.
Revision 1.0.1 23 May 2011
Released with the Yocto Project 1.0.1 Release.
Revision 1.1 6 October 2011
Released with the Yocto Project 1.1 Release.
Revision 1.2 April 2012
Released with the Yocto Project 1.2 Release.

Table of Contents

ChapterВ 1.В Board Support Packages (BSP) — Developer’s Guide

Table of Contents

A Board Support Package (BSP) is a collection of information that defines how to support a particular hardware device, set of devices, or hardware platform. The BSP includes information about the hardware features present on the device and kernel configuration information along with any additional hardware drivers required. The BSP also lists any additional software components required in addition to a generic Linux software stack for both essential and optional platform features.

This chapter (or document if you are reading the BSP Developer’s Guide) talks about BSP Layers, defines a structure for components so that BSPs follow a commonly understood layout, discusses how to customize a recipe for a BSP, addresses BSP licensing, and provides information that shows you how to create and manage a BSP Layer using two Yocto Project BSP Tools.

1.1.В BSP Layers

The BSP consists of a file structure inside a base directory. Collectively, you can think of the base directory and the file structure as a BSP Layer. BSP Layers use the following naming convention:

Читайте также:  Что такое статус активации windows

«bsp_name» is a placeholder for the machine or platform name.

The layer’s base directory ( meta- ) is the root of the BSP Layer. This root is what you add to the BBLAYERS variable in the conf/bblayers.conf file found in the Yocto Project Build Directory. Adding the root allows the Yocto Project build system to recognize the BSP definition and from it build an image. Here is an example:

Some BSPs require additional layers on top of the BSP’s root layer in order to be functional. For these cases, you also need to add those layers to the BBLAYERS variable in order to build the BSP. You must also specify in the «Dependencies» section of the BSP’s README file any requirements for additional layers and, preferably, any build instructions that might be contained elsewhere in the README file.

Some layers function as a layer to hold other BSP layers. An example of this type of layers is the meta-intel layer. The meta-intel layer contains over 10 individual BSP layers.

For more detailed information on layers, see the «Understanding and Creating Layers» section of the Yocto Project Development Manual. You can also see the detailed examples in the appendices of The Yocto Project Development Manual.

1.2.В Example Filesystem Layout

Providing a common form allows end-users to understand and become familiar with the layout. A common format also encourages standardization of software support of hardware.

The proposed form does have elements that are specific to the Yocto Project and OpenEmbedded build systems. It is intended that this information can be used by other systems besides Yocto Project and OpenEmbedded and that it will be simple to extract information and convert it to other formats if required. Yocto Project, through its standard layers mechanism, can directly accept the format described as a layer. The BSP captures all the hardware-specific details in one place in a standard format, which is useful for any person wishing to use the hardware platform regardless of the build system they are using.

The BSP specification does not include a build system or other tools — it is concerned with the hardware-specific components only. At the end-distribution point, you can ship the BSP combined with a build system and other tools. However, it is important to maintain the distinction that these are separate components that happen to be combined in certain end products.

Below is the common form for the file structure inside a BSP Layer. While you can use this basic form for the standard, realize that the actual structures for specific BSPs could differ.

Below is an example of the Crown Bay BSP:

The following sections describe each part of the proposed BSP format.

1.2.1.В License Files

You can find these files in the BSP Layer at:

These optional files satisfy licensing requirements for the BSP. The type or types of files here can vary depending on the licensing requirements. For example, in the Crown Bay BSP all licensing requirements are handled with the COPYING.MIT file.

Licensing files can be MIT, BSD, GPLv*, and so forth. These files are recommended for the BSP but are optional and totally up to the BSP developer.

1.2.2.В README File

You can find this file in the BSP Layer at:

This file provides information on how to boot the live images that are optionally included in the binary/ directory. The README file also provides special information needed for building the image.

At a minimum, the README file must contain a list of dependencies, such as the names of any other layers on which the BSP depends and the name of the BSP maintainer with his or her contact information.

1.2.3.В README.sources File

You can find this file in the BSP Layer at:

This file provides information on where to locate the BSP source files. For example, information provides where to find the sources that comprise the images shipped with the BSP. Information is also included to help you find the metadata used to generate the images that ship with the BSP.

1.2.4.В Pre-built User Binaries

You can find these files in the BSP Layer at:

This optional area contains useful pre-built kernels and user-space filesystem images appropriate to the target system. This directory typically contains graphical (e.g. sato) and minimal live images when the BSP tarball has been created and made available in the Yocto Project website. You can use these kernels and images to get a system running and quickly get started on development tasks.

The exact types of binaries present are highly hardware-dependent. However, a README file should be present in the BSP Layer that explains how to use the kernels and images with the target hardware. If pre-built binaries are present, source code to meet licensing requirements must also exist in some form.

1.2.5.В Layer Configuration File

You can find this file in the BSP Layer at:

The conf/layer.conf file identifies the file structure as a Yocto Project layer, identifies the contents of the layer, and contains information about how Yocto Project should use it. Generally, a standard boilerplate file such as the following works. In the following example, you would replace » bsp » and » _bsp » with the actual name of the BSP (i.e. from the example template).

To illustrate the string substitutions, here are the last three statements from the Crown Bay conf/layer.conf file:

This file simply makes BitBake aware of the recipes and configuration directories. The file must exist so that the Yocto Project build system can recognize the BSP.

1.2.6.В Hardware Configuration Options

You can find these files in the BSP Layer at:

The machine files bind together all the information contained elsewhere in the BSP into a format that the Yocto Project build system can understand. If the BSP supports multiple machines, multiple machine configuration files can be present. These filenames correspond to the values to which users have set the MACHINE variable.

These files define things such as the kernel package to use ( PREFERRED_PROVIDER of virtual/kernel), the hardware drivers to include in different types of images, any special software components that are needed, any bootloader information, and also any special image format requirements.

Each BSP Layer requires at least one machine file. However, you can supply more than one file. For example, in the Crown Bay BSP shown earlier in this section, the conf/machine directory contains two configuration files: crownbay.conf and crownbay-noemgd.conf . The crownbay.conf file is used for the Crown Bay BSP that supports the Intel В® Embedded Media and Graphics Driver ( Intel В® EMGD), while the crownbay-noemgd.conf file is used for the Crown Bay BSP that does not support the Intel В® EMGD.

This crownbay.conf file could also include a hardware «tuning» file that is commonly used to define the package architecture and specify optimization flags, which are carefully chosen to give best performance on a given processor.

Tuning files are found in the meta/conf/machine/include directory of the Yocto Project Files. Tuning files can also reside in the BSP Layer itself. For example, the ia32-base.inc file resides in the meta-intel BSP Layer in conf/machine/include .

Читайте также:  Не могу сделать google chrome браузером по умолчанию windows 10

To use an include file, you simply include them in the machine configuration file. For example, the Crown Bay BSP crownbay.conf has the following statements:

1.2.7.В Miscellaneous Recipe Files

You can find these files in the BSP Layer at:

This optional directory contains miscellaneous recipe files for the BSP. Most notably would be the formfactor files. For example, in the Crown Bay BSP there is the formfactor_0.0.bbappend file, which is an append file used to augment the recipe that starts the build. Furthermore, there are machine-specific settings used during the build that are defined by the machconfig files. In the Crown Bay example, two machconfig files exist: one that supports the Intel В® Embedded Media and Graphics Driver ( Intel В® EMGD) and one that does not:

If a BSP does not have a formfactor entry, defaults are established according to the formfactor configuration file that is installed by the main formfactor recipe meta/recipes-bsp/formfactor/formfactor_0.0.bb , which is found in the Yocto Project Files.

1.2.8.В Core Recipe Files

You can find these files in the BSP Layer at:

This directory contains recipe files that are almost always necessary to build a useful, working Linux image. Thus, the term «core» is used to group these recipes. For example, in the Crown Bay BSP there is the task-core-tools-profile.bbappend file, which is an append file used to recommend that the SystemTap package be included as a package when the image is built.

1.2.9.В Display Support Files

You can find these files in the BSP Layer at:

This optional directory contains recipes for the BSP if it has special requirements for graphics support. All files that are needed for the BSP to support a display are kept here. For example, the Crown Bay BSP contains two versions of the xorg.conf file. The version in crownbay builds a BSP that supports the Intel В® Embedded Media Graphics Driver (EMGD), while the version in crownbay-noemgd builds a BSP that supports Video Electronics Standards Association (VESA) graphics only:

1.2.10.В Linux Kernel Configuration

You can find these files in the BSP Layer at:

These files append your specific changes to the kernel you are using.

For your BSP, you typically want to use an existing Yocto Project kernel found in the Yocto Project Files at meta/recipes-kernel/linux . You can append your specific changes to the kernel recipe by using a similarly named append file, which is located in the BSP Layer (e.g. the meta- /recipes-kernel/linux directory).

Suppose the BSP uses the linux-yocto_3.0.bb kernel, which is the preferred kernel to use for developing a new BSP using the Yocto Project. In other words, you have selected the kernel in your .conf file by adding the following statements:

You would use the linux-yocto_3.0.bbappend file to append specific BSP settings to the kernel, thus configuring the kernel for your particular BSP.

As an example, look at the existing Crown Bay BSP. The append file used is:

The following listing shows the file. Be aware that the actual commit ID strings in this example listing might be different than the actual strings in the file from the meta-intel Git source repository.

This append file contains statements used to support the Crown Bay BSP for both Intel В® EMGD and the VESA graphics. The build process, in this case, recognizes and uses only the statements that apply to the defined machine name — crownbay in this case. So, the applicable statements in the linux-yocto_3.0.bbappend file are follows:

The append file defines crownbay as the compatible machine and defines the KMACHINE . The file also points to some configuration fragments to use by setting the KERNEL_FEATURES variable. The location for the configuration fragments is the kernel tree itself in the Yocto Project Build Directory under linux/meta . Finally, the append file points to the specific commits in the Yocto Project Files Git repository and the meta Git repository branches to identify the exact kernel needed to build the Crown Bay BSP.

One thing missing in this particular BSP, which you will typically need when developing a BSP, is the kernel configuration file ( .config ) for your BSP. When developing a BSP, you probably have a kernel configuration file or a set of kernel configuration files that, when taken together, define the kernel configuration for your BSP. You can accomplish this definition by putting the configurations in a file or a set of files inside a directory located at the same level as your append file and having the same name as the kernel. With all these conditions met simply reference those files in a SRC_URI statement in the append file.

For example, suppose you had a set of configuration options in a file called myconfig . If you put that file inside a directory named /linux-yocto and then added a SRC_URI statement such as the following to the append file, those configuration options will be picked up and applied when the kernel is built.

As mentioned earlier, you can group related configurations into multiple files and name them all in the SRC_URI statement as well. For example, you could group separate configurations specifically for Ethernet and graphics into their own files and add those by using a SRC_URI statement like the following in your append file:

The FILESEXTRAPATHS variable is in boilerplate form in the previous example in order to make it easy to do that. This variable must be in your layer or BitBake will not find the patches or configurations even if you have them in your SRC_URI . The FILESEXTRAPATHS variable enables the build process to find those configuration files.

Other methods exist to accomplish grouping and defining configuration options. For example, if you are working with a local clone of the kernel repository, you could checkout the kernel’s meta branch, make your changes, and then push the changes to the local bare clone of the kernel. The result is that you directly add configuration options to the Yocto kernel meta branch for your BSP. The configuration options will likely end up in that location anyway if the BSP gets added to the Yocto Project. For an example showing how to change the BSP configuration, see the «Changing the BSP Configuration» section in the Yocto Project Development Manual. For a better understanding of working with a local clone of the kernel repository and a local bare clone of the kernel, see the «Modifying the Kernel Source Code» section also in the Yocto Project Development Manual.

In general, however, the Yocto Project maintainers take care of moving the SRC_URI -specified configuration options to the kernel’s meta branch. Not only is it easier for BSP developers to not have to worry about putting those configurations in the branch, but having the maintainers do it allows them to apply ‘global’ knowledge about the kinds of common configuration options multiple BSPs in the tree are typically using. This allows for promotion of common configurations into common features.

Источник

Оцените статью