Hi Team,

                Based on our team requirement we want to port the kernel 4.10.17 version to add support riscv and it should support both unmatched & unleashed boards. for that, I have cloned kernel sources from and locally maintained GitLab there I have updated riscv arch platform support. Using Yocto method I am trying to compile my sources. But I am facing some challenges 

‘scripts/mod/devicetable-offsets.s’ failed
kernel-source/include/uapi/linux/types.h:4:10: fatal error: asm/types.h: No such file or directory
4 | #include <asm/types.h>
| ^~~~~~~~~~~~~
compilation terminated.

attaching my log can you please check and give some suggestions on How can I fix these issues. and can you please provide any patch works required? please provide me.

Thanking you in advance.


I would not recommend even the most experienced Linux kernel developer try and backport the entirety of riscv support to 4.10.17 when the port first appeared a whole 5 releases later and we’re now many releases further down the line. You’re going to face all manner of issues in doing so and if you can’t even figure out a header include issue on your own then I don’t see how you expect to deal with the harder issues that involve backporting all kinds of modifications to the kernel’s internals. I strongly urge you to reconsider this requirement; it is almost certainly the case that you would be better off updating whatever you have that runs on top of 4.10.17 to support a more modern kernel, especially when 4.10.x was EOL’ed almost 5 years ago in May 2017.