【发布时间】:2015-06-23 00:16:47
【问题描述】:
我正在设置 yocto v1.7.1 “dizzy”,以便从签入我本地 git 存储库的自定义 Linux 内核修订版构建自定义 Linux 映像。
在进行构建过程时,它在do_validate_branches() 期间失败并显示以下错误消息。
DEBUG: Executing shell function do_validate_branches
usage: git cat-file (-t|-s|-e|-p|<type>|--textconv) <object>
or: git cat-file (--batch|--batch-check) < <list_of_objects>
<type> can be one of: blob, tree, commit, tag
-t show object type
-s show object size
-e exit with zero when there's no error
-p pretty-print object's content
--textconv for blob objects, run textconv on object's content
--batch[=<format>] show info and content of objects fed from the standard input
--batch-check[=<format>]
show info about objects fed from the standard input
ERROR: is not a valid commit ID.
ERROR: The kernel source tree may be out of sync
WARNING: exit code 1 from a shell command.
ERROR: Function failed: do_validate_branches (log file is located at etc..)
查看为 do_validate_branches 生成的代码,问题似乎是因为它调用了git cat-file -t ${machine_srcrev},但${machine_srcrev} 是一个空字符串。此外,这似乎是因为我在 linux-yocto-custom.bb
SRCREV="${AUTOREV}"
因为当我用修订号替换它时,我不再遇到问题,例如...
SRCREV="7035c2a67d964acbb5d917f470bcda42691a3d9c"
问题是我实际上希望这个配方从分支的 HEAD 构建,所以放置一个特定的修订似乎不是我所追求的,SRCREV="${AUTOREV}" 似乎是我真正想要的。但如上所述,这使得${SRCREV_machine} 是一个空字符串,而不是我认为应该评估为的AUTOINC。
谁能给我任何见解,让我了解如何让食谱既能跟随头脑,又不必不断更新食谱以包含正确的SRCREV 并让它通过它的do_validate_branches()?我在这里错过了什么?
编辑:更多信息...
如果我如下修改我的 kernel-yocto.bbclass,问题似乎也得到了解决...@285
- machine_srcrev="${SRCREV_machine}"
+ machine_srcrev="${@ get_machine_branch(d, "${SRCREV}" )}"
我对我的更改的理解是我明确地从我的机器分支重新获取$SRCREV。原文似乎认为已经存储在${SRCREV_machine} 中。虽然原始结果为空字符串,而我的更改结果为AUTOINC。
虽然我仍然认为我必须遗漏一些东西,因为我不应该需要编辑基类。但我总是更倾向于认为我错过了一些东西,而不是这是一个错误。也许我应该把它发布到 yocto 邮件列表的某个地方。
【问题讨论】:
-
不确定您的情况是否有必要,但您是否根据yoctoproject.org/docs/1.6/dev-manual/… 将
SRCPV添加到PV? -
是的,我有
PV = "${LINUX_VERSION}+git${SRCPV}",它包含在我从运行 yocto-bsp create 获得的原始文件中。构建期间创建的目录结构似乎证实了这一点,其中包含3.14.28+gitAUTOINC+7035c2a67d-r0目录。
标签: linux git linux-kernel yocto bitbake