野火电子论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3520|回复: 4

[求助] make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j8 编译错误

[复制链接]
发表于 2023-5-5 14:38:17 | 显示全部楼层 |阅读模式
系统:Linux xh--linux 5.19.0-41-generic #42~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Apr 18 17:40:00 UTC 2 x86_64 x86_64 x86_64 GNU/Linux


克隆下来的内核 :

git clone https://github.com/LubanCat/kernel







sudo apt install  make libssl-dev liblz4-tool device-tree-compiler bison flex u-boot-tools gcc-aarch64-linux-gnu




make ARCH=arm64 lubancat2_defconfig


make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j8


运行

make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j8



后错误提示如下: (请问是哪里设置不对吗? )


AREDS@ADSF--linux:~/lbc/kernel$ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j8
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CC [M]  drivers/net/wireless/rockchip_wlan/rtl8821ce/core/rtw_mlme.o
  CC [M]  drivers/net/wireless/rockchip_wlan/rtl8822bu/core/rtw_mlme.o
  CC [M]  drivers/net/wireless/rockchip_wlan/rtl8822bs/core/rtw_mlme.o
  AR      drivers/net/wireless/rockchip_wlan/built-in.a
  CC [M]  drivers/net/wireless/rockchip_wlan/rtl8821ce/core/rtw_rf.o
  CC [M]  drivers/net/wireless/rockchip_wlan/rtl8821cs/core/rtw_recv.o
  CC [M]  drivers/net/wireless/rockchip_wlan/rtl8822bu/core/rtw_recv.o
  CC [M]  drivers/net/wireless/rockchip_wlan/rtl8822cs/core/rtw_mlme.o
drivers/net/wireless/rockchip_wlan/rtl8822bu/core/rtw_mlme.c: In function 'rtw_drv_scan_by_self':
drivers/net/wireless/rockchip_wlan/rtl8822bs/core/rtw_mlme.c: In function 'rtw_drv_scan_by_self':
drivers/net/wireless/rockchip_wlan/rtl8822bu/core/rtw_mlme.c:3455:17: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
error, forbidden warning:rtw_mlme.c:3455
3455 |                 else
      |                 ^~~~
drivers/net/wireless/rockchip_wlan/rtl8822bu/core/rtw_mlme.c:3458:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
3458 |                         goto exit;
      |                         ^~~~
drivers/net/wireless/rockchip_wlan/rtl8822bs/core/rtw_mlme.c:3452:17: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
error, forbidden warning:rtw_mlme.c:3452
3452 |                 else
      |                 ^~~~
drivers/net/wireless/rockchip_wlan/rtl8822bs/core/rtw_mlme.c:3455:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
3455 |                         goto exit;
      |                         ^~~~
drivers/net/wireless/rockchip_wlan/rtl8821ce/core/rtw_mlme.c: In function 'rtw_drv_scan_by_self':
drivers/net/wireless/rockchip_wlan/rtl8821ce/core/rtw_mlme.c:3161:17: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
error, forbidden warning:rtw_mlme.c:3161
3161 |                 else
      |                 ^~~~
drivers/net/wireless/rockchip_wlan/rtl8821ce/core/rtw_mlme.c:3164:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
3164 |                         goto exit;
      |                         ^~~~
drivers/net/wireless/rockchip_wlan/rtl8821ce/core/rtw_rf.c: In function 'dump_txpwr_lmt':
drivers/net/wireless/rockchip_wlan/rtl8821ce/core/rtw_rf.c:765:9: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
error, forbidden warning:rtw_rf.c:765
  765 |         if (IS_HARDWARE_TYPE_JAGUAR_AND_JAGUAR2(adapter))
      |         ^~
In file included from ./drivers/net/wireless/rockchip_wlan/rtl8821ce/include/drv_types.h:60,
                 from drivers/net/wireless/rockchip_wlan/rtl8821ce/core/rtw_rf.c:17:
./drivers/net/wireless/rockchip_wlan/rtl8821ce/include/rtw_debug.h:220:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
  220 |         do {\
      |         ^~
drivers/net/wireless/rockchip_wlan/rtl8821ce/core/rtw_rf.c:767:17: note: in expansion of macro 'RTW_PRINT_SEL'
  767 |                 RTW_PRINT_SEL(sel, "txpwr_lmt_5g_20_40_ref:0x%02x\n", rfctl->txpwr_lmt_5g_20_40_ref);
      |                 ^~~~~~~~~~~~~
drivers/net/wireless/rockchip_wlan/rtl8821cs/core/rtw_recv.c: In function 'validate_mp_recv_frame':
drivers/net/wireless/rockchip_wlan/rtl8821cs/core/rtw_recv.c:3640:25: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
error, forbidden warning:rtw_recv.c:3640
3640 |                         for (i = 0; i < precv_frame->u.hdr.len; i = i + 8)
      |                         ^~~
In file included from drivers/net/wireless/rockchip_wlan/rtl8821cs/include/drv_types.h:61,
                 from drivers/net/wireless/rockchip_wlan/rtl8821cs/core/rtw_recv.c:18:
drivers/net/wireless/rockchip_wlan/rtl8821cs/include/rtw_debug.h:168:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
  168 |         do {\
      |         ^~
drivers/net/wireless/rockchip_wlan/rtl8821cs/core/rtw_recv.c:3643:33: note: in expansion of macro 'RTW_INFO'
3643 |                                 RTW_INFO("#############################\n");
      |                                 ^~~~~~~~
drivers/net/wireless/rockchip_wlan/rtl8822bu/core/rtw_recv.c: In function 'validate_mp_recv_frame':
drivers/net/wireless/rockchip_wlan/rtl8822bu/core/rtw_recv.c:3575:25: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
error, forbidden warning:rtw_recv.c:3575
3575 |                         for (i = 0; i < precv_frame->u.hdr.len; i = i + 8)
      |                         ^~~
In file included from drivers/net/wireless/rockchip_wlan/rtl8822bu/include/drv_types.h:60,
                 from drivers/net/wireless/rockchip_wlan/rtl8822bu/core/rtw_recv.c:17:
drivers/net/wireless/rockchip_wlan/rtl8822bu/include/rtw_debug.h:165:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
  165 |         do {\
      |         ^~
drivers/net/wireless/rockchip_wlan/rtl8822bu/core/rtw_recv.c:3578:33: note: in expansion of macro 'RTW_INFO'
3578 |                                 RTW_INFO("#############################\n");
      |                                 ^~~~~~~~
drivers/net/wireless/rockchip_wlan/rtl8822cs/core/rtw_mlme.c: In function 'rtw_drv_scan_by_self':
drivers/net/wireless/rockchip_wlan/rtl8822cs/core/rtw_mlme.c:3139:17: warning: this 'else' clause does not guard... [-Wmisleading-indentation]
error, forbidden warning:rtw_mlme.c:3139
3139 |                 else
      |                 ^~~~
drivers/net/wireless/rockchip_wlan/rtl8822cs/core/rtw_mlme.c:3142:25: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'else'
3142 |                         goto exit;
      |                         ^~~~
  CC [M]  drivers/net/wireless/rockchip_wlan/rtl8821ce/core/rtw_sta_mgt.o
make[5]: *** [scripts/Makefile.build:333:drivers/net/wireless/rockchip_wlan/rtl8821ce/core/rtw_rf.o] 错误 1
make[5]: *** 正在删除文件“drivers/net/wireless/rockchip_wlan/rtl8821ce/core/rtw_rf.o”
make[5]: *** 正在等待未完成的任务....
  CC [M]  drivers/net/wireless/rockchip_wlan/rtl8822bs/core/rtw_chplan.o
make[5]: *** [scripts/Makefile.build:333:drivers/net/wireless/rockchip_wlan/rtl8821cs/core/rtw_recv.o] 错误 1
make[5]: *** 正在删除文件“drivers/net/wireless/rockchip_wlan/rtl8821cs/core/rtw_recv.o”
make[4]: *** [scripts/Makefile.build:637:drivers/net/wireless/rockchip_wlan/rtl8821cs] 错误 2
make[4]: *** 正在等待未完成的任务....
  CC [M]  drivers/net/wireless/rockchip_wlan/rtl8822bs/core/rtw_recv.o
make[5]: *** [scripts/Makefile.build:333:drivers/net/wireless/rockchip_wlan/rtl8821ce/core/rtw_mlme.o] 错误 1
make[5]: *** 正在删除文件“drivers/net/wireless/rockchip_wlan/rtl8821ce/core/rtw_mlme.o”
  CC [M]  drivers/net/wireless/rockchip_wlan/rtl8822bu/core/rtw_br_ext.o
drivers/net/wireless/rockchip_wlan/rtl8822bs/core/rtw_mlme.c: At top level:
cc1: note: unrecognized command-line option '-Wno-self-assign' may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option '-Wno-pointer-bool-conversion' may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option '-Wno-parentheses-equality' may have been intended to silence earlier diagnostics
make[5]: *** [scripts/Makefile.build:333:drivers/net/wireless/rockchip_wlan/rtl8822bu/core/rtw_recv.o] 错误 1
make[5]: *** 正在删除文件“drivers/net/wireless/rockchip_wlan/rtl8822bu/core/rtw_recv.o”
make[5]: *** 正在等待未完成的任务....
  CC [M]  drivers/net/wireless/rockchip_wlan/rtl8822bs/core/rtw_sta_mgt.o
make[5]: *** [scripts/Makefile.build:333:drivers/net/wireless/rockchip_wlan/rtl8822bu/core/rtw_mlme.o] 错误 1
make[5]: *** 正在删除文件“drivers/net/wireless/rockchip_wlan/rtl8822bu/core/rtw_mlme.o”
  CC [M]  drivers/net/wireless/rockchip_wlan/rtl8822bs/core/rtw_ap.o
make[5]: *** [scripts/Makefile.build:333:drivers/net/wireless/rockchip_wlan/rtl8822bs/core/rtw_mlme.o] 错误 1
make[5]: *** 正在删除文件“drivers/net/wireless/rockchip_wlan/rtl8822bs/core/rtw_mlme.o”
make[5]: *** 正在等待未完成的任务....
  CC [M]  drivers/net/wireless/rockchip_wlan/rtl8822cs/core/rtw_recv.o
make[5]: *** [scripts/Makefile.build:333:drivers/net/wireless/rockchip_wlan/rtl8822cs/core/rtw_mlme.o] 错误 1
make[5]: *** 正在删除文件“drivers/net/wireless/rockchip_wlan/rtl8822cs/core/rtw_mlme.o”
make[5]: *** 正在等待未完成的任务....
make[4]: *** [scripts/Makefile.build:637:drivers/net/wireless/rockchip_wlan/rtl8821ce] 错误 2
drivers/net/wireless/rockchip_wlan/rtl8822bs/core/rtw_recv.c: In function 'validate_mp_recv_frame':
drivers/net/wireless/rockchip_wlan/rtl8822bs/core/rtw_recv.c:3575:25: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
error, forbidden warning:rtw_recv.c:3575
3575 |                         for (i = 0; i < precv_frame->u.hdr.len; i = i + 8)
      |                         ^~~
In file included from drivers/net/wireless/rockchip_wlan/rtl8822bs/include/drv_types.h:60,
                 from drivers/net/wireless/rockchip_wlan/rtl8822bs/core/rtw_recv.c:17:
drivers/net/wireless/rockchip_wlan/rtl8822bs/include/rtw_debug.h:165:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
  165 |         do {\
      |         ^~
drivers/net/wireless/rockchip_wlan/rtl8822bs/core/rtw_recv.c:3578:33: note: in expansion of macro 'RTW_INFO'
3578 |                                 RTW_INFO("#############################\n");
      |                                 ^~~~~~~~
drivers/net/wireless/rockchip_wlan/rtl8822cs/core/rtw_recv.c: In function 'validate_mp_recv_frame':
drivers/net/wireless/rockchip_wlan/rtl8822cs/core/rtw_recv.c:3558:25: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
error, forbidden warning:rtw_recv.c:3558
3558 |                         for (i = 0; i < precv_frame->u.hdr.len; i = i + 8)
      |                         ^~~
In file included from drivers/net/wireless/rockchip_wlan/rtl8822cs/include/drv_types.h:60,
                 from drivers/net/wireless/rockchip_wlan/rtl8822cs/core/rtw_recv.c:17:
drivers/net/wireless/rockchip_wlan/rtl8822cs/include/rtw_debug.h:137:9: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
  137 |         do {\
      |         ^~
drivers/net/wireless/rockchip_wlan/rtl8822cs/core/rtw_recv.c:3561:33: note: in expansion of macro 'RTW_INFO'
3561 |                                 RTW_INFO("#############################\n");
      |                                 ^~~~~~~~
make[4]: *** [scripts/Makefile.build:637:drivers/net/wireless/rockchip_wlan/rtl8822bu] 错误 2
drivers/net/wireless/rockchip_wlan/rtl8822bs/core/rtw_recv.c: At top level:
cc1: note: unrecognized command-line option '-Wno-self-assign' may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option '-Wno-pointer-bool-conversion' may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option '-Wno-parentheses-equality' may have been intended to silence earlier diagnostics
make[5]: *** [scripts/Makefile.build:333:drivers/net/wireless/rockchip_wlan/rtl8822bs/core/rtw_recv.o] 错误 1
make[5]: *** 正在删除文件“drivers/net/wireless/rockchip_wlan/rtl8822bs/core/rtw_recv.o”
make[5]: *** [scripts/Makefile.build:333:drivers/net/wireless/rockchip_wlan/rtl8822cs/core/rtw_recv.o] 错误 1
make[5]: *** 正在删除文件“drivers/net/wireless/rockchip_wlan/rtl8822cs/core/rtw_recv.o”
make[4]: *** [scripts/Makefile.build:637:drivers/net/wireless/rockchip_wlan/rtl8822cs] 错误 2
make[4]: *** [scripts/Makefile.build:637:drivers/net/wireless/rockchip_wlan/rtl8822bs] 错误 2
make[3]: *** [scripts/Makefile.build:637:drivers/net/wireless/rockchip_wlan] 错误 2
make[2]: *** [scripts/Makefile.build:637:drivers/net/wireless] 错误 2
make[1]: *** [scripts/Makefile.build:637:drivers/net] 错误 2
make: *** [Makefile:1194:drivers] 错误 2






回复

使用道具 举报

发表于 2023-5-8 00:02:47 | 显示全部楼层
用sdk的编译器编译或者把不需要的网卡驱动在配置文件注释掉
回复 支持 反对

使用道具 举报

 楼主| 发表于 2023-5-8 08:12:41 | 显示全部楼层
おおおじ。 发表于 2023-5-8 00:02
用sdk的编译器编译或者把不需要的网卡驱动在配置文件注释掉

早上好,按官方教程操作的,理说不应该这样。谢谢!!
回复 支持 反对

使用道具 举报

发表于 2023-5-11 09:06:57 | 显示全部楼层
建议使用rk的gcc

make ARCH=arm64 lubancat2_defconfig
make ARCH=arm64 CROSS_COMPILE=../prebuilts/gcc/linux-x86/aarch64/gcc-linaro-6.3.1-2017.05-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
回复 支持 反对

使用道具 举报

发表于 2024-3-1 09:40:08 | 显示全部楼层
DHDAXCW 发表于 2023-5-11 09:06
建议使用rk的gcc

make ARCH=arm64 lubancat2_defconfig

你好,我使用了RK的gcc,也会报错:
drivers/net/wireless/rockchip_wlan/rtl8821ce/core/rtw_mlme_ext.c: In function 'rtw_txpwr_init_regd':
drivers/net/wireless/rockchip_wlan/rtl8821ce/core/rtw_mlme_ext.c:261:3: error: empty declaration [-Werror]
   __attribute__((__fallthrough__));
   ^~~~~~~~~~~~~
drivers/net/wireless/rockchip_wlan/rtl8821ce/core/rtw_mlme_ext.c:261:3: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
drivers/net/wireless/rockchip_wlan/rtl8821ce/core/rtw_mlme_ext.c: In function 'mgt_dispatcher':
drivers/net/wireless/rockchip_wlan/rtl8821ce/core/rtw_mlme_ext.c:1331:3: error: empty declaration [-Werror]
   __attribute__((__fallthrough__));
   ^~~~~~~~~~~~~
drivers/net/wireless/rockchip_wlan/rtl8821ce/core/rtw_mlme_ext.c:1331:3: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
  CC [M]  drivers/net/wireless/rockchip_wlan/rtl8821ce/core/rtw_wlan_util.o
  CC [M]  drivers/net/wireless/rockchip_wlan/rtl8821ce/core/rtw_vht.o
  CC [M]  drivers/net/wireless/rockchip_wlan/rtl8822bu/core/rtw_debug.o
  CC [M]  drivers/net/wireless/rockchip_wlan/rtl8822cs/core/rtw_security.o
  CC [M]  drivers/net/wireless/rockchip_wlan/rtl8822cs/core/rtw_debug.o
  CC [M]  drivers/net/wireless/rockchip_wlan/rtl8822cs/core/rtw_io.o
cc1: all warnings being treated as errors
  CC [M]  drivers/net/wireless/rockchip_wlan/rtl8822bu/core/rtw_io.o
make[5]: *** [scripts/Makefile.build:273: drivers/net/wireless/rockchip_wlan/rtl8821ce/core/rtw_mlme_ext.o] Error 1
make[4]: *** [scripts/Makefile.build:516: drivers/net/wireless/rockchip_wlan/rtl8821ce] Error 2
make[4]: *** Waiting for unfinished jobs....

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

联系站长|手机版|野火电子官网|野火淘宝店铺|野火电子论坛 ( 粤ICP备14069197号 ) 大学生ARM嵌入式2群

GMT+8, 2024-11-24 18:17 , Processed in 0.064210 second(s), 24 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表