OpenIPC开源FPV之工程编译
1. 源由
鉴于要折腾《Ardupilot开源飞控之FollowMe验证平台搭建》,基本硬件已经在《Ardupilot & OpenIPC & 基于WFB-NG构架分析和数据链路思考》进行了测试。
在实际使用时,还存在一些问题,为此我们优化考虑:
- 【硬件】9V(VTX power) -18V(4S)自适应电源 //部分VTX 12V输出;若有干扰可以直接使用4S电池供电
- 【结构】可以在不拆卸结构的情况下,单独使用网线+电源转接跳线配置
- 【硬件】同时BEC和网线+电源转接跳线供电时,电源不冲突
- 【结构】支持GoPro支架安装
- 【硬件】Rx/Tx/VCC/GND引出外接接口(最好能提供一个插接口,方便拆卸)
- 【结构】更换广角镜头,比如:1.7mm焦距 M12孔径
- 【电子】IR-CUT可控
- 【电子】MIC声音记录
除了上面明确的硬件,结构调整外,部分电子方面的调整涉及软件;为了更好的后续集成软件功能,其中一项重要任务就是OpenIPC摄像头固件的编译。
2. 编译目标
3. 编译步骤
3.1 Step 1:编译准备
$ sudo apt-get update -y
$ sudo apt-get install -y automake autotools-dev bc build-essential curl fzf git libtool rsync \
unzip mc tree python-is-python3
3.2 Step 2:下载编译工程
$ git clone git@github.com:OpenIPC/builder.git
$ cd builder
3.3 Step 3:编译设备目标
方法一:通过menu选择目标板
$ ./builder.sh
方法二:命令行指定目标板
$ ./builder.sh ssc338q_fpv_openipc-urllc-aio
3.4 Step 4:目标配置&固件
$ ./builder.sh ssc338q_fpv_openipc-urllc-aio
Experimental system for building OpenIPC firmware for known devices
https://openipc.org/
Version: 1724920535
Starting a device for ssc338q_fpv_openipc-urllc-aio
/home/daniel/Work/builder/devices/ssc338q_fpv_openipc-urllc-aio
├── br-ext-chip-sigmastar
│ └── configs
│ └── ssc338q_fpv_openipc-urllc-aio_defconfig
└── general
├── overlay
│ └── usr
│ └── share
│ └── openipc
│ └── customizer.sh
├── package
│ └── sigmastar-osdrv-infinity6e
│ └── files
│ └── script
│ └── load_sigmastar
└── scripts
└── excludes
└── ssc338q_fpv.list
13 directories, 4 files
... // 编译过程 略 ... ...
Copying files to local archive
Assembled firmware available in:
/home/daniel/Work/builder/archive/ssc338q_fpv_openipc-urllc-aio/202408300624
├── openipc.ssc338q-nor-fpv.tgz
├── rootfs.squashfs.ssc338q
├── rootfs.ssc338q.tar
└── uImage.ssc338q
0 directories, 4 files
Done
3.5 工程适配修改
编译实际上存在几个问题:
- 网络不稳定,时断时续
- https方式下载git代码成功率低,不如git协议稳定
$ git diff
diff --git a/builder.sh b/builder.sh
index 17df7b3..acd05db 100755
--- a/builder.sh
+++ b/builder.sh
@@ -107,10 +107,10 @@ sleep 3
echo_c 33 "\nUpdating Builder"
git pull
-rm -rf openipc
+#rm -rf openipc
if [ ! -d "$FIRMWARE_DIR" ]; then
echo_c 33 "\nDownloading Firmware"
- git clone --depth=1 https://github.com/OpenIPC/firmware.git "$FIRMWARE_DIR"
+ git clone --depth=1 git@github.com:OpenIPC/firmware.git "$FIRMWARE_DIR"
cd "$FIRMWARE_DIR"
else
echo_c 33 "\nUpdating Firmware"
3.6 在线安装指南
4. 其他配置
4.1 Create firmware with built-in credentials
- Usage: repack.sh [uboot] [firmware] [ssid] [pass]
$ repack.sh ssc337de ssc337de_ultimate_foscam-x5-nor router password
4.2 registrate a new device
processor_flavor_vendor-model-version/br-ext-chip-sigmastar/configs/processor_flavor_vendor-model-version_defconfig
processor_flavor_vendor-model-version/general/overlay/usr/share/openipc/customizer.sh
processor_flavor_vendor-model-version/general/scripts/excludes/processor_flavor.list
- flavor - firmware direction in the openipc system, by default try to use “lite” as much as possible
- model - official model name from the main device manufacturer
- processor - official name of the processor in the OpenIPC structure
- vendor - the name of the official equipment manufacturer; if there are several of them, a description is created
- version - usually this is an addition to the model, version or revision of hardware differences
5. 参考资料
【1】OpenIPC Builder
【2】Alternative open firmware for your IP camer
【3】Ardupilot & OpenIPC & 基于WFB-NG构架分析和数据链路思考
6. 补充资料 - OpenIPC-FPV
目前,有两个地方在维护板级配置文件;从配置文件内容看,builder
下面更倾向于FPV,而firmware
比较全面,大家请根据自己的需求进行选择。