This shows you the differences between two versions of the page.
ass:labs-2025:01:tasks:03 [2025/08/03 17:00] florin.stancu created |
ass:labs-2025:01:tasks:03 [2025/08/04 15:18] (current) florin.stancu |
||
---|---|---|---|
Line 1: | Line 1: | ||
==== 03. Finally booting the board! ==== | ==== 03. Finally booting the board! ==== | ||
- | The i.MX93 family of processors can boot from multiple sources: eMMC, SD card, etc. Our board lacks an SD card slot so this method can be discarded right off the bat. Although booting from eMMC is possible, it would require us to overwrite its persistent storage with a disk image every single time. We will do this at some point in the following sessions but for now the most convenient solution is using SDP to download **flash.bin** via a serial connection, over USB. | + | The i.MX93 family of processors can boot from multiple sources: eMMC, SD card, etc. Our board lacks an SD card so this method can be discarded right off the bat. Although booting from eMMC is possible, it would require us to overwrite its persistent storage with a disk image every single time. We will do this at some point later in our workshop but, for now, the most convenient solution is using SDP (Serial Download Protocol) to download **flash.bin** via our USB connection to the board directly into the chip's SRAM (and execute it there!). |
=== Preparation === | === Preparation === | ||
- | In order to select Serial Download as the preferred method of boot, you will need to set two jumpers on the board. Find J1 and J2 and configure them according to the figure below. | + | In order to select Serial Download as the preferred method of boot, you will need to set four DIP switches on the board. Find the BOOT label and configure them according to the figure below: |
- | {{ :ass:labs-2025:01:tasks:imx93_boot_jumpers.png?400 |}} | + | {{ :ass:labs-2025:01:imx93_boot_jumpers.jpg?500 |}} |
- | == Step 6. Download & compile the IMX Universal Update Utility == | + | == Step 3.1. Download & compile the IMX Universal Update Utility == |
The Universal Update Utility (UUU) is an image deployment tool created by NXP for it's i.MX architecture. For more information about its usage, scripting interface and supported protocols, check out the [[https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/imx-processors/140261/1/UUU.pdf|documentation]]. | The Universal Update Utility (UUU) is an image deployment tool created by NXP for it's i.MX architecture. For more information about its usage, scripting interface and supported protocols, check out the [[https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/imx-processors/140261/1/UUU.pdf|documentation]]. | ||
Line 26: | Line 26: | ||
First things first, connect the three USB-C cables (Power to the AC adapter, Debug and USB_C labeled ports to your PC). While the former will be used to power on the board, the latter will expose two Serial Devices and a USB Bootloader communication line with your computer. The one used for console I/O by the bootloaders should appear to you as ''/dev/ttyACM0''. | First things first, connect the three USB-C cables (Power to the AC adapter, Debug and USB_C labeled ports to your PC). While the former will be used to power on the board, the latter will expose two Serial Devices and a USB Bootloader communication line with your computer. The one used for console I/O by the bootloaders should appear to you as ''/dev/ttyACM0''. | ||
+ | |||
+ | {{ :ass:labs-2025:01:imx93_frdm_annotated.jpg?500 |}} | ||
<note warning> | <note warning> | ||
Line 37: | Line 39: | ||
Note that nothing will be printed on the console yet, but you need to stay connected to receive the messages that will follow! | Note that nothing will be printed on the console yet, but you need to stay connected to receive the messages that will follow! | ||
- | == Step 7: Upload the firmware image package (FIP)! == | + | == Step 3.2. Upload the firmware image package (FIP)! == |
- | Ever since the USB-C cable was plugged in, **BL1** has been waiting for the FIP data over serial, thanks to our jumper configuration. Now we can finally provide this data using **uuu** and it's SDP implementation: | + | Ever since the USB-C cable was plugged in, **BL1** has been waiting for the FIP data over serial, thanks to our jumper configuration. Now we can finally provide this data using **uuu** and it's SDP implementation. |
+ | |||
+ | <note tip> | ||
+ | If you're using a remote VM, you must download the ''flash.bin'' file (reminder: it was generated inside ''imx-mkimage/iMX93/'' build subdirectory) to your local machine using ''scp'': | ||
+ | |||
+ | <code bash> | ||
+ | # basic syntax: scp <source> <destination> | ||
+ | # either source or destination MUST be a remote SSH with the form: | ||
+ | # username@host:/path/to/file | ||
+ | # Note: -P specifies the port (your VM index!) | ||
+ | # example (destination is "./" -- your current directory): | ||
+ | scp -P 220X your-user@arm2026.root.sx:path/to/flash.bin ./ | ||
+ | </code> | ||
+ | </note> | ||
<code bash> | <code bash> | ||
Line 54: | Line 69: | ||
Finally, when everything is in working condition, you should see a ''Run fastboot ...'' message, press //Ctrl + C// and you should get the ''u-boot%%=>%%'' prompt. | Finally, when everything is in working condition, you should see a ''Run fastboot ...'' message, press //Ctrl + C// and you should get the ''u-boot%%=>%%'' prompt. | ||
- | == Step 9. Time to play! == | + | == Step 3.3. Time to play! == |
You might be wondering: but we don't have an OS installed yet... is this all we can do now? | You might be wondering: but we don't have an OS installed yet... is this all we can do now? | ||
Line 68: | Line 83: | ||
* Print the available eMMC devices, as well as their partition tables (if any are available). | * Print the available eMMC devices, as well as their partition tables (if any are available). | ||
* Perform a memory test on the first GB of DRAM. Note that U-Boot relocates itself toward the end of the DRAM bank during its initialization phase (check ''bdinfo'' for the exact address). Stay away from that region unless you want to overwrite **BL33** itself with your test pattern. | * Perform a memory test on the first GB of DRAM. Note that U-Boot relocates itself toward the end of the DRAM bank during its initialization phase (check ''bdinfo'' for the exact address). Stay away from that region unless you want to overwrite **BL33** itself with your test pattern. | ||
+ | |||
+ | Finally, let's test the USB Mass Storage emulation of the eMMC using u-boot (which will allow us to access the board's internal flash memory direcrly from our ;laptops / PCs via USB-C). Try the ''ums'' command (use Google/LLMs for its arguments ;) ). | ||
+ | |||