Error: "git:" subodule "is not a git command in Intel Edison and git 2.0.1

When I try to use the git submodules and type the usual git submodule on my Intel Edison, working with Yocto Linux and git 2.0.1, I just get the following error message:

 $> git submodule init git: 'submodule' is not a git command. See 'git --help' 

System version:

 $> uname -r 3.10.17-poky-edison+ $> git --version git version 2.0.1 $> configure_edison --version 159 

There is no trace of this error in google.

Is there an additional package to install? Or is it because of git 2.0.1?

On my Ubuntu (git 1.9.1) these commands work fine.

+7
source share
3 answers

Yes, Git on Edison may be a lite version. As mentioned in the msw comments, the best option is to build git from the source code . But I believe that the next version of the Yocto package may come with a new version of git.

+6
source

The question is old, but since I ran into the same problem on Edison's board, here is my workaround, it might still interest some people.
Here is the version of Yocto that I use for Edison: https://github.com/edison-fw/meta-intel-edison

The problem arises because in the git version on the Edison board some parts are missing. In this case, the git-submodules binary is missing from / usr / libexec / git-core

So, as soon as you build the yocto image, following the explanations you can find at the same link above (or here https://edison-fw.imtqy.com/meta-intel-edison/ ), and reflash your board, you will have to copy the git-submodules file from your host computer to your edison platform.

On your host, once in the assembly directory (path / to / edison / out / linux64 / build), enter:

 find . -name "git-submodule" 

And you will get different places for the same file. Take one of them.

Copy it on the edison board in / usr / libexec / git-core.

Now we have to hope that git with the submodule should work ...


UPDATE:
The answer to the ferry is better, but in some cases it does not work on my side (yocto sumo). The git-perltools is part of the git package, so there is no need to add it to the kernel image, but it is still not installed. I found that the git-perltools dependent on findutils , so Ferry's response might require adding findutils to the core-image.

NB:
I would rather comment on Ferry's answer, but I have no rights.

+3
source

It seems that when building git with Yocto, the behavior will be as intended. Unfortunately, the intended behavior is not what you expect. In Ubuntu, git-submodule is included in the git package, in Yocto, in the git-perltools . When you run bitbake git following packages (Thud):

 ferry@delfion :~/.../out/linux64/build/tmp/work/corei7-32-poky-linux/git/2.18.1-r0/deploy-debs/corei7-32$ ls -l - git_2.18.1-r0_i386.deb - git-bash-completion_2.18.1-r0_i386.deb - git-dbg_2.18.1-r0_i386.deb - git-dev_2.18.1-r0_i386.deb - git-doc_2.18.1-r0_i386.deb - git-perltools_2.18.1-r0_i386.deb - gitweb_2.18.1-r0_i386.deb 

using git-perltools containing git-submodule .

How could you know in advance? Checkout https://layers.openembedded.org . You can easily find: http://cgit.openembedded.org/openembedded-core/tree/meta/recipes-devtools/git/git.inc?h=thud , which contains:

 PERLTOOLS = " \ ${libexecdir}/git-core/git-add--interactive \ ${libexecdir}/git-core/git-archimport \ ${libexecdir}/git-core/git-cvsexportcommit \ ${libexecdir}/git-core/git-cvsimport \ ${libexecdir}/git-core/git-cvsserver \ ${bindir}/git-cvsserver \ ${libexecdir}/git-core/git-difftool \ ${libexecdir}/git-core/git-send-email \ ${libexecdir}/git-core/git-svn \ ${libexecdir}/git-core/git-instaweb \ ${libexecdir}/git-core/git-submodule \ ${libexecdir}/git-core/git-am \ ${libexecdir}/git-core/git-request-pull \ ${datadir}/gitweb/gitweb.cgi \ ${datadir}/git-core/templates/hooks/prepare-commit-msg.sample \ ${datadir}/git-core/templates/hooks/pre-rebase.sample \ ${datadir}/git-core/templates/hooks/fsmonitor-watchman.sample \ " # Git tools requiring perl PACKAGES =+ "${PN}-perltools" FILES_${PN}-perltools += " \ ${PERLTOOLS} \ ${libdir}/perl \ ${datadir}/perl5 \ " 

Thus, adding not only git , but also git-perltools to your core-image will give you what you want + a bit more.

OTOH Yocto has a great feature that creates a cross-compilation environment on your host. Thus, you can configure the use of fi QT Creator to build using sdk and debug the target remotely from your host. Thus, you do not need to build / install your toolbox on Intel Edison. More on this here: https://edison-fw.imtqy.com/meta-intel-edison/3-Building-the-SDK.html

Ferry Toth (aka htot @github)

+2
source

Source: https://habr.com/ru/post/1242114/


All Articles