Differences

This shows you the differences between two versions of the page.

Link to this comparison view

ass:labs-2025:03 [2025/08/03 16:59]
florin.stancu created
ass:labs-2025:03 [2025/08/05 15:56] (current)
florin.stancu
Line 1: Line 1:
-==== 03. Finally booting the board! ====+~~NOTOC~~
  
-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.+===== 03 - Extras =====
  
-=== Preparation ​===+===== Objectives =====
  
-In order to select Serial Download as the preferred method of bootyou will need to set two jumpers on the boardFind J1 and J2 and configure them according to the figure below.+  * More U-Boot customization (low-level C programming :D); 
 +  * Make firmware package for an alternativebut similar model (i.MX91); 
 +  * Make networking work on i.MX93 with mainline kernel & Buildroot! 
 +  * Cross-compile Buildroot packages from source;
  
-{{ :​ass:​labs-2025:​01:​tasks:​imx93_boot_jumpers.png?​400 |}}+===== Contents =====
  
-== Step 6. Download & compile the IMX Universal Update Utility ==+{{indexmenu>:​ass:​labs-2025:​03:​tasks|skipfile}}
  
-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]].+===== Lecture =====
  
-Grab the source code from [[https://​github.com/​nxp-imx/​mfgtools.git|here]] and compile **uuu**. The project uses the **cmake** build system for the sake of portability. If you haven'​t encountered it yetfollow these setup steps:+No new lectures today ;) some demosmaybe!
  
-<code bash> +But if you haven'​t already, check out the first two: [[:​ass:​cursuri:​01|1]],​ [[:​ass:​cursuri:​02|2]].
-# currently in the mfgtools repo root +
-mkdir build +
-cd build +
-cmake .+
-make -j $(nproc) +
-</​code>​+
  
-=== Connecting to the board ===+===== Tasks =====
  
-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''​.+{{namespace>:​ass:​labs-2025:​03:​tasks&​nofooter&​noeditbutton}}
  
-<note warning> 
-If you're using a Virtual Machine, you first need to identify the USB device on the host (it should be something like ''​NXP Semiconductors i.MX''​) and forward it to the VM. Also capture the ''​QinHeng Electronics USB Dual_Serial''​ (from the Debug port). 
- 
-Otherwise (if you're using a Windows host), you will need to download and install both the NXP IMX ''​uuu''​ utility and a serial console program for your native platform; but not recommended. WSL will not work, unless you manually setup USB Passthrough using [[https://​learn.microsoft.com/​en-us/​windows/​wsl/​connect-usb|USBIPD]]. 
-</​note>​ 
- 
-Connect to this device using a serial terminal emulation tool of your choice. We recommend **picocom**. The default baud rate of i.MX devices (actually, most embedded Linux devices) is 115200 by convention. But don't trust us on this: check the manual ;) 
- 
-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)! == 
- 
-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:​ 
- 
-<code bash> 
-# paths for uuu and flash.bin truncated 
-uuu -b spl flash.bin 
-</​code>​ 
- 
-About now you should see some debug messages in your serial console tool. 
- 
-<​note>​ 
-In order to reset your board, unfortunately,​ there is no physical button connected (just some jumper holes). So simply disconnect & reconnect the Power USB-C cable (: 
-</​note>​ 
- 
-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! == 
- 
-You might be wondering: but we don't have an OS installed yet... is this all we can do now? 
- 
-Don't worry, we'll now get to see why ''​u-boot''​ is the most popular choice for embedded devices (here'​s another fact: most Android phones also use it, although it's not popular anymore since most manufacturers migrated to proprietary ones). 
- 
-Now that we finally have access to the interactive shell (we've stopped at **BL33**), try to run ''​bdinfo''​ for some generic board information. Run ''​help''​ to see what other commands are available to you, and ''​help <​command>''​ for detailed information of said command. Note that this may not be an exhaustive list of commands; some may not have been compiled into the final binary, depending on your ''​.config''​. 
- 
-Try to perform the following: 
- 
-  * Print the available environment (''​env''​ u-boot command). 
-  * Check out the vendor and System on Chip (SOC) values. 
-  * 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. 
  
ass/labs-2025/03.1754229576.txt.gz · Last modified: 2025/08/03 16:59 by florin.stancu
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0