AnsweredAssumed Answered

iMX6Q SabreSD board errors building recovery-image for Android Oreo 8.0.0

Question asked by David Kilp on Mar 14, 2018
Latest reply on Jul 20, 2018 by Diego Adrian Cuevas

Building Android Oreo 8.0.0_1.0.0_ga release for the i.MX6Quad running on SabreSD dev board. I followed the instructions and was able to get a build that successfully runs. However, I notice in the output log during the build of the recovery image the following errors:

 

[ 98% 8150/8288] ----- Making recovery image ------
Copying baseline ramdisk...
Modifying ramdisk contents...
/bin/bash: line 0: [: =: unary operator expected
/bin/bash: @echo: command not found
/bin/bash: @: command not found
+out/target/product/sabresd_6dq/recovery.img maxsize=34256640 blocksize=4224 total=0 reserve=346368
/bin/bash: line 0: [: =: unary operator expected
/bin/bash: @echo: command not found
/bin/bash: @: command not found
+out/target/product/sabresd_6dq/recovery.img maxsize=34256640 blocksize=4224 total=0 reserve=346368
/bin/bash: line 0: [: =: unary operator expected
/bin/bash: @echo: command not found
/bin/bash: @: command not found
+out/target/product/sabresd_6dq/recovery.img maxsize=34256640 blocksize=4224 total=0 reserve=346368
/bin/bash: line 0: [: =: unary operator expected
/bin/bash: @echo: command not found
/bin/bash: @: command not found
+out/target/product/sabresd_6dq/recovery.img maxsize=34256640 blocksize=4224 total=0 reserve=346368
/bin/bash: line 0: [: =: unary operator expected
/bin/bash: @echo: command not found
/bin/bash: @: command not found
+out/target/product/sabresd_6dq/recovery.img maxsize=34256640 blocksize=4224 total=0 reserve=346368
----- Made recovery image: out/target/product/sabresd_6dq/recovery.img --------

 

This seems to be a problem with the build/core/Makefile that NXP modified to build u-boot/kernel as part of the build but I think the logic in the Makefile is wrong during the step of creating the recovery image when it does this check at line 1260-1262:

 

if [ $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VERITY) = true ]; then \
       $(BOOT_SIGNER) /recovery $(1) $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VERITY_SIGNING_KEY).pk8 $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_VERITY_SIGNING_KEY).x509.pem $(1); \
    fi;\

 

the value of $(PRODUCTS.$(INTERNAL_PRODUCT).PRODUCT_SUPPORTS_VERITY) is always empty which is why the build outputs all those errors because it does this for each different u-boot produced for the different board types.

 

I guess it doesn't matter in this case because boot signing is not enabled ?

 

Also, even if this code was invoked to sign the recovery image, the $(BOOT_SIGNER) command expands out to:

out/host/linux-x86/bin/boot_signer but this path does not exist and would fail if the check worked? Perhaps this is supposed to expand out to: ./system/extras/verity/boot_signer which does exist??

 

Has anyone else seen this problem or how to fix this?

Outcomes