The errors you are seeing during the build process of your device driver are related to changes in the Linux kernel source code between the Rocko and Kirkstone releases.
The error message indicates that the function “current_thread_info()” is being used in the driver code, but is no longer defined in the version of the kernel headers being used in the build process. This is likely due to changes in the kernel headers and APIs between the two releases.
To resolve this issue, you will need to update your device driver code to use the appropriate APIs and data structures that are defined in the version of the kernel headers used in the Kirkstone release. You may need to consult the kernel documentation and release notes for the Kirkstone release to identify the appropriate changes that need to be made.
Alternatively, you can try using the kernel headers from the Rocko release instead of the Kirkstone release to see if this resolves the build errors. However, this may not be a sustainable solution in the long term, as it could result in compatibility issues with other components of your Yocto-based system that are designed to work with the Kirkstone release.
As you can you the error is reported in a include file provided with the kernel:
kernel-source/arch/arm/include/asm/domain.h:92:17: error: implicit declaration of function ‘current_thread_info’ [-Werror=implicit-function-declaration]
I’ve come to the conclusion that the newer version of the c compiler that is used in kirkstone now makes an error of this issue where as the version of the c compiler that is used in the rocko distribution did not.