Adding a New Recipe to the Workspace Layer
To add a new recipe to the workspace layer, use the petalinux-devtool add command. For petalinux-devtool add bbexample
https://github.com/whbruce/bbexample.git This command fetches the
source from the specified URL and creates the recipe bbexample in the Devtool
Workspace directory.
petalinux-devtool add bbexample https://github.com/whbruce/bbexample.git
[INFO] Sourcing buildtools
[INFO] Extracting yocto SDK to components/yocto. This may take time!
[INFO] Generating Kconfig for project
[INFO] Silentconfig project
[INFO] Generating kconfig for rootfs
[INFO] Silentconfig rootfs
[INFO] Adding user layers
[INFO] Generating machine conf file
[INFO] Generating plnxtool conf file
[INFO] Generating kernel configuration files
[INFO] Generating u-boot configuration files
[INFO] Generating workspace directory
[INFO] devtool add bbexample https://github.com/whbruce/bbexample.git
NOTE: Starting bitbake server...
NOTE: Started PRServer with DBfile: xilinx-ac701-2023.1/build/cache/prserv.sqlite3, Address: 127.0.0.1:34447, PID: 23551
NOTE: Starting bitbake server...
NOTE: Started PRServer with DBfile: xilinx-ac701-2023.1/build/cache/prserv.sqlite3, Address: 127.0.0.1:34939, PID: 23680
INFO: Fetching git://github.com/whbruce/bbexample.git;protocol=https;branch=master...
Loading cache: 100% | | ETA: --:--:--
Loaded 0 entries from dependency cache.
Parsing recipes: 100% |######################################################| Time: 0:00:24
Parsing of 4359 .bb files complete (0 cached, 4359 parsed). 6290 targets, 863 skipped, 1 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
NOTE: Fetching uninative binary shim file://xilinx-ac701-2023.1/components/yocto/downloads/uninative/5fab9a5c97fc73a21134e5a81f74498cbaecda75d56aab971c934e0b803bcc00/x86_64-nativesdk-libc-3.8.1.tar.xz;sha256sum=5fab9a5c97fc73a21134e5a81f74498cbaecda75d56aab971c934e0b803bcc00 (will check PREMIRRORS first)
Initialising tasks: 100% |###################################################| Time: 0:00:00
Sstate summary: Wanted 0 Local 0 Mirrors 0 Missed 0 Current 0 (0% match, 0% complete)
NOTE: No setscene tasks
NOTE: Executing Tasks
NOTE: Tasks Summary: Attempted 2 tasks of which 0 didn't need to be rerun and all succeeded.
INFO: Using default source tree path xilinx-ac701-2023.1/components/yocto/workspace/sources/bbexample
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection (#1)...
NOTE: Reconnecting to bitbake server...
NOTE: Reconnecting to bitbake server...
NOTE: Retrying server connection (#1)...
NOTE: Retrying server connection (#1)...
NOTE: Starting bitbake server...
NOTE: Started PRServer with DBfile: xilinx-ac701-2023.1/build/cache/prserv.sqlite3, Address: 127.0.0.1:43239, PID: 26161
INFO: Recipe xilinx-ac701-2023.1/components/yocto/workspace/recipes/bbexample/bbexample_git.bb has been automatically created; further editing may be required to make it fully functional
petalinux-devtool status
[INFO] Sourcing buildtools
[INFO] Silentconfig project
[INFO] Silentconfig rootfs
[INFO] Generating workspace directory
[INFO] devtool status
NOTE: Starting bitbake server...
NOTE: Started PRServer with DBfile: xilinx-ac701-2023.1/build/cache/prserv.sqlite3, Address: 127.0.0.1:37885, PID: 30764
bbexample: xilinx-ac701-2023.1/components/yocto/workspace/sources/bbexample (xilinx-ac701-2023.1/components/yocto/workspace/recipes/bbexample/bbexample_git.bb)
Getting the Status of the Recipes in Your Workspace
Use the petalinux-devtool status command to list the recipes
currently in your workspace. Information includes the paths to their respective
external source trees.
petalinux-devtool status
[INFO] Sourcing buildtools
[INFO] Sourcing build environment
[INFO] Generating workspace directory
[INFO] devtool status
NOTE: Starting bitbake server...
NOTE: Started PRServer with DBfile: /wrk/everest_fcv_nobkup/project/_20221015_/xilinx-ac701-2022.2/build/cache/prserv.sqlite3, Address: 127.0.0.1:39075, PID: 29287
bbexample: /wrk/everest_fcv_nobkup/project/_20221015_/xilinx-ac701-2022.2/components/yocto/workspace/sources/bbexample (/wrk/everest_fcv_nobkup/project/_20221015_/xilinx-ac701-2022.2/components/yocto/workspace/recipes/bbexample/bbexample_git.bb)
Modifying an Existing Recipe
Use the petalinux-devtool modify command to begin modifying the
source of an existing recipe. This command extracts the source for a recipe to the
Devtool Workspace directory, checks out a branch for development, and applies the
patches, if any, from the recipe as commits on top.
Use the following command to modify the linux-xlnx recipe:
petalinux-devtool modify linux-xlnx
Building the Recipe
Use the petalinux-devtool build command to
build your recipe. This command is equivalent to the bitbake
-c populate_sysroot command. You must supply the root name of the
recipe (that is, do not provide versions, paths, or extensions), as shown:
petalinux-devtool build linux-xlnx
Building Your Image
Use the petalinux-devtool build-image command
to build an image using the devtool flow. This includes the recipes which are the
workspace directory. When running this command you must specify the image name to be
built.
petalinux-devtool build-image petalinux-image-minimal
Resetting the Recipe
Use the petalinux-devtool reset command to
remove the recipe and its configurations from Devtool Workspace directory. This
command does not add/append changes in the Devtool Workspace to any layers, you need
to update the recipe append file before running the reset command.
petalinux-devtool reset linux-xlnx
petalinux-devtool in place of devtool in the
examples.