blob: e46dbb7d70d90fc043d080ec5fe68dfba2e733db [file] [log] [blame]
Brad Bishop6c2fd812019-07-21 18:08:31 -04001require u-boot-common-aspeed-sdk_${PV}.inc
zhanghaicheng851a10e2021-12-23 09:44:26 +08002require conf/machine/distro/include/uboot-distrovars.inc
Brad Bishop6c2fd812019-07-21 18:08:31 -04003
Adriana Kobylaka6da5832020-04-08 11:19:49 -05004UBOOT_MAKE_TARGET ?= "DEVICE_TREE=${UBOOT_DEVICETREE}"
Brad Bishop6c2fd812019-07-21 18:08:31 -04005
Andrei Kartashevc5b413f2021-10-08 00:14:45 +03006require recipes-bsp/u-boot/u-boot.inc
Brad Bishop6c2fd812019-07-21 18:08:31 -04007
8PROVIDES += "u-boot"
9DEPENDS += "bc-native dtc-native"
Adriana Kobylak8d6b91c2020-07-08 13:47:10 -050010
Howard Chiuc1c23702022-04-26 09:32:42 +080011SRC_URI:append:uboot-flash-32768 = " file://u-boot_flash_32M.cfg"
12SRC_URI:append:uboot-flash-65536 = " file://u-boot_flash_64M.cfg"
Patrick Williamsb9799be2021-08-06 09:13:33 -050013SRC_URI:append:df-phosphor-mmc = " file://u-boot-env-ast2600.txt"
Klaus Heinrich Kiwiaecc80b2021-03-09 21:09:40 -030014SRC_URI += " \
15 file://rsa_oem_dss_key.pem;sha256sum=64a379979200d39949d3e5b0038e3fdd5548600b2f7077a17e35422336075ad4 \
16 file://rsa_pub_oem_dss_key.pem;sha256sum=40132a694a10af2d1b094b1cb5adab4d6b4db2a35e02d848b2b6a85e60738264 \
17 "
Adriana Kobylak8d6b91c2020-07-08 13:47:10 -050018
Andrew Jeffery38cfcc32021-08-04 12:51:56 +093019SOCSEC_SIGN_KEY ?= "${WORKDIR}/rsa_oem_dss_key.pem"
20SOCSEC_SIGN_ALGO ?= "RSA4096_SHA512"
Jamin Line73cb4a2021-12-17 15:04:35 +080021SOCSEC_SIGN_EXTRA_OPTS ?= "--stack_intersects_verification_region=false --rsa_key_order=big"
Andrew Jeffery38cfcc32021-08-04 12:51:56 +093022
Andrew Jeffery50e22342021-08-25 15:46:26 +093023inherit socsec-sign
Jamin Lineed879f2021-12-17 15:45:25 +080024inherit otptool
Andrew Jeffery50e22342021-08-25 15:46:26 +093025
Patrick Williamsb9799be2021-08-06 09:13:33 -050026UBOOT_ENV_SIZE:df-phosphor-mmc = "0x10000"
27UBOOT_ENV:df-phosphor-mmc = "u-boot-env"
28UBOOT_ENV_SUFFIX:df-phosphor-mmc = "bin"
Andrei Kartashevb60b7b12021-07-29 09:01:35 +030029UBOOT_ENV_TXT:df-phosphor-mmc = "u-boot-env-ast2600.txt"
Adriana Kobylak8d6b91c2020-07-08 13:47:10 -050030
Patrick Williamsb9799be2021-08-06 09:13:33 -050031do_compile:append() {
Adriana Kobylak8d6b91c2020-07-08 13:47:10 -050032 if [ -n "${UBOOT_ENV}" ]
33 then
34 # Generate redundant environment image
Andrei Kartashevb60b7b12021-07-29 09:01:35 +030035 ${B}/tools/mkenvimage -r -s ${UBOOT_ENV_SIZE} -o ${WORKDIR}/${UBOOT_ENV_BINARY} ${WORKDIR}/${UBOOT_ENV_TXT}
Adriana Kobylak8d6b91c2020-07-08 13:47:10 -050036 fi
37}