antmicro / meta-antmicro

Apache License 2.0
16 stars 1 forks source link

Update to kernel 5.15 / tegra 36.3 for Orin NX #1

Open dHofmeister opened 2 months ago

dHofmeister commented 2 months ago

Dear ant-micro,

firstly,apologies for the double post on https://github.com/antmicro/antmicro-jetson-orin-baseboard-kernel-5-10/issues/2, i dont really know which of these two repos would be the most relevant. Feel free to close one.

I see that you forked the linux repo and applied changes onto that fork as described here: https://github.com/antmicro/antmicro-jetson-orin-baseboard-kernel-5-10/compare/f5dd4195b2f42a92c5dec5c1b09b0305719419ed...a0861582129bb67d377b471a86cd6e651aa53301

is it save to assume that simply forking the linux kernel again, but for 5.15, and applying those changes to that, would result in a working build for kernel 5.15 / tegra 36.3? or would that be rather naive? What would be key points to consider / be aware of? Are there breaking changes?

Greetings and thank you for your work on this base board, it's awesome!

tgorochowik commented 2 months ago

Hi @dHofmeister it's likely to work out of the box, feel free to give it a go. However nVidia kernels are often (or at least used to be pre-UEFI, if it's still a trend we're yet to see) rather tightly integrated with the bootloaders. This is not a big issue, but your best bet is upgrading everything at once (i.e. use bootloaders from 36.3 as well).

Updating the support to 36.3 is on our TODO list btw, but I don't have any ETAs, should be soon-ish though at it doesn't look complicated.

dHofmeister commented 2 months ago

dear @tgorochowik, thank you for your reply.

What confuses me is that OE4T didnt release linux-tegra-5.15 but instead linux-jammy-nvidia-tegra, which has a different file layout than linux 5.10 and also includes ubuntu jammy in the build? I am not quite sure what to do here as i cannot simply map all your changes to the 5.15 kernel. Also it seems that for example ov5640 support is now already natively included: ov5640.c?

I am not (yet) very fluent in yocto / linux drivers / tegra to make sense of it yet, apologies.

However, regardless of cameras, is it correct that i need to get the .dtsi and .dts files from these commits included in the build for 36.3 to get the gpio, i2c and usb to work? Would that be the minimal required to get all I/O working?

In terms of upgrading it all at once, i assume you mean using all the scarthgap branches for the yocto dependencies and build from there?

BBLAYERS ?= " \
  ${TOPDIR}/../meta \
  ${TOPDIR}/../meta-poky \
  ${TOPDIR}/../meta-yocto-bsp \
  ${TOPDIR}/../layers/meta-openembedded/meta-oe \
  ${TOPDIR}/../layers/meta-tegra \
  ${TOPDIR}/../layers/meta-antmicro/meta-jetson \
  ${TOPDIR}/../layers/meta-antmicro/meta-jetson-orin-baseboard \
  "

Where the meta-antmicro layer will contain changes to point to the linux jammy fork of the kernel, with the same changes as the above commits. I assume that is the way?

Thank you very much for taking your time to reply and again, apologies for not fully understanding this

Greetings