On 2/15/23 7:30 AM, Martin Siegumfeldt wrote:
Hi,

We have recently bumped to the langdale release and uses the open source SPL development flow (i.e. without proprietary Xilinx tools during the Yocto build).

SPL flow has nothing to do with proprietary tools or not. You still need the firmware component(s) to boot and use the SoC's components. What it changes is what loads parts of the configuration. The SPL flow itself is not currently being tested by us. If you get it working, please post instructions on what you did. Lots of people claim to be using it, but everyone I've talked to has custom hacks and nothing that I've been able to replicate in a way to make this generally useful to everyone.

As an organization, the SPL flow is not recommended primarily due to security configurations. You need to use the standard implemented way to be able to safely blow the efuses for boot validation. If this is not a concern, then SPL should be fine.

Consequently, we so far managed with just the BSP- and core layers. AFAICT, the BSP layer requirement (https://github.com/Xilinx/meta-xilinx/blob/fb27f36ad989478bde5896b70886dd264975bd21/meta-xilinx-bsp/conf/layer.conf#L17 <https://github.com/Xilinx/meta-xilinx/blob/fb27f36ad989478bde5896b70886dd264975bd21/meta-xilinx-bsp/conf/layer.conf#L17>) defines a dependency towards the core layer. However, https://github.com/Xilinx/meta-xilinx/commit/3182c3c10ffba0d92563bf83d9c583a30be3fabc <https://github.com/Xilinx/meta-xilinx/commit/3182c3c10ffba0d92563bf83d9c583a30be3fabc> appears to introduce an implicit dependency towards also the standalone layer - is this correct or am I missing something?

You either need to provide the firmware components yourself (prebuilt) or build them. meta-xilinx-standalone is required to build them.

The firmware components are referenced here:

https://github.com/Xilinx/meta-xilinx/tree/master/meta-xilinx-core/recipes-bsp/embeddedsw

Looking at pmufw:

https://github.com/Xilinx/meta-xilinx/blob/6cbae9509694a2ed65435f391c5a900e4c1d3908/meta-xilinx-core/recipes-bsp/embeddedsw/pmufw.bb#L17


# directory, named "pmu-firmware-${MACHINE}.elf" and 
"pmu-firmware-${MACHINE}.bin"
# A machine, multiconfig, or local.conf should override this
PMU_DEPENDS ??= ""
PMU_MCDEPENDS ??= ""
PMU_FIRMWARE_DEPLOY_DIR ??= "${DEPLOY_DIR_IMAGE}"
PMU_FIRMWARE_DEPLOY_DIR[vardepsexclude] += "TOPDIR"
PMU_FIRMWARE_IMAGE_NAME ??= "pmu-firmware-${MACHINE}"

The above settings are the fall back defaults from the recipe. The machine.conf might set it's own versions or even the distribution configuration. But in the end you can use these to control how and where the components come from.

If you are providing your own pre-built version, then set depends/mcdepends blank (we don't depend on another recipe). The firmware_deploy_dir needs to be set to the directory your prebuilt firmware is in, and the image_name is the name of the firmware WITHOUT the .elf/.bin suffix.

You need to have the .elf version, as well as the .bin, as the .bin may not contain the proper load addresses in a format that bootgen or u-boot's flow can read. The .bin though is required for some qemu booting processes.

If you only have the .elf, you can generate the .bin using:

objcopy -O binary <.elf> <.bin>

(Need to have an objcopy that understands microblaze elf.)


meta-xilinx-standalone (by itself) can attempt to build a generic version of the firmware from source. See the instructions in the layer's README file. But be aware, this version may not work on all boards and may be feature limited. Due to the configurable nature of the FPGA SoC, the only way to get a fully correct/functional firmware is to build it based on the board configuration (.xsa file) which requires the meta-xilinx-tools.

Also be aware that the pmu-firmware API and Linux kernel APIs need to be in sync. The APIs have changed over time, so if the firmware and kernel are out of sync you will get failures to initialize, configure or shutdown things.

--Mark


Thanks,
Martin




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

Reply via email to