如何让bitbake采用git仓库相对路径下载代码? 使用bitbake下载代码失败出错? 由于使用本地服务器采用git+gitolite管理代码, 只能采用git仓库相对路径(git@192.168.101.1:testing.git;protocol=ssh) 下载代码,不能采用绝对路径下载代码(git://git@192.168.101.1/home/git/repo/testing.git;;protocol=ssh)
testing.git不使用bitake方式时候可以正常下载代码 --------------------------------------------------- ``` $ git clone git@192.168.101.1:testing.git -b master 正克隆到 'testing'... remote: Counting objects: 21, done. remote: Compressing objects: 100% (16/16), done. remote: Total 21 (delta 5), reused 0 (delta 0) 接收对象中: 100% (21/21), 320.39 KiB | 0 bytes/s, done. 处理 delta 中: 100% (5/5), done. 检查连接... 完成。 ``` testing/testing.bb ------------------------- ``` DESCRIPTION = "testing" LICENSE = "GPLv2+" LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263" SRC_URI = "git://git@192.168.101.1:testing.git;protocol=ssh;branch=master" SRCREV = "3d361c8b81cf783e4af8b1be6e7ada7bf9b9ef07" S = "${WORKDIR}/git" ``` 使用bitbake下载代码失败出错log ---------------------------------- ``` $ bitbake -c fetch testing -v -f Loading cache: 100% |##############################################################################################################################################################################| ETA: 00:00:00 Loaded 2631 entries from dependency cache. Parsing recipes: 100% |############################################################################################################################################################################| Time: 00:00:00 Parsing of 2102 .bb files complete (2101 cached, 1 parsed). 2625 targets, 339 skipped, 4 masked, 0 errors. NOTE: Resolving any missing task queue dependencies NOTE: selecting pseudo-native to satisfy virtual/fakeroot-native due to PREFERRED_PROVIDERS NOTE: selecting gcc-cross-arm to satisfy virtual/arm-poky-linux-gnueabi-gcc due to PREFERRED_PROVIDERS NOTE: selecting gcc-runtime to satisfy virtual/arm-poky-linux-gnueabi-compilerlibs due to PREFERRED_PROVIDERS NOTE: selecting glibc to satisfy virtual/libc due to PREFERRED_PROVIDERS NOTE: selecting glibc to satisfy runtime libsegfault due to PREFERRED_PROVIDER_virtual/libc = glibc NOTE: selecting glibc to satisfy runtime glibc-dev due to PREFERRED_PROVIDER_virtual/libc = glibc NOTE: selecting glibc to satisfy runtime glibc due to PREFERRED_PROVIDER_virtual/libc = glibc NOTE: selecting binutils-cross-arm to satisfy virtual/arm-poky-linux-gnueabi-binutils due to PREFERRED_PROVIDERS NOTE: selecting glibc to satisfy virtual/arm-poky-linux-gnueabi-libc-for-gcc due to PREFERRED_PROVIDERS NOTE: selecting linux-libc-headers to satisfy linux-libc-headers due to PREFERRED_PROVIDERS NOTE: selecting gcc-cross-arm to satisfy virtual/arm-poky-linux-gnueabi-g++ due to PREFERRED_PROVIDERS NOTE: selecting libgcc to satisfy libgcc due to PREFERRED_PROVIDERS NOTE: selecting gcc-cross-initial-arm to satisfy virtual/arm-poky-linux-gnueabi-gcc-initial due to PREFERRED_PROVIDERS NOTE: selecting glibc-initial to satisfy virtual/arm-poky-linux-gnueabi-libc-initial due to PREFERRED_PROVIDERS NOTE: selecting linux-libc-headers to satisfy runtime linux-libc-headers-dev due to PREFERRED_PROVIDER_linux-libc-headers = linux-libc-headers NOTE: selecting libgcc to satisfy runtime libgcc due to PREFERRED_PROVIDER_libgcc = libgcc Build Configuration: BB_VERSION = "1.26.0" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "Ubuntu-14.04" TARGET_SYS = "arm-poky-linux-gnueabi" MACHINE = "imx6qsabresd" DISTRO = "fsl-imx-fb" DISTRO_VERSION = "3.14.52-1.1.0" TUNE_FEATURES = "arm armv7a vfp neon callconvention-hard cortexa9" TARGET_FPU = "vfp-neon" meta meta-yocto = "(nobranch):b74ea963cefffad9fbd91d4eb9b240f6a8c86cd0" meta-oe meta-multimedia = "(nobranch):df2f700d66bace65f5d802225232d01cf511fe81" meta-fsl-arm = "(nobranch):70ddee3ebeacbc53180ee7221533375bf0c9eac4" meta-fsl-arm-extra = "(nobranch):41e79c6bd055f12b6252618c22c43a2fed5cfb49" meta-fsl-demos = "(nobranch):17f9da65efb5c65c1d44b5cc18584034b29a742b" meta-bsp meta-sdk = "(nobranch):6a96fe97d411e097d2222c8e93198b558f4c0329" meta-browser = "(nobranch):30b8d6b3d0d6501c56ef6967a2fa73a3d4bf5fe9" meta-gnome meta-networking meta-python meta-ruby meta-filesystems = "(nobranch):df2f700d66bace65f5d802225232d01cf511fe81" meta-itas-demo = "<unknown>:<unknown>" meta-qt5 = "(nobranch):51b4620392aa9041d8512549bfa554bea368c5ea" NOTE: Preparing RunQueue NOTE: Marking Active Tasks NOTE: Pruned 1296 inactive tasks, 1 left NOTE: Assign Weightings NOTE: Compute totals (have 1 endpoint(s)) NOTE: Invalidate task do_fetch, /home/test/fsl-releases-bsp/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-bsp/testing/testing.bb NOTE: Tainting hash to force rebuild of task /home/test/fsl-releases-bsp/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-bsp/testing/testing.bb, do_fetch WARNING: /home/test/fsl-releases-bsp/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-bsp/testing/testing.bb.do_fetch is tainted from a forced run NOTE: Executing RunQueue Tasks WARNING: Failed to fetch URL git://git@192.168.101.1:testing.git;protocol=ssh;branch=master, attempting MIRRORS if available ERROR: Fetcher failure: Fetch command failed with exit code 128, output: Cloning into bare repository '/home/test/fsl-releases-bsp/downloads//git2/192.168.101.91:testing.git'... fatal: No path specified. See 'man git-pull' for valid url syntax ERROR: Function failed: Fetcher failure for URL: 'git://git@192.168.101.1:testing.git;protocol=ssh;branch=master'. Unable to fetch URL from any source. ERROR: Logfile of failure stored in: /home/test/fsl-releases-bsp/fsl-imx-fb/tmp/work/cortexa9hf-vfp-neon-poky-linux-gnueabi/testing/1.0-r0/temp/log.do_fetch.20491 ERROR: Task 0 (/home/test/fsl-releases-bsp/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-bsp/testing/testing.bb, do_fetch) failed with exit code '1' NOTE: Tasks Summary: Attempted 1 tasks of which 0 didn't need to be rerun and 1 failed. Summary: 1 task failed: /home/test/fsl-releases-bsp/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-bsp/testing/testing.bb, do_fetch Summary: There were 2 WARNING messages shown. Summary: There were 2 ERROR messages shown, returning a non-zero exit code. ```
Hi,
Please verify that you have internet connection and you may contact your system administrator because if you are using firewalls or proxy server this may avoid connection.
Besides, for one or the other reason the GIT server is sometimes not reachable, but you still have the option to download the source code from Freescale Public GIT (http://git.freescale.com/git/) and then build it. If you have the need for various builds based on the same release, then it's useful to download all sources one time and base the following builds then on (a copy of) the local sources:
$ bitbake -c fetchall target
In Yocto Project Development Manual (http://www.yoctoproject.org/docs/2.0/dev-manual/dev-manual.html) in chapter 5.15 you find some more information.
Regards