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

[WIP] support for linux-yocto as kernel provider #1680

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

kekiefer
Copy link
Contributor

@kekiefer kekiefer commented Aug 29, 2024

This is a work in progress. Please do not merge yet.

Builds and boots on Orin agx devkit and has undergone some testing.

@kekiefer kekiefer marked this pull request as draft August 29, 2024 18:14
Copy link

Choose a reason for hiding this comment

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

I think, this is relatively new for Nvidia: They seem to have git repos for their sources, at least I found them only recently.
Especially, there is this repo for the nvidia OOT modules: https://nv-tegra.nvidia.com/r/gitweb?p=linux-nv-oot.git;a=summary

AFAICT, the blob currently referenced by this recipe's SRC_URI corresponds to the branch l4t/l4t-r36.3, resp. tag jetson_36.3. Your patches are applied to this revision
The unreleased changes seem to be developed in the branch rel-36, and there are commits that claim improving compatibility with newer Kernel versions.

IMO, it should be considered to reference the git repo itself, or to fork it in the OE4T project if some of the proposed changes are covered by newer commits there.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@akfaro good call-out. It is preferable, at least, to apply the patches from there (where they exist) rather than re-inventing these. I have some concern that the modifications we make to build will make maintaining a _git version of the oot modules difficult, but it seems worth taking that into consideration as well.

Copy link
Member

Choose a reason for hiding this comment

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

I have some concern that the modifications we make to build will make maintaining a _git version of the oot modules difficult

The nv-tegra.nvidia.com site has had reliability problems in the past, too, which has made me nervous about relying on it for any of our recipes.

Copy link
Member

Choose a reason for hiding this comment

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

We can not rely on the nv-tegra.nvidia.com at the moment. I had the same issues mentioned by @madisongh .

@kekiefer
Copy link
Contributor Author

Rebased on master, after fixes to egl/gbm, display output works now

recipes-kernel/linux/linux-yocto_6.6.bbappend Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

We can not rely on the nv-tegra.nvidia.com at the moment. I had the same issues mentioned by @madisongh .

@akfaro
Copy link

akfaro commented Sep 2, 2024

Thanks for the proposal, @kekiefer!
I have successfully tested this on a custom Orin NX based board, with the proposed changes applied via bbappend files in my board/distro layer.

In order to flash the image via the initrd-flash script, I needed a minor change to the init script because the USB-gadget sysfs interface seems to have changed slightly, see attached
init-flash-update-UDC-sysfs-interface.patch

@kekiefer
Copy link
Contributor Author

kekiefer commented Sep 3, 2024

In order to flash the image via the initrd-flash script, I needed a minor change to the init script because the USB-gadget sysfs interface seems to have changed slightly, see attached init-flash-update-UDC-sysfs-interface.patch

@akfaro thanks for tracking that one down! I'll rework this a bit so it can function across different kernels.

@kekiefer kekiefer force-pushed the master+linux-yocto branch 4 times, most recently from 277a524 to 13a5d39 Compare September 4, 2024 00:36
@kekiefer
Copy link
Contributor Author

kekiefer commented Sep 4, 2024

Today I've updated two things:

  • initrd flashing should be working on NX as well as AGX machines
  • fixed rtw 8822ce wifi configuration

@kekiefer
Copy link
Contributor Author

kekiefer commented Sep 4, 2024

There is a crash connecting wifi related to enabling ieee80211w (protected management frames) in wpa_supplicant used by WPA3, and has nothing to do with the 8822ce drivers as it occurs with other adapters as well. The problem relates crypto offload to tegra_se (built by the oot modules) as blocking this module from loading allows this function to work.

Change adds patches to nvidia-kernel-oot build to compile against
newer kernel. Changes are compatible with nvidia 5.15 kernel build
as well.

Signed-off-by: Kurt Kiefer <[email protected]>
This change removes rtl8822 from nvidia-kernel-oot to switch to the
driver and firmware from linux-yocto and linux firmware. It includes
updates to tegra-wifi to pull in the needed packages to the image.

Signed-off-by: Kurt Kiefer <[email protected]>
@kekiefer
Copy link
Contributor Author

kekiefer commented Sep 14, 2024

The crash in tegra_se is now resolved by porting a patch from the nv-tegra git repos. I intend to swap some of the other oot module patches I've created with similar ones from upstream, but the result should be the same. Functionally, I think this PR is about where it needs to be.

Copy link
Member

Choose a reason for hiding this comment

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

Could this be done without having to provide a full defconfig? Using the in-tree defconfig and providing modifications with config fragments would be more manageable.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was dreading this. Yes it could be done I'm sure... my first efforts at this were not successful when I started the project, so I ended up moving over and updating the defconfig that was in nvidia's 5.15 sources.

You're not wrong about the motivation for wanting this to be maintainable so I'll give it another shot.

Copy link
Member

Choose a reason for hiding this comment

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

This bbappend is going to wreak havoc on other machines in other layers that also use linux-yocto 6.6.

It either needs to be its own recipe, in which case marking it as tegra-only via COMPATIBLE_MACHINE would be fine, or the bbappend needs to be reworked to remove the COMPATIBLE_MACHINE setting and changing all the task/variable modifications to be :tegra-specific.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes of course, no problem

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