Author Topic: Bootloader by SD card for the RT1020  (Read 306 times)

Offline LuisHS

  • Newbie
  • *
  • Posts: 21
    • View Profile
Bootloader by SD card for the RT1020
« on: March 07, 2020, 10:56:39 PM »

Hi Mark.
Is there a uTasker that works as a bootloader by SD card for the RT1020?

Regards.

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3035
    • View Profile
    • uTasker
Re: Bootloader by SD card for the RT1020
« Reply #1 on: March 08, 2020, 04:09:41 AM »
Hi Luis

I presently have HS USB MSD loading ready for the i.MX RT 1020: https://www.utasker.com/iMX/RT1020.html
but haven't ported the SDHC controller over yet. Since the uSDHC1 controller in the i.MX RT 1020 is almost identical to the one in the Kinetis parts I don't expect any real difficulties.

I expect to have it ready by the end of the next week at latest.

Regards

Mark

Offline LuisHS

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Bootloader by SD card for the RT1020
« Reply #2 on: March 09, 2020, 02:06:37 PM »
 
Thanks Mark.
Is it possible to update the program from the SD card to the QSPI with your bootloader?

The RT series, having no flash memory, already allows a direct boot from SD, but what I would like is for the boot to always be from QSPI and the firmware can be updated with an SD.

The problem is also that the files must be signed to protect against unauthorized copying. Will this be possible with your bootloader?

 
« Last Edit: March 09, 2020, 02:08:26 PM by LuisHS »

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3035
    • View Profile
    • uTasker
Re: Bootloader by SD card for the RT1020
« Reply #3 on: March 09, 2020, 03:29:35 PM »
Luis

The uTasker loot loader allows new applications to be copied from SD card to QSPI flash so that the new code boots from there.
The new code on the SD card can be encryped.

Regards

Mark

Offline LuisHS

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Bootloader by SD card for the RT1020
« Reply #4 on: March 09, 2020, 03:57:27 PM »
 
Thanks, I look forward to the version for RT1020 that allows the encrypted bootloader from SD to QSPI.

A question about copy protection:
When the bootloader loads the firmware from SD to QSPI, will the firmware in the QSPI be encrypted?

I have not started working on firmware files signed with the RT1020 yet, but I understand that once the program has been compiled, it can be encrypted before recording it to the boot device (SD, QSPI, hyperflash). Then, in the case of your booloader, in addition to the firmware being encrypted in the SD, once it is loaded into the QSPI from the SD, will it also be encrypted in the QSPI?

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3035
    • View Profile
    • uTasker
Re: Bootloader by SD card for the RT1020
« Reply #5 on: March 09, 2020, 05:41:32 PM »
Hi

There are two possibilities for encryption:
1. The image is AES256 encrypted (on the SD card and copied in the same format to QSPI). It is then decrypted at boot time to run (in unencrypted form) in SRAM.
2. The image is encrypted to run from QSPI flash using the XiP and Bus Encryption Engine (BEE). It is saved in this format to the SD card and is copied in this format to the QSPI flash.

The method used by the uTasker project is generally method 1 (has priority during development) since it allows faster code operation, lower power consumption and lower radiation.

Regards

Mark

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3035
    • View Profile
    • uTasker
Re: Bootloader by SD card for the RT1020
« Reply #6 on: March 11, 2020, 05:05:31 AM »
utFAT has been ported to the i.MX RT 1020 - binary available at:

https://www.utasker.com/iMX/RT1020.html

This means that it should theoretically be operational for boot loader use so a version looks good still for this week!

Regards

Mark


Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3035
    • View Profile
    • uTasker
Re: Bootloader by SD card for the RT1020
« Reply #7 on: March 13, 2020, 09:23:40 AM »
The SD card loader for i.MX RT 1020 is ready and can be tried at

https://www.utasker.com/iMX/RT1020.html#SDCARD_BL

Regards

Mark