u-boot: enhance deploy symlinking logic
[glsdk/meta-ti-glsdk.git] / recipes-bsp / u-boot / u-boot.inc
index 310d80cac294128d3ac73cbdb8678862601effcd..1621d6b119511cdab62f0c902f4e7edf9fd0213b 100644 (file)
@@ -63,6 +63,14 @@ do_deploy () {
        install ${S}/${UBOOT_BINARY} ${DEPLOY_DIR_IMAGE}/${UBOOT_IMAGE}
 
        cd ${DEPLOY_DIR_IMAGE}
-       rm -f ${UBOOT_SYMLINK}
+       rm -f ${UBOOT_BINARY} ${UBOOT_SYMLINK}
        ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK}
+       ln -sf ${UBOOT_IMAGE} ${UBOOT_BINARY}
+
+       if [ -e ${S}/MLO ] ; then
+               install ${S}/MLO ${DEPLOY_DIR_IMAGE}/MLO-${MACHINE}-${PV}
+               rm -f ${DEPLOY_DIR_IMAGE}/MLO-${MACHINE} ${DEPLOY_DIR_IMAGE}/MLO
+               ln -sf MLO-${MACHINE}-${PV} ${DEPLOY_DIR_IMAGE}/MLO-${MACHINE}
+               ln -sf MLO-${MACHINE}-${PV} ${DEPLOY_DIR_IMAGE}/MLO
+       fi
 }