summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaju Kumar Pothuraju <rajukumar.pothuraju@amd.com>2025-01-10 11:01:50 +0530
committerMark Hatle <mark.hatle@amd.com>2025-03-30 14:16:15 -0600
commit1e27a13557f68a834b5b06e233427c0aaa9d7d78 (patch)
tree7adaec9de4c18ad0d0f54f83561e98656754aa92
parent979d2f3bf4908a9a0185be740a7dff9bf791264d (diff)
downloadmeta-xilinx-1e27a13557f68a834b5b06e233427c0aaa9d7d78.tar.gz
psmfw: Remove psmfw.bin support
We are using psmfw.elf in all flows to build and boot. Remove the psmfw.bin dependency or support from psmfw recipe. Use below command to generate the .bin from .elf. objcopy -O binary psm-$MACHINE.elf psm.bin Signed-off-by: Raju Kumar Pothuraju <rajukumar.pothuraju@amd.com> Signed-off-by: Mark Hatle <mark.hatle@amd.com>
-rw-r--r--meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb16
-rw-r--r--meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/psm-firmware_sdt.inc6
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_generic.inc4
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/psmfw-meta-xilinx-standalone.inc11
4 files changed, 6 insertions, 31 deletions
diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb
index 3fa6d98c..0c70a0c5 100644
--- a/meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb
+++ b/meta-xilinx-core/recipes-bsp/embeddedsw/psmfw.bb
@@ -17,7 +17,7 @@ COMPATIBLE_HOST = ".*"
17PACKAGE_ARCH = "${MACHINE_ARCH}" 17PACKAGE_ARCH = "${MACHINE_ARCH}"
18 18
19# Default expects the user to provide the psm-firmware in the deploy 19# Default expects the user to provide the psm-firmware in the deploy
20# directory, named "psm-firmware-${MACHINE}.elf" and "psm-firmware-${MACHINE}.bin" 20# directory, named "psm-firmware-${MACHINE}.elf"
21# A machine, multiconfig, or local.conf should override this 21# A machine, multiconfig, or local.conf should override this
22PSM_DEPENDS ??= "" 22PSM_DEPENDS ??= ""
23PSM_MCDEPENDS ??= "" 23PSM_MCDEPENDS ??= ""
@@ -25,7 +25,7 @@ PSM_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}"
25PSM_FIRMWARE_DEPLOY_DIR[vardepsexclude] += "TOPDIR" 25PSM_FIRMWARE_DEPLOY_DIR[vardepsexclude] += "TOPDIR"
26PSM_FIRMWARE_IMAGE_NAME ??= "psm-firmware-${MACHINE}" 26PSM_FIRMWARE_IMAGE_NAME ??= "psm-firmware-${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)
29PSM_FILE ??= "${PSM_FIRMWARE_DEPLOY_DIR}/${PSM_FIRMWARE_IMAGE_NAME}" 29PSM_FILE ??= "${PSM_FIRMWARE_DEPLOY_DIR}/${PSM_FIRMWARE_IMAGE_NAME}"
30PSM_FILE[vardepsexclude] = "PSM_FIRMWARE_DEPLOY_DIR" 30PSM_FILE[vardepsexclude] = "PSM_FIRMWARE_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 ${PSM_FILE}.elf ${DEPLOYDIR}/${PSM_FIRMWARE_IMAGE_NAME}.elf 51 install -Dm 0644 ${PSM_FILE}.elf ${DEPLOYDIR}/${PSM_FIRMWARE_IMAGE_NAME}.elf
52 install -Dm 0644 ${PSM_FILE}.bin ${DEPLOYDIR}/${PSM_FIRMWARE_IMAGE_NAME}.bin
53 fi 52 fi
54} 53}
55 54
@@ -71,22 +70,15 @@ def check_psm_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('PSM_FILE') + ".elf"): 73 if not os.path.exists(d.getVar('PSM_FILE') + ".elf"):
76 msg = msg + "The expected file %s.elf is not available. " % d.getVar('PSM_FILE') 74 msg = msg + "The expected file %s.elf is not available. " % d.getVar('PSM_FILE')
77 fail = True
78 if not os.path.exists(d.getVar('PSM_FILE') + ".bin"):
79 msg = msg + "The expected file %s.bin is not available. " % d.getVar('PSM_FILE')
80 fail = True
81
82 if fail:
83 if not d.getVar('WITHIN_EXT_SDK'): 75 if not d.getVar('WITHIN_EXT_SDK'):
84 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)
85 else: 77 else:
86 # We found the file, so be sure to track it 78 # We found the file, so be sure to track it
87 d.setVar('SRC_URI', 'file://${PSM_FILE}.elf file://${PSM_FILE}.bin') 79 d.setVar('SRC_URI', 'file://${PSM_FILE}.elf')
88 d.setVarFlag('do_install', 'file-checksums', '${PSM_FILE}.elf:True') 80 d.setVarFlag('do_install', 'file-checksums', '${PSM_FILE}.elf:True')
89 d.setVarFlag('do_deploy', 'file-checksums', '${PSM_FILE}.elf:True ${PSM_FILE}.bin:True') 81 d.setVarFlag('do_deploy', 'file-checksums', '${PSM_FILE}.elf:True')
90 82
91python() { 83python() {
92 # 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/psm-firmware_sdt.inc b/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/psm-firmware_sdt.inc
index acd3a82a..edf9793e 100644
--- a/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/psm-firmware_sdt.inc
+++ b/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/psm-firmware_sdt.inc
@@ -11,10 +11,6 @@ do_configure:prepend() {
11 ) 11 )
12} 12}
13 13
14do_compile:append() {
15 ${OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin
16}
17
18do_install() { 14do_install() {
19 : 15 :
20} 16}
@@ -24,8 +20,6 @@ ESW_COMPONENT = "versal_psmfw.elf"
24do_deploy() { 20do_deploy() {
25 install -Dm 0644 ${B}/${ESW_COMPONENT} ${DEPLOYDIR}/${PSM_FIRMWARE_BASE_NAME}.elf 21 install -Dm 0644 ${B}/${ESW_COMPONENT} ${DEPLOYDIR}/${PSM_FIRMWARE_BASE_NAME}.elf
26 ln -sf ${PSM_FIRMWARE_BASE_NAME}.elf ${DEPLOYDIR}/${PSM_FIRMWARE_IMAGE_NAME}.elf 22 ln -sf ${PSM_FIRMWARE_BASE_NAME}.elf ${DEPLOYDIR}/${PSM_FIRMWARE_IMAGE_NAME}.elf
27 install -m 0644 ${B}/${ESW_COMPONENT}.bin ${DEPLOYDIR}/${PSM_FIRMWARE_BASE_NAME}.bin
28 ln -sf ${PSM_FIRMWARE_BASE_NAME}.bin ${DEPLOYDIR}/${PSM_FIRMWARE_IMAGE_NAME}.bin
29} 23}
30 24
31addtask deploy before do_build after do_install 25addtask deploy before do_build after do_install
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_generic.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_generic.inc
index 252425ef..47bde41d 100644
--- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_generic.inc
+++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware_generic.inc
@@ -42,8 +42,6 @@ do_compile() {
42 # --build-id=none is required due to linker script not defining a location for it. 42 # --build-id=none is required due to linker script not defining a location for it.
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
46 ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin
47} 45}
48 46
49do_install() { 47do_install() {
@@ -57,8 +55,6 @@ ESW_COMPONENT = "psmfw.elf"
57do_deploy() { 55do_deploy() {
58 install -Dm 0644 ${B}/${ESW_COMPONENT} ${DEPLOYDIR}/${PSM_FIRMWARE_BASE_NAME}.elf 56 install -Dm 0644 ${B}/${ESW_COMPONENT} ${DEPLOYDIR}/${PSM_FIRMWARE_BASE_NAME}.elf
59 ln -sf ${PSM_FIRMWARE_BASE_NAME}.elf ${DEPLOYDIR}/${PSM_FIRMWARE_IMAGE_NAME}.elf 57 ln -sf ${PSM_FIRMWARE_BASE_NAME}.elf ${DEPLOYDIR}/${PSM_FIRMWARE_IMAGE_NAME}.elf
60 install -m 0644 ${B}/${ESW_COMPONENT}.bin ${DEPLOYDIR}/${PSM_FIRMWARE_BASE_NAME}.bin
61 ln -sf ${PSM_FIRMWARE_BASE_NAME}.bin ${DEPLOYDIR}/${PSM_FIRMWARE_IMAGE_NAME}.bin
62} 58}
63 59
64addtask deploy before do_build after do_install 60addtask deploy before do_build after do_install
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psmfw-meta-xilinx-standalone.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psmfw-meta-xilinx-standalone.inc
index dc7c6df6..4d11cbce 100644
--- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psmfw-meta-xilinx-standalone.inc
+++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psmfw-meta-xilinx-standalone.inc
@@ -9,19 +9,12 @@ def check_psm_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('PSM_FILE') + ".elf"): 12 if not os.path.exists(d.getVar('PSM_FILE') + ".elf"):
14 msg = msg + "The expected file %s.elf is not available. " % d.getVar('PSM_FILE') 13 msg = msg + "The expected file %s.elf is not available. " % d.getVar('PSM_FILE')
15 fail = True
16 if not os.path.exists(d.getVar('PSM_FILE') + ".bin"):
17 msg = msg + "The expected file %s.bin is not available. " % d.getVar('PSM_FILE')
18 fail = True
19
20 if fail:
21 if not d.getVar('WITHIN_EXT_SDK'): 14 if not d.getVar('WITHIN_EXT_SDK'):
22 raise bb.parse.SkipRecipe("%s\nEither specify PSM_FILE, or you may need to enable BBMULTICONFIG += 'versal-fw' to generate it." % msg) 15 raise bb.parse.SkipRecipe("%s\nEither specify PSM_FILE, or you may need to enable BBMULTICONFIG += 'versal-fw' to generate it." % msg)
23 else: 16 else:
24 # We found the file, so be sure to track it 17 # We found the file, so be sure to track it
25 d.setVar('SRC_URI', 'file://${PSM_FILE}.elf file://${PSM_FILE}.bin') 18 d.setVar('SRC_URI', 'file://${PSM_FILE}.elf')
26 d.setVarFlag('do_install', 'file-checksums', '${PSM_FILE}.elf:True') 19 d.setVarFlag('do_install', 'file-checksums', '${PSM_FILE}.elf:True')
27 d.setVarFlag('do_deploy', 'file-checksums', '${PSM_FILE}.elf:True ${PSM_FILE}.bin:True') 20 d.setVarFlag('do_deploy', 'file-checksums', '${PSM_FILE}.elf:True')