1

I need to create wic image with enable secureboot. Then I changed in local.conf to "IMAGE_FSTYPES = "wic" " then bitbake-core-image-sato-sdk to get the image.

The generated image able to boot but cannot boot with secureboot. I investigated and found that the layer in my meta-secureboot had a secureboot.class. This class was calling do_efi_populate and efi_iso_populate_append .

In this two function contains a line that control to generate bzImage.signed for secureboot. Therefore, there is no way I can change to wic image because this two function stuck with do_efi_populate and efi_iso_populate that only call for iso and hddimg . Do you guys have any idea to call function from hddimg/iso to wic.

Step done:

  1. Create core-image-sato-sdk.bbappend . Then adding:

    inherit image_types_wic

    do_image_wic[recrdeptask] += "do_efi_iso_populate".

example of secureboot.class:

   efi_populate_append() {
        #Sign bzImage and deploy as bzImage.signed
        sb-keymgmt.py -c sign -kn ${DEPLOY_DIR_IMAGE}/yocto.key -cn ${DEPLOY_DIR_IMAGE}/yocto.crt - 
        usf ${DEPLOY_DIR_IMAGE}/bzImage -sf ${DEPLOY_DIR_IMAGE}/bzImage.signed
        install -m 0644 ${DEPLOY_DIR_IMAGE}/bzImage.signed ${DEST}/bzImage.signed}
  efi_iso_populate_append() 
        iso_dir=$1
        efi_populate $iso_dir
        # Build a EFI directory to create efi.img
        mkdir -p ${EFIIMGDIR}/${EFIDIR}
        cp $iso_dir/${EFIDIR}/* ${EFIIMGDIR}${EFIDIR}
Rachid K.
  • 4,490
  • 3
  • 11
  • 30
James Bond
  • 11
  • 1

0 Answers0