summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaju Kumar Pothuraju <rajukumar.pothuraju@amd.com>2025-01-10 11:01:49 +0530
committerMark Hatle <mark.hatle@amd.com>2025-03-30 14:16:15 -0600
commit979d2f3bf4908a9a0185be740a7dff9bf791264d (patch)
treee5ba507ef69ff758d4a510e613bef8d45c14b608
parenta36dcfe6c8031a956e138dd06f5e2fa80f05dc5c (diff)
downloadmeta-xilinx-979d2f3bf4908a9a0185be740a7dff9bf791264d.tar.gz
pmufw.bb: Remove pmufw.bin support
We are using pmufw.elf in all flows to build and boot. Remove the pmufw.bin dependency or support from pmufw recipe. Use below command to generate the .bin from .elf. objcopy -O binary pmu-$MACHINE.elf pmu.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/conf/machine/include/soc-zynqmp.inc2
-rw-r--r--meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb13
-rw-r--r--meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/pmu-firmware_sdt.inc6
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_generic.inc4
-rw-r--r--meta-xilinx-standalone/recipes-bsp/embeddedsw/pmufw-meta-xilinx-standalone.inc10
5 files changed, 6 insertions, 29 deletions
diff --git a/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc b/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc
index aee5c19c..74029c4a 100644
--- a/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc
+++ b/meta-xilinx-core/conf/machine/include/soc-zynqmp.inc
@@ -25,7 +25,7 @@ PMU_ROM ?= "${DEPLOY_DIR_IMAGE}/pmu-rom.elf"
25 25
26 26
27# Default expects the user to provide a specific pmu-firwmare in the deploy 27# Default expects the user to provide a specific pmu-firwmare in the deploy
28# directory, named "pmu-firmware-${MACHINE}.elf" and "pmu-firmware-${MACHINE}.bin" 28# directory, named "pmu-firmware-${MACHINE}.elf"
29PMU_DEPENDS ??= "" 29PMU_DEPENDS ??= ""
30PMU_MCDEPENDS ??= "" 30PMU_MCDEPENDS ??= ""
31PMU_FIRMWARE_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}" 31PMU_FIRMWARE_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}"
diff --git a/meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb b/meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb
index 344a6f7a..40a0f5b2 100644
--- a/meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb
+++ b/meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb
@@ -23,7 +23,7 @@ PMU_FIRMWARE_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}"
23PMU_FIRMWARE_DEPLOY_DIR[vardepsexclude] += "TOPDIR" 23PMU_FIRMWARE_DEPLOY_DIR[vardepsexclude] += "TOPDIR"
24PMU_FIRMWARE_IMAGE_NAME ??= "pmu-firmware-${MACHINE}" 24PMU_FIRMWARE_IMAGE_NAME ??= "pmu-firmware-${MACHINE}"
25 25
26# Default is for the multilib case (without the extension .elf/.bin) 26# Default is for the multilib case (without the extension .elf)
27PMU_FILE ??= "${PMU_FIRMWARE_DEPLOY_DIR}/${PMU_FIRMWARE_IMAGE_NAME}" 27PMU_FILE ??= "${PMU_FIRMWARE_DEPLOY_DIR}/${PMU_FIRMWARE_IMAGE_NAME}"
28PMU_FILE[vardepsexclude] = "PMU_FIRMWARE_DEPLOY_DIR" 28PMU_FILE[vardepsexclude] = "PMU_FIRMWARE_DEPLOY_DIR"
29 29
@@ -46,7 +46,6 @@ SHOULD_DEPLOY = "${@'false' if (d.getVar('PMU_FILE')).startswith(d.getVar('DEPLO
46do_deploy() { 46do_deploy() {
47 if ${SHOULD_DEPLOY}; then 47 if ${SHOULD_DEPLOY}; then
48 install -Dm 0644 ${PMU_FILE}.elf ${DEPLOYDIR}/${PMU_FIRMWARE_IMAGE_NAME}.elf 48 install -Dm 0644 ${PMU_FILE}.elf ${DEPLOYDIR}/${PMU_FIRMWARE_IMAGE_NAME}.elf
49 install -Dm 0644 ${PMU_FILE}.bin ${DEPLOYDIR}/${PMU_FIRMWARE_IMAGE_NAME}.bin
50 fi 49 fi
51} 50}
52 51
@@ -68,21 +67,15 @@ def check_pmu_vars(d):
68 d.setVar('BB_DONT_CACHE', '1') 67 d.setVar('BB_DONT_CACHE', '1')
69 68
70 msg = "" 69 msg = ""
71 fail = False
72 if not os.path.exists(d.getVar('PMU_FILE') + ".elf"): 70 if not os.path.exists(d.getVar('PMU_FILE') + ".elf"):
73 msg = msg + "The expected file %s.elf is not available. " % d.getVar('PMU_FILE') 71 msg = msg + "The expected file %s.elf is not available. " % d.getVar('PMU_FILE')
74 fail = True
75 if not os.path.exists(d.getVar('PMU_FILE') + ".bin"):
76 msg = msg + "The expected file %s.bin is not available. " % d.getVar('PMU_FILE')
77 fail = True
78 if fail:
79 if not d.getVar('WITHIN_EXT_SDK'): 72 if not d.getVar('WITHIN_EXT_SDK'):
80 raise bb.parse.SkipRecipe("%s See the meta-xilinx-core README." % msg) 73 raise bb.parse.SkipRecipe("%s See the meta-xilinx-core README." % msg)
81 else: 74 else:
82 # We found the file, so be sure to track it 75 # We found the file, so be sure to track it
83 d.setVar('SRC_URI', 'file://${PMU_FILE}.elf file://${PMU_FILE}.bin') 76 d.setVar('SRC_URI', 'file://${PMU_FILE}.elf')
84 d.setVarFlag('do_install', 'file-checksums', '${PMU_FILE}.elf:True') 77 d.setVarFlag('do_install', 'file-checksums', '${PMU_FILE}.elf:True')
85 d.setVarFlag('do_deploy', 'file-checksums', '${PMU_FILE}.elf:True ${PMU_FILE}.bin:True') 78 d.setVarFlag('do_deploy', 'file-checksums', '${PMU_FILE}.elf:True')
86 79
87 80
88python() { 81python() {
diff --git a/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/pmu-firmware_sdt.inc b/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/pmu-firmware_sdt.inc
index e5b123cd..bbab5b0d 100644
--- a/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/pmu-firmware_sdt.inc
+++ b/meta-xilinx-standalone-sdt/recipes-bsp/embeddedsw/pmu-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 = "zynqmp_pmufw.elf"
24do_deploy() { 20do_deploy() {
25 install -Dm 0644 ${B}/${ESW_COMPONENT} ${DEPLOYDIR}/${PMU_FIRMWARE_BASE_NAME}.elf 21 install -Dm 0644 ${B}/${ESW_COMPONENT} ${DEPLOYDIR}/${PMU_FIRMWARE_BASE_NAME}.elf
26 ln -sf ${PMU_FIRMWARE_BASE_NAME}.elf ${DEPLOYDIR}/${PMU_FIRMWARE_IMAGE_NAME}.elf 22 ln -sf ${PMU_FIRMWARE_BASE_NAME}.elf ${DEPLOYDIR}/${PMU_FIRMWARE_IMAGE_NAME}.elf
27 install -m 0644 ${B}/${ESW_COMPONENT}.bin ${DEPLOYDIR}/${PMU_FIRMWARE_BASE_NAME}.bin
28 ln -sf ${PMU_FIRMWARE_BASE_NAME}.bin ${DEPLOYDIR}/${PMU_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/pmu-firmware_generic.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_generic.inc
index 9d4a5b07..d7a5009f 100644
--- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_generic.inc
+++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_generic.inc
@@ -31,8 +31,6 @@ EXTRA_OEMAKE = "${@bsp_make_vars(d)}"
31 31
32do_compile() { 32do_compile() {
33 oe_runmake 33 oe_runmake
34
35 ${MB_OBJCOPY} -O binary ${B}/${ESW_COMPONENT} ${B}/${ESW_COMPONENT}.bin
36} 34}
37 35
38do_install() { 36do_install() {
@@ -46,8 +44,6 @@ ESW_COMPONENT = "executable.elf"
46do_deploy() { 44do_deploy() {
47 install -Dm 0644 ${B}/${ESW_COMPONENT} ${DEPLOYDIR}/${PMU_FIRMWARE_BASE_NAME}.elf 45 install -Dm 0644 ${B}/${ESW_COMPONENT} ${DEPLOYDIR}/${PMU_FIRMWARE_BASE_NAME}.elf
48 ln -sf ${PMU_FIRMWARE_BASE_NAME}.elf ${DEPLOYDIR}/${PMU_FIRMWARE_IMAGE_NAME}.elf 46 ln -sf ${PMU_FIRMWARE_BASE_NAME}.elf ${DEPLOYDIR}/${PMU_FIRMWARE_IMAGE_NAME}.elf
49 install -m 0644 ${B}/${ESW_COMPONENT}.bin ${DEPLOYDIR}/${PMU_FIRMWARE_BASE_NAME}.bin
50 ln -sf ${PMU_FIRMWARE_BASE_NAME}.bin ${DEPLOYDIR}/${PMU_FIRMWARE_IMAGE_NAME}.bin
51} 47}
52 48
53addtask deploy before do_build after do_install 49addtask deploy before do_build after do_install
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmufw-meta-xilinx-standalone.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmufw-meta-xilinx-standalone.inc
index 241da1d0..4af57ec7 100644
--- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmufw-meta-xilinx-standalone.inc
+++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmufw-meta-xilinx-standalone.inc
@@ -9,18 +9,12 @@ def check_pmu_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('PMU_FILE') + ".elf"): 12 if not os.path.exists(d.getVar('PMU_FILE') + ".elf"):
14 msg = msg + "The expected file %s.elf is not available. " % d.getVar('PMU_FILE') 13 msg = msg + "The expected file %s.elf is not available. " % d.getVar('PMU_FILE')
15 fail = True
16 if not os.path.exists(d.getVar('PMU_FILE') + ".bin"):
17 msg = msg + "The expected file %s.bin is not available. " % d.getVar('PMU_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 PMU_FILE, or you may need to enable BBMULTICONFIG += 'zynqmp-pmufw' to generate it." % msg) 15 raise bb.parse.SkipRecipe("%s\nEither specify PMU_FILE, or you may need to enable BBMULTICONFIG += 'zynqmp-pmufw' 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://${PMU_FILE}.elf file://${PMU_FILE}.bin') 18 d.setVar('SRC_URI', 'file://${PMU_FILE}.elf')
25 d.setVarFlag('do_install', 'file-checksums', '${PMU_FILE}.elf:True') 19 d.setVarFlag('do_install', 'file-checksums', '${PMU_FILE}.elf:True')
26 d.setVarFlag('do_deploy', 'file-checksums', '${PMU_FILE}.elf:True ${PMU_FILE}.bin:True') 20 d.setVarFlag('do_deploy', 'file-checksums', '${PMU_FILE}.elf:True')