不必通宵挂机,飞速克隆PX4源码的方法

不必通宵挂机,飞速克隆PX4源码的方法

国内github网速,那是慢的没法说,克隆个PX4源码要半天,然后更新子模块,那不得需要一夜的时间,有时早上一来,刷刷的提示更新失败,那也得继续更新啊,几天都不一定能搞定。介于以上,好在我们国内也有git服务器,接下来我们可以把px4的源码fork到国内的码云上,然后打开**.gitmodules**文件,把其中需要clone的子模块全部fork到码云上,当然url地址也要修改成码云上的地址,工作量还是挺大的,不过我已经帮大家做好了,

直接clone如下仓库 ,仓库目前的版本支持**PX4 v1.10.0及以下 **当然我也会随着官网的更新而持续更新。

git clone https://gitee.com/bingobinlw/Firmware.git

然后更新子模块

git submodule update --init --recursive

如果出错的话,需要删除空白文件夹,再次更新子模块

make distclean
git submodule update --init --recursive

以上步骤就可以了,亲测有效,大概10多分钟就搞定了。

下面是我修改过的***.gitmodules***文件内容,供参考

[submodule "mavlink/include/mavlink/v2.0"]
	path = mavlink/include/mavlink/v2.0
	url = https://gitee.com/bingobinlw/c_library_v2.git
	branch = master
[submodule "src/drivers/uavcan/libuavcan"]
	path = src/drivers/uavcan/libuavcan
	url = https://gitee.com/bingobinlw/uavcan.git
	branch = px4
[submodule "Tools/jMAVSim"]
	path = Tools/jMAVSim
	url = https://gitee.com/bingobinlw/jMAVSim.git
	branch = master
[submodule "Tools/sitl_gazebo"]
	path = Tools/sitl_gazebo
	url = https://gitee.com/bingobinlw/sitl_gazebo.git
	branch = master
[submodule "src/lib/matrix"]
	path = src/lib/matrix
	url = https://gitee.com/bingobinlw/Matrix.git
	branch = master
[submodule "src/lib/ecl"]
	path = src/lib/ecl
	url = https://gitee.com/bingobinlw/ecl.git
	branch = master
[submodule "boards/atlflight/cmake_hexagon"]
	path = boards/atlflight/cmake_hexagon
	url = https://gitee.com/bingobinlw/cmake_hexagon.git
	branch = px4
[submodule "src/drivers/gps/devices"]
	path = src/drivers/gps/devices
	url = https://gitee.com/bingobinlw/GpsDrivers.git
	branch = master
[submodule "src/modules/micrortps_bridge/micro-CDR"]
	path = src/modules/micrortps_bridge/micro-CDR
	url =https://gitee.com/bingobinlw/micro-CDR.git
	branch = px4
[submodule "platforms/nuttx/NuttX/nuttx"]
	path = platforms/nuttx/NuttX/nuttx
	url = https://gitee.com/bingobinlw/NuttX.git
	branch = px4_firmware_nuttx-8.2
[submodule "platforms/nuttx/NuttX/apps"]
	path = platforms/nuttx/NuttX/apps
	url =  https://gitee.com/bingobinlw/NuttX-apps.git
	branch = px4_firmware_nuttx-8.2
[submodule "cmake/configs/uavcan_board_ident"]
	path = cmake/configs/uavcan_board_ident
	url = https://gitee.com/bingobinlw/uavcan_board_ident.git
	branch = master
[submodule "platforms/qurt/dspal"]
	path = platforms/qurt/dspal
	url = https://gitee.com/bingobinlw/dspal.git

如有任何问题,请到阿木实验室提问

发布了10 篇原创文章 · 获赞 11 · 访问量 5932

猜你喜欢

转载自blog.csdn.net/qq_33641919/article/details/100624513