Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zynqmp: add 2018.3 linux images #7

Merged
merged 1 commit into from
Jan 27, 2024
Merged

Conversation

chrisguikema
Copy link
Contributor

This commit adds 2018.3 Linux artifacts that are compatible with the seL4 kernel device tree. It also links them as "defaults".

@lsf37
Copy link
Member

lsf37 commented Jan 26, 2024

I don't see any problems with adding the image as such, but can you explain why it is necessary?

@axel-h
Copy link
Member

axel-h commented Jan 26, 2024

Are you planning to add PetaLinux 2022_1 then also?

@chrisguikema
Copy link
Contributor Author

can you explain why it is necessary?

Sure! Xilinx releases quarterly updates for the Petalinux images, and with those changes come minor device tree dependencies. So using a 2018.3 device tree with the 2021.1 kernel may have unintended consequences. The ZCU102 is the platform that DornerWorks gets requested to use the most, so we have an interest in making these toolchain updates work as seamlessly as possible.

Internally, we update the seL4 device tree to just use the newest version of Petalinux that we support. When I tried to update the seL4 device tree in a PR, there was some kickback that since seL4 doesn't care about dependencies, and only cares about memory regions / interrupts for untyped object creation, updating the seL4 kernel device tree doesn't really make a lot of sense. Luckily, the dtb_base_name in the VMM can use a custom dtb instead of the kernel dtb, so we can bypass the issue and support newer versions as needed.

With all that being said, anyone who tries to use the camkes-vm for the ZCU102 out of the box probably doesn't care too much about Petalinux releases, if we're being honest. For device tree generation in the VMM, the seL4 kernel device tree is used by default. Using this device tree with newer Petalinux images may not work as intended. However, it will work with older Petalinux versions.

This solution is basically adding Petalinux 2018.3 as a default, as the artifacts are compatible with seL4 without any axi/amba changes. It also easily allows for newer Petalinux releases to be supported as well, as soon as we get around to testing them :)

I think what I'll do is make a PR for the vm_minimal ZCU102 example, and add a devices.camkes for each supported Petalinux version. That way, anyone who pulls this down and tests can select their supported version. Additionally, it becomes easy to add CI tests to ensure each version builds as expected.

Are you planning to add PetaLinux 2022_1 then also?

I think we have that version supported internally. I'll double check first, but I'd like to have that version supported as well.

@axel-h
Copy link
Member

axel-h commented Jan 26, 2024

When I tried to update the seL4 device tree in a PR, there was some kickback that since seL4 doesn't care about dependencies

I think this was in seL4/seL4#1102

Copy link
Member

@axel-h axel-h left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me.

The situation with the device tree usage from the kernel is a bit of a pitfall that might be worth looking into one day. Especially when some node names and paths change, it might be a reason to update the file in the kernel also (even if this does not affect the kernel directly), just be stay aligned with the rest of the world. Or we should consider stripping the kernel devices trees down to just what is used, so it is harder to use them for anything else...

This commit adds Petalinux-2018.3 prebuilt images for the zynqmp. It
also symlinks these artifacts to act as the default images, as they
work with the seL4 kernel device tree for dtb generation.

Signed-off-by: Chris Guikema <chris.guikema@dornerworks.com>
@lsf37
Copy link
Member

lsf37 commented Jan 27, 2024

Seems fine to me.

The situation with the device tree usage from the kernel is a bit of a pitfall that might be worth looking into one day. Especially when some node names and paths change, it might be a reason to update the file in the kernel also (even if this does not affect the kernel directly), just be stay aligned with the rest of the world. Or we should consider stripping the kernel devices trees down to just what is used, so it is harder to use them for anything else...

Stripping the device tree to just the info the kernel needs might be useful, at least if that can be done reliably and automatically. Then it would be invariant under all those changes and it would be clearer what bits the kernel is sensitive to. Not sure. That should be a separate discussion, maybe on an issue in the kernel repo.

@lsf37 lsf37 merged commit 627a43b into seL4:master Jan 27, 2024
7 checks passed
@Ivan-Velickovic
Copy link

Stripping the device tree to just the info the kernel needs might be useful, at least if that can be done reliably and automatically. Then it would be invariant under all those changes and it would be clearer what bits the kernel is sensitive to. Not sure. That should be a separate discussion, maybe on an issue in the kernel repo.

There has been some discussion here seL4/seL4#1036.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants