Hi, Commit fd9c7cbfe446 ("scripts: Add common library functions") intorduced the usage of the common library functions to imx-image, which breaks the HAB USB image generation within barebox. Signed images are still generated fine: OBJCOPYB images/start_imx6ul_ccbv2_512m.pblb CHKFILESIZE images/start_imx6ul_ccbv2_512m.pblb OBJCOPYB images/start_imx6ul_ccbv2_256m.pblb CHKFILESIZE images/start_imx6ul_ccbv2_256m.pblb IMX-IMG images/start_imx6ul_ccbv2_512m.pblb.imximg IMX-IMG images/start_imx6ul_ccbv2_512m.pblb.simximg Input CSF text filename CSF Processed successfully and signed data available in images/start_imx6ul_ccbv2_512m.pblb.simximg.csfbin IMX-IMG images/start_imx6ul_ccbv2_512m.pblb.usimximg Input CSF text filename CSF Processed successfully and signed data available in images/start_imx6ul_ccbv2_512m.pblb.usimximg.csfbin write failed: Bad address make[1]: *** [/home/phoenix/work/ptx/barebox/images/Makefile.imx:38: images/start_imx6ul_ccbv2_512m.pblb.usimximg] Error 1 make[1]: *** Deleting file 'images/start_imx6ul_ccbv2_512m.pblb.usimximg' make: *** [Makefile:703: images] Error 2 I have attached the .config I used to test this, you'll need the i.MX cst tool in your path and the environment configuration to point to certificates. The ptx devel certificates https://git.pengutronix.de/git/ptx-code-signing-dev were what i used for testing. I assume this is the same error that has been fixed in "scripts/common: fix write_file when opened with mmap", however imx-image implements its own xwrite helper and opens files itself, so there is a mismatch there Thanks, Rouven Czerwinski