image.bbclass: add link to .rootfs.<type> or .<type>.img
authorBen Gardiner <bengardiner@nanometrics.ca>
Tue, 15 Mar 2011 18:13:54 +0000 (14:13 -0400)
committerTom Rini <tom_rini@mentor.com>
Wed, 16 Mar 2011 02:05:54 +0000 (19:05 -0700)
commitcfde49e8d0f1cf09d589910f1a342849db148519
tree492387bbfc67214acfab895e148deb92401a281d
parentce869976ecc8e87cf8f12ce96649a24512a891a1
image.bbclass: add link to .rootfs.<type> or .<type>.img

The current image link-creation code will unconditionaly create a link
from .<type> pointing to the .rootfs.<type> output.

This is not compatible with the UBIFS images produced which have
.<type>.img extension since they are not considered to be valid rootfs
images when they are not included in a UBI container.

Check for existence of the link target .rootfs.<type> before creating the
link and fallback to a check for the .<type>.img target after that.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Acked-by: Denys Dmytriyenko <denys@ti.com>
Signed-off-by: Tom Rini <tom_rini@mentor.com>
classes/image.bbclass