blob: 983c33f541ed556d598464069584a6f748b9e6e8 [file] [log] [blame]
Saqib Khan41723472017-09-22 10:21:30 -05001inherit image_version
2
Brad Bishop273ec602018-02-08 16:37:10 -05003SRC_URI_append_aspeed = " file://0001-configs-ast-Add-redundnant-env.patch"
Adriana Kobylak57ef7222017-08-19 09:32:18 -05004
Brad Bishop273ec602018-02-08 16:37:10 -05005SRC_URI_append_aspeed = " ${@bb.utils.contains('MACHINE_FEATURES', 'obmc-ubi-fs', \
Joel Stanley2fbe1fe2018-02-20 16:17:22 +10306 'file://0002-config-ast-common-hack-bootopts.patch \
7 file://0003-config-ast-common-Add-bootopts-to-support-ubi-and-mt.patch \
8 file://0004-config-ast-common-Add-conditional-factory-reset-comm.patch', '', d)}"
Patrick Williams470e25e2017-07-27 13:32:33 -05009
Brad Bishop273ec602018-02-08 16:37:10 -050010
11python do_configure_aspeed () {
Michael Tritz9f5607f2018-01-25 10:06:21 -060012 if "obmc-ubi-fs" in d.getVar("MACHINE_FEATURES", True):
Saqib Khan41723472017-09-22 10:21:30 -050013 version_id=do_get_versionID(d)
14 d.setVar('VERSION_ID', version_id)
15 bb.build.exec_func("patch_uboot", d)
16}
17
18patch_uboot () {
19 sed -i "s/kernel-0/kernel-${VERSION_ID}/g" \
Joel Stanley2fbe1fe2018-02-20 16:17:22 +103020 ${S}/patches/0003-config-ast-common-Add-bootopts-to-support-ubi-and-mt.patch &> /dev/null
Saqib Khan41723472017-09-22 10:21:30 -050021 sed -i "s/kernel-0/kernel-${VERSION_ID}/g" \
22 ${S}/include/configs/ast-common.h &> /dev/null
23}