Setup of external call to bl_validation_fw from my application

Hi All,

I'm in the process of implementing the bootloader (NSIB) to support FW upgrades.

This is working well until I added access to call the bootloaders bl_validation_firmware() from my app via the EXT_API feature.  To get the project to compile I had to add

CONFIG_SECURE_BOOT_VALIDATION=y
CONFIG_BL_VALIDATE_FW_EXT_API_ENABLED=y
CONFIG_SECURE_BOOT_CRYPTO=y
CONFIG_SECURE_BOOT_STORAGE=y
EXT_API_REQ(BL_VALIDATE_FW, 1, struct bl_validate_fw_ext_api, bl);

int main(void)
{

        printk("Starting up...\n");

        if (bl->ext_api.bl_validate_firmware(0x9000, 0x9000))
        {
                printk("FW at 0x9000 validated");
        }
        else
                printk("FW at 0x9000 Failed validated");

        printk("Waiting forever...\n");
        while (1)
        {
                ;
        }
        return 0;
}
But then it fails to Link my app, with undefined reference to get_hash().  So am I missing another CONFIG item?
I wouldn't have thought that my app would need to link in bl_crypto in the first place, as this functionality is implemented in the bootloader image? Isn't this the point of the external api to enable calls to the bootloader functions and not having to re-implement them in the user application?
I'm testing this on the nRF52840DK with SDK 2.2.0

Thanks

Simon

Parents Reply Children
No Data
Related