When executing GNAP to create a .img file, GNAP enters an endless loop caused by the invcation of the gtest function from the cleanup function when it receives an error when trying to unmount the loopback device (which wasn't mounted). Solution could be the substitution of lines number 108 and 115 by if [ $? ] ; then echo "Failed to unmount ${LOOP}" ; fi and if [ $? ] ; then echo "Failed to remove ${DIRTOREMOVE}" ; fi respectively.
The GNAP project has been discontinued, its removal was acknowledged by steev. If you need to, you can contact the Gentoo Embedded project; more information about the Gentoo Embedded project can be found on the following link: http://www.gentoo.org/proj/en/base/embedded/ This removal happens as part of project cleanup by the Gentoo Council's members.