* Custom Kernel Recipe Compilation Error. @ 2025-07-07 20:10 C Larbi 2025-07-08 9:06 ` [yocto] " Gyorgy Sarvari 2025-07-14 16:18 ` Quentin Schulz 0 siblings, 2 replies; 7+ messages in thread From: C Larbi @ 2025-07-07 20:10 UTC (permalink / raw) To: yocto Hello all I am a newbie to the yocto project and on a journey to understand the basics. My reference hardware for my learning journey is the Orange pi 3b (RK3566 soc) I have created a bsp layer containing my machine configuration and a recipe to build a custom kernel. The kernel recipe build throws an error on the "do_compile_kernelmodules" task. Before writing this, i went through the manual process of compiling the same kernel source on my machine and i was able to produce a vmlinux file and build the modules. This is the error from the yocto build process. | GEN Makefile | CALL /home/cerezo/yocto/tut/poky/build/tmp/work-shared/opi3b/kernel-source/scripts/checksyscalls.sh | CC [M] drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/aiutils.o | CC [M] drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/siutils.o | /home/cerezo/yocto/tut/poky/build/tmp/work-shared/opi3b/kernel-source/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/aiutils.c:44:10: fatal error: typedefs.h: No such file or directory | 44 | #include <typedefs.h> | | ^~~~~~~~~~~~ | compilation terminated. | make[7]: *** [/home/cerezo/yocto/tut/poky/build/tmp/work-shared/opi3b/kernel-source/scripts/Makefile.build:250: drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/aiutils.o] Error 1 | make[7]: *** Waiting for unfinished jobs.... Will really appreciate if i can get some pointers as to what i may be doing wrong. KERNEL RECIPE https://github.com/AccraNET/meta-orspace-orangepi3b/blob/main/recipes-kernel/linux/linux-orangepi.bb MACHINE CONFIGURATION https://github.com/AccraNET/meta-orspace-orangepi3b/blob/main/conf/machine/opi3b.conf Best Regards Cerezo ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [yocto] Custom Kernel Recipe Compilation Error. 2025-07-07 20:10 Custom Kernel Recipe Compilation Error C Larbi @ 2025-07-08 9:06 ` Gyorgy Sarvari 2025-07-09 9:32 ` C Larbi 2025-07-10 8:36 ` Paul Gortmaker 2025-07-14 16:18 ` Quentin Schulz 1 sibling, 2 replies; 7+ messages in thread From: Gyorgy Sarvari @ 2025-07-08 9:06 UTC (permalink / raw) To: yocto, pkl2000us On 7/7/25 22:10, C Larbi via lists.yoctoproject.org wrote: > Hello all > I am a newbie to the yocto project and on a journey to understand the basics. > > My reference hardware for my learning journey is the Orange pi 3b (RK3566 soc) > > I have created a bsp layer containing my machine configuration and a > recipe to build a custom kernel. > > The kernel recipe build throws an error on the "do_compile_kernelmodules" task. > Before writing this, i went through the manual process of compiling > the same kernel source on my machine and i was able to produce a > vmlinux file and build the modules. > > This is the error from the yocto build process. > > | GEN Makefile > | CALL /home/cerezo/yocto/tut/poky/build/tmp/work-shared/opi3b/kernel-source/scripts/checksyscalls.sh > | CC [M] drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/aiutils.o > | CC [M] drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/siutils.o > | /home/cerezo/yocto/tut/poky/build/tmp/work-shared/opi3b/kernel-source/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/aiutils.c:44:10: > fatal error: typedefs.h: No such file or directory > | 44 | #include <typedefs.h> > | | ^~~~~~~~~~~~ > | compilation terminated. > | make[7]: *** [/home/cerezo/yocto/tut/poky/build/tmp/work-shared/opi3b/kernel-source/scripts/Makefile.build:250: > drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/aiutils.o] Error 1 > | make[7]: *** Waiting for unfinished jobs.... > > Will really appreciate if i can get some pointers as to what i may be > doing wrong. This seems to be a recurring problem with this particular vendor kernel unfortunately. Take a look at this patch which solves the same issue on a different branch: https://github.com/riscv/meta-riscv/blob/master/recipes-kernel/linux/linux-orangepi/orangepi-rv2/bcmdhd-fix-typedefs-header-not-found.patch I think adapting this to your branch should solve your problem too. > > KERNEL RECIPE > https://github.com/AccraNET/meta-orspace-orangepi3b/blob/main/recipes-kernel/linux/linux-orangepi.bb > > MACHINE CONFIGURATION > https://github.com/AccraNET/meta-orspace-orangepi3b/blob/main/conf/machine/opi3b.conf > > Best Regards > Cerezo > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#65623): https://lists.yoctoproject.org/g/yocto/message/65623 > Mute This Topic: https://lists.yoctoproject.org/mt/114034987/6084445 > Group Owner: yocto+owner@lists.yoctoproject.org > Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [skandigraun@gmail.com] > -=-=-=-=-=-=-=-=-=-=-=- > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [yocto] Custom Kernel Recipe Compilation Error. 2025-07-08 9:06 ` [yocto] " Gyorgy Sarvari @ 2025-07-09 9:32 ` C Larbi 2025-07-10 8:36 ` Paul Gortmaker 1 sibling, 0 replies; 7+ messages in thread From: C Larbi @ 2025-07-09 9:32 UTC (permalink / raw) To: Gyorgy Sarvari; +Cc: yocto Thank you Gyorgy! This helped. Regards Cerezo On Tue, 8 Jul 2025 at 09:06, Gyorgy Sarvari <skandigraun@gmail.com> wrote: > > On 7/7/25 22:10, C Larbi via lists.yoctoproject.org wrote: > > Hello all > > I am a newbie to the yocto project and on a journey to understand the basics. > > > > My reference hardware for my learning journey is the Orange pi 3b (RK3566 soc) > > > > I have created a bsp layer containing my machine configuration and a > > recipe to build a custom kernel. > > > > The kernel recipe build throws an error on the "do_compile_kernelmodules" task. > > Before writing this, i went through the manual process of compiling > > the same kernel source on my machine and i was able to produce a > > vmlinux file and build the modules. > > > > This is the error from the yocto build process. > > > > | GEN Makefile > > | CALL /home/cerezo/yocto/tut/poky/build/tmp/work-shared/opi3b/kernel-source/scripts/checksyscalls.sh > > | CC [M] drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/aiutils.o > > | CC [M] drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/siutils.o > > | /home/cerezo/yocto/tut/poky/build/tmp/work-shared/opi3b/kernel-source/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/aiutils.c:44:10: > > fatal error: typedefs.h: No such file or directory > > | 44 | #include <typedefs.h> > > | | ^~~~~~~~~~~~ > > | compilation terminated. > > | make[7]: *** [/home/cerezo/yocto/tut/poky/build/tmp/work-shared/opi3b/kernel-source/scripts/Makefile.build:250: > > drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/aiutils.o] Error 1 > > | make[7]: *** Waiting for unfinished jobs.... > > > > Will really appreciate if i can get some pointers as to what i may be > > doing wrong. > > This seems to be a recurring problem with this particular vendor kernel > unfortunately. Take a look at this patch which solves the same issue on > a different branch: > https://github.com/riscv/meta-riscv/blob/master/recipes-kernel/linux/linux-orangepi/orangepi-rv2/bcmdhd-fix-typedefs-header-not-found.patch > > I think adapting this to your branch should solve your problem too. > > > > > > KERNEL RECIPE > > https://github.com/AccraNET/meta-orspace-orangepi3b/blob/main/recipes-kernel/linux/linux-orangepi.bb > > > > MACHINE CONFIGURATION > > https://github.com/AccraNET/meta-orspace-orangepi3b/blob/main/conf/machine/opi3b.conf > > > > Best Regards > > Cerezo > > > > -=-=-=-=-=-=-=-=-=-=-=- > > Links: You receive all messages sent to this group. > > View/Reply Online (#65623): https://lists.yoctoproject.org/g/yocto/message/65623 > > Mute This Topic: https://lists.yoctoproject.org/mt/114034987/6084445 > > Group Owner: yocto+owner@lists.yoctoproject.org > > Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [skandigraun@gmail.com] > > -=-=-=-=-=-=-=-=-=-=-=- > > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [yocto] Custom Kernel Recipe Compilation Error. 2025-07-08 9:06 ` [yocto] " Gyorgy Sarvari 2025-07-09 9:32 ` C Larbi @ 2025-07-10 8:36 ` Paul Gortmaker 2025-07-10 14:35 ` C Larbi 1 sibling, 1 reply; 7+ messages in thread From: Paul Gortmaker @ 2025-07-10 8:36 UTC (permalink / raw) To: yocto, skandigraun, alperyasinak1; +Cc: pkl2000us [Re: [yocto] Custom Kernel Recipe Compilation Error.] On 08/07/2025 (Tue 11:06) Gyorgy Sarvari via lists.yoctoproject.org wrote: > On 7/7/25 22:10, C Larbi via lists.yoctoproject.org wrote: > > Hello all > > I am a newbie to the yocto project and on a journey to understand the basics. > > > > My reference hardware for my learning journey is the Orange pi 3b (RK3566 soc) > > > > I have created a bsp layer containing my machine configuration and a > > recipe to build a custom kernel. > > > > The kernel recipe build throws an error on the "do_compile_kernelmodules" task. > > Before writing this, i went through the manual process of compiling > > the same kernel source on my machine and i was able to produce a > > vmlinux file and build the modules. > > > > This is the error from the yocto build process. > > > > | GEN Makefile > > | CALL /home/cerezo/yocto/tut/poky/build/tmp/work-shared/opi3b/kernel-source/scripts/checksyscalls.sh > > | CC [M] drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/aiutils.o > > | CC [M] drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/siutils.o > > | /home/cerezo/yocto/tut/poky/build/tmp/work-shared/opi3b/kernel-source/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/aiutils.c:44:10: > > fatal error: typedefs.h: No such file or directory > > | 44 | #include <typedefs.h> > > | | ^~~~~~~~~~~~ > > | compilation terminated. I saw this, and I'm thinking that include shouldn't be there at all. You might in turn ask "Why would you say that?" -- well, experience? Let us have a quick look at a current kernel. linux-head$ git grep '#include <typedefs.h>' linux-head$ git grep '#include .*typedefs.h>' linux-head$ git grep '#include .*module.h>' | wc -l 14342 linux-head$ No instances of <typedefs.h>. Also no instances of <somepath/typedefs.h>. And if I search for a common include, like module.h, there are tens of thousands of instances, so my search isn't somehow fundamentally broken. > > | make[7]: *** [/home/cerezo/yocto/tut/poky/build/tmp/work-shared/opi3b/kernel-source/scripts/Makefile.build:250: > > drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/aiutils.o] Error 1 > > | make[7]: *** Waiting for unfinished jobs.... > > > > Will really appreciate if i can get some pointers as to what i may be > > doing wrong. > > This seems to be a recurring problem with this particular vendor kernel > unfortunately. Take a look at this patch which solves the same issue on > a different branch: > https://github.com/riscv/meta-riscv/blob/master/recipes-kernel/linux/linux-orangepi/orangepi-rv2/bcmdhd-fix-typedefs-header-not-found.patch So this patch amounts to the one line change as follows: EXTRA_CFLAGS += -I$(BCMDHD_ROOT)/include/ -I$(BCMDHD_ROOT)/ +EXTRA_CFLAGS += -I$(srctree)/$(src)/include ifeq ($(CONFIG_BCMDHD),m) OK, that probably does put a (semi random) instance of typedefs.h into the header search path, but given what I've shown above in the mainline kernel tree, I would ask if anyone has checked what happens if the offending typedefs.h include line was simply *removed*? Does the error go away, or does it give a more informative error on exactly what specific definition is missing - so that folks can fix it "properly"? You generally don't want the kernel and kernel drivers pulling in include paths from random locations outside the kernel. The kernel is designed to be self-contained, with the exception of the few user space utilities that happen to be bundled with the kernel for convenience. In a case like this, the patch risks causing additional errors elsewhere. Things like "conflicting definitions for XYZ". Or worse, you could get an instance where an added include presents a "struct foo" that is different from the kernel's view of what "struct foo" is - say for example the kernel's version uses a u64 instead of a u32, or has padding for cache line alignment and performance reasons. Then your stuff will just silently compile, but explode at runtime. Kind of a classic case of "two wrongs don't make a right". This is one (of many) problems with not-in-mainline drivers like this. The various SoC engineers tasked with creating a driver develop their own ways of doing things, but it remains largely unreviewed by the larger group of people out there, including the subsystem maintainers who would spot things like this and require it to be done properly before accepting it into their local tree and then requesting it to be merged upwards into mainline. Paul. -- > > I think adapting this to your branch should solve your problem too. > > > > > > KERNEL RECIPE > > https://github.com/AccraNET/meta-orspace-orangepi3b/blob/main/recipes-kernel/linux/linux-orangepi.bb > > > > MACHINE CONFIGURATION > > https://github.com/AccraNET/meta-orspace-orangepi3b/blob/main/conf/machine/opi3b.conf > > > > Best Regards > > Cerezo > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [yocto] Custom Kernel Recipe Compilation Error. 2025-07-10 8:36 ` Paul Gortmaker @ 2025-07-10 14:35 ` C Larbi 2025-07-11 17:20 ` Paul Gortmaker 0 siblings, 1 reply; 7+ messages in thread From: C Larbi @ 2025-07-10 14:35 UTC (permalink / raw) To: Paul Gortmaker; +Cc: yocto, skandigraun, alperyasinak1 Hello Paul From my understanding, are the includes in a module makefile not private to that compilation context only ? And also is the srctree variable not tied to the sources being compiled ? Cerezo On Thu, 10 Jul 2025 at 08:36, Paul Gortmaker <paulg@kernel.org> wrote: > > [Re: [yocto] Custom Kernel Recipe Compilation Error.] On 08/07/2025 (Tue 11:06) Gyorgy Sarvari via lists.yoctoproject.org wrote: > > > On 7/7/25 22:10, C Larbi via lists.yoctoproject.org wrote: > > > Hello all > > > I am a newbie to the yocto project and on a journey to understand the basics. > > > > > > My reference hardware for my learning journey is the Orange pi 3b (RK3566 soc) > > > > > > I have created a bsp layer containing my machine configuration and a > > > recipe to build a custom kernel. > > > > > > The kernel recipe build throws an error on the "do_compile_kernelmodules" task. > > > Before writing this, i went through the manual process of compiling > > > the same kernel source on my machine and i was able to produce a > > > vmlinux file and build the modules. > > > > > > This is the error from the yocto build process. > > > > > > | GEN Makefile > > > | CALL /home/cerezo/yocto/tut/poky/build/tmp/work-shared/opi3b/kernel-source/scripts/checksyscalls.sh > > > | CC [M] drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/aiutils.o > > > | CC [M] drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/siutils.o > > > | /home/cerezo/yocto/tut/poky/build/tmp/work-shared/opi3b/kernel-source/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/aiutils.c:44:10: > > > fatal error: typedefs.h: No such file or directory > > > | 44 | #include <typedefs.h> > > > | | ^~~~~~~~~~~~ > > > | compilation terminated. > > I saw this, and I'm thinking that include shouldn't be there at all. > You might in turn ask "Why would you say that?" -- well, experience? > > Let us have a quick look at a current kernel. > > linux-head$ git grep '#include <typedefs.h>' > linux-head$ git grep '#include .*typedefs.h>' > linux-head$ git grep '#include .*module.h>' | wc -l > 14342 > linux-head$ > > No instances of <typedefs.h>. Also no instances of <somepath/typedefs.h>. > And if I search for a common include, like module.h, there are tens of > thousands of instances, so my search isn't somehow fundamentally broken. > > > > | make[7]: *** [/home/cerezo/yocto/tut/poky/build/tmp/work-shared/opi3b/kernel-source/scripts/Makefile.build:250: > > > drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/aiutils.o] Error 1 > > > | make[7]: *** Waiting for unfinished jobs.... > > > > > > Will really appreciate if i can get some pointers as to what i may be > > > doing wrong. > > > > This seems to be a recurring problem with this particular vendor kernel > > unfortunately. Take a look at this patch which solves the same issue on > > a different branch: > > https://github.com/riscv/meta-riscv/blob/master/recipes-kernel/linux/linux-orangepi/orangepi-rv2/bcmdhd-fix-typedefs-header-not-found.patch > > So this patch amounts to the one line change as follows: > > EXTRA_CFLAGS += -I$(BCMDHD_ROOT)/include/ -I$(BCMDHD_ROOT)/ > +EXTRA_CFLAGS += -I$(srctree)/$(src)/include > ifeq ($(CONFIG_BCMDHD),m) > > OK, that probably does put a (semi random) instance of typedefs.h into > the header search path, but given what I've shown above in the mainline > kernel tree, I would ask if anyone has checked what happens if the > offending typedefs.h include line was simply *removed*? Does the error > go away, or does it give a more informative error on exactly what > specific definition is missing - so that folks can fix it "properly"? > > You generally don't want the kernel and kernel drivers pulling in > include paths from random locations outside the kernel. The kernel is > designed to be self-contained, with the exception of the few user space > utilities that happen to be bundled with the kernel for convenience. > > In a case like this, the patch risks causing additional errors elsewhere. > Things like "conflicting definitions for XYZ". Or worse, you could get > an instance where an added include presents a "struct foo" that is > different from the kernel's view of what "struct foo" is - say for > example the kernel's version uses a u64 instead of a u32, or has padding > for cache line alignment and performance reasons. Then your stuff will > just silently compile, but explode at runtime. Kind of a classic case > of "two wrongs don't make a right". > > This is one (of many) problems with not-in-mainline drivers like this. > The various SoC engineers tasked with creating a driver develop their > own ways of doing things, but it remains largely unreviewed by the > larger group of people out there, including the subsystem maintainers > who would spot things like this and require it to be done properly > before accepting it into their local tree and then requesting it to be > merged upwards into mainline. > > Paul. > -- > > > > > I think adapting this to your branch should solve your problem too. > > > > > > > > > > KERNEL RECIPE > > > https://github.com/AccraNET/meta-orspace-orangepi3b/blob/main/recipes-kernel/linux/linux-orangepi.bb > > > > > > MACHINE CONFIGURATION > > > https://github.com/AccraNET/meta-orspace-orangepi3b/blob/main/conf/machine/opi3b.conf > > > > > > Best Regards > > > Cerezo > > > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [yocto] Custom Kernel Recipe Compilation Error. 2025-07-10 14:35 ` C Larbi @ 2025-07-11 17:20 ` Paul Gortmaker 0 siblings, 0 replies; 7+ messages in thread From: Paul Gortmaker @ 2025-07-11 17:20 UTC (permalink / raw) To: C Larbi; +Cc: yocto, skandigraun, alperyasinak1 [Re: [yocto] Custom Kernel Recipe Compilation Error.] On 10/07/2025 (Thu 14:35) C Larbi wrote: > Hello Paul > From my understanding, are the includes in a module makefile not > private to that compilation context only ? Sure, but do you want to open the possibility that one driver is sourcing includes from some random non-kernel location? > And also is the srctree variable not tied to the sources being compiled ? I think you miss the point. The kernel literally has *thousands* of drivers. I've already shown you that not a single one of them includes typedefs.h -- in fact, there is no such typedefs.h header anywhere to be found in the kernel: $ find . -name typedefs.h $ find . -name module.h | wc -l 21 $ So, by definition, you are introducing another complete set of user space headers into the normally strictly controlled environment for compiling kernels - to fix what is a very dubious include to begin with. Even if it is only just for this one driver, you don't want to do that. Just delete the typedefs.h inclusion and see what happens. Paul. -- > > Cerezo > > On Thu, 10 Jul 2025 at 08:36, Paul Gortmaker <paulg@kernel.org> wrote: > > > > [Re: [yocto] Custom Kernel Recipe Compilation Error.] On 08/07/2025 (Tue 11:06) Gyorgy Sarvari via lists.yoctoproject.org wrote: > > > > > On 7/7/25 22:10, C Larbi via lists.yoctoproject.org wrote: > > > > Hello all > > > > I am a newbie to the yocto project and on a journey to understand the basics. > > > > > > > > My reference hardware for my learning journey is the Orange pi 3b (RK3566 soc) > > > > > > > > I have created a bsp layer containing my machine configuration and a > > > > recipe to build a custom kernel. > > > > > > > > The kernel recipe build throws an error on the "do_compile_kernelmodules" task. > > > > Before writing this, i went through the manual process of compiling > > > > the same kernel source on my machine and i was able to produce a > > > > vmlinux file and build the modules. > > > > > > > > This is the error from the yocto build process. > > > > > > > > | GEN Makefile > > > > | CALL /home/cerezo/yocto/tut/poky/build/tmp/work-shared/opi3b/kernel-source/scripts/checksyscalls.sh > > > > | CC [M] drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/aiutils.o > > > > | CC [M] drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/siutils.o > > > > | /home/cerezo/yocto/tut/poky/build/tmp/work-shared/opi3b/kernel-source/drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/aiutils.c:44:10: > > > > fatal error: typedefs.h: No such file or directory > > > > | 44 | #include <typedefs.h> > > > > | | ^~~~~~~~~~~~ > > > > | compilation terminated. > > > > I saw this, and I'm thinking that include shouldn't be there at all. > > You might in turn ask "Why would you say that?" -- well, experience? > > > > Let us have a quick look at a current kernel. > > > > linux-head$ git grep '#include <typedefs.h>' > > linux-head$ git grep '#include .*typedefs.h>' > > linux-head$ git grep '#include .*module.h>' | wc -l > > 14342 > > linux-head$ > > > > No instances of <typedefs.h>. Also no instances of <somepath/typedefs.h>. > > And if I search for a common include, like module.h, there are tens of > > thousands of instances, so my search isn't somehow fundamentally broken. > > > > > > | make[7]: *** [/home/cerezo/yocto/tut/poky/build/tmp/work-shared/opi3b/kernel-source/scripts/Makefile.build:250: > > > > drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/aiutils.o] Error 1 > > > > | make[7]: *** Waiting for unfinished jobs.... > > > > > > > > Will really appreciate if i can get some pointers as to what i may be > > > > doing wrong. > > > > > > This seems to be a recurring problem with this particular vendor kernel > > > unfortunately. Take a look at this patch which solves the same issue on > > > a different branch: > > > https://github.com/riscv/meta-riscv/blob/master/recipes-kernel/linux/linux-orangepi/orangepi-rv2/bcmdhd-fix-typedefs-header-not-found.patch > > > > So this patch amounts to the one line change as follows: > > > > EXTRA_CFLAGS += -I$(BCMDHD_ROOT)/include/ -I$(BCMDHD_ROOT)/ > > +EXTRA_CFLAGS += -I$(srctree)/$(src)/include > > ifeq ($(CONFIG_BCMDHD),m) > > > > OK, that probably does put a (semi random) instance of typedefs.h into > > the header search path, but given what I've shown above in the mainline > > kernel tree, I would ask if anyone has checked what happens if the > > offending typedefs.h include line was simply *removed*? Does the error > > go away, or does it give a more informative error on exactly what > > specific definition is missing - so that folks can fix it "properly"? > > > > You generally don't want the kernel and kernel drivers pulling in > > include paths from random locations outside the kernel. The kernel is > > designed to be self-contained, with the exception of the few user space > > utilities that happen to be bundled with the kernel for convenience. > > > > In a case like this, the patch risks causing additional errors elsewhere. > > Things like "conflicting definitions for XYZ". Or worse, you could get > > an instance where an added include presents a "struct foo" that is > > different from the kernel's view of what "struct foo" is - say for > > example the kernel's version uses a u64 instead of a u32, or has padding > > for cache line alignment and performance reasons. Then your stuff will > > just silently compile, but explode at runtime. Kind of a classic case > > of "two wrongs don't make a right". > > > > This is one (of many) problems with not-in-mainline drivers like this. > > The various SoC engineers tasked with creating a driver develop their > > own ways of doing things, but it remains largely unreviewed by the > > larger group of people out there, including the subsystem maintainers > > who would spot things like this and require it to be done properly > > before accepting it into their local tree and then requesting it to be > > merged upwards into mainline. > > > > Paul. > > -- > > > > > > > > I think adapting this to your branch should solve your problem too. > > > > > > > > > > > > > > KERNEL RECIPE > > > > https://github.com/AccraNET/meta-orspace-orangepi3b/blob/main/recipes-kernel/linux/linux-orangepi.bb > > > > > > > > MACHINE CONFIGURATION > > > > https://github.com/AccraNET/meta-orspace-orangepi3b/blob/main/conf/machine/opi3b.conf > > > > > > > > Best Regards > > > > Cerezo > > > > > > ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [yocto] Custom Kernel Recipe Compilation Error. 2025-07-07 20:10 Custom Kernel Recipe Compilation Error C Larbi 2025-07-08 9:06 ` [yocto] " Gyorgy Sarvari @ 2025-07-14 16:18 ` Quentin Schulz 1 sibling, 0 replies; 7+ messages in thread From: Quentin Schulz @ 2025-07-14 16:18 UTC (permalink / raw) To: yocto, pkl2000us Hi Cerezo, On 7/7/25 10:10 PM, C Larbi via lists.yoctoproject.org wrote: > [You don't often get email from pkl2000us=gmail.com@lists.yoctoproject.org. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ] > > Hello all > I am a newbie to the yocto project and on a journey to understand the basics. > > My reference hardware for my learning journey is the Orange pi 3b (RK3566 soc) > Just for your information: Orange Pi 3B seems to be supported in upstream Linux and upstream U-Boot. RK3566 SoC is supported in meta-rockchip (the community one). So maybe you could simply include meta-rockchip (https://git.yoctoproject.org/meta-rockchip) layer and base your machine configuration file on including rk3566.inc from it. See https://git.yoctoproject.org/meta-rockchip/tree/conf/machine/include/soquartz.inc for an RK3566 machine (or https://git.yoctoproject.org/meta-rockchip/tree/conf/machine/include/radxa-zero-3.inc). Then you should hopefully be able to use linux-yocto by adding your machine to COMPATIBLE_MACHINE in a linux-yocto_%.bbappend, c.f. https://git.yoctoproject.org/meta-rockchip/tree/recipes-kernel/linux/linux-yocto_%25.bbappend and you would be running mainline U-Boot and Linux on your Orange Pi 3B instead of the vendor fork. Note that not necessarily all features have made it to upstream Linux (e.g. the camera stack still isn't supported, not all VPUs, etc...) so you may not necessarily want to switch now if you depend on those features. I'm pretty sure Trevor (the meta-rockchip maintainer) would be happy merging support for Orange Pi 3B with upstream Linux and U-Boot if you were to send a patch for this :) In any case, have fun with Yocto :)! Cheers, Quentin ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-07-14 16:19 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-07-07 20:10 Custom Kernel Recipe Compilation Error C Larbi 2025-07-08 9:06 ` [yocto] " Gyorgy Sarvari 2025-07-09 9:32 ` C Larbi 2025-07-10 8:36 ` Paul Gortmaker 2025-07-10 14:35 ` C Larbi 2025-07-11 17:20 ` Paul Gortmaker 2025-07-14 16:18 ` Quentin Schulz
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox