On 31-08-16 07:19, Edward Wingate wrote:
> Is it possible to use Yocto to compile a Xilinx SDK project?  Would I

I'm experimenting with that. A recipe like this may be used to compile an
existing SDK project using Eclipse (work in progress, I happen to be doing the
same thing):

SUMMARY = "ARM firmware for second CPU"
LICENSE = "CLOSED"
SRC_URI = "git://${HOME}/projects/amp-blink"
SRCREV = "${AUTOREV}"
inherit gitpkgv
PV = "0+${SRCPV}"
PKGV = "0+${GITPKGV}"
S = "${WORKDIR}/git"
# Using toolchain from Xilinx, so no dependency on libc or gcc.
INHIBIT_DEFAULT_DEPS = "1"
XILINX_SDK_VERSION = "2016.2"
XILINX_SDK_PATH = "/opt/Xilinx/SDK/${XILINX_SDK_VERSION}"
ECLIPSE = "${XILINX_SDK_PATH}/eclipse/lnx64.o/eclipse"
VM = "${XILINX_SDK_PATH}/tps/lnx64/jre/bin"
WSPACE = "${S}/workspace"
TARGET = "blink/Release/blink.elf"
# Magic Xilinx eclipse build command, see:
#
http://www.xilinx.com/support/documentation/sw_manuals/xilinx2014_2/SDK_Doc/concepts/sdk_c_headless_mode.htm
# Since (like all Xilinx tools) you don't get a sensible return value, check
# for presence of the output file on completion to trigger a compile error.
do_compile() {
    ${ECLIPSE} -vm ${VM} -nosplash -application
org.eclipse.cdt.managedbuilder.core.headlessbuild -build all -data ${WSPACE}
-vmargs -Dorg.eclipse.cdt.core.console=org.eclipse.cdt.core.systemConsole
    test -e "${TARGET}"
}
FILES_${PN} = "/lib/firmware"
do_install() {
install -d ${D}/lib/firmware
install -m 644 ${S}/${TARGET} ${D}/lib/firmware/
}


> use the Linux version of Xilinx SDK, or could/would I use some other
> toolchain that's more command-line oriented?  Could I furthermore

Xilinx SDK is actually just Eclipse, and that isn't very commandline friendly
as it seems. I've virtually no experience with it.

My biggest problem is that XSDK creates about a hundred files, and it's
unclear how to store them in version control. Answers from Xilinx like these:
http://www.xilinx.com/support/documentation/sw_manuals/xilinx14_1/SDK_Doc/reference/sdk_u_cvs.htm
are just plain wrong, if you commit the files listed there and clone it
elsewhere, it won't even see the project and build nothing.

For the Zynq, one could use the OE toolchain to build the AMP firmware, since
they are the same CPU. Haven't tried that yet, but it would nicely solve the
issues with the SDK toolchain that requires manual installation of various
host system packages because it's a 32-bit program.

On the MPSOC, the R5 cores don't have the same instruction set as the A53
cores, so you need a different "tune" for those. To build with the OE chain,
you'd have to define a machine for them. OE is currently working on a
multi-config feature that might be able to build such a system in one call.

> build a BOOT.BIN from, say, a Xilinx SDK-based FSBL and a Yocto
> generated u-boot.elf?  Can anyone point me to or provide example
> recipes that accomplish some of these things?  Thanks for any help.

In meta-topic I have made recipes that build a Vivado project, export the
resulting 'hardware' into the sysroot (including ps7_init.c) and then use that
to build u-boot SPL. Other recipes can use the hardware output as they see fit
too. You can call bootgen from the build of course, just like other Xilinx tools.

I abandoned that route because of the bugs and limitations in Vivado's PS
configuration, currently I just let Vivado generate a "draft" script and then
manually patch that. With kernel 4.x the pinmuxing can be done in the kernel,
so the bootloader can be quite generic (only needs to configure boot devices).


 

Kind regards,

 

Mike Looijmans

System Expert

 



TOPIC Products

 

 

Materiaalweg 4

 

 

5681 RJ Best

T:

+31 (0) 499 33 69 69

Postbus 440

E:

mike.looijm...@topicproducts.com

5680 AK Best

W:

www.topicproducts.com

The Netherlands


Please consider the environment before printing this e-mail


Topic zoekt gedreven (embedded) software specialisten!

-- 
_______________________________________________
meta-xilinx mailing list
meta-xilinx@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-xilinx

Reply via email to