Why doesn't the kernel recipe simply use SRCREV="${AUTOREV}" or hash. I find these lines instead.
SRCREV_machine = "31dbf25138831241f31f7eee835b83a607eaa179"
SRCREV_meta = "2eaed50911009f9ddbc74460093e17b22ef7daa0"
What do these define? How does bitbake process these?
The need for SRCREV_FORMAT
stems from having multiple git repositories in SRC_URI
. Taken from the raspberry pi kernel recipe you linked:
SRC_URI = " \
git://github.com/raspberrypi/linux.git;name=machine;branch=${LINUX_RPI_BRANCH};protocol=https \
git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${LINUX_RPI_KMETA_BRANCH};destsuffix=${KMETA} \
file://powersave.cfg \
file://android-drivers.cfg \
"
Notice the name=machine
and name=meta
options in the URLs. They indicate which SRCREV
matches which repository. Regarding the kernel, the Yocto project applies patches (located in meta
repository) to a specific version of the kernel (located in machine
repository). The commit hashes in both repositories can't be the same, as one is taken from Linux kernel and one from Yocto's patch set repository.
A commit hash is used over SRCREV="${AUTOREV}"
to prevent surprising changes. There's "poky bleeding" distribution, if you want to live on the tip of main.