Create a project specific layer#
It is heavily advised to put project specific changes into an extra layer, so we need to create one first.
We use scotty
’s createlayer command for this purpose.
Create a blank git repository
Create a blank git repository on your git server.
That could be
github (see GitHub tutorial)
Gitlab (see GitLab tutorial)
your internal server
empty and private
Make sure that the new repository is empty and set to private
The clone
URL is what will need in the next steps.
For simplicity we use git@github.com:my-username/my-product.git
from here on.
scotty createlayer
Let’s say your project/product is called my-product
, then you can run
scotty createlayer my-product git@github.com:my-username/my-product.git
(optional) create scotty environment file
To keep things convenient for you, you can add Scotty project specific settings. But this step is optional.
If you prefer not to use this feature, you will have to set SCOTTY_EXTRA_DOWNLOAD
manually
(re)setup scotty
Now you will need to setup your workspace with scotty
again.
Run
scotty --force-sync --refresh --reconfigure setup
Be sure to select my-product project
in the feature selection.
edit the files
Inside the new layer (to be found at build/build/sources/meta-my-product
), you will
find the following files
file |
purpose |
---|---|
|
A SimpleCore™ non-graphical image |
|
A SimpleCore™ graphical image |
|
A SimpleSwitch non-graphical image |
|
A SimpleSwitch graphical image |
you can edit them in any way for your project’s purposes.
Always push changes to remote
Any changes should be pushed to your git server
build new image
Once you edited the files in your project, you can build any of
my-product-image
my-product-weston-image
simpleswitch-my-product-image
simpleswitch-my-product-weston-image
using the scotty
bitbake command