Professional Documents
Culture Documents
Tom Zanussi Intel C orporation < t o m . z a n u s s i @ i n t e l . c o m > Richard Purdie Linux Foundation < r i c h a r d . p u r d i e @ l i n u x f o u n d a t i o n . o r g > C opyright 2010-2014 Linux Foundation Permission is granted to copy, distribute and/or modify this document under the terms of the C reative C ommons Attribution-Non-C ommercial-Share Alike 2.0 UK: England & Wales as published by C reative C ommons.
Note
For the latest version of this manual associated with this Yocto Project release, see the Yocto Project Board Support Package (BSP) Developer's Guide from the Yocto Project website.
The initial document draft released with the Yocto Project 0.9 Release. Revision 1.0 Released with the Yocto Project 1.0 Release. Revision 1.0.1 Released with the Yocto Project 1.0.1 Release. Revision 1.1 Released with the Yocto Project 1.1 Release. Revision 1.2 Released with the Yocto Project 1.2 Release. Revision 1.3 Released with the Yocto Project 1.3 Release. Revision 1.4 Released with the Yocto Project 1.4 Release. Revision 1.5 Released with the Yocto Project 1.5 Release. Revision 1.5.1 Released with the Yocto Project 1.5.1 Release. January 2014 October 2013 April 2013 October 2012 April 2012 6 October 2011 23 May 2011 6 April 2011
Table of Contents 1. Board Support Packages (BSP) - Developer's Guide 1.1. BSP Layers 1.2. Example Filesystem Layout 1.2.1. License Files 1.2.2. README File 1.2.3. README.sources File 1.2.4. Pre-built User Binaries 1.2.5. Layer C onfiguration File 1.2.6. Hardware C onfiguration Options 1.2.7. Miscellaneous BSP-Specific Recipe Files
http://www.yoctoproject.org/docs/1.5.1/bsp-guide/bsp-guide.html
1/14
2/27/2014
Table of Contents 1.1. BSP Layers 1.2. Example Filesystem Layout 1.2.1. License Files 1.2.2. README File 1.2.3. README.sources File 1.2.4. Pre-built User Binaries 1.2.5. Layer C onfiguration File 1.2.6. Hardware C onfiguration Options 1.2.7. Miscellaneous BSP-Specific Recipe Files 1.2.8. Display Support Files 1.2.9. Linux Kernel C onfiguration 1.3. Requirements and Recommendations for Released BSPs 1.3.1. Released BSP Requirements 1.3.2. Released BSP Recommendations 1.4. C ustomizing a Recipe for a BSP 1.5. BSP Licensing C onsiderations 1.6. Using the Yocto Project's BSP Tools 1.6.1. C ommon Features 1.6.2. C reating a new BSP Layer Using the yocto-bsp Script 1.6.3. Managing Kernel Patches and C onfig Items with yocto-kernel
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 guide presents information 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.
B B L A Y E R Svariable in the c o n f / b b l a y e r s . c o n ffile found in the Build Directory. Adding the root allows
B B L A Y E R Svariable in order to build the BSP. You must also specify in the
2/14
http://www.yoctoproject.org/docs/1.5.1/bsp-guide/bsp-guide.html
2/27/2014
"Dependencies" section of the BSP's
R E A D M Efile any requirements for additional layers and, preferably, any build R E A D M Efile. m e t a i n t e l
Some layers function as a layer to hold other BSP layers. An example of this type of layer is the layer. The
For more detailed information on layers, see the "Understanding and C reating Layers" section of the Yocto Project Development Manual.
http://www.yoctoproject.org/docs/1.5.1/bsp-guide/bsp-guide.html
3/14
2/27/2014
C O P Y I N G . M I Tfile.
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.
R E A D M Efile also provides special information needed for building the image.
b i n a r y /directory.
At a minimum, the R E A D M Efile 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.
#W eh a v eac o n fa n dc l a s s e sd i r e c t o r y ,a d dt oB B P A T H B B P A T H. =" : $ { L A Y E R D I R } " #W eh a v ear e c i p e sd i r e c t o r y ,a d dt oB B F I L E S B B F I L E S+ =" $ { L A Y E R D I R } / r e c i p e s * / * / * . b b\ $ { L A Y E R D I R } / r e c i p e s * / * / * . b b a p p e n d " B B F I L E _ C O L L E C T I O N S+ =" b s p " B B F I L E _ P A T T E R N _ b s p=" ^ $ { L A Y E R D I R } / " B B F I L E _ P R I O R I T Y _ b s p=" 6 " To illustrate the string substitutions, here are the corresponding statements from the C rown Bay
c o n f / l a y e r . c o n ffile:
http://www.yoctoproject.org/docs/1.5.1/bsp-guide/bsp-guide.html 4/14
2/27/2014
M A C H I N Evariable.
These files define things such as the kernel package to use (P R E F E R R E D _ P R O V I D E Rof 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. This c r o w n b a y . c o n ffile 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 example, the
m e t a / c o n f / m a c h i n e / i n c l u d edirectory within the Source Directory. For i a 3 2 b a s e . i n cfile resides in the m e t a / c o n f / m a c h i n e / i n c l u d edirectory.
To use an include file, you simply include them in the machine configuration file. For example, the C rown Bay BSP
Note
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
m e t a / r e c i p e s b s p / f o r m f a c t o r / f o r m f a c t o r _ 0 . 0 . b b , which is
found in the Source Directory.
http://www.yoctoproject.org/docs/1.5.1/bsp-guide/bsp-guide.html
5/14
2/27/2014
m e t a / r e c i p e s k e r n e l / l i n u x . 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 m e t a < b s p _ n a m e > / r e c i p e s k e r n e l / l i n u xdirectory).
Suppose you are using the selected the kernel in your
l i n u x y o c t o _ 3 . 1 0 . b brecipe to build the kernel. In other words, you have < b s p _ n a m e > . c o n ffile by adding these types of statements:
Note
When the preferred provider is assumed by default, the statement does not appear in the
You would use the l i n u x y o c t o _ 3 . 1 0 . b b a p p e n dfile to append specific BSP settings to the kernel, thus configuring the kernel for your particular BSP. As an example, look at the existing C rown Bay BSP. The append file used is: m e t a c r o w n b a y / r e c i p e s k e r n e l / l i n u x / l i n u x y o c t o _ 3 . 1 0 . b b a p p e n d 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
F I L E S E X T R A P A T H S _ p r e p e n d: =" $ { T H I S D I R } / $ { P N } : " C O M P A T I B L E _ M A C H I N E _ c r o w n b a y n o e m g d=" c r o w n b a y n o e m g d " K M A C H I N E _ c r o w n b a y n o e m g d=" c r o w n b a y " K B R A N C H _ c r o w n b a y n o e m g d=" s t a n d a r d / c r o w n b a y " K E R N E L _ F E A T U R E S _ a p p e n d _ c r o w n b a y n o e m g d="c f g / v e s a f b " L I N U X _ V E R S I O N=" 3 . 1 0 . 1 1 " S R C R E V _ m e t a _ c r o w n b a y n o e m g d=" 2 8 5 f 9 3 b f 9 4 2 e 8 f 6 f a 6 7 8 f f c 6 c c 5 3 6 9 6 e d 5 4 0 0 7 1 8 " S R C R E V _ m a c h i n e _ c r o w n b a y n o e m g d=" 7 0 2 0 4 0 a c 7 c 7 e c 6 6 a 2 9 b 4 d 1 4 7 6 6 5 c c d d 0 f f 0 1 5 5 7 7 "
c r o w n b a yas the C O M P A T I B L E _ M A C H I N Eand uses the K M A C H I N Evariable to ensure the machine name used by the
This append file contains statements used to support the C rown Bay BSP. The file defines OpenEmbedded build system maps to the machine name used by the Linux Yocto kernel. The file also uses the
K B R A N C Hvariable to ensure the build process uses the s t a n d a r d / c r o w n b a ykernel branch. The K E R N E L _ F E A T U R E Svariable enables features specific to the kernel. Finally, the append file points to specific commits in the Source Directory Git repository and the m e t aGit repository branches to identify the exact kernel
optional needed to build the C rown Bay BSP. One thing missing in this particular BSP, which you will typically need when developing a BSP, is the kernel configuration file (. c o n f i g ) 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 kernel's append file and having the same name as the kernel's main recipe file. With all these conditions met, simply reference those files in a
For example, suppose you had some configuration options in a file called
place that file inside a directory named l i n u x y o c t oand then add a S R C _ U R Istatement such as the following to the append file. When the OpenEmbedded build system builds the kernel, the configuration options are picked up and applied. S R C _ U R I+ =" f i l e : / / n e t w o r k _ c o n f i g s . c f g "
To group related configurations into multiple files, you perform a similar procedure. Here is an example that groups separate configurations specifically for Ethernet and graphics into their own files and adds the configurations by using a
http://www.yoctoproject.org/docs/1.5.1/bsp-guide/bsp-guide.html
2/27/2014
Note
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 m e t abranch, 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
m e t abranch for your BSP. The configuration options will likely end up in that location
anyway if the BSP gets added to the Yocto Project. In general, however, the Yocto Project maintainers take care of moving the specified configuration options to the kernel's m e t abranch. 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.
S R C _ U R I -
r e c i p e s . t x tfile. In particular, you should place recipes (. b bfiles) and recipe modifications (. b b a p p e n dfiles) into r e c i p e s *subdirectories by functional area as outlined in r e c i p e s . t x t . If you cannot find a category in r e c i p e s . t x tto fit a particular recipe, you can make up your own r e c i p e s *subdirectory. You can find r e c i p e s . t x tin the m e t adirectory of the Source Directory, or in the OpenEmbedded C ore Layer (o p e n e m b e d d e d c o r e ) found at
http://git.openembedded.org/openembedded-core/tree/meta. Within any particular
Git repository (o p e n e m b e d d e d c o r e ) or the Source Directory (p o k y ). In other words, make sure you
r e c i p e s *category, the layout should match what is found in the OpenEmbedded C ore
place related files in appropriately related r e c i p e s *subdirectories specific to the recipe's function, or within a subdirectory containing a set of closely-related recipes. The recipes themselves should follow the general guidelines for recipes used in the Yocto Project found in the "Yocto Recipe and Patch Style Guide". License File: You must include a license file in the m e t a < b s p _ n a m e >directory. This license covers the BSP Metadata as a whole. You must specify which license to use since there is no default license if one is not specified. See the example.
C O P Y I N G . M I Tfile for the Fish River Island 2 BSP in the m e t a f r i 2BSP layer as an
http://www.yoctoproject.org/docs/1.5.1/bsp-guide/bsp-guide.html
7/14
2/27/2014
README File: You must include a
A brief description about the hardware the BSP targets. A list of all the dependencies on which a BSP layer depends. These dependencies are typically a list of required layers needed to build the BSP. However, the dependencies should also contain information regarding any other dependencies the BSP might have. Any required special licensing information. For example, this information includes information on special variables needed to satisfy a EULA, or instructions on information needed to build or distribute binaries built from the BSP Metadata. The name and contact information for the BSP layer maintainer. This is the person to whom patches and questions should be sent. For information on how to find the right person, see the "How to Submit a C hange" section in the Yocto Project Development Manual. Instructions on how to build the BSP using the BSP layer. Instructions on how to boot the BSP build from the BSP layer. Instructions on how to boot the binary images contained in the
b i n a r ydirectory, if present.
Information on any known bugs or issues that users should know about when either building or booting the BSP binaries. README.sources File: You must include a R E A D M E . s o u r c e sin the m e t a < b s p _ n a m e >directory. This file specifies exactly where you can find the sources used to generate the binary images contained in the
b i n a r ydirectory, if present. See the R E A D M E . s o u r c e sfile for the Fish River Island 2 BSP in the m e t a f r i 2BSP layer as an example.
Layer Configuration File: You must include a directory. This file identifies the
c o n f / l a y e r . c o n fin the m e t a < b s p _ n a m e > m e t a < b s p _ n a m e >BSP layer as a layer to the build system. c o n f / m a c h i n e / < b s p _ n a m e > . c o n f
files in the m e t a < b s p _ n a m e >directory. These configuration files define machine targets that can be built using the BSP layer. Multiple machine configuration files define variations of machine configurations that are supported by the BSP. If a BSP supports multiple machine variations, you need to adequately describe each variation in the BSP R E A D M Efile. Do not use multiple machine configuration files to describe disparate hardware. If you do have very different targets, you should create separate BSP layers for each target.
Note
It is completely possible for a developer to structure the working repository as a conglomeration of unrelated BSP files, and to possibly generate BSPs targeted for release from that directory using scripts or some other mechanism (e.g. m e t a y o c t o b s p layer). Such considerations are outside the scope of this document.
m e t a < b s p _ n a m e >directory.
b i n a r y /
Note
If you do include a bootable image as part of the BSP and the image was built by software covered by the GPL or other open source licenses, it is your responsibility to understand and meet all licensing requirements, which could include distribution of source files.
Use a Yocto Linux Kernel: Kernel recipes in the BSP should be based on a Yocto Linux kernel. Basing your recipes on these kernels reduces the costs for maintaining the BSP and increases its scalability. See the
Y o c t o
8/14
2/27/2014
r e c i p e s b s p ,r e c i p e s g r a p h i c s ,r e c i p e s c o r e , and so
Place the BSP-specific files in the directory named for your machine inside the BSP layer. Following is a specific example to help you better understand the process. C onsider an example that customizes a recipe by adding a BSP-specific configuration file named recipe for machine "xyz". Do the following: 1. Edit the
i n t e r f a c e sto the i n i t i f u p d o w n _ 1 . 0 . b b
F I L E S E X T R A P A T H S _ p r e p e n d: =" $ { T H I S D I R } / f i l e s : " P R I N C: =" $ { @ i n t ( P R I N C )+2 } " The append file needs to be in the 2. C reate and place the new
m e t a x y z / r e c i p e s c o r e / i n i t i f u p d o w ndirectory.
m e t a x y z / r e c i p e s c o r e / i n i t i f u p d o w n / f i l e s / x y z / i n t e r f a c e s The
find files during the build. C onsequently, for this example you need to have the location as your append file.
F I L E S E X T R A P A T H Svariable in the append files extends the search path the build system uses to f i l e sdirectory in the same
L I C E N S E _ F L A G S _ W H I T E L I S T , the build stops and provides you with the list of recipes that you have tried to include in the image that need entries in the L I C E N S E _ F L A G S _ W H I T E L I S T . Once you
enter the appropriate license flags into the whitelist, restart the build to continue where it left off. During the build, the prompt will not appear again since you have satisfied the requirement. Once the appropriate license flags are on the white list in the L I C E N S E _ F L A G S _ W H I T E L I S T variable, you can build the encumbered image with no change at all to the normal build process.
http://www.yoctoproject.org/docs/1.5.1/bsp-guide/bsp-guide.html
9/14
2/27/2014
Note
Pre-compiled images are bundled with a time-limited kernel that runs for a predetermined amount of time (10 days) before it forces the system to reboot. This limitation is meant to discourage direct redistribution of the image. You must eventually rebuild the image if you want to remove this restriction.
y o c t o k e r n e l , respectively.
y o c t o b s p y o c t o -
The following sections describe the common location and help features as well as provide details for the
b s pand y o c t o k e r n e ltools.
1.6.1. Common Features
Designed to have a command interface somewhat like Git, each tool is structured as a set of sub-commands under a top-level command. The top-level command (y o c t o b s por or provide help on the sub-commands it supports. Both tools reside in the must
s c r i p t s /subdirectory of the Source Directory. C onsequently, to use the scripts, you s o u r c ethe environment just as you would when invoking a build:
$s o u r c eo e i n i t b u i l d e n v[ b u i l d _ d i r ]
The most immediately useful function is to get help on both tools. The built-in help system makes it easy to drill down at any time and view the syntax required for any specific command. Simply enter the name of the command with the
h e l pswitch:
$y o c t o b s ph e l p U s a g e : C r e a t eac u s t o m i z e dY o c t oB S Pl a y e r . u s a g e :y o c t o b s p[ v e r s i o n ][ h e l p ]C O M M A N D[ A R G S ] C u r r e n t' y o c t o b s p 'c o m m a n d sa r e : c r e a t e C r e a t ean e wY o c t oB S P l i s t L i s ta v a i l a b l ev a l u e sf o ro p t i o n sa n dB S Pp r o p e r t i e s S e e' y o c t o b s ph e l pC O M M A N D 'f o rm o r ei n f o r m a t i o no nas p e c i f i cc o m m a n d .
O p t i o n s : v e r s i o n s h o wp r o g r a m ' sv e r s i o nn u m b e ra n de x i t h ,h e l p s h o wt h i sh e l pm e s s a g ea n de x i t D ,d e b u g o u t p u td e b u gi n f o r m a t i o n Similarly, entering just the name of a sub-command shows the detailed usage for that sub-command: $y o c t o b s pc r e a t e U s a g e : C r e a t ean e wY o c t oB S P u s a g e :y o c t o b s pc r e a t e< b s p n a m e >< k a r c h >[ o< D I R N A M E >|o u t d i r< D I R N A M E > ] [ i< J S O NP R O P E R T YF I L E >|i n f i l e< J S O NP R O P E R T Y _ F I L E > ] T h i sc o m m a n dc r e a t e saY o c t oB S Pb a s e do nt h es p e c i f i e dp a r a m e t e r s . T h en e wB S Pw i l lb ean e wY o c t oB S Pl a y e rc o n t a i n e db yd e f a u l tw i t h i n t h et o p l e v e ld i r e c t o r ys p e c i f i e da s' m e t a b s p n a m e ' . T h eoo p t i o n c a nb eu s e dt op l a c et h eB S Pl a y e ri nad i r e c t o r yw i t had i f f e r e n t n a m ea n dl o c a t i o n . . . .
http://www.yoctoproject.org/docs/1.5.1/bsp-guide/bsp-guide.html
10/14
2/27/2014
Note
You can also use the y o c t o l a y e rtool to create a "generic" layer. For information on this tool, see the "C reating a General Layer Using the yocto-layer Script" section in the Yocto Project Development Guide.
The next sections provide a concrete starting point to expand on a few points that might not be immediately obvious or that could use further explanation.
specify a particular kernel architecture (k a r c h ) on which to base the BSP. Assuming you have sourced the environment, you can use the BSP creation as follows:
y o c t o b s pc r e a t esub-command to create a new BSP layer. This command requires you to y o c t o b s pl i s tk a r c hsub-command to list the architectures available for
machine architecture. Of the available architectures, q e m uis the only architecture that causes the script to prompt you further for an actual architecture. In every other way, this architecture is representative of how creating a BSP for an actual machine would work. The reason the example uses this architecture is because it is an emulated
http://www.yoctoproject.org/docs/1.5.1/bsp-guide/bsp-guide.html
11/14
2/27/2014
Let's take a closer look at the example now: 1. For the QEMU architecture, the script first prompts you for which emulated architecture to use. In the example, we use the ARM architecture. 2. The script then prompts you for the kernel. The default 3.10 kernel is acceptable. So, the example accepts the default. If you enter 'n', the script prompts you to further enter the kernel you do want to use (e.g. 3.2, 3.2_preempt-rt, and so forth.). 3. Next, the script asks whether you would like to have a new branch created especially for your BSP in the local Linux Yocto Kernel Git repository . If not, then the script re-uses an existing branch. In this example, the default (or "yes") is accepted. Thus, a new branch is created for the BSP rather than using a common, shared branch. The new branch is the branch committed to for any patches you might later add. The reason a new branch is the default is that typically new BSPs do require BSP-specific patches. The tool thus assumes that most of time a new branch is required. 4. Regardless of which choice you make in the previous step, you are now given the opportunity to select a particular machine branch on which to base your new BSP-specific machine branch (or to re-use if you had elected to not create a new branch). Because this example is generating an ARM-based BSP, the example uses
5. The remainder of the prompts are routine. Defaults are accepted for each. 6. By default, the script creates the new BSP Layer in the current working directory of the Source Directory, which is
Once the BSP Layer is created, you must add it to your B B L A Y E R S=?"\ / u s r / l o c a l / s r c / y o c t o / m e t a\ / u s r / l o c a l / s r c / y o c t o / m e t a y o c t o\ / u s r / l o c a l / s r c / y o c t o / m e t a y o c t o b s p\ / u s r / l o c a l / s r c / y o c t o / m e t a m y a r m\ " B B L A Y E R S _ N O N _ R E M O V A B L E? ="\
http://www.yoctoproject.org/docs/1.5.1/bsp-guide/bsp-guide.html
12/14
2/27/2014
y o c t o k e r n e ltool to be able to
y o c t o b s pand you added it to your B B L A Y E R Svariable in y o c t o k e r n e lscript to add patches and configuration
y o c t o k e r n e lscript allows you to add, remove, and list patches and kernel config settings to a BSP's . b b a p p e n dfile. All you need to do is use the appropriate sub-command. Recall that the easiest way to see exactly what sub-commands are available is to use the y o c t o k e r n e lbuilt-in help as follows:
kernel $y o c t o k e r n e l U s a g e : M o d i f ya n dl i s tY o c t oB S Pk e r n e lc o n f i gi t e m sa n dp a t c h e s . u s a g e :y o c t o k e r n e l[ v e r s i o n ][ h e l p ]C O M M A N D[ A R G S ] C u r r e n t' y o c t o k e r n e l 'c o m m a n d sa r e : c o n f i gl i s t L i s tt h em o d i f i a b l es e to fb a r ek e r n e lc o n f i go p t i o n sf o raB S P c o n f i ga d d A d do rm o d i f yb a r ek e r n e lc o n f i go p t i o n sf o raB S P c o n f i gr m R e m o v eb a r ek e r n e lc o n f i go p t i o n sf r o maB S P p a t c hl i s t L i s tt h ep a t c h e sa s s o c i a t e dw i t haB S P p a t c ha d d P a t c ht h eY o c t ok e r n e lf o raB S P p a t c hr m R e m o v ep a t c h e sf r o maB S P f e a t u r el i s t L i s tt h ef e a t u r e su s e db yaB S P f e a t u r ea d d H a v eaB S Pu s eaf e a t u r e f e a t u r er m H a v eaB S Ps t o pu s i n gaf e a t u r e f e a t u r e sl i s t L i s tt h ef e a t u r e sa v a i l a b l et oB S P s f e a t u r ed e s c r i b e D e s c r i b eap a r t i c u l a rf e a t u r e f e a t u r ec r e a t e C r e a t ean e wB S P l o c a lf e a t u r e f e a t u r ed e s t r o y R e m o v eaB S P l o c a lf e a t u r e S e e' y o c t o k e r n e lh e l pC O M M A N D 'f o rm o r ei n f o r m a t i o no nas p e c i f i cc o m m a n d .
O p t i o n s : v e r s i o n s h o wp r o g r a m ' sv e r s i o nn u m b e ra n de x i t h ,h e l p s h o wt h i sh e l pm e s s a g ea n de x i t D ,d e b u g o u t p u td e b u gi n f o r m a t i o n The
y o c t o k e r n e lp a t c ha d dsub-command allows you to add a patch to a BSP. The following example m y a r mBSP:
$y o c t o k e r n e lp a t c ha d dm y a r m~ / t e s t . p a t c h A d d e dp a t c h e s : t e s t . p a t c h $y o c t o k e r n e lp a t c ha d dm y a r m~ / y o c t o t e s t m o d . p a t c h A d d e dp a t c h e s : y o c t o t e s t m o d . p a t c h
Note
Although the previous example adds patches one at a time, it is possible to add multiple patches at the same time.
You can verify patches have been added by using the an example:
y o c t o k e r n e lp a t c hl i s tsub-command. Here is
$y o c t o k e r n e lp a t c hl i s tm y a r m T h ec u r r e n ts e to fm a c h i n e s p e c i f i cp a t c h e sf o rm y a r mi s : 1 )t e s t . p a t c h 2 )y o c t o t e s t m o d . p a t c h You can also use the y o c t o k e r n e lscript to remove a patch using the sub-command. Here is an example: $y o c t o k e r n e lp a t c hr mm y a r m S p e c i f yt h ep a t c h e st or e m o v e : 1 )t e s t . p a t c h
y o c t o k e r n e lp a t c hr m
http://www.yoctoproject.org/docs/1.5.1/bsp-guide/bsp-guide.html
13/14
2/27/2014
more kernel config item settings to a BSP. The following commands add a couple of config items to the BSP: $y o c t o k e r n e lc o n f i ga d dm y a r mC O N F I G _ M I S C _ D E V I C E S = y A d d e di t e m s : C O N F I G _ M I S C _ D E V I C E S = y $y o c t o k e r n e lc o n f i ga d dm y a r mC O N F I G _ Y O C T O _ T E S T M O D = y A d d e di t e m s : C O N F I G _ Y O C T O _ T E S T M O D = y
Note
Although the previous example adds config items one at a time, it is possible to add multiple config items at the same time.
You can list the config items now associated with the BSP. Doing so shows you the config items you added as well as others associated with the BSP: $y o c t o k e r n e lc o n f i gl i s tm y a r m T h ec u r r e n ts e to fm a c h i n e s p e c i f i ck e r n e lc o n f i gi t e m sf o rm y a r mi s : 1 )C O N F I G _ M I S C _ D E V I C E S = y 2 )C O N F I G _ Y O C T O _ T E S T M O D = y Finally, you can remove one or more config items using the a manner completely analogous to
y o c t o k e r n e lc o n f i gr msub-command in y o c t o k e r n e lp a t c hr m .
http://www.yoctoproject.org/docs/1.5.1/bsp-guide/bsp-guide.html
14/14