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

推荐订阅源

人人都是产品经理
人人都是产品经理
D
Docker
GbyAI
GbyAI
B
Blog RSS Feed
博客园 - 司徒正美
博客园 - Franky
美团技术团队
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
aimingoo的专栏
aimingoo的专栏
C
Check Point Blog
IT之家
IT之家
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
www.infosecurity-magazine.com
www.infosecurity-magazine.com
AI
AI
O
OpenAI News
Attack and Defense Labs
Attack and Defense Labs
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
T
Tailwind CSS Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
S
Secure Thoughts
博客园 - 聂微东
L
LINUX DO - 最新话题
U
Unit 42
SecWiki News
SecWiki News
A
Arctic Wolf
Schneier on Security
Schneier on Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
V
Visual Studio Blog
量子位
The Cloudflare Blog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
G
Google Developers Blog
T
Threat Research - Cisco Blogs
TaoSecurity Blog
TaoSecurity Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
B
Blog
博客园 - 【当耐特】
C
CERT Recently Published Vulnerability Notes
Scott Helme
Scott Helme
Last Week in AI
Last Week in AI
D
Darknet – Hacking Tools, Hacker News & Cyber Security
Microsoft Security Blog
Microsoft Security Blog
Apple Machine Learning Research
Apple Machine Learning Research
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
A
About on SuperTechFans
博客园 - 三生石上(FineUI控件)
Latest news
Latest news

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