linaro-swg / linux

Linux kernel source tree
Other
41 stars 79 forks source link

Kernel 5.17 for RPi3 #102

Closed akorb closed 2 years ago

akorb commented 2 years ago

Hello!

I need some newer Linux features. However, the current RPi3 supported Linux version for OP-TEE is rpi3-optee-5.4 I need at least 5.14.

It seems that rpi3-optee-5.4 and main are not very different, considering only the "on-top-of-mainline" commits. I thought I might only have to cherry-pick some commits from the rpi3 branch into the main branch. However, it failed already for the first commit ( https://github.com/linaro-swg/linux/commit/196e461df741d8d04f63b4158573f576cd181208 ) because the files arch/arm/boot/dts/bcm2710-rpi-3-b.dts and arch/arm/boot/dts/bcm2710.dtsi are missing. Maybe it's sufficient to only copy this file from the old branch into the new one.

But before I dive deeper, I wanted to ask some developers experienced in this matter if my goal is quickly achievable or if there are huge problems I can't see. Thanks!

jbech-linaro commented 2 years ago

This is not a direct answer, but I did prepare to step up to 5.11 (https://github.com/jbech-linaro/linux/commits/rpi3-optee-5.11) however, I never got to finalize it. But as you can see, there wasn't a lot of changes. But in theory you're right, doing this is a rebase and just make it work.

akorb commented 2 years ago

Ah, I just realized that I need to use the Raspberry Pi specific Linux trees: https://github.com/raspberrypi/linux/tree/rpi-5.17.y That's also the reason that those files I mentioned didn't exist, as they are not part of mainline Linux.

I guess I would need to use rpi-5.17.y as a base, put the op-tee main branch on top and then cherry-pick the op-tee RPi3 specific commits (from 5.4 branch).

jbech-linaro commented 2 years ago

I guess I would need to use rpi-5.17.y as a base, put the op-tee main branch on top and then cherry-pick the op-tee RPi3 specific commits (from 5.4 branch).

Correct!

akorb commented 2 years ago

I think I succeded.

Source tree: https://github.com/akorb/linux/tree/rpi-5.17.y

# uname -r
5.17.14-v8

# xtest
[...]
+-----------------------------------------------------
26264 subtests of which 0 failed
95 test cases of which 0 failed
0 test cases were skipped
TEE test application done!

Tested on Raspberry Pi 3 Model B

jbech-linaro commented 2 years ago

I think I succeded.

Great!

Source tree: https://github.com/akorb/linux/tree/rpi-5.17.y

I can try it out next week and then if OK by you, I can mirror your branch and update the manifest.

akorb commented 2 years ago

Yeah, would be great

jbech-linaro commented 2 years ago

Just tested it

# xtest
...
+-----------------------------------------------------
26306 subtests of which 0 failed
98 test cases of which 0 failed
0 test cases were skipped
TEE test application done!
# uname -a
Linux buildroot 5.17.14-v8 #1 SMP PREEMPT Tue Jun 21 13:00:28 CEST 2022 aarch64 GNU/Linux

So, I'm going to push this branch into the linaro-swg/linux.git and then send a pull request to the manifest git. Thanks!