[meta-xilinx] [PATCH 3/5] pmu-firmware: Create a recipe for the PMU firmware for PMU on ZynqMP
Manjukumar Harthikote Matha
manjukumar.harthikote-matha at xilinx.com
Fri May 26 15:39:53 PDT 2017
> -----Original Message-----
> From: Nathan Rossi [mailto:nathan at nathanrossi.com]
> Sent: Thursday, May 25, 2017 10:00 PM
> To: Manjukumar Harthikote Matha <MANJUKUM at xilinx.com>
> Cc: meta-xilinx at yoctoproject.org
> 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-
> matha at xilinx.com> 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 <nathan at nathanrossi.com>
> >> ---
> >> 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?
Thanks
Manju
> Thanks,
> Nathan
This email and any attachments are intended for the sole use of the named recipient(s) and contain(s) confidential information that may be proprietary, privileged or copyrighted under applicable law. If you are not the intended recipient, do not read, copy, or forward this email message or any attachments. Delete this email message and any attachments immediately.
More information about the meta-xilinx
mailing list