Skip to content

Commit

Permalink
imx8m: Fix dependency issue
Browse files Browse the repository at this point in the history
When DTB and bl31.bin are not existed, the build still can process and
make out problematic image. Add more dependency checks.

Signed-off-by: Ye Li <[email protected]>
  • Loading branch information
Ye Li committed Dec 1, 2017
1 parent 31cadae commit c3b3c8f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions iMX8M/mkimage_fit_atf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
[ -z "$BL31" ] && BL31="bl31.bin"

if [ ! -f $BL31 ]; then
echo "WARNING: BL31 file $BL31 NOT found, resulting binary is non-functional" >&2
BL31=/dev/null
echo "ERROR: BL31 file $BL31 NOT found" >&2
exit 0
else
echo "bl31.bin size: " >&2
ls -lct bl31.bin | awk '{print $5}' >&2
Expand All @@ -28,7 +28,7 @@ fi
BL33="u-boot-nodtb.bin"

if [ ! -f $BL33 ]; then
echo "WARNING: $BL33 file NOT found" >&2
echo "ERROR: $BL33 file NOT found" >&2
exit 0
else

Expand Down
3 changes: 2 additions & 1 deletion iMX8M/soc.mak
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ clean:
@rm -f $(MKIMG) $(DCD_CFG) .imx8mq_dcd.cfg.cfgtmp.d u-boot-atf.bin u-boot-atf-tee.bin u-boot-spl-ddr.bin u-boot.itb u-boot.its $(OUTIMG)

dtbs = fsl-imx8mq-evk.dtb
u-boot.itb:
u-boot.itb: $(dtbs)
./mkimage_fit_atf.sh $(dtbs) > u-boot.its
./mkimage_uboot -E -p 0x3000 -f u-boot.its u-boot.itb
@rm -f u-boot.its

flash_hdmi_spl_uboot: $(MKIMG) signed_hdmi_imx8m.bin u-boot-spl-ddr.bin u-boot.itb
./mkimage_imx8 -fit -signed_hdmi signed_hdmi_imx8m.bin -loader u-boot-spl-ddr.bin 0x7E1000 -second_loader u-boot.itb 0x40200000 0x60000 -out $(OUTIMG)
Expand Down

0 comments on commit c3b3c8f

Please sign in to comment.