i.MX Yocto Proyect: How can I create a new Layer?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX Yocto Proyect: How can I create a new Layer?

i.MX Yocto Proyect: How can I create a new Layer?

It is suggested to create a layer when creating or modifying any metadata file (recipe, configuration file or class). The main reason is simple: modularity. Follow these steps

1. To have access to Yocto scripts, setup the enviroment from the BASE folder

fsl-community-bsp $ . setup-environment build

2. Move to the place you want to create your layer and choose a name (e.g. `fsl-custom`)

sources $ yocto-layer create fsl-custom

# Answer the questions. Make sure the priority is set correctly (higher numbers,

# higher priorities). Set the priority equal to the lowest already present, except

# when you have introduce a new recipe with the same name as other and want to shadow

# the original one.

3. Add any metadata content. Suggestion: Version the layer with Git and upload your local git repo to a server

4. Edit and add the layer to the `build/conf/bblayers.conf` file

5. To verify that your layer is *seen* by BitBake, run the following command under the build folder

build $ bitbake-layers show-layers

This document was generated from the following discussion: i.MX Yocto Proyect: How can I create a new Layer?

%3CLINGO-SUB%20id%3D%22lingo-sub-1103962%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Ei.MX%20Yocto%20Proyect%3A%20How%20can%20I%20create%20a%20new%20Layer%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1103962%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EIt%20is%20suggested%20to%20create%20a%20layer%20when%20creating%20or%20modifying%20any%20metadata%20file%20(recipe%2C%20configuration%20file%20or%20class).%20The%20main%20reason%20is%20simple%3A%20%3CSTRONG%3Emodularity%3C%2FSTRONG%3E.%20Follow%20these%20steps%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E1.%20To%20have%20access%20to%20Yocto%20scripts%2C%20setup%20the%20enviroment%20from%20the%20BASE%20folder%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CBLOCKQUOTE%3E%0A%3CP%3Efsl-community-bsp%20%24%20.%20setup-environment%20build%3C%2FP%3E%0A%0A%3C%2FBLOCKQUOTE%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E2.%20Move%20to%20the%20place%20you%20want%20to%20create%20your%20layer%20and%20choose%20a%20name%20(e.g.%20%60fsl-custom%60)%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CBLOCKQUOTE%3E%0A%3CP%3Esources%20%24%20yocto-layer%20create%20fsl-custom%3C%2FP%3E%0A%3CP%3E%23%20Answer%20the%20questions.%20Make%20sure%20the%20priority%20is%20set%20correctly%20(higher%20numbers%2C%3C%2FP%3E%0A%3CP%3E%23%20higher%20priorities).%20Set%20the%20priority%20equal%20to%20the%20lowest%20already%20present%2C%20except%3C%2FP%3E%0A%3CP%3E%23%20when%20you%20have%20introduce%20a%20new%20recipe%20with%20the%20same%20name%20as%20other%20and%20want%20to%20shadow%3C%2FP%3E%0A%3CP%3E%23%20the%20original%20one.%3C%2FP%3E%0A%0A%3C%2FBLOCKQUOTE%3E%3CP%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E3.%20Add%20any%20metadata%20content.%20Suggestion%3A%20Version%20the%20layer%20with%20Git%20and%20upload%20your%20local%20git%20repo%20to%20a%20server%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E4.%20Edit%20and%20add%20the%20layer%20to%20the%20%60build%2Fconf%2Fbblayers.conf%60%20file%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E5.%20To%20verify%20that%20your%20layer%20is%20*seen*%20by%20BitBake%2C%20run%20the%20following%20command%20under%20the%20%3CEM%3Ebuild%3C%2FEM%3E%20folder%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CBLOCKQUOTE%3E%0A%3CP%3Ebuild%20%24%20bitbake-layers%20show-layers%3C%2FP%3E%0A%0A%3C%2FBLOCKQUOTE%3E%3CP%3E%3C%2FP%3E%3CP%3EThis%20document%20was%20generated%20from%20the%20following%20discussion%3A%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Fthread%2F310288%22%20target%3D%22_blank%22%3Ei.MX%20Yocto%20Proyect%3A%20How%20can%20I%20create%20a%20new%20Layer%3F%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎08-19-2013 08:20 AM
Updated by: