On 11/23/22 4:47 PM, [email protected] wrote:
Hi Mark,

Thanks for taking a look! Comments below.

The primary usage is to build an external toolchain.  The external toolchain
can be used to build baremetal but does NOT include libxil.  libxil is tied to 
the
hardware and is built 'elsewhere'.

Yes, I should have mentioned, I started by generating a platform project using 
Vivado (feeding it a .xsa). I am converting the Makefile-based build system to 
Meson. So we are building libxil that way.

The external toolchain is built using:

DISTRO=xilinx-standalone
MACHINE=aarch32-tc

bitbake meta-toolchain

Use the environment file for the correct output and use the matching libxil.a
and it should work.

I think for Cortex R5, I'd want to use arm-rm-tc, right? (Since it's armv7-r)

Correct.

However, I will need aarch32-tc because we also are targeting a Zynq 7000. For 
that one, I think we need the armv7afpthf tune. Seems like the MACHINES are 
implemented using multilib, though. I don't really have any experience with 
that.

multilibs are tune specific.. and require underlying configurations to understand how to build potentially incompatible libraries and combine them together into a single filesystem. In this case "BASE_LIBS" is what configures the system to be able to do that. The 'DEFAULTTUNE' is your default, everything else becomes an 'alternative', specified via DEFAULT:virtclass-multilib-<multilib>.

Do you have any advice on how to use multilib for this? I am trying to dig up 
documentation on how to actually incorporate multilib into a build but it is 
sparse. (There is 
https://docs.yoctoproject.org/dev-manual/common-tasks.html#combining-multiple-versions-of-library-files-into-one-image
 but it didn't really help my understanding). I will also ask on the mailing 
list.

All of the TC's work the same way, but...

https://github.com/Xilinx/meta-xilinx/blob/6cbae9509694a2ed65435f391c5a900e4c1d3908/meta-xilinx-standalone/conf/machine/arm-rm-tc.conf#L18

Lines 18-27 control the build combinations.  Plus the default tune is 'armv7r'.

Since you only want to target the R5, you can zero out the MULTILIBs value and ONLY build for the default tune. In your local.conf do:

MULTILIBS:forcevariable = ""

Then build: MACHINE=arm-rm-tc bitbake meta-toolchain

(The same works for other toolchain specific configs as well.. Alternatively just select a single multiple that you need. This will build MUCH faster then the full set.)

Hope this helps.

--Mark


You have to have libxil.a (which is analogous to libgloss) that describes the
hardware interfaces.  Since the interfaces are configurable, there is no default
libxil.a that I am aware of.  (Possible one exists, I just don't know of that 
part.)


Makes sense, thanks!

Thanks again,
Chris
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#5095): 
https://lists.yoctoproject.org/g/meta-xilinx/message/5095
Mute This Topic: https://lists.yoctoproject.org/mt/95098230/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-xilinx/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to