diff --git a/board/ti/common/am6xx/post-build.sh b/board/ti/common/am6xx/post-build.sh
index e3ff4d7f12ce..c32cfe25b299 100755
--- a/board/ti/common/am6xx/post-build.sh
+++ b/board/ti/common/am6xx/post-build.sh
@@ -1,4 +1,5 @@
 #!/bin/sh
+set -eu
 
 # genimage will need to find the extlinux.conf
 # in the binaries directory
