惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
V2EX
C
Check Point Blog
博客园 - Franky
月光博客
月光博客
T
Tenable Blog
博客园 - 聂微东
Cyberwarzone
Cyberwarzone
The GitHub Blog
The GitHub Blog
C
CERT Recently Published Vulnerability Notes
Scott Helme
Scott Helme
IT之家
IT之家
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
CXSECURITY Database RSS Feed - CXSecurity.com
F
Full Disclosure
博客园 - 司徒正美
Project Zero
Project Zero
Y
Y Combinator Blog
A
Arctic Wolf
美团技术团队
博客园 - 叶小钗
S
Securelist
F
Fortinet All Blogs
T
Threatpost
T
Threat Research - Cisco Blogs
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
酷 壳 – CoolShell
酷 壳 – CoolShell
MyScale Blog
MyScale Blog
大猫的无限游戏
大猫的无限游戏
Recorded Future
Recorded Future
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Schneier on Security
Apple Machine Learning Research
Apple Machine Learning Research
L
LangChain Blog
P
Privacy International News Feed
博客园_首页
S
SegmentFault 最新的问题
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
腾讯CDC
P
Proofpoint News Feed
Cisco Talos Blog
Cisco Talos Blog
AWS News Blog
AWS News Blog
阮一峰的网络日志
阮一峰的网络日志
G
Google Developers Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Simon Willison's Weblog
Simon Willison's Weblog
雷峰网
雷峰网
P
Proofpoint News Feed
Latest news
Latest news
G
GRAHAM CLULEY

kekxv 技术日志

基于 kekxv/gitea-pages 与 Gitea Actions 构建静态站点托管服务 Json简单工具 在Windows上运行Code Server:结合WSL打造你的云端VS Code开发环境 安卓sdkmanager工具换源 boost bazel starter bazel 供应商模式 PVE引导丢失修复 NSFW图像检测 警惕c++内置变量指针 关于内网springboot启动慢记录 网页转换为chrome插件 nginx代理的一种使用方式 YOLOv8 训练自己的数据 gitea actions CICD 自动化 Linux限制进程使用率 影音中心Jellyfin快速部署 OCR & 人脸算法 -- opencv dnn tensorflow gpu 安装(ubuntu22.04) 深度学习记录-简单
luckfox-交叉编译之bazel
kekxv · 2023-12-16 · via kekxv 技术日志

最近opencv-mobileluckfox
这款板子进行了适配优化,我对它也很有兴趣所以入手了一个luckfox开发板,包含300万像素摄像头,价格还算比较便宜。

不过官方提供的交叉编译链只有Linux以及windows的,而我却是Mac的,没办法直接调用,刚刚最近在使用bazel,并且它支持远程编译。

关于 luckfox 和 opencv-mobile

可以看看 opencv-mobile 现已支持 luckfox-pico MIPI CSI 摄像头和 rkaiq/rga 硬件加速

可以前往官网查看https://bazel.google.cn/
,这里用到的主要是:https://github.com/bazelbuild/bazel-toolchains

开始使用

https://github.com/kekxv/luckfox-bazel做了优化,可以快速使用:

1
2
3
4
5
6
#克隆仓库
git clone https://github.com/kekxv/luckfox-bazel.git
#进入仓库
cd luckfox-bazel
# 如果是 Linux 系统或者wsl,直接编译即可
bazel build //...

编译结果:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
☁  luckfox git:(main) ✗ bazel build //...  
INFO: Invocation ID: e25a3ea2-4501-447b-9e57-071b71866b07
Loading:
Loading:
Loading: 0 packages loaded
Analyzing: 16 targets (10 packages loaded, 0 targets configured)
INFO: Analyzed 16 targets (53 packages loaded, 6907 targets configured).
INFO: Found 16 targets...
[0 / 5] [Prepa] BazelWorkspaceStatusAction stable-status.txt
[24 / 33] Foreign Cc - CMake: Building protobuf-build; 1s remote
[24 / 33] Foreign Cc - CMake: Building protobuf-build; 11s remote
[24 / 33] Foreign Cc - CMake: Building protobuf-build; 41s remote
[24 / 33] Foreign Cc - CMake: Building protobuf-build; Downloading third-party/protobuf/protobuf-build/lib/libprotobuf-lite.a, 1.0 MiB / 1.2 MiB; 44s remote
[25 / 33] Foreign Cc - CMake: Building opencv-build; 0s remote
[25 / 33] Foreign Cc - CMake: Building opencv-build; 11s remote
[25 / 33] Foreign Cc - CMake: Building opencv-build; 41s remote
[25 / 33] Foreign Cc - CMake: Building opencv-build; Downloading third-party/opencv/opencv-build/lib/libopencv_calib3d.a, 1.4 MiB / 4.2 MiB; 79s remote
[25 / 33] Foreign Cc - CMake: Building opencv-build; Downloading third-party/opencv/opencv-build/lib/libopencv_calib3d.a, 2.7 MiB / 4.2 MiB; 80s remote
[25 / 33] Foreign Cc - CMake: Building opencv-build; Downloading third-party/opencv/opencv-build/lib/libopencv_dnn.a, 10.9 MiB / 13.6 MiB; 81s remote
[25 / 33] Foreign Cc - CMake: Building opencv-build; Downloading third-party/opencv/copy_opencv-build/opencv-build/lib/libopencv_dnn.a, 4.9 MiB / 13.6 MiB; 82s remote
[28 / 33] [Sched] Foreign Cc - CMake: Building ncnn ... (3 actions, 2 running)
[30 / 33] Foreign Cc - CMake: Building ncnn; 0s remote
[30 / 33] Foreign Cc - CMake: Building ncnn; 11s remote
[31 / 33] [Scann] Compiling third-party/ncnn/hello_ncnn/hello_ncnn.cpp
INFO: Elapsed time: 157.768s, Critical Path: 157.18s
INFO: 33 processes: 6 remote cache hit, 19 internal, 8 remote.
INFO: Build completed successfully, 33 total actions

更多的信息请参考 https://github.com/kekxv/luckfox-bazel/blob/main/README.md ,方便获取最新信息。

参考文章

关于 bazel 远程服务 远程执行概览 远程执行服务

bazel 交叉编译链 参考了 https://ltekieli.com/cross-compiling-with-bazel/

opencv-mobile 参考 https://zhuanlan.zhihu.com/p/670191385