In order to build and install Yocto for SMA-IMX6, I created a folder and then ran sudo apt-get install git.

I could not download the source code directly, so I first downloaded the kernel linux-imx6-imx_3.14.28_1.0.0_ga-bcm, then downloaded the patch file REV-SA01-KERNEL-PATCH-3.14.28-1.0.0. After that, I tried to apply the patch to the kernel:

$ git am ../REV-SA01-KERNEL-PATCH-3.14.28-1.0.0/*.patch

But I got this error:

fatal: Not a git repository (or any of the parent directories): .git

How can I solve this? Is there any other method to patch?

  • 3
    Do you want to install yocto (whatever that is) or patch it? Do you want to patch yocto or the kernel? How is git relevant? Please edit your question and explain what you are trying to do in more detail. – terdon Apr 3 '17 at 11:51

You should look up what git is: it's a version control system. For you, the basic usage is to download a copy of a repository with git clone …. This downloads not only a particular version of the source code, but all the versions of the source code, including proposed variants and change logs. All this extra information is in a hidden directory called .git. You can use git commands such as git checkout, git am, etc. to manipulate the content of the directory and apply patches.

If you've downloaded an archive (e.g. a .tgz), then you don't have any of this extra information, you only have a particular version of the source code. Use the patch command to apply a patch.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.