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

Offline LuisHS

  • Newbie
  • *
  • Posts: 22
    • 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: 3060
    • 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: 22
    • 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: 3060
    • 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: 22
    • 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: 3060
    • 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: 3060
    • 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: 3060
    • 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

Offline LuisHS

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: Bootloader by SD card for the RT1020
« Reply #8 on: May 13, 2020, 11:55:19 PM »
Hello Mark.

I don't quite understand the usefulness of that binary.
How to create the encrypted bootloader, configuring the keys that I want, as it was done with the Kinetis?

I would be interested in an encrypted bootloader for SD cards, such as that of the Kinetis, to be able to configure the keys, and in the case of i.Mx RT, also to be able to encrypt the user program that will load in QSPI or SD, so that it cannot be copied or used on other plates without authorization.

Initially I was going to use the RT1020 in LQFP100, but now I prefer to use the RT1062 in BGA (will be my first PCB for BGA), since it is the processor that uses Teensy 4.0 and 4.1, so I can do the developments and tests with Teensy, and when everything works, then create my own board with the RT1062. Does uTasker support or will it also support the RT1062?

Thank you
« Last Edit: May 13, 2020, 11:57:23 PM by LuisHS »

Offline mark

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3060
    • View Profile
    • uTasker
Re: Bootloader by SD card for the RT1020
« Reply #9 on: May 14, 2020, 12:14:05 AM »
Hi

uTasker supports the i.MX RT 1062 on these boards:
https://www.utasker.com/iMX/RT1060.html
https://www.utasker.com/iMX/iMX_RT1062_OEM.html
https://www.utasker.com/iMX/Teensy_4_0.html
https://www.utasker.com/iMX/Teensy_4_1.html

The updated secure boot loader concept is described in this video: https://www.youtube.com/watch?v=2XfgZq19XDw&list=PLWKlVb_MqDQEOCnsNOJO8gd3jDCwiyKKe&index=3
and there is a guide to building with MCUXprsesso at https://www.youtube.com/watch?v=C7DyE8RscHs&list=PLWKlVb_MqDQEOCnsNOJO8gd3jDCwiyKKe&index=4

The method of configuring keys and such is almost the same as the Kinetis.

Regards

Mark