Can I specify a prebuilt version of toolchain only for kernel building?


Y. HB
 

Hello

I got a board (Rockchip RV1126), whose NPU driver kernel module is
distributed in binary form, which requires specific kernel version
(4.19.111) and toolchain version (gcc 10.3)

( I built the yocto with the specified kernel version, but using yocto
shipped gcc 11, when I insmod, the driver reported invalid module
format, and modprobe reported invalid exec format, I guess that is due
to gcc version is incompatible )

I'm building the system with yocto kirkstone, which ships gcc 11. Can
I have some way to just specify using external toolchain with prebuilt
gcc 10.3 while other system still be built with default yocto shipped
toolchain?

I have seen meta-external-toolchain and meta-soucery, but it seems it
will replace whole toolchain with this external version. Can I find a
mean to just specify for building kernel ?

Thanks


Khem Raj
 

On Mon, Feb 20, 2023 at 7:40 AM Y. HB <sprhawk@...> wrote:

Hello

I got a board (Rockchip RV1126), whose NPU driver kernel module is
distributed in binary form, which requires specific kernel version
(4.19.111) and toolchain version (gcc 10.3)

( I built the yocto with the specified kernel version, but using yocto
shipped gcc 11, when I insmod, the driver reported invalid module
format, and modprobe reported invalid exec format, I guess that is due
to gcc version is incompatible )

I'm building the system with yocto kirkstone, which ships gcc 11. Can
I have some way to just specify using external toolchain with prebuilt
gcc 10.3 while other system still be built with default yocto shipped
toolchain?
before we start on that path, perhaps verify that you can run the kernel
that you build with gcc 10.3 externally but manually building it and replacing
it on target
you can use a prebuilt toolchain from
https://toolchains.bootlin.com/releases_aarch64.html


I have seen meta-external-toolchain and meta-soucery, but it seems it
will replace whole toolchain with this external version. Can I find a
mean to just specify for building kernel ?

Thanks



Y. HB
 

Thanks for reply

Like I said the driver (galcore.ko) is running on kernel 4.19 built
with gcc10.3, yes I verified the kernel can run on my target hardware.

I didn't need the toolchain, what I need is integrating a prebuilt
toolchain only for kernel build.

On Tue, Feb 21, 2023 at 1:26 AM Khem Raj <raj.khem@...> wrote:

On Mon, Feb 20, 2023 at 7:40 AM Y. HB <sprhawk@...> wrote:

Hello

I got a board (Rockchip RV1126), whose NPU driver kernel module is
distributed in binary form, which requires specific kernel version
(4.19.111) and toolchain version (gcc 10.3)

( I built the yocto with the specified kernel version, but using yocto
shipped gcc 11, when I insmod, the driver reported invalid module
format, and modprobe reported invalid exec format, I guess that is due
to gcc version is incompatible )

I'm building the system with yocto kirkstone, which ships gcc 11. Can
I have some way to just specify using external toolchain with prebuilt
gcc 10.3 while other system still be built with default yocto shipped
toolchain?
before we start on that path, perhaps verify that you can run the kernel
that you build with gcc 10.3 externally but manually building it and replacing
it on target
you can use a prebuilt toolchain from
https://toolchains.bootlin.com/releases_aarch64.html


I have seen meta-external-toolchain and meta-soucery, but it seems it
will replace whole toolchain with this external version. Can I find a
mean to just specify for building kernel ?

Thanks