Mender not working in iMX6 UL

Looking back over a past project I had to add a yocto bbappend file to my uboot recipe which created the imx file manually. Below are the bitbake append functions i added

do_compile_append() {
    if [ -n "${UBOOT_CONFIG}" ]
    then
        unset i j
        for config in ${UBOOT_MACHINE}; do
            i=$(expr $i + 1);
            for type in ${UBOOT_CONFIG}; do
                j=$(expr $j + 1);
                if [ $j -eq $i ]
                then
                    dd if="${B}/${config}/SPL" of="${B}/${config}/u-boot-${type}.imx"
                    dd if="${B}/${config}/u-boot.img" of="${B}/${config}/u-boot-${type}.imx" obs=1K seek=68
                fi
            done
            unset  j
        done
        unset  i
    else
        dd if="${B}/SPL" of="${B}/u-boot.imx"
        dd if="${B}/u-boot.img" of="${B}/u-boot.imx" obs=1K seek=68
    fi

}



do_deploy_append () {
    if [ -n "${UBOOT_CONFIG}" ]
    then
        for config in ${UBOOT_MACHINE}; do
            i=$(expr $i + 1);
            for type in ${UBOOT_CONFIG}; do
                j=$(expr $j + 1);
                if [ $j -eq $i ]
                then
                    install -d ${DEPLOYDIR}
                    install -m 644 ${B}/${config}/u-boot-${type}.imx ${DEPLOYDIR}/u-boot-${type}-${PV}-${PR}.imx
                    cd ${DEPLOYDIR}
                    ln -sf u-boot-${type}-${PV}-${PR}.imx u-boot-${type}.imx
                    ln -sf u-boot-${type}-${PV}-${PR}.imx u-boot.imx
                fi
            done
            unset  j
        done
        unset  i
    else
        install -d ${DEPLOYDIR}
        install -m 644 ${B}/u-boot.imx ${DEPLOYDIR}/u-boot-${PV}-${PR}.imx
        cd ${DEPLOYDIR}
        rm -f u-boot*.imx
        ln -sf u-boot-${PV}-${PR}.imx u-boot.imx

   fi

}
1 Like