Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rock 5B Buildroot: Errors when compiling with gcc 12 #178

Open
akkusativk opened this issue Aug 8, 2023 · 1 comment
Open

Rock 5B Buildroot: Errors when compiling with gcc 12 #178

akkusativk opened this issue Aug 8, 2023 · 1 comment
Assignees

Comments

@akkusativk
Copy link

Hello,

I am trying to add board support for the Rock 5B to buildroot (https://buildroot.org/). Recently buildroot changed its default gcc version from 11.x to 12.x. In gcc 12 some warnings are now treated as errors. This causes the build of the Radxa custom Linux Kernel to fail, hence the whole build of the linux image for the Rock 5B. I had a look at the error messages and identified 2 patches in the mainline Linux kernel, which were not yet applied to this Radxa custom kernel:

gregkh/linux@08ad7a7
gregkh/linux@69848f9

Could you apply those patches to the Radxa custom Linux kernel?

In addition there are also some errors, which seem to affect parts of the Radxa custom kernel, which are not part of the mainline Linux kernel. Hence, I there exists no patch for those yet. These are the reported errors, when compiling the commit 52f51a2 with gcc 12:

========================

drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_android.c: In function 'wl_handle_private_cmd':
drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_android.c:12068:62: warning: the comparison will always evaluate as 'true' for the pointer operand in 'rev_info_delim + 1' must not be NULL [-Waddress]
error, forbidden warning:wl_android.c:12068
12068 | strlen(CMD_COUNTRY_DELIMITER)) == 0) &&
| ^~
CC [M] drivers/net/tun.o
CC drivers/firmware/efi/libstub/skip_spaces.o
make[8]: *** [scripts/Makefile.build:273: drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_android.o] Error 1
make[8]: *** Deleting file 'drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/wl_android.o'
make[8]: *** Waiting for unfinished jobs....

========================

drivers/net/wireless/rockchip_wlan/rtl8852be/core/rtw_vht.c: In function 'rtw_reattach_vht_ies':
drivers/net/wireless/rockchip_wlan/rtl8852be/core/rtw_vht.c:1419:27: warning: the comparison will always evaluate as 'true' for the address of 'IEs' will never be NULL [-Waddress]
error, forbidden warning:rtw_vht.c:1419
1419 | if (pnetwork->IEs != NULL) {
| ^~
In file included from drivers/net/wireless/rockchip_wlan/rtl8852be/include/drv_types.h:27,
from drivers/net/wireless/rockchip_wlan/rtl8852be/core/rtw_vht.c:17:
drivers/net/wireless/rockchip_wlan/rtl8852be/include/wlan_bssdef.h:249:13: note: 'IEs' declared here
249 | u8 IEs[MAX_IE_SZ]; /* (timestamp, beacon interval, and capability information) */
| ^~~
make[7]: *** [scripts/Makefile.build:274: drivers/net/wireless/rockchip_wlan/rtl8852be/core/rtw_vht.o] Error 1
make[7]: *** Deleting file 'drivers/net/wireless/rockchip_wlan/rtl8852be/core/rtw_vht.o'
make[7]: *** Waiting for unfinished jobs....

========================

drivers/net/wireless/rockchip_wlan/rtl8852be/core/rtw_sta_mgt.c: In function 'rtw_mfree_stainfo':
drivers/net/wireless/rockchip_wlan/rtl8852be/core/rtw_sta_mgt.c:389:25: warning: the comparison will always evaluate as 'true' for the address of 'lock' will never be NULL [-Waddress]
error, forbidden warning:rtw_sta_mgt.c:389
389 | if (&psta->lock != NULL)
| ^~
In file included from drivers/net/wireless/rockchip_wlan/rtl8852be/include/drv_types.h:110,
from drivers/net/wireless/rockchip_wlan/rtl8852be/core/rtw_sta_mgt.c:17:
drivers/net/wireless/rockchip_wlan/rtl8852be/include/sta_info.h:273:17: note: 'lock' declared here
273 | _lock lock;
| ^~~~
make[7]: *** [scripts/Makefile.build:273: drivers/net/wireless/rockchip_wlan/rtl8852be/core/rtw_sta_mgt.o] Error 1
make[7]: *** Deleting file 'drivers/net/wireless/rockchip_wlan/rtl8852be/core/rtw_sta_mgt.o'

========================

drivers/net/wireless/rockchip_wlan/rtl8852bu/core/rtw_vht.c: In function 'rtw_reattach_vht_ies':
drivers/net/wireless/rockchip_wlan/rtl8852bu/core/rtw_vht.c:1423:27: warning: the comparison will always evaluate as 'true' for the address of 'IEs' will never be NULL [-Waddress]
error, forbidden warning:rtw_vht.c:1423
1423 | if (pnetwork->IEs != NULL) {
| ^~
In file included from drivers/net/wireless/rockchip_wlan/rtl8852bu/include/drv_types.h:27,
from drivers/net/wireless/rockchip_wlan/rtl8852bu/core/rtw_vht.c:17:
drivers/net/wireless/rockchip_wlan/rtl8852bu/include/wlan_bssdef.h:249:13: note: 'IEs' declared here
249 | u8 IEs[MAX_IE_SZ]; /* (timestamp, beacon interval, and capability information) */
| ^~~
make[7]: *** [scripts/Makefile.build:273: drivers/net/wireless/rockchip_wlan/rtl8852bu/core/rtw_vht.o] Error 1
make[7]: *** Deleting file 'drivers/net/wireless/rockchip_wlan/rtl8852bu/core/rtw_vht.o'
make[7]: *** Waiting for unfinished jobs....

========================

drivers/net/wireless/rockchip_wlan/rtl8852bu/core/rtw_sta_mgt.c: In function 'rtw_mfree_stainfo':
drivers/net/wireless/rockchip_wlan/rtl8852bu/core/rtw_sta_mgt.c:389:25: warning: the comparison will always evaluate as 'true' for the address of 'lock' will never be NULL [-Waddress]
error, forbidden warning:rtw_sta_mgt.c:389
389 | if (&psta->lock != NULL)
| ^~
In file included from drivers/net/wireless/rockchip_wlan/rtl8852bu/include/drv_types.h:110,
from drivers/net/wireless/rockchip_wlan/rtl8852bu/core/rtw_sta_mgt.c:17:
drivers/net/wireless/rockchip_wlan/rtl8852bu/include/sta_info.h:273:17: note: 'lock' declared here
273 | _lock lock;
| ^~~~
make[7]: *** [scripts/Makefile.build:273: drivers/net/wireless/rockchip_wlan/rtl8852bu/core/rtw_sta_mgt.o] Error 1
make[7]: *** Deleting file 'drivers/net/wireless/rockchip_wlan/rtl8852bu/core/rtw_sta_mgt.o'

========================

Could you have a look into these errors and fix them? That would be a great help to add board support for the Rock 5B to buildroot!

Best regards,
Kilian

@akkusativk
Copy link
Author

Any status on this? Fixing these issues would be needed to add support for the Radxa Rock 5B board to buildroot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants