The advice I usually give people is get it working with the default configuration (linux-xlnx kernel, u-boot, etc) first. THEN move to your custom version.

Doing it this way eliminates the input files as the culprit and can help point it to your components OR the integration having a bug that needs to be resolved.

If you are working on a custom XSA, using the gen-machineconf tool (2023.2, master) can make the work of creating your machine .conf file much easier. There is still additional work to do, but it can help with the initial setup.

I usually then focus on resolving configuration and compilation problems, and then work on booting. (Often this can be a problem on custom boards due to generated device trees missing entries.)

With all of the above said... it is intended that you can replace the AMD (Xilinx) forks of the various components with your own forks. This can be done by implementing similar recipe structures and using PREFERRED_PROVIDER.

Most of the defaults are defined in:

https://github.com/Xilinx/meta-xilinx/blob/master/meta-xilinx-core/conf/machine/include/machine-xilinx-default.inc

It's intended that your machine .conf can override these defaults, and some of them can also be overridden in your local.conf.

If using a preferred provider does not work properly, please let us know here on the list, as it might be a bug in the integration.

--Mark


On 2/14/24 7:54 AM, Felix Kuhlmann via lists.yoctoproject.org wrote:
Hello Michał,

thank you again for the thorough reply.
The device trees and XSA files are supplied through the appropriate
recipes. These worked with the linux-xlnx kernel as provided by the
meta-xilinx layers. Obviously, these files don't seem to work anymore.

Currently, I believe it would be best to try to work with the Xilinx
kernel recipe in order to ensure that functionality like device trees,
XSA files etc. works correctly. I will try to generate the patches and
apply it to this kernel through bbappend.

Thank you for highlighting the complexity of building a custom kernel
for the Ultrascale+ platform, I wasn't aware of that.

Best regards,

Felix Kuhlmann

Am Tue, Feb 13, 2024 at 12:00:11PM +0000 schrieb Michał Fita via 
lists.yoctoproject.org:
Hello Felix,

Now, I'm by any means no expert on this, but if all your patches are
clearly applied, it may mean you only patched the existing code. The Xilinx
kernel used in Xilinx recipes may, however, use much more than just that,
including significant pieces of default configuration which would set any
console output as well to show crashes. Quiet console after attempt to
start usually means the kernel is loaded but doesn't produce any output and
there may be a lot of reasons.

The fact your kernel binary is significantly smaller than one produced from
original recipes indicates a lot is missing in it. And especially
Ultrascale+ kernels need a lot of stuff to work as practically any driver
is specific to that platform.

Then if you don't use Xilinx recipes to build the kernel, how are your
Device Trees derived? On ZynqMP there wouldn't be any default to reuse as
you have to have an XSA file with configuration of all peripherals for the
Device Tree to be derived from. As far as I remember parts of it sit in
recipes linked to Xilinx kernel layers.

Cooking your mix of recipes and layers to get vanilla Poky kernel into
workable state may take you months of trial and error - it's not trivial
problem to solve as you have to understand not only each individual bit of
the Kernel in the making, but deal with whole Yocto machinery used in -
let's say - non-standard way (lots of customizations applied).

I cannot be more helpful without hands on your system and environment as
all the details required to understand what may go wrong would need you to
write a book in the first place.

Regards,
Michał Fita

On Fri, 9 Feb 2024 at 20:38, Felix Kuhlmann via lists.yoctoproject.org
<[email protected]> wrote:

Hello Michał,

thanks for the quick reply.

Alright, thanks for pointing me in that general direction, I'll check
out the differences.

When watching the start up sequence on serial, I can see that the
bootloaders run until u-boot attempts to start the kernel (derived from
the message "Starting the kernel...").
Afterwards, nothing happens anymore, the board practically hangs.

The board in question is a Xilinx Ultrascale+ MPSoC.

The patches are generated by me. Since bitbake required mbox format
patches, I created a set of patches using diff, applied them to the
kernel and committed the changes in order to generate appropriately
formatted patches.

I hope this made my intentions a bit more clear. Thank you for helping
me!

Felix

Am Fri, Feb 09, 2024 at 07:59:44PM +0000 schrieb Michał Fita:
That's shot from the hip, but the default kernel configuration of the
Xilinx fork would be significantly different from the default config of
the
vanilla Kernel from Poky.

The "board refuses to start up" is very vague. Do you have any output at
all on the serial console? Does u-boot try to load the Kernel? I've got a
feeling that you need to patch up much more than just the Kernel to boot
the Xilinx board (which board do you have?).

Where are your patches coming from?

Regards,
Michał Fita

On Fri, 9 Feb 2024 at 16:06, Felix Kuhlmann via lists.yoctoproject.org
<[email protected]> wrote:

Hello everybody,

I need some help with creating a recipe that uses a custom Linux kernel
with my Xilinx board.
I want to use the mainline kernel as a base for different reasons. I
want to include the Xilinx specific changes with a patch.

My current attempt at such a kernel recipe follows the information
provided by the custom kernel recipe in "poky/meta-skeleton".
This recipe which pulls, patches and builds the mainline kernel
correctly compiles, but the board refuses to start up.
Furthermore, the "Image" file in the deploy folder is only 7.8MB in
size, compared to 22MB of the regular linux-xlnx kernel.

Is there anything I have to bear in mind when wanting to create a
custom
kernel for a Xilinx board (i.e. kernel generation would usually be
handled by the meta-xilinx kernel recipe)?

If you need further information, don't hesitate to ask.

Thanks in advance and best regards,

Felix

















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

Reply via email to