Skip to content
Snippets Groups Projects
imx-boot_%.bbappend 1.31 KiB
Newer Older
require imx-mkimage_kuk.inc

FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
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}"
    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
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
}