--- a\device\rockchip\common\BoardConfig.mk
+++ b\device\rockchip\common\BoardConfig.mk#for 3G/4G modem dongle support
-BOARD_HAVE_DONGLE := false
+BOARD_HAVE_DONGLE := true

然后编译报错

============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=11
TARGET_PRODUCT=rk3568_r
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=cortex-a55
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv8-2a
TARGET_2ND_CPU_VARIANT=cortex-a55
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-5.4.0-91-generic-x86_64-Ubuntu-18.04.6-LTS
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=RQ3A.210705.001
OUT_DIR=out
============================================
[ 30% 283/935] target  C++: usb_dongle <= external/usb_modeswitch/usb_dongle/Misc.cpp
FAILED: out/target/product/rk3568_r/obj/EXECUTABLES/usb_dongle_intermediates/Misc.o
/bin/bash -c "(prebuilts/clang/host/linux-x86/clang-r383902b1/bin/clang-tidy -warnings-as-errors=clang-analyzer-security*,cert-* -quiet -extra-arg-before=-fno-caret-diagnostics -extra-arg-before=-D__clang_analyzer__ -extra-arg-before=-Xclang -extra-arg-before=-analyzer-config -extra-arg-before=-Xclang -extra-arg-before=c++-temp-dtor-inlining=false -checks=-*,clang-diagnostic-unused-command-line-argument,google*,-google-build-using-namespace,-google-default-arguments,-google-explicit-constructor,-google-readability*,-google-runtime-int,-google-runtime-references,-*,clang-analyzer-security*,cert-*,-cert-err34-c,-cert-err58-cpp,-cert-env33-c external/usb_modeswitch/usb_dongle/Misc.cpp -- -I external/usb_modeswitch/usb_dongle -I out/target/product/rk3568_r/obj/EXECUTABLES/usb_dongle_intermediates -I out/target/product/rk3568_r/gen/EXECUTABLES/usb_dongle_intermediates  -Isystem/core/libsysutils/include -Isystem/core/libsysutils/include -Iframeworks/native/libs/binder/include -Isystem/core/base/include -Isystem/core/libcutils/include_vndk -Isystem/core/libutils/include -Isystem/core/libbacktrace/include -Isystem/core/liblog/include_vndk -Isystem/core/libsystem/include -Isystem/core/libprocessgroup/include -Iout/soong/.intermediates/frameworks/native/libs/binder/libbinder/android_vendor.30_arm64_armv8-a_cortex-a55_shared/gen/aidl -Isystem/core/libcutils/include_vndk -Isystem/core/libprocessgroup/include -Isystem/core/libcutils/include -Isystem/core/liblog/include_vndk -Iexternal/selinux/libselinux/include -Isystem/core/libutils/include -Isystem/core/libbacktrace/include -Isystem/core/liblog/include_vndk -Isystem/core/libsystem/include -Isystem/core/libcutils/include_vndk -Isystem/core/libprocessgroup/include -Isystem/core/base/include -Iexternal/fmtlib/include -Isystem/libhwbinder/include -Isystem/libhwbinder/include -Iexternal/libcxx/include -Iexternal/libcxxabi/include -isystem out/soong/.intermediates/bionic/libc/libc.llndk/android_vendor.30_arm64_armv8-a_cortex-a55_shared/gen/include -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm64   -Iexternal/libcxxabi/include    -isystem out/target/product/rk3568_r/obj/include -c  -Werror=implicit-function-declaration -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fno-strict-aliasing -Werror=date-time -Werror=pragma-pack -Werror=pragma-pack-suspicious-include -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -faddrsig -Werror=int-conversion -fexperimental-new-pass-manager -Wno-reserved-id-macro -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-sign-compare -Wno-defaulted-function-deleted -Wno-inconsistent-missing-override -Wno-c99-designator -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -ffunction-sections -fdata-sections -fno-short-enums -funwind-tables -fstack-protector-strong -Wa,--noexecstack -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=format-security -nostdlibinc -march=armv8-a -mcpu=cortex-a55 -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin  -Wsign-promo -Wimplicit-fallthrough -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-gnu-include-next -fvisibility-inlines-hidden  -std=gnu++17   -fno-rtti -Werror -Wall -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Werror=format -DUSE_USB_MODE_SWITCH -D__ANDROID_VNDK__ -fPIE -Wno-enum-compare -Wno-enum-compare-switch -Wno-null-pointer-arithmetic -Wno-null-dereference -Wno-pointer-compare -Wno-xor-used-as-pow -Wno-final-dtor-non-final-class -target aarch64-linux-android30   -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=fortify-source -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-compare -Wno-tautological-type-limit-compare -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-int-in-bool-context -Wno-sizeof-array-div -Wno-tautological-overlap-compare -Wno-deprecated-copy -Wno-range-loop-construct -Wno-misleading-indentation -Wno-zero-as-null-pointer-constant -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conversion -Wno-string-compare -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-pessimizing-move ) && (PWD=/proc/self/cwd  prebuilts/clang/host/linux-x86/clang-r383902b1/bin/clang++ -I external/usb_modeswitch/usb_dongle -I out/target/product/rk3568_r/obj/EXECUTABLES/usb_dongle_intermediates -I out/target/product/rk3568_r/gen/EXECUTABLES/usb_dongle_intermediates  -Isystem/core/libsysutils/include -Isystem/core/libsysutils/include -Iframeworks/native/libs/binder/include -Isystem/core/base/include -Isystem/core/libcutils/include_vndk -Isystem/core/libutils/include -Isystem/core/libbacktrace/include -Isystem/core/liblog/include_vndk -Isystem/core/libsystem/include -Isystem/core/libprocessgroup/include -Iout/soong/.intermediates/frameworks/native/libs/binder/libbinder/android_vendor.30_arm64_armv8-a_cortex-a55_shared/gen/aidl -Isystem/core/libcutils/include_vndk -Isystem/core/libprocessgroup/include -Isystem/core/libcutils/include -Isystem/core/liblog/include_vndk -Iexternal/selinux/libselinux/include -Isystem/core/libutils/include -Isystem/core/libbacktrace/include -Isystem/core/liblog/include_vndk -Isystem/core/libsystem/include -Isystem/core/libcutils/include_vndk -Isystem/core/libprocessgroup/include -Isystem/core/base/include -Iexternal/fmtlib/include -Isystem/libhwbinder/include -Isystem/libhwbinder/include -Iexternal/libcxx/include -Iexternal/libcxxabi/include -isystem out/soong/.intermediates/bionic/libc/libc.llndk/android_vendor.30_arm64_armv8-a_cortex-a55_shared/gen/include -isystem bionic/libc/kernel/android/scsi -isystem bionic/libc/kernel/android/uapi -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm64   -Iexternal/libcxxabi/include    -isystem out/target/product/rk3568_r/obj/include -c  -Werror=implicit-function-declaration -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -no-canonical-prefixes -DNDEBUG -UDEBUG -fno-exceptions -Wno-multichar -O2 -g -fno-strict-aliasing -Werror=date-time -Werror=pragma-pack -Werror=pragma-pack-suspicious-include -fdebug-prefix-map=/proc/self/cwd= -D__compiler_offsetof=__builtin_offsetof -faddrsig -Werror=int-conversion -fexperimental-new-pass-manager -Wno-reserved-id-macro -Wno-unused-command-line-argument -fcolor-diagnostics -Wno-sign-compare -Wno-defaulted-function-deleted -Wno-inconsistent-missing-override -Wno-c99-designator -ftrivial-auto-var-init=zero -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang -ffunction-sections -fdata-sections -fno-short-enums -funwind-tables -fstack-protector-strong -Wa,--noexecstack -D_FORTIFY_SOURCE=2 -Wstrict-aliasing=2 -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=format-security -nostdlibinc -march=armv8-a -mcpu=cortex-a55 -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin  -Wsign-promo -Wimplicit-fallthrough -D_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS -Wno-gnu-include-next -fvisibility-inlines-hidden  -std=gnu++17   -fno-rtti -Werror -Wall -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter -Werror=format -DUSE_USB_MODE_SWITCH -D__ANDROID_VNDK__ -fPIE -Wno-enum-compare -Wno-enum-compare-switch -Wno-null-pointer-arithmetic -Wno-null-dereference -Wno-pointer-compare -Wno-xor-used-as-pow -Wno-final-dtor-non-final-class -target aarch64-linux-android30   -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast -Werror=fortify-source -Werror=address-of-temporary -Werror=return-type -Wno-tautological-constant-compare -Wno-tautological-type-limit-compare -Wno-reorder-init-list -Wno-implicit-int-float-conversion -Wno-int-in-bool-context -Wno-sizeof-array-div -Wno-tautological-overlap-compare -Wno-deprecated-copy -Wno-range-loop-construct -Wno-misleading-indentation -Wno-zero-as-null-pointer-constant -Wno-deprecated-anon-enum-enum-conversion -Wno-deprecated-enum-enum-conversion -Wno-string-compare -Wno-enum-enum-conversion -Wno-enum-float-conversion -Wno-pessimizing-move  -MD -MF out/target/product/rk3568_r/obj/EXECUTABLES/usb_dongle_intermediates/Misc.d -o out/target/product/rk3568_r/obj/EXECUTABLES/usb_dongle_intermediates/Misc.o external/usb_modeswitch/usb_dongle/Misc.cpp )"
error: declaration uses identifier '_FORTIFY_SOURCE', which is a reserved identifier [cert-dcl37-c,-warnings-as-errors]
error: declaration uses identifier '_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS', which is a reserved identifier [cert-dcl37-c,-warnings-as-errors]
note: this fix will not be applied because it overlaps with another fix
error: declaration uses identifier '__ANDROID_VNDK__', which is a reserved identifier [cert-dcl37-c,-warnings-as-errors]
note: this fix will not be applied because it overlaps with another fix
error: declaration uses identifier '__clang_analyzer__', which is a reserved identifier [cert-dcl37-c,-warnings-as-errors]
note: this fix will not be applied because it overlaps with another fix
error: declaration uses identifier '__compiler_offsetof', which is a reserved identifier [cert-dcl37-c,-warnings-as-errors]
note: this fix will not be applied because it overlaps with another fix
error: declaration uses identifier '_FORTIFY_SOURCE', which is a reserved identifier [cert-dcl51-cpp,-warnings-as-errors]
error: declaration uses identifier '_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS', which is a reserved identifier [cert-dcl51-cpp,-warnings-as-errors]
note: this fix will not be applied because it overlaps with another fix
error: declaration uses identifier '__ANDROID_VNDK__', which is a reserved identifier [cert-dcl51-cpp,-warnings-as-errors]
note: this fix will not be applied because it overlaps with another fix
error: declaration uses identifier '__clang_analyzer__', which is a reserved identifier [cert-dcl51-cpp,-warnings-as-errors]
note: this fix will not be applied because it overlaps with another fix
error: declaration uses identifier '__compiler_offsetof', which is a reserved identifier [cert-dcl51-cpp,-warnings-as-errors]
note: this fix will not be applied because it overlaps with another fix..............error: declaration uses identifier '_FORTIFY_SOURCE', which is a reserved identifier [cert-dcl37-c,-warnings-as-errors]
error: declaration uses identifier '_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS', which is a reserved identifier [cert-dcl37-c,-warnings-as-errors]
note: this fix will not be applied because it overlaps with another fix
error: declaration uses identifier '__ANDROID_VNDK__', which is a reserved identifier [cert-dcl37-c,-warnings-as-errors]
note: this fix will not be applied because it overlaps with another fix
error: declaration uses identifier '__clang_analyzer__', which is a reserved identifier [cert-dcl37-c,-warnings-as-errors]
note: this fix will not be applied because it overlaps with another fix
error: declaration uses identifier '__compiler_offsetof', which is a reserved identifier [cert-dcl37-c,-warnings-as-errors]
note: this fix will not be applied because it overlaps with another fix
error: declaration uses identifier '_FORTIFY_SOURCE', which is a reserved identifier [cert-dcl51-cpp,-warnings-as-errors]
error: declaration uses identifier '_LIBCPP_ENABLE_THREAD_SAFETY_ANNOTATIONS', which is a reserved identifier [cert-dcl51-cpp,-warnings-as-errors]
note: this fix will not be applied because it overlaps with another fix
error: declaration uses identifier '__ANDROID_VNDK__', which is a reserved identifier [cert-dcl51-cpp,-warnings-as-errors]
note: this fix will not be applied because it overlaps with another fix
error: declaration uses identifier '__clang_analyzer__', which is a reserved identifier [cert-dcl51-cpp,-warnings-as-errors]
note: this fix will not be applied because it overlaps with another fix
error: declaration uses identifier '__compiler_offsetof', which is a reserved identifier [cert-dcl51-cpp,-warnings-as-errors]
note: this fix will not be applied because it overlaps with another fix
15:58:06 ninja failed with: exit status 1#### failed to build some targets (01:38 (mm:ss)) ####

修改:\external\usb_modeswitch\usb_dongle\Android.mk

LOCAL_PATH:= $(call my-dir)common_src_files := \NetlinkManager.cpp \NetlinkHandler.cpp \MiscManager.cpp \Misc.cpp \G3Dev.cppcommon_shared_libraries := \libsysutils \libbinder \libcutils \liblog \libselinux \libutils \libbase \libhwbindercommon_cflags := -Werror -Wall -Wno-missing-field-initializers -Wno-unused-variable -Wno-unused-parameter- common_local_tidy_flags := -warnings-as-errors=clang-analyzer-security*,cert-*
+ #common_local_tidy_flags := -warnings-as-errors=clang-analyzer-security*,cert-*common_local_tidy_checks := -*,clang-analyzer-security*,cert-*,-cert-err34-c,-cert-err58-cpp
common_local_tidy_checks += ,-cert-env33-cinclude $(CLEAR_VARS)LOCAL_ADDITIONAL_DEPENDENCIES := $(LOCAL_PATH)/Android.mk
LOCAL_MODULE := usb_dongle
LOCAL_PROPRIETARY_MODULE := true
LOCAL_CLANG := true
LOCAL_TIDY := true
LOCAL_TIDY_FLAGS := $(common_local_tidy_flags)
LOCAL_TIDY_CHECKS := $(common_local_tidy_checks)
LOCAL_SRC_FILES := \main.cpp \$(common_src_files)LOCAL_INIT_RC := usb_dongle.rcLOCAL_CFLAGS := $(common_cflags)
LOCAL_CFLAGS += -Werror=format
LOCAL_CFLAGS += -DUSE_USB_MODE_SWITCHLOCAL_SHARED_LIBRARIES := $(common_shared_libraries)include $(BUILD_EXECUTABLE)

注解掉common_local_tidy_flags这一项

就可以编译通过了

RK3568-ANDROID11-BOARD_HAVE_DONGLE 报错(3G/4G)相关推荐

  1. RK3568 debian系统iptables命令报错

    问题现象: 在RK3568 Linux系统(Debian 10)中使用iptables报如下错误: root@linaro-alip:~# iptables iptables/1.8.2 Failed ...

  2. rockchip rk3566 android11 网口log报错: DMA engine initialization failed

    问题描述:上电初始化前将网口插入,然后上电初始化网口能够正常使用,且能够找到PHY,ifconfig 查看能够有eth0 产生,网口正常使用且能够热插拔,但上电初始化时,不插入网口,就会报DMA en ...

  3. linux qemu 报错 Unable to reserve 0xfffff000 bytes of virtual address space at 0x1000 解决方法

    目录 错误现象 可能原因 解决过程 解决方法 错误现象 使用 qemu-i686 运行 i686平台文件 报错 qemu-i686: Unable to reserve 0xfffff000 byte ...

  4. 调用后台接口返回报错前端隐藏提示_腾讯社交联盟广告

    开发者帮助中心 优量汇服务体系升级了,除查阅本页常见问题外,还可以通过以下渠道解决您遇到的问题 1. 实时智能客服 入口:优量汇官网.开发者平台.优量汇服务号 时间:7*24即时问答 服务内容:涵盖 ...

  5. 5.Apache Kylin 构建 第一步报错 Container complete event for unknown container

    版本: Apache Kylin 3.0.0 一.问题 build cube第一步(#1 Step Name: Create Intermediate Flat Hive)报错 Container c ...

  6. C# 报错“输入的不是有效的 Base-64 字符串,因为它包含非 Base-64 字符、两个以上的填充字符,或者填充字符间包含非法字符”

    我这里有一串 base64,是经过验证的.可以一些在线工具是可以转成图片的,后台C# 用 FromBase64String就报错. data:image/jpeg;base64,/9j/4QBmRXh ...

  7. lvextend扩容后,发现还是原来的大小。报错: resize2fs: Bad magic number in super-block 打开 /dev/mapper/vg01-lv01 时的解决方法

    lvextend扩容后,发现还是原来的大小,以及报错: resize2fs: Bad magic number in super-block 打开 /dev/mapper/vg01-lv01 时的解决 ...

  8. java报错怎么看_IGV 哐当就不能用了,除了换台电脑还能怎么办?

    不知道哪一次更新,也不知道因为更新了什么,PC 上的 IGV 突然就不能用了.除了换一台 Mac 以外还能怎么办.下文记录了 debug 的过程以及一点思考. 前奏 IGV 这个工具因为是 Java ...

  9. ecplice中class.forname一直报错_英雄联盟LOL闪退,弹出吉格斯报错BUGSPLAT

    不少玩家进入游戏对局之前就会弹出吉格斯报错,或者游戏中途出现报错等情况,网上说的办法很多,什么分辨率设置不对,提高虚拟内存,卸载一些不用软件等,都是有用的办法.弹窗下面有三个可点击,左边是上传错误日志 ...

最新文章

  1. 我爸和在我们小区里的一位老大爷
  2. 80%以上Javaer可能不知道的一个Spring知识点
  3. Linux系统中退出vim的编辑器3种情况
  4. a byte of python-A Byte of Python PDF 下载
  5. Ubuntu 14.04 hadoop单机安装
  6. php7 提示500错误解决,升级php7出现500错误怎么办
  7. java确认rabbitmq_RabbitMQ的消息确认模式
  8. 很实用的小功能,通过配置Web.xml让点击文件路径的超链接,直接下载而不会在浏览器上尝试打开...
  9. js基础-(二)-类和面向对象
  10. 四大经典大数据应用案例解析
  11. Thinkpad T430 重装系统不能从光盘或者U盘启动/BIOS设置 关于T430 无法光盘引导安装-BIOS设置问题...
  12. python实现决策树 西瓜书_朴素贝叶斯python代码实现(西瓜书)
  13. wps两个段落之间间隔太大,将段落中的行距设为0也没用
  14. Java程序员月薪达到三万,需要技术水平达到什么程度?(文末送书)
  15. canvas手写签名
  16. 最好的Google表格插件
  17. 微信公众号赞赏账户头像在哪里修改?附详细图文教程
  18. raw socket (DELPHI开发平台)
  19. 开发板评测 | STM32 Nucleo-64评测报告
  20. 你真的会用搜索引擎吗?能写出好论文、找到好工作的那种

热门文章

  1. 实现简单QQ注册页面
  2. 寒冬+裁员,互联网行业还好吗?
  3. 安卓录制视频不录制外界声音_我如何录制我的视频
  4. 一股幽香袭来,她依偎在我怀中
  5. ubantu 18.04.4下载
  6. EduCoder实践课程——Python零基础到精通 参考答案(七)
  7. 游戏设计中的色彩哲学:没想象的那么简单
  8. 苹果xsmax是什么接口_液态硅胶手机壳,媲美苹果官方同款,拿手里太舒服了~
  9. 2022-FANUC0imc/D_三菱M70数控系统(常用参数对照表)
  10. python 生成pdf收据_javascript – 从Django Web应用程序打印收据