On 27 May 2017 at 08:39, Manjukumar Harthikote Matha <[email protected]> wrote: > > >> -----Original Message----- >> From: Nathan Rossi [mailto:[email protected]] >> Sent: Thursday, May 25, 2017 10:00 PM >> To: Manjukumar Harthikote Matha <[email protected]> >> Cc: [email protected] >> Subject: Re: [meta-xilinx] [PATCH 3/5] pmu-firmware: Create a recipe for the >> PMU >> firmware for PMU on ZynqMP >> >> On 26 May 2017 at 11:00, Manjukumar Harthikote Matha <manjukumar.harthikote- >> [email protected]> wrote: >> > Hi Nathan, >> > >> > >> > On 05/18/2017 09:02 AM, Nathan Rossi wrote: >> >> >> >> Create a recipe for the PMU firmware for the ZynqMP PMU. This >> >> firmware is provided by the embeddedsw repo, and specifically uses >> >> the 'zynqmp_pmufw' application of the repo. >> >> >> >> This build requires a MicroBlaze compiler with newlib, libgloss and >> >> libgcc. >> >> >> >> Signed-off-by: Nathan Rossi <[email protected]> >> >> --- >> >> recipes-bsp/pmu-firmware/pmu-firmware_2017.1.bb | 80 >> >> +++++++++++++++++++++++++ >> >> 1 file changed, 80 insertions(+) >> >> create mode 100644 recipes-bsp/pmu-firmware/pmu-firmware_2017.1.bb >> >> >> >> diff --git a/recipes-bsp/pmu-firmware/pmu-firmware_2017.1.bb >> >> b/recipes-bsp/pmu-firmware/pmu-firmware_2017.1.bb >> >> new file mode 100644 >> >> index 0000000000..be4666f6a1 >> >> --- /dev/null >> >> +++ b/recipes-bsp/pmu-firmware/pmu-firmware_2017.1.bb >> >> @@ -0,0 +1,80 @@ >> >> +SUMMARY = "Firmware for the PMU on the ZynqMP Programmable Silicon" >> >> +HOMEPAGE = "https://github.com/Xilinx/embeddedsw" >> >> +SECTION = "bsp" >> >> + >> >> +INHIBIT_DEFAULT_DEPS = "1" >> >> +DEPENDS = "virtual/${TARGET_PREFIX}gcc newlib libgloss libgcc" >> >> + >> >> +# This source links in a number of components with differing >> >> +licenses, >> >> and some >> >> +# licenses are not Open Source compatible. Additionally the >> >> +pmu-firmware >> >> source >> >> +# itself is licensed under a modified MIT license which restricts >> >> +use to >> >> Xilinx >> >> +# devices only. >> >> +LICENSE = "Proprietary" >> >> +LIC_FILES_CHKSUM = >> >> "file://../../../../license.txt;md5=8c0025a6b0e91b4ab8e4ba9f6d2fb65c" >> >> + >> >> +inherit deploy >> >> + >> >> +XILINX_RELEASE_VERSION = "v2017.1" >> >> +SRCREV = "3813f14966bd69e7e1d59943d2a58c64efafa17b" >> >> +PV = "${XILINX_RELEASE_VERSION}+git${SRCPV}" >> >> + >> >> +SRC_URI = >> >> "git://github.com/Xilinx/embeddedsw.git;protocol=https;nobranch=1" >> >> + >> >> +COMPATIBLE_HOST = "microblaze.*-elf" >> >> +COMPATIBLE_MACHINE = "^$" >> >> +COMPATIBLE_MACHINE_zynqmp = "zynqmp" >> >> + >> >> +PACKAGE_ARCH = "${MACHINE_ARCH}" >> >> + >> >> +S = "${WORKDIR}/git/lib/sw_apps/zynqmp_pmufw/src" >> >> + >> >> +# The makefile does not handle parallelization PARALLEL_MAKE = "" >> >> + >> >> +do_configure() { >> >> + # manually do the copy_bsp step first, so as to be able to >> >> +fix up >> >> use of >> >> + # mb-* commands >> >> + ${S}/../misc/copy_bsp.sh >> >> +} >> >> + >> >> +COMPILER = "${CC}" >> >> +COMPILER_FLAGS = "-O2 -c" >> >> +EXTRA_COMPILER_FLAGS = "-g -Wall -Wextra -Os -flto -ffat-lto-objects" >> >> +ARCHIVER = "${AR}" >> >> + >> >> +# HACK: fix the dirty bug where xilsecure wants to call this >> >> +PSVersion # function, which is not implemented for microblaze. The >> >> +symbols never >> >> make it >> >> +# into the final elf as the xilsecure function that uses it is not >> >> +called >> >> in >> >> +# pmufw. >> >> +EXTRA_COMPILER_FLAGS_append = " -DXGetPSVersion_Info=atexit" >> >> + >> >> +BSP_DIR ?= "${S}/../misc/zynqmp_pmufw_bsp" >> >> +BSP_TARGETS_DIR ?= "${BSP_DIR}/psu_pmu_0/libsrc" >> >> + >> > >> > Can we add the following? Basically deploying versioned images >> > >> > PMU_FIRMWARE_BASE_NAME ?=" >> > ${PN}${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}" >> > PMU_FIRMWARE_BASE_NAME[vardepsexclude] = "DATETIME" >> > >> > >> >> +def bsp_make_vars(d): >> >> + s = ["COMPILER", "CC", "COMPILER_FLAGS", "EXTRA_COMPILER_FLAGS", >> >> "ARCHIVER", "AR", "AS"] >> >> + return " ".join(["\"%s=%s\"" % (v, d.getVar(v)) for v in s]) >> >> + >> >> +do_compile() { >> >> + # the Makefile in ${S}/../misc/Makefile, does not handle CC, >> >> +AR, >> >> AS, etc >> >> + # properly. So do its job manually. Preparing the includes >> >> + first, >> >> then libs. >> >> + for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do >> >> + oe_runmake -C $(dirname $i) -s include >> >> ${@bsp_make_vars(d)} >> >> + done >> >> + for i in $(ls ${BSP_TARGETS_DIR}/*/src/Makefile); do >> >> + oe_runmake -C $(dirname $i) -s libs ${@bsp_make_vars(d)} >> >> + done >> >> + >> >> + # --build-id=none is required due to linker script not >> >> + defining a >> >> location for it. >> >> + oe_runmake CC="${CC}" CC_FLAGS="-MMD -MP -Wl,--build-id=none" >> >> +} >> >> + >> >> +do_install() { >> >> + : >> >> +} >> >> + >> >> +do_deploy() { >> >> + install -Dm 0644 ${B}/executable.elf >> >> ${DEPLOYDIR}/pmu-${MACHINE}.elf >> > >> > install -Dm 0644 ${B}/executable.elf >> > ${DEPLOYDIR}/${PMU_FIRMWARE_BASE_NAME}.elf >> > ln -sf ${PMU_FIRMWARE_BASE_NAME}.elf ${DEPLOYDIR}/${PN}-${MACHINE}.elf >> > ln -sf ${PN}-${MACHINE}.elf ${DEPLOYDIR}/pmu-${MACHINE}.elf >> >> I will update the series to add this. However there are issues with using PN >> due to the >> "zynqmp-pmu-" prefix when building with the PN rewriting due to zynqmp- >> pmu.bbclass, so BPN instead of PN. >> > Ok thanks. > > In addition, I am seeing the following warning while building e-sdk we should > resolve it > > WARNING: core-image-minimal-1.0-r0 do_populate_sdk_ext: Manifest > /workspaces2/manjukum/meta-xilinx-master/build/tmp/sstate-control/manifest-x86_64_aarch64-zynqmp-pmu-gcc-cross-microblazeel.populate_sysroot > not found? > WARNING: core-image-minimal-1.0-r0 do_populate_sdk_ext: Manifest > /workspaces2/manjukum/meta-xilinx-master/build/tmp/sstate-control/manifest-x86_64_aarch64-zynqmp-pmu-binutils-cross-microblazeel.populate_sysroot > not found?
Unfortunately this is where the cracks start to appear in the extender class implementation. This is one of the reasons as to why this implementation should be replaced with multiconfig once multiconfig option can handle this use case. Essentially the warnings you are seeing are caused by the staging class following do_deploy task dependency chains resulting in the image having dependence on the do_populate_sysroot of the pmu architecture target/cross tasks. I managed to resolve this for the 'target' (pmu) outputs by putting the image/sysroot content in a nested prefix (/usr/<prefix>). This is much harder to do with the cross recipes without modifying staging.bbclass (which has checks for target/native/nativesdk cross types). This is the line of interest http://git.openembedded.org/openembedded-core/tree/meta/classes/staging.bbclass#n529. Since at the image tasks TARGET_ARCH != PMU_ARCH, this is why the manifest files don't exist. However I don't think this is a major problem since it is not intended to be shipping the PMU microblaze toolchain in the eSDK (the class doesn't handle nativesdk-zynqmp-pmu-gcc-cross-microblazeel builds/etc and the nesting of extenders is problematic), also the pmu cross toolchain is not added to the TOOLCHAIN_HOST_TASK. So the warnings can be ignored. Regards, Nathan -- _______________________________________________ meta-xilinx mailing list [email protected] https://lists.yoctoproject.org/listinfo/meta-xilinx
