| # ASPEED AST2600 devices can use Aspeed's utility 'otptool' |
| # The variables below carry default values to the create_otp() |
| OTPTOOL_EXTRA_DEPENDS ?= " socsec-native" |
| DEPENDS += '${@oe.utils.conditional("SOCSEC_SIGN_ENABLE", "1", "${OTPTOOL_EXTRA_DEPENDS}", "", d)}' |
| if [ "${SOC_FAMILY}" != "aspeed-g6" ] ; then |
| bbwarn "OTP creation is only supported on AST2600 boards" |
| elif [ ! -e "${OTPTOOL_CONFIG}" ] ; then |
| bbfatal "Invalid otptool config: ${OTPTOOL_CONFIG}" |
| elif [ ! -d "${OTPTOOL_KEY_DIR}" ] ; then |
| bbfatal "Invalid otptool signing key directory: ${OTPTOOL_KEY_DIR}" |
| --key_folder ${OTPTOOL_KEY_DIR} \ |
| bbfatal "Generated OTP image failed." |
| ${B}/${CONFIG_B_PATH}/otp-all.image |
| bbfatal "Printed OTP image failed." |
| install -m 0644 ${B}/${CONFIG_B_PATH}/otp-* ${DEPLOYDIR} |
| if [ -n "${UBOOT_CONFIG}" ]; then |
| for config in ${UBOOT_MACHINE}; do |
| CONFIG_B_PATH="${config}" |
| if [ "${SOCSEC_SIGN_ENABLE}" = "1" ] ; then |