本文共 4448 字,大约阅读时间需要 14 分钟。
BitBake ??????????????????????????????????????????????????????? BitBake ??????????????????????
BitBake ???????????????????????????? BitBake ????????
??????? VARIABLE ??? "value"??????????????
VARIABLE = "value"
?????????????????????
VARIABLE = " value"VARIABLE = "value "
????????????????
VARIABLE = ""VARIABLE = " "
??????????????????????
VARIABLE = 'I have a " in my value'
???? Bourne shell ???BitBake ?????????????????????????
????????????????????????????????
*.bbclass ?????????????*.bbappend ??????????????????????????????????????????????????????????????????????
BitBake ???????? (\) ??????????????
FOO = "bar \ baz \ qaz"
?????????????????????FOO ???????????
???????? Bourne shell ?????????????????????
A = "ava"B = "pre${A}post" ???? Bourne shell ???BitBake ????????????? (${})???? $?
????????????????????????????????
A = "${B} baz"B = "pre"C = "foo" ???????${A} ???? "pre foo"?
?=)????? ?= ?????????????????????????????????
A ?= "aval"
????????????? ?= ??????????????
??=)???? ??= ???????????????? ?= ????????????????????
A ??= "somevalue"A ??= "someothervalue"
?????????? A?????????????? A????????? "someothervalue"?
:=):= ?????????????????????????????
T = "123"A := "test ${T}"T = "456"B := "${T} ${C}"C = "cval"C := "${C}append" ????????? T ????? "456"?A ???? "test123"??? B ??? "456 cvalappend"?
+=) ??? (+=)??????????? += ? += ??????????????????????????
B = "bval"B += "additionaldata"C = "cval"C =+ "test"
??????
=.) ??? (=.)??????????????????????? =.= ? =. ????
B = "bval"B .= "additionaldata"C = "cval"C =. "test"
??????
????????????????????????????? += ? =+ ??????????????????
B_append = "additionaldata"C_prepend = "additional data "D_append = "additional data"
??????
??????????????????????
????????????????????????????????????????????
FOO = "123 456 789 123456 123 456 123 456"FOO_remove = "123"FOO_remove = "456"
???
????? export ????????????????????????
export ENV_VARIABLEENV_VARIABLE = "value from the environment"
????????????????????????
bitbake -e
??????????????????? "export" ???
BitBake ?? OVERRIDES ??????????? OVERRIDES ??????
OVERRIDES ???????????????????????????
OVERRIDES = "architecture:os:machine"TEST = "default"TEST_os = "osspecific"
???????BitBake ?????? OVERRIDES ?????????????
? BitBake ??????????? key ??????
A${B} = "X"B = "2"A2 = "Y" ???????BitBake ??? ${B} ? "2"??? A2 ???? "X"?
BitBake ?????????????????????????????
BitBake ?? BBPATH ?????????????BBPATH ??????? PATH?
?????????? inherit ???????????????
inherit autotools
BitBake ?? BBPATH ??? classes/autotools.bbclass ???
include ?????????????????
include test_defs.inc
???????????include ?????????????? require ??? include?????????
require ??? include ???????????????????????
require foo.inc
???????? INHERIT ????????????
INHERIT += "abc"
BitBake ?? Shell ???BitBake ??? Python ???Python ????? Python ???
Shell ?????
some_function () { echo "Hello World"} BitBake ??? Python ?????
python some_python_function () { d.setVar("TEXT", "Hello World") print(d.getVar("TEXT"))} ?? Python ?????
def get_depends(d): if d.getVar('SOMECONDITION'): return "dependencywithcond" else: return "dependency"DEPENDS = "${@get_depends(d)}" ??? BitBake ????????? BitBake ?????????? do_ ???
?????
addtask printdate after do_fetch before do_build
???????
deltask printdate
?????varflags???????????????????????
[cleandirs]?????????????[depends]???????????[dirs]????????????BitBake ??????????????????????????
bb.event.BuildStarted()bb.build.TaskStarted()bb.event.ConfigParsed()BitBake ???? BBCLASSEXTEND ? BBVERSIONS ????????????
BBCLASSEXTEND = "native"BBVERSIONS = "1.0 2.0 git"
BitBake ???????????????????
do_configure[deptask] = "do_populate_sysroot"
?????????????????? BitBake ?????????
转载地址:http://nvkr.baihongyu.com/