General steps to use the 6.4 tree of the kernel for my local fork

I would like to benefit from some recent power savings in the 6.4 kernel (amd_pstates upgrades). What steps would I need to take in order to have my local fork of OpenWrt build from kernel tree? Scope is just x86/64 and not all kmods, just the ones I am using. I mention that last part knowing that some of them might need adjustments to their respective Makefiles and that could keep things more simple for my use case.

Thanks!

@Ansuel - I see you did lots of work over the years on getting new kernels into the project.

there is a way to just set a custom directory but that won't have any openwrt kernel patches so that is the drawback... I wonder if the changes to amd_pstates are big enough and can't be backported?

I am interested in learning more about the set-a-directory method. Can you enlighten me?

Regarding a backport, I have been in email contact with the contributors at AMD who wrote the code. Their thought is that an informal backport will be complicated (not impossible) because the needed commits touch more drivers than amd-pstates.

It seems that chromeos has done this backport into the 6.1 tree. How can I extract the needed cherry picks in order to make a series of backport patches that I can apply to the vanilla 6.1 series of kernels?

https://chromium.googlesource.com/chromiumos/third_party/kernel/+/refs/heads/chromeos-6.1

If I go into the chromos-6.1 branch, and run:

git log -- drivers/cpufreq/amd-pstate.c

How far back do I go when manually noting the commits?
Same for

git log -- drivers/acpi/cppc_acpi.c

Thanks.

Honestly a good idea might me to contact the dav that made the backport and see if he can give you a patchset.

1 Like

Please try.

@Ansuel - I am very pleased to report that through a bit of trial and error, I think I identified the needed files from chromeos-6.1's backport of amd_pstates into 6.1.

It builds against 6.1.38 and seems to work as expected. If we can get independent confirmation particularly from the author of the chromeos backport, that would fantastic.

See my x86_64-v61-WIP-3 branch, specifically: 65bc628

# cat /sys/devices/system/cpu/cpufreq/policy0/scaling_driver  
amd-pstate-epp