Skip to contentSkip to conversation

rock5b & 2023.08-rc1

Buildroot Nick Betteridge 2 participants 2 messages Aug 7, 2023

lore
Share & tools
lore
#0 lore raw

Hello,

I just tried to build the rock5b, with a 'make rock5b_defconfig' and 'make', and the build failed during the kernel compilation (page_alloc.c) - there were many 'error, forbidden warning', many referencing 'in expansion of macro 'adj_init_size''.

I tried out the rock5b last month using the patches posted to the list and the build completed - is there something I can modify in the defconfig to make this work?

Thanks

Nick

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

#1 lore raw

Hello Nick, all

Quoted 2 lines

I just tried to build the rock5b, with a 'make rock5b_defconfig' and 'make', and the build failed during the kernel compilation

Thanks for your mail. I think your issue is related to the current build job fail, see here:

https://gitlab.com/buildroot.org/buildroot/-/jobs/4795673759

Quoted 2 lines

(page_alloc.c) - there were many 'error, forbidden warning', many referencing 'in expansion of macro 'adj_init_size''.

I am not sure, whether I completely understand it yet. I believe some setting changed, such that some gcc warnings now produce actual errors (because it is now a "forbidden warning"). Maybe some gcc version bumb changed these settings, or some other config change to buildroot introduced this - to be
honest: I don't know. Maybe someone has an idea an can help?

Quoted 3 lines

I tried out the rock5b last month using the patches posted to the list and the build completed - is there something I can modify in the defconfig to make this work?

Now, regarding those error producing warnings: to me it seems that Radxa (or Rockchip) did fork from mainline kernel at some point to introduce their code to support their boards (or SoCs respectively). Unfortunately this also means, that mainline kernel fixes are not automatically introduced to the forked Linux version. I already looked into it and I found two patches to mainline Linux, which fix two (now error producing) warnings, but which are not yet applied to the Radxa kernel:

https://github.com/gregkh/linux/commit/
08ad7a770efacfecf903143f8de88d1e351a1f2d

https://github.com/gregkh/linux/commit/69848f9488bc1088bcd9a73987dff8d2cb47a060

So I made patches from these commits:

git format-patch -1 08ad7a770efacfecf903143f8de88d1e351a1f2d git format-patch -1 69848f9488bc1088bcd9a73987dff8d2cb47a060

I then put these patches into the rock5b folder (i.e., board/radxa/rock5b/) and added the following line to the rock5b_defconfig, so that buildroot applies the patches during build:

BR2_LINUX_KERNEL_PATCH="board/radxa/rock5b/0001-etherdevice-Adjust-ether_addr- prototypes-to-silence-.patch board/radxa/rock5b/0002-mm-page_alloc-fix- building-error-on-Werror-array-com.patch"

However, the build did fail again, because there are even more "forbidden warnings". These warnings are produced by kernel code which is located in "drivers/net/wireless/rockchip_wlan/". To me it seems that this folder is not part of mainline linux, but contains code some wireless driver code, put there by Radxa or Rockchip. I am now not sure what to do about this. It would be possible to try to fix these issues and then add more patches to the board/ radxa/rock5b folder. However, I am not sure, whether I want to touch that code. I am a bit afraid, I might not properly understand the code and then introduce some bugs myself ...

Does anyone have some suggestions, ideas and overall helpful info about this? Help is really appreciated!

Best regards,
Kilian

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot