diff options
author | Mark Hatle <mark.hatle@xilinx.com> | 2021-03-05 08:54:52 -0800 |
---|---|---|
committer | Mark Hatle <mark.hatle@xilinx.com> | 2021-03-05 10:45:18 -0800 |
commit | bab70c9b09106a9d2b1f168f7beff010dc4d44dc (patch) | |
tree | 3d16307e51ec12de970291b6ce9550fb0f02832c | |
parent | 2b71a5526730d915106405a71a7bcf515c68fbb1 (diff) | |
download | meta-xilinx-bab70c9b09106a9d2b1f168f7beff010dc4d44dc.tar.gz |
Further adjustments for embeddedsw so it works with meta-xilinx-tools
Ensure that plm-firmware can run for any microblaze & versal configuration.
Ensure that psm-firmware can run for any microblaze & versal configuration.
Ensure that pmu-firmware can run for any microblaze & zynqmp configuration.
In each case, use EXTRA_OEMAKE to set the bsp_make_vars instead of
individual references. This allows meta-xilinx-tools to disable this.
Signed-off-by: Mark Hatle <mark.hatle@xilinx.com>
5 files changed, 32 insertions, 23 deletions
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc index 49e6e452..57e577ea 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/plm-firmware.inc | |||
@@ -6,7 +6,8 @@ PROVIDES = "virtual/plm" | |||
6 | inherit xlnx-embeddedsw deploy | 6 | inherit xlnx-embeddedsw deploy |
7 | 7 | ||
8 | COMPATIBLE_HOST = "microblaze.*-elf" | 8 | COMPATIBLE_HOST = "microblaze.*-elf" |
9 | COMPATIBLE_MACHINE = "microblaze-plm" | 9 | COMPATIBLE_MACHINE = "none" |
10 | COMPATIBLE_MACHINE_versal = ".*" | ||
10 | 11 | ||
11 | S = "${WORKDIR}/git" | 12 | S = "${WORKDIR}/git" |
12 | B = "${S}/lib/sw_apps/versal_plm/src" | 13 | B = "${S}/lib/sw_apps/versal_plm/src" |
@@ -32,19 +33,21 @@ def bsp_make_vars(d): | |||
32 | s = ["COMPILER", "CC", "COMPILER_FLAGS", "EXTRA_COMPILER_FLAGS", "ARCHIVER", "AR", "AS"] | 33 | s = ["COMPILER", "CC", "COMPILER_FLAGS", "EXTRA_COMPILER_FLAGS", "ARCHIVER", "AR", "AS"] |
33 | return " ".join(["\"%s=%s\"" % (v, d.getVar(v)) for v in s]) | 34 | return " ".join(["\"%s=%s\"" % (v, d.getVar(v)) for v in s]) |
34 | 35 | ||
36 | EXTRA_OEMAKE = "${@bsp_make_vars(d)}" | ||
37 | |||
35 | do_compile() { | 38 | do_compile() { |
36 | # the Makefile in ${B}/../misc/Makefile, does not handle CC, AR, AS, etc | 39 | # the Makefile in ${B}/../misc/Makefile, does not handle CC, AR, AS, etc |
37 | # properly. So do its job manually. Preparing the includes first, then libs. | 40 | # properly. So do its job manually. Preparing the includes first, then libs. |
38 | for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do | 41 | for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do |
39 | oe_runmake -C $(dirname $i) -s include ${@bsp_make_vars(d)} | 42 | oe_runmake -C $(dirname $i) -s include |
40 | done | 43 | done |
41 | for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do | 44 | for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do |
42 | oe_runmake -C $(dirname $i) -s libs ${@bsp_make_vars(d)} | 45 | oe_runmake -C $(dirname $i) -s libs |
43 | done | 46 | done |
44 | 47 | ||
45 | # --build-id=none is required due to linker script not defining a location for it. | 48 | # --build-id=none is required due to linker script not defining a location for it. |
46 | # Again, recipe-systoot include is necessary | 49 | # Again, recipe-systoot include is necessary |
47 | oe_runmake CC="${CC}" CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" | 50 | oe_runmake CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" |
48 | } | 51 | } |
49 | 52 | ||
50 | do_install() { | 53 | do_install() { |
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware.inc index f77976e0..01d05a9b 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware.inc | |||
@@ -5,7 +5,8 @@ PROVIDES = "virtual/pmu-firmware" | |||
5 | inherit xlnx-embeddedsw deploy | 5 | inherit xlnx-embeddedsw deploy |
6 | 6 | ||
7 | COMPATIBLE_HOST = "microblaze.*-elf" | 7 | COMPATIBLE_HOST = "microblaze.*-elf" |
8 | COMPATIBLE_MACHINE = "microblaze-pmu" | 8 | COMPATIBLE_MACHINE = "none" |
9 | COMPATIBLE_MACHINE_zynqmp = ".*" | ||
9 | 10 | ||
10 | S = "${WORKDIR}/git" | 11 | S = "${WORKDIR}/git" |
11 | B = "${S}/lib/sw_apps/zynqmp_pmufw/src" | 12 | B = "${S}/lib/sw_apps/zynqmp_pmufw/src" |
@@ -31,19 +32,21 @@ def bsp_make_vars(d): | |||
31 | s = ["COMPILER", "CC", "COMPILER_FLAGS", "EXTRA_COMPILER_FLAGS", "ARCHIVER", "AR", "AS"] | 32 | s = ["COMPILER", "CC", "COMPILER_FLAGS", "EXTRA_COMPILER_FLAGS", "ARCHIVER", "AR", "AS"] |
32 | return " ".join(["\"%s=%s\"" % (v, d.getVar(v)) for v in s]) | 33 | return " ".join(["\"%s=%s\"" % (v, d.getVar(v)) for v in s]) |
33 | 34 | ||
35 | EXTRA_OEMAKE = "${@bsp_make_vars(d)}" | ||
36 | |||
34 | do_compile() { | 37 | do_compile() { |
35 | # the Makefile in ${B}/../misc/Makefile, does not handle CC, AR, AS, etc | 38 | # the Makefile in ${B}/../misc/Makefile, does not handle CC, AR, AS, etc |
36 | # properly. So do its job manually. Preparing the includes first, then libs. | 39 | # properly. So do its job manually. Preparing the includes first, then libs. |
37 | for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do | 40 | for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do |
38 | oe_runmake -C $(dirname $i) -s include ${@bsp_make_vars(d)} | 41 | oe_runmake -C $(dirname $i) -s include |
39 | done | 42 | done |
40 | for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do | 43 | for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do |
41 | oe_runmake -C $(dirname $i) -s libs ${@bsp_make_vars(d)} | 44 | oe_runmake -C $(dirname $i) -s libs |
42 | done | 45 | done |
43 | 46 | ||
44 | # --build-id=none is required due to linker script not defining a location for it. | 47 | # --build-id=none is required due to linker script not defining a location for it. |
45 | # Again, recipe-systoot include is necessary | 48 | # Again, recipe-systoot include is necessary |
46 | oe_runmake CC="${CC}" CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" | 49 | oe_runmake CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" |
47 | } | 50 | } |
48 | 51 | ||
49 | do_install() { | 52 | do_install() { |
@@ -51,6 +54,7 @@ do_install() { | |||
51 | } | 54 | } |
52 | 55 | ||
53 | PMU_FIRMWARE_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" | 56 | PMU_FIRMWARE_BASE_NAME ?= "${BPN}-${PKGE}-${PKGV}-${PKGR}-${MACHINE}${IMAGE_VERSION_SUFFIX}" |
57 | PMU_FIRMWARE_BASE_NAME[vardepsexclude] = "DATETIME" | ||
54 | 58 | ||
55 | do_deploy() { | 59 | do_deploy() { |
56 | install -Dm 0644 ${B}/executable.elf ${DEPLOYDIR}/${PMU_FIRMWARE_BASE_NAME}.elf | 60 | install -Dm 0644 ${B}/executable.elf ${DEPLOYDIR}/${PMU_FIRMWARE_BASE_NAME}.elf |
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2020.2.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2020.2.bb index 81eaf1ae..93c8bafc 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2020.2.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_2020.2.bb | |||
@@ -23,26 +23,26 @@ do_compile() { | |||
23 | # First process the sequential items | 23 | # First process the sequential items |
24 | for i in $(cat seq.mak); do | 24 | for i in $(cat seq.mak); do |
25 | echo Include Seq: $i | 25 | echo Include Seq: $i |
26 | oe_runmake -C $(dirname $i) -s include ${@bsp_make_vars(d)} | 26 | oe_runmake -C $(dirname $i) -s include |
27 | done | 27 | done |
28 | for i in $(cat seq.mak); do | 28 | for i in $(cat seq.mak); do |
29 | echo Libs Seq: $i | 29 | echo Libs Seq: $i |
30 | oe_runmake -C $(dirname $i) -s libs ${@bsp_make_vars(d)} | 30 | oe_runmake -C $(dirname $i) -s libs |
31 | done | 31 | done |
32 | 32 | ||
33 | # the Makefile in ${B}/../misc/Makefile, does not handle CC, AR, AS, etc | 33 | # the Makefile in ${B}/../misc/Makefile, does not handle CC, AR, AS, etc |
34 | # properly. So do its job manually. Preparing the includes first, then libs. | 34 | # properly. So do its job manually. Preparing the includes first, then libs. |
35 | for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do | 35 | for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do |
36 | echo Include: $i | 36 | echo Include: $i |
37 | oe_runmake -C $(dirname $i) -s include ${@bsp_make_vars(d)} | 37 | oe_runmake -C $(dirname $i) -s include |
38 | done | 38 | done |
39 | for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do | 39 | for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do |
40 | echo Libs: $i | 40 | echo Libs: $i |
41 | oe_runmake -C $(dirname $i) -s libs ${@bsp_make_vars(d)} | 41 | oe_runmake -C $(dirname $i) -s libs |
42 | done | 42 | done |
43 | 43 | ||
44 | # --build-id=none is required due to linker script not defining a location for it. | 44 | # --build-id=none is required due to linker script not defining a location for it. |
45 | # Again, recipe-systoot include is necessary | 45 | # Again, recipe-systoot include is necessary |
46 | echo Construct: executable | 46 | echo Construct: executable |
47 | oe_runmake executable.elf ${@bsp_make_vars(d)} CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" | 47 | oe_runmake executable.elf CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" |
48 | } | 48 | } |
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_git.bb b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_git.bb index fe4dcf5f..2fc69cbe 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_git.bb +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/pmu-firmware_git.bb | |||
@@ -26,26 +26,26 @@ do_compile() { | |||
26 | # First process the sequential items | 26 | # First process the sequential items |
27 | for i in $(cat seq.mak); do | 27 | for i in $(cat seq.mak); do |
28 | echo Include Seq: $i | 28 | echo Include Seq: $i |
29 | oe_runmake -C $(dirname $i) -s include ${@bsp_make_vars(d)} | 29 | oe_runmake -C $(dirname $i) -s include |
30 | done | 30 | done |
31 | for i in $(cat seq.mak); do | 31 | for i in $(cat seq.mak); do |
32 | echo Libs Seq: $i | 32 | echo Libs Seq: $i |
33 | oe_runmake -C $(dirname $i) -s libs ${@bsp_make_vars(d)} | 33 | oe_runmake -C $(dirname $i) -s libs |
34 | done | 34 | done |
35 | 35 | ||
36 | # the Makefile in ${B}/../misc/Makefile, does not handle CC, AR, AS, etc | 36 | # the Makefile in ${B}/../misc/Makefile, does not handle CC, AR, AS, etc |
37 | # properly. So do its job manually. Preparing the includes first, then libs. | 37 | # properly. So do its job manually. Preparing the includes first, then libs. |
38 | for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do | 38 | for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do |
39 | echo Include: $i | 39 | echo Include: $i |
40 | oe_runmake -C $(dirname $i) -s include ${@bsp_make_vars(d)} | 40 | oe_runmake -C $(dirname $i) -s include |
41 | done | 41 | done |
42 | for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do | 42 | for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do |
43 | echo Libs: $i | 43 | echo Libs: $i |
44 | oe_runmake -C $(dirname $i) -s libs ${@bsp_make_vars(d)} | 44 | oe_runmake -C $(dirname $i) -s libs |
45 | done | 45 | done |
46 | 46 | ||
47 | # --build-id=none is required due to linker script not defining a location for it. | 47 | # --build-id=none is required due to linker script not defining a location for it. |
48 | # Again, recipe-systoot include is necessary | 48 | # Again, recipe-systoot include is necessary |
49 | echo Construct: executable | 49 | echo Construct: executable |
50 | oe_runmake executable.elf ${@bsp_make_vars(d)} CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" | 50 | oe_runmake executable.elf CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" |
51 | } | 51 | } |
diff --git a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc index 25db5bf4..05b9a9b5 100644 --- a/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc +++ b/meta-xilinx-standalone/recipes-bsp/embeddedsw/psm-firmware.inc | |||
@@ -6,8 +6,8 @@ PROVIDES = "virtual/psm-firmware" | |||
6 | inherit xlnx-embeddedsw deploy | 6 | inherit xlnx-embeddedsw deploy |
7 | 7 | ||
8 | COMPATIBLE_HOST = "microblaze.*-elf" | 8 | COMPATIBLE_HOST = "microblaze.*-elf" |
9 | COMPATIBLE_MACHINE = "microblaze-psm" | 9 | COMPATIBLE_MACHINE = "none" |
10 | 10 | COMPATIBLE_MACHINE_versal = ".*" | |
11 | 11 | ||
12 | S = "${WORKDIR}/git" | 12 | S = "${WORKDIR}/git" |
13 | B = "${S}/lib/sw_apps/versal_psmfw/src" | 13 | B = "${S}/lib/sw_apps/versal_psmfw/src" |
@@ -33,19 +33,21 @@ def bsp_make_vars(d): | |||
33 | s = ["COMPILER", "CC", "COMPILER_FLAGS", "EXTRA_COMPILER_FLAGS", "ARCHIVER", "AR", "AS"] | 33 | s = ["COMPILER", "CC", "COMPILER_FLAGS", "EXTRA_COMPILER_FLAGS", "ARCHIVER", "AR", "AS"] |
34 | return " ".join(["\"%s=%s\"" % (v, d.getVar(v)) for v in s]) | 34 | return " ".join(["\"%s=%s\"" % (v, d.getVar(v)) for v in s]) |
35 | 35 | ||
36 | EXTRA_OEMAKE = "${@bsp_make_vars(d)}" | ||
37 | |||
36 | do_compile() { | 38 | do_compile() { |
37 | # the Makefile in ${B}/../misc/Makefile, does not handle CC, AR, AS, etc | 39 | # the Makefile in ${B}/../misc/Makefile, does not handle CC, AR, AS, etc |
38 | # properly. So do its job manually. Preparing the includes first, then libs. | 40 | # properly. So do its job manually. Preparing the includes first, then libs. |
39 | for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do | 41 | for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do |
40 | oe_runmake -C $(dirname $i) -s include ${@bsp_make_vars(d)} | 42 | oe_runmake -C $(dirname $i) -s include |
41 | done | 43 | done |
42 | for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do | 44 | for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do |
43 | oe_runmake -C $(dirname $i) -s libs ${@bsp_make_vars(d)} | 45 | oe_runmake -C $(dirname $i) -s libs |
44 | done | 46 | done |
45 | 47 | ||
46 | # --build-id=none is required due to linker script not defining a location for it. | 48 | # --build-id=none is required due to linker script not defining a location for it. |
47 | # Again, recipe-systoot include is necessary | 49 | # Again, recipe-systoot include is necessary |
48 | oe_runmake CC="${CC}" CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" | 50 | oe_runmake CC_FLAGS="-MMD -MP -Wl,--build-id=none -I${STAGING_DIR_TARGET}/usr/include" |
49 | } | 51 | } |
50 | 52 | ||
51 | do_install() { | 53 | do_install() { |