diff options
| author | Mark Hatle <mark.hatle@amd.com> | 2024-06-06 09:40:27 -0600 |
|---|---|---|
| committer | Mark Hatle <mark.hatle@amd.com> | 2024-06-06 11:41:43 -0600 |
| commit | 2bbe53c463daf01de661a905e08461231b6ad8f1 (patch) | |
| tree | 89a1333afb570524da6ab2b151fc9767386ece76 /docs/README.fw.package.md | |
| parent | 1601779783bfcd0da237f98b4ee23f6cbf15b669 (diff) | |
| parent | 77eba12b28e4258e1f6a8e613902c1b084a170e1 (diff) | |
| download | meta-xilinx-2bbe53c463daf01de661a905e08461231b6ad8f1.tar.gz | |
Merge remote-tracking branch 'origin/rel-v2024.1' into langdale
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
Diffstat (limited to 'docs/README.fw.package.md')
| -rw-r--r-- | docs/README.fw.package.md | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/docs/README.fw.package.md b/docs/README.fw.package.md new file mode 100644 index 00000000..a7e54402 --- /dev/null +++ b/docs/README.fw.package.md | |||
| @@ -0,0 +1,61 @@ | |||
| 1 | # How to package and depoly firmware elf or bin to linux root filesystem | ||
| 2 | |||
| 3 | * [Introduction](#introduction) | ||
| 4 | * [How to create and install firmware package recipe](#how-to-create-and-install-firmware-package-recipe) | ||
| 5 | |||
| 6 | ## Introduction | ||
| 7 | This readme describes how to package and deploy firmware baremetal or freertos | ||
| 8 | application elf or bin files to linux root filesystem under /lib/firmware directory. | ||
| 9 | Packaging an firmware baremetal or freertos application elf or bin files to linux | ||
| 10 | root filesystem is not automated from multiconfig baremetal or freertos recipes. | ||
| 11 | Hence user has to create a linux recipe and inherit fw-package which provides | ||
| 12 | infrastructure to package and deploy firmware elf or bin files to linux root | ||
| 13 | filesystem. | ||
| 14 | |||
| 15 | ## How to create and install firmware package recipe | ||
| 16 | |||
| 17 | 1. Follow [SDT Building Instructions](../meta-xilinx-standalone-experimental/README.md ) upto step 4. | ||
| 18 | |||
| 19 | 2. Create recipes-firmware directory in distribution meta layer. | ||
| 20 | ``` | ||
| 21 | $ mkdir -p <meta-layer>/recipes-firmware/<firmware-package-name>/ | ||
| 22 | ``` | ||
| 23 | 3. Now create the recipes firmware package using recipetool. | ||
| 24 | ``` | ||
| 25 | $ recipetool create -o <meta-layer>/recipes-firmware/<firmware-package-name>/firmware-package-name.bb | ||
| 26 | ``` | ||
| 27 | 4. Modify the recipe and inherit fw-package bbclass as shown below. | ||
| 28 | |||
| 29 | > **Note:** | ||
| 30 | > * **DESTDIR:** Variable to specify elf or bin directory path. Default is set to | ||
| 31 | > /lib/firmware directory from fw-package,bbclass and user can | ||
| 32 | > change this value to /boot directory depending on requirement. | ||
| 33 | > * **FW_NAME:** Variable to define firmware baremetal or freertos application | ||
| 34 | > recipe name. | ||
| 35 | > * **TARGET_MC:** Variable to define one of the multiconfig target name | ||
| 36 | > (ex: cortexr5-0-zynqmp-baremetal) from the BBMULTICONFIG list | ||
| 37 | > generated at [SDT Building Instructions](../meta-xilinx-standalone-experimental/README.md ) | ||
| 38 | > step 4. | ||
| 39 | |||
| 40 | ``` | ||
| 41 | SUMMARY = "Recipe to package and deploy baremetal or freertos elf or bin to linux rootfs" | ||
| 42 | LICENSE = "CLOSED" | ||
| 43 | |||
| 44 | inherit fw-package | ||
| 45 | |||
| 46 | FW_NAME = "hello-world" | ||
| 47 | |||
| 48 | TARGET_MC = "cortexr5-0-zynqmp-baremetal" | ||
| 49 | |||
| 50 | FW_MCDEPENDS := "mc::${TARGET_MC}:${FW_NAME}:do_deploy" | ||
| 51 | FW_DEPLOY_DIR := "${TOPDIR}/tmp-${TARGET_MC}/deploy/images/${MACHINE}" | ||
| 52 | ``` | ||
| 53 | 5. Add firmware-package recipe to image to local.conf as shown below. | ||
| 54 | |||
| 55 | ``` | ||
| 56 | IMAGE_INSTALL:append = " \ | ||
| 57 | firmware-package-name \ | ||
| 58 | " | ||
| 59 | ``` | ||
| 60 | 6. Follow [SDT Building Instructions](../meta-xilinx-standalone-experimental/README.md ) and continue from | ||
| 61 | step 5. | ||
