meta-aspeed: otp: create otp image

1. Add otptool.bbclass to create otp image.
2. Update u-boot recipe to "inherit otptool.bbclass" for
otp image creation in the u-boot tasks.
3. Update socsec tool for SPL and OTP image verification if
verify failed u-boot should be built failed.
4. Use OE logging utilities.

Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com>
Change-Id: I0ba5da4d112b49d182bdf2751614afe62850eac3
diff --git a/meta-aspeed/classes/socsec-sign.bbclass b/meta-aspeed/classes/socsec-sign.bbclass
index 5b90da1..f46147d 100644
--- a/meta-aspeed/classes/socsec-sign.bbclass
+++ b/meta-aspeed/classes/socsec-sign.bbclass
@@ -60,9 +60,19 @@
     fi
 }
 
+verify_spl_otp() {
+    socsec verify \
+        --sec_image ${DEPLOYDIR}/${SPL_IMAGE} \
+        --otp_image ${DEPLOYDIR}/otp-all.image
+
+    if [ $? -ne 0 ]; then
+        bbfatal "Verified OTP image failed."
+    fi
+}
 
 do_deploy:append() {
     if [ "${SOCSEC_SIGN_ENABLE}" = "1" -a -n "${SPL_BINARY}" ] ; then
         sign_spl
+        verify_spl_otp
     fi
 }