浏览代码

加入大华相机模块后,同步优化修改项目打包脚本

niujiuru 3 周之前
父节点
当前提交
2de0b8d965
共有 1 个文件被更改,包括 12 次插入5 次删除
  1. 12 5
      package/armv7hf.sh

+ 12 - 5
package/armv7hf.sh

@@ -25,18 +25,25 @@ chmod a+x "${pkg_dir}/script/"*
 
 echo "3, Creating lib directory and copying library files..."
 mkdir -p "${pkg_dir}/lib"
-use_cam="hk_takephoto"  # 使用海康相机
-cam_dir="${pre_dir}/${use_cam}"
-cp -rf "${cam_dir}/lib/armv7hf/"* "${pkg_dir}/lib/"
+use_cam="all_supported"  # 使用海康相机: "hk_takephoto"; 使用大华相机: "dh_takephoto"; 同时使用所有: "all_supported"
+if [ "$use_cam" = "all_supported" ] || [ "$use_cam" = "hk_takephoto" ]; then
+  cam_dir="${pre_dir}/hk_takephoto"
+  cp -rf "${cam_dir}/lib/armv7hf/"* "${pkg_dir}/lib/"
+fi
+if [ "$use_cam" = "all_supported" ] || [ "$use_cam" = "dh_takephoto" ]; then
+  cam_dir="${pre_dir}/dh_takephoto"
+  cp -rf "${cam_dir}/lib/armv7hf/"* "${pkg_dir}/lib/"
+fi
 
 echo "4, Building hkcam_reset..."
-if [ "$use_cam" = "hk_takephoto" ]; then
+if [ "$use_cam" = "all_supported" ] || [ "$use_cam" = "hk_takephoto" ]; then
+  cam_dir="${pre_dir}/hk_takephoto"
   make -C "${cam_dir}" clean
   make -C "${cam_dir}" target=armv7hf hkcam_reset.out
   cp -rf "${cam_dir}/hkcam_reset.out" "${pkg_dir}/"
   make -C "${cam_dir}" clean
 else
- echo "  Skipping hkcam_reset build (not U-port camera)!"
+  echo "  Skipping hkcam_reset build (not U-port camera)!"
 fi
 
 echo "5, Building ${pkgname}..."