This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How to add local kernel source to Yocto Project

Hi everyone,

I want to use local kernel source to replace the git source in linux-ti-glsdk_3.8.bb.

How to modify the bb file to achieve?

My wrong config like below:

#SRC_URI = "git://git.omapzoom.org/kernel/omap.git;protocol=git;branch=${BRANCH} \
SRC_URI = "file:///home/ubuntu/work/linux-3.8.13 \
file://defconfig \
"

  • Hello,

    You cannot modify the SRC_URI to simply point to a file on your host machine.  As per yocto project guidelines in most cases SRC_URI should be a git repository that uses one of the supported Git fetcher protocols (i.e. file, git, http, etc.).

    You can try the steps bellow:

    You first need to make a complete build with the following variable set in local.conf:

     SOURCE_MIRROR_URL ?= "file://source_mirror/sources/"
     INHERIT += "own-mirrors" 
     BB_GENERATE_MIRROR_TARBALLS = "1" 

    After your complete build, copy all files from your download folder to the desired source mirror directory, and modify  local.conf as follows:

    SOURCE_MIRROR_URL ?= "file://source_mirror/sources/"
    INHERIT += "own-mirrors" 
    BB_GENERATE_MIRROR_TARBALLS = "1" 

    BB_NO_NETWORK = "1" #ensures your build does not use network access#

    For additional info you can check: https://wiki.yoctoproject.org/wiki/How_do_I

    Also have a look at the description of SRC_URI parameter: http://www.yoctoproject.org/docs/1.6/ref-manual/ref-manual.html#var-SRC_URI

    and FILESEXTRAPATHS parameter: http://www.yoctoproject.org/docs/1.6/ref-manual/ref-manual.html#var-FILESEXTRAPATHS

    Best Regards,
    Yordan