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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

990 Views
davidkilp
Contributor IV

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?

0 Kudos
2 Replies

561 Views
diegoadrian
NXP Employee
NXP Employee

Hello,

I apologize for the delay,

This is normal since our newer Android releases do not include the recovery image.

 

Best Regards,

Diego.

0 Kudos

561 Views
george
Senior Contributor II

Dear diegoadrian‌,

We want to learn how to build a recovery image.
Isn't there any reference?

Even materials or an old building system will help us.

Best Regards,

George

0 Kudos