require imx-mkimage_kuk.inc FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" SOC_TARGET_imx8mguf = "iMX8MM" SOC_TARGET_imx8mpguf = "iMX8MP" SOC_FAMILY_imx8mguf = "mx8m" SOC_FAMILY_imx8mpguf = "mx8m" ATF_MACHINE_NAME_imx8mguf = "bl31-imx8mm.bin" ATF_MACHINE_NAME_imx8mpguf = "bl31-imx8mp.bin" BOOT_STAGING_imx8mguf = "${S}/iMX8M" BOOT_STAGING_imx8mpguf = "${S}/iMX8M" # Using prepuilt bl31 for now DEPENDS_remove = "imx-atf" # Remove some copy operations from the original compile_mx8m, because we already # have some of the files fscl wants to copy there checked out compile_mx8m() { bbnote 8MQ/8MM/8MN/8MP boot binary build cp ${DEPLOY_DIR_IMAGE}/signed_dp_imx8m.bin ${BOOT_STAGING} cp ${DEPLOY_DIR_IMAGE}/u-boot-spl.bin-${MACHINE}-${UBOOT_CONFIG} \ ${BOOT_STAGING}/u-boot-spl.bin cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${UBOOT_DTB_NAME} ${BOOT_STAGING} cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG} \ ${BOOT_STAGING}/u-boot-nodtb.bin cp ${STAGING_DIR_NATIVE}/${bindir}/mkimage ${BOOT_STAGING}/mkimage_uboot # bl31 is already part of the mkimage repo #cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin cp ${BOOT_STAGING}/${ATF_MACHINE_NAME} ${BOOT_STAGING}/bl31.bin cp ${DEPLOY_DIR_IMAGE}/${UBOOT_NAME} ${BOOT_STAGING}/u-boot.bin } do_compile_append() { # Integrate fw_env.config and u-boot-initial-env cp "${DEPLOY_DIR_IMAGE}/u-boot-initial-env-${MACHINE}-${UBOOT_CONFIG}.bin" "${S}" cp "${DEPLOY_DIR_IMAGE}/fw_env-${MACHINE}-${UBOOT_CONFIG}.config" "${S}" cd ${S} for target in ${IMXBOOT_TARGETS}; do # Store an md5sum to check the files on target before installation md5sum ${BOOT_CONFIG_MACHINE}-${target} \ u-boot-initial-env-${MACHINE}-${UBOOT_CONFIG}.bin \ fw_env-${MACHINE}-${UBOOT_CONFIG}.config \ > ${BOOT_CONFIG_MACHINE}-${target}.md5 done cd - } do_deploy_append() { for target in ${IMXBOOT_TARGETS}; do # Create a tar from the bootfiles, compressed gz, dereference links (copy the file not the link into the tar) cd ${S} tar chzf ${DEPLOYDIR}/${BOOT_CONFIG_MACHINE}-${target}.tar.gz \ ${BOOT_CONFIG_MACHINE}-${target} \ ${BOOT_CONFIG_MACHINE}-${target}.md5 \ u-boot-initial-env-${MACHINE}-${UBOOT_CONFIG}.bin \ fw_env-${MACHINE}-${UBOOT_CONFIG}.config cd - cd ${DEPLOYDIR} ln -sf ${BOOT_CONFIG_MACHINE}-${target}.tar.gz ${BOOT_NAME}.tar.gz cd - done }