-1

I have a custom meta layer that is supposed to build github kernel.

SRC_URI = "git://git@github.com/preetamsashankreddy/linux-cip;protocol=ssh;"
PV = "${LINUX_VERSION}+git${SRCPV}"
SRCREV_machine="${AUTOINC}"

I only get

bb.data_smart.ExpansionError: Failure expanding variable SRCPV, expression was ${@bb.fetch2.get_srcrev(d)} which triggered exception FetchError: Fetcher failure for URL: 'git://git@github.com/preetamsashankreddy/linux-cip;protocol=ssh;'. Please set a valid SRCREV for url ['SRCREV_default:pn-linux-yocto', 'SRCREV_default', 'SRCREV:pn-linux-yocto', 'SRCREV'] (possible key names are git://git@github.com/preetamsashankreddy/linux-cip;protocol=ssh;, or use a ;rev=X URL parameter)
The variable dependency chain for the failure is: SRCPV -> PV -> WORKDIR -> RECIPE_SYSROOT_NATIVE -> STAGING_DIR_NATIVE -> STAGING_INCDIR_NATIVE -> BUILD_CPPFLAGS

I have tried SRCREV, SRCREV_machine and SRCREV_meta. Nothing works. What is going on here?

preetam
  • 1,451
  • 1
  • 17
  • 43
  • The `_machine` and `_meta` postfixes denote a name, that you can specify in the SRC_URI url, like `name=meta`. If you don't specify the name, don't add it to the SRCREV variable either. It is useful when you are using multiple repositories, and have to specify multiple revisions. If you want to use the latest revision, make sure to use `${AUTOREV}` and not `${AUTOINC}` (which is not a thing, unless you define it yourself) – skandigraun Aug 04 '23 at 12:23
  • I am having a hard time understanding things. what is 'name' here referring to? recipe name? machine name? casual string ? – preetam Aug 05 '23 at 04:40
  • I have a `MACHINE='custom'` and the bb file has `KBRANCH:custom = "sbc-5.10-cip"`. This is in addition to `SRCREV=${AUTOREV}`. I now get Expansion error and it can't find 'master' branch. Why is it looking for master branch? – preetam Aug 05 '23 at 04:45
  • You have to specify which branch to check out somewhere. `KBRANCH` isn't a particularly magic variable, it just has a special sounding name. E.g. in the poky recipes the SRC_URI contains the following `...;branch=${KBRANCH};...`, just like most other repository specs. – skandigraun Aug 05 '23 at 06:59
  • Regarding the name: in the `SRC_URI` you can specify an arbitrary name for the repository, in a similar way you do with the protocol. You can do things like `SRC_URI = "git:\\whatever.git;protocol=ssh;name=jill git:\\whatever2.git;protocol=ssh;name=jack"` - to specify the different revisions, you can append the same name to the `SRCREV` variable: `SRCREV_jill` will be used with the first repo, and `SRCREV_jack` is used with the second. – skandigraun Aug 05 '23 at 07:10
  • I defined KBRANCH and it seems to work. However, it now says "Nothing RPROVIDES ' 'kernel-vmlinux'". Why is it so difficult to use linux-custom.bb with machine=custom. These variables don't work at all. I even provided `PREFERRED_PROVIDER_virtual/kernel = "linux=custom"`. Still doesn't pick it up. I don't even know where the extra `'` is coming from in kernel-vmlinux. – preetam Aug 05 '23 at 09:45

0 Answers0