diff options
author | Raju Kumar Pothuraju <rajukumar.pothuraju@amd.com> | 2025-01-07 15:06:34 +0530 |
---|---|---|
committer | Mark Hatle <mark.hatle@amd.com> | 2025-03-30 14:16:06 -0600 |
commit | 02242301c6f9f5a6e440a29dc0ac456882e9c7cf (patch) | |
tree | af10c2c11b56c570df1a9f920def47335e9d1ccf | |
parent | 8edc577e00873055a06246780289b6edabfa2ff4 (diff) | |
download | meta-xilinx-02242301c6f9f5a6e440a29dc0ac456882e9c7cf.tar.gz |
plmfw: Remove plmfw.bin support
We are using plmfw.elf in all flows to build and boot.
Remove the plmfw.bin dependency or support from plmfw recipe.
Use below command to generate the .bin from .elf.
objcopy -O binary plm-$MACHINE.elf plm.bin
Signed-off-by: Raju Kumar Pothuraju <rajukumar.pothuraju@amd.com>
Signed-off-by: Mark Hatle <mark.hatle@amd.com>
4 files changed, 6 insertions, 28 deletions
diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb index 80063f85..c3c595b2 100644 --- a/meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb +++ b/meta-xilinx-core/recipes-bsp/embeddedsw/plmfw.bb | |||
@@ -17,7 +17,7 @@ COMPATIBLE_HOST = ".*" | |||
17 | PACKAGE_ARCH = "${MACHINE_ARCH}" | 17 | PACKAGE_ARCH = "${MACHINE_ARCH}" |
18 | 18 | ||
19 | # Default expects the user to provide the plm-firmware in the deploy | 19 | # Default expects the user to provide the plm-firmware in the deploy |
20 | # directory, named "plm-${MACHINE}.elf" and "plm-${MACHINE}.bin" | 20 | # directory, named "plm-${MACHINE}.elf" |
21 | # A machine, multiconfig, or local.conf should override this | 21 | # A machine, multiconfig, or local.conf should override this |
22 | PLM_DEPENDS ??= "" | 22 | PLM_DEPENDS ??= "" |
23 | PLM_MCDEPENDS ??= "" | 23 | PLM_MCDEPENDS ??= "" |
@@ -25,7 +25,7 @@ PLM_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}" | |||
25 | PLM_DEPLOY_DIR[vardepsexclude] += "TOPDIR" | 25 | PLM_DEPLOY_DIR[vardepsexclude] += "TOPDIR" |
26 | PLM_IMAGE_NAME ??= "plm-${MACHINE}" | 26 | PLM_IMAGE_NAME ??= "plm-${MACHINE}" |
27 | 27 | ||
28 | # Default is for the multilib case (without the extension .elf/.bin) | 28 | # Default is for the multilib case (without the extension .elf) |
29 | PLM_FILE ??= "${PLM_DEPLOY_DIR}/${PLM_IMAGE_NAME}" | 29 | PLM_FILE ??= "${PLM_DEPLOY_DIR}/${PLM_IMAGE_NAME}" |
30 | PLM_FILE[vardepsexclude] = "PLM_DEPLOY_DIR" | 30 | PLM_FILE[vardepsexclude] = "PLM_DEPLOY_DIR" |
31 | 31 | ||
@@ -49,7 +49,6 @@ do_deploy() { | |||
49 | # If the item is already in OUR deploy_image_dir, nothing to deploy! | 49 | # If the item is already in OUR deploy_image_dir, nothing to deploy! |
50 | if ${SHOULD_DEPLOY}; then | 50 | if ${SHOULD_DEPLOY}; then |
51 | install -Dm 0644 ${PLM_FILE}.elf ${DEPLOYDIR}/${PLM_IMAGE_NAME}.elf | 51 | install -Dm 0644 ${PLM_FILE}.elf ${DEPLOYDIR}/${PLM_IMAGE_NAME}.elf |
52 | install -Dm 0644 ${PLM_FILE}.bin ${DEPLOYDIR}/${PLM_IMAGE_NAME}.bin | ||
53 | fi | 52 | fi |
54 | } | 53 | } |
55 | 54 | ||
@@ -71,21 +70,15 @@ def check_plm_vars(d): | |||
71 | d.setVar('BB_DONT_CACHE', '1') | 70 | d.setVar('BB_DONT_CACHE', '1') |
72 | 71 | ||
73 | msg = "" | 72 | msg = "" |
74 | fail = False | ||
75 | if not os.path.exists(d.getVar('PLM_FILE') + ".elf"): | 73 | if not os.path.exists(d.getVar('PLM_FILE') + ".elf"): |
76 | msg = msg + "The expected file %s.elf is not available. " % d.getVar('PLM_FILE') | 74 | msg = msg + "The expected file %s.elf is not available. " % d.getVar('PLM_FILE') |
77 | fail = True | ||
78 | if not os.path.exists(d.getVar('PLM_FILE') + ".bin"): | ||
79 | msg = msg + "The expected file %s.bin is not available. " % d.getVar('PLM_FILE') | ||
80 | fail = True | ||
81 | if fail: | ||
82 | if not d.getVar('WITHIN_EXT_SDK'): | 75 | if not d.getVar('WITHIN_EXT_SDK'): |
83 | raise bb.parse.SkipRecipe("%s\nSee the meta-xilinx-core README." % msg) | 76 | raise bb.parse.SkipRecipe("%s\nSee the meta-xilinx-core README." % msg) |
84 | else: | 77 | else: |
85 | # We found the file, so be sure to track it | 78 | # We found the file, so be sure to track it |
86 | d.setVar('SRC_URI', 'file://${PLM_FILE}.elf file://${PLM_FILE}.bin') | 79 | d.setVar('SRC_URI', 'file://${PLM_FILE}.elf') |
87 | d.setVarFlag('do_install', 'file-checksums', '${PLM_FILE}.elf:True') | 80 | d.setVarFlag('do_install', 'file-checksums', '${PLM_FILE}.elf:True') |
88 | d.setVarFlag('do_deploy', 'file-checksums', '${PLM_FILE}.elf:True ${PLM_FILE}.bin:True') | 81 | d.setVarFlag('do_deploy', 'file-checksums', '${PLM_FILE}.elf:True') |
89 | 82 | ||
90 | python() { | 83 | python() { |
91 | # Need to allow bbappends to change the check | 84 | # Need to allow bbappends to change the check |
diff --git a/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/plm-firmware_sdt.inc b/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/plm-firmware_sdt.inc index 75580ba3..58164b70 100644 --- a/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/plm-firmware_sdt.inc +++ b/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/plm-firmware_sdt.inc | |||
@@ -11,10 +11,6 @@ do_configure:prepend() { | |||
11 | ) | 11 | ) |
12 | } | 12 | } |
13 | 13 | ||
14 | do_compile:append() { | ||
15 | ${OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin | ||
16 | } | ||
17 | |||
18 | do_install() { | 14 | do_install() { |
19 | : | 15 | : |
20 | } | 16 | } |
@@ -24,8 +20,6 @@ ESW_COMPONENT = "versal_plm.elf" | |||
24 | do_deploy() { | 20 | do_deploy() { |
25 | install -Dm 0644 ${B}/${ESW_COMPONENT} ${DEPLOYDIR}/${PLM_BASE_NAME}.elf | 21 | install -Dm 0644 ${B}/${ESW_COMPONENT} ${DEPLOYDIR}/${PLM_BASE_NAME}.elf |
26 | ln -sf ${PLM_BASE_NAME}.elf ${DEPLOYDIR}/${PLM_IMAGE_NAME}.elf | 22 | ln -sf ${PLM_BASE_NAME}.elf ${DEPLOYDIR}/${PLM_IMAGE_NAME}.elf |
27 | install -m 0644 ${B}/${ESW_COMPONENT}.bin ${DEPLOYDIR}/${PLM_BASE_NAME}.bin | ||
28 | ln -sf ${PLM_BASE_NAME}.bin ${DEPLOYDIR}/${PLM_IMAGE_NAME}.bin | ||
29 | } | 23 | } |
30 | 24 | ||
31 | addtask deploy before do_build after do_install | 25 | addtask deploy before do_build after do_install |
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_generic.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_generic.inc index 0a00984f..fd64b603 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_generic.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware_generic.inc | |||
@@ -43,7 +43,6 @@ do_compile() { | |||
43 | # Again, recipe-systoot include is necessary | 43 | # Again, recipe-systoot include is necessary |
44 | oe_runmake CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" | 44 | oe_runmake CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" |
45 | 45 | ||
46 | ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin | ||
47 | } | 46 | } |
48 | 47 | ||
49 | do_install() { | 48 | do_install() { |
@@ -57,8 +56,6 @@ ESW_COMPONENT = "plm.elf" | |||
57 | do_deploy() { | 56 | do_deploy() { |
58 | install -Dm 0644 ${B}/${ESW_COMPONENT} ${DEPLOYDIR}/${PLM_BASE_NAME}.elf | 57 | install -Dm 0644 ${B}/${ESW_COMPONENT} ${DEPLOYDIR}/${PLM_BASE_NAME}.elf |
59 | ln -sf ${PLM_BASE_NAME}.elf ${DEPLOYDIR}/${PLM_IMAGE_NAME}.elf | 58 | ln -sf ${PLM_BASE_NAME}.elf ${DEPLOYDIR}/${PLM_IMAGE_NAME}.elf |
60 | install -m 0644 ${B}/${ESW_COMPONENT}.bin ${DEPLOYDIR}/${PLM_BASE_NAME}.bin | ||
61 | ln -sf ${PLM_BASE_NAME}.bin ${DEPLOYDIR}/${PLM_IMAGE_NAME}.bin | ||
62 | } | 59 | } |
63 | 60 | ||
64 | addtask deploy before do_build after do_install | 61 | addtask deploy before do_build after do_install |
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plmfw-meta-xilinx-standalone.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plmfw-meta-xilinx-standalone.inc index 49c897e1..12bb93e3 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plmfw-meta-xilinx-standalone.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plmfw-meta-xilinx-standalone.inc | |||
@@ -9,18 +9,12 @@ def check_plm_vars(d): | |||
9 | d.setVar('BB_DONT_CACHE', '1') | 9 | d.setVar('BB_DONT_CACHE', '1') |
10 | 10 | ||
11 | msg = "" | 11 | msg = "" |
12 | fail = False | ||
13 | if not os.path.exists(d.getVar('PLM_FILE') + ".elf"): | 12 | if not os.path.exists(d.getVar('PLM_FILE') + ".elf"): |
14 | msg = msg + "The expected file %s.elf is not available. " % d.getVar('PLM_FILE') | 13 | msg = msg + "The expected file %s.elf is not available. " % d.getVar('PLM_FILE') |
15 | fail = True | ||
16 | if not os.path.exists(d.getVar('PLM_FILE') + ".bin"): | ||
17 | msg = msg + "The expected file %s.bin is not available. " % d.getVar('PLM_FILE') | ||
18 | fail = True | ||
19 | if fail: | ||
20 | if not d.getVar('WITHIN_EXT_SDK'): | 14 | if not d.getVar('WITHIN_EXT_SDK'): |
21 | raise bb.parse.SkipRecipe("%s\nEither specify PLM_FILE, or you may need to enable BBMULTICONFIG += 'versal-fw' to generate it." % msg) | 15 | raise bb.parse.SkipRecipe("%s\nEither specify PLM_FILE, or you may need to enable BBMULTICONFIG += 'versal-fw' to generate it." % msg) |
22 | else: | 16 | else: |
23 | # We found the file, so be sure to track it | 17 | # We found the file, so be sure to track it |
24 | d.setVar('SRC_URI', 'file://${PLM_FILE}.elf file://${PLM_FILE}.bin') | 18 | d.setVar('SRC_URI', 'file://${PLM_FILE}.elf') |
25 | d.setVarFlag('do_install', 'file-checksums', '${PLM_FILE}.elf:True') | 19 | d.setVarFlag('do_install', 'file-checksums', '${PLM_FILE}.elf:True') |
26 | d.setVarFlag('do_deploy', 'file-checksums', '${PLM_FILE}.elf:True ${PLM_FILE}.bin:True') | 20 | d.setVarFlag('do_deploy', 'file-checksums', '${PLM_FILE}.elf:True') |