Sector 1) | Size 2) | Contents | Linux (SD-Card) | Linux (eMMC) | Mountpoint |
---|---|---|---|---|---|
0x000000 … 0x000000 | 0x0001 sector / 512 B | MBR / Partition Table | unpartitioned area | n/a | |
0x000001 … 0x00003F | 0x003F sectors / 32256 B | none | |||
0x000040 … 0x001FFF | 0x1FC0 sectors / 4064 kiB | bootstream (U-Boot) | |||
0x002000 … 0x003FFF | 0x2000 sectors / 4 MiB | U-Boot environment | |||
0x004000 … 0x023FFF | 0x20000 sectors / 64 MiB | firmware (Kernel, devicetrees) | mmcblk1p1 | mmcblk0p1 | /boot |
0x024000 … | actual size depends on contents of RootFS | RootFS | mmcblk1p2 | mmcblk0p2 | / |
The Image can be simply written to the SD Card by using the dd shell command in Linux:
$ cd <path to your image> $ sudo dd if=tq-image-weston-tqma8mpxs-mb-smarc-2-<build Timestamp>.rootfs.wic of=/dev/sdc bs=1M conv=fsync #Assuming the SD card is assigned to /dev/sdc
To identify the SD card in Linux the shell command dmesg can be used:
$ dmesg | tail -n 15
$ dmesg | tail -n 15 #plug in SD Card into the reader $ dmesg | tail -n 15
A good approach to update the firmare components U-Boot,Linux kernel and devicetree in a running system it to load them from a tftp server.
This process requires a running TFTP server, please see the following page how to setup TFTP Server.
After setting up the TFTP server, the binaries to be updated must be copied into the TFTP directory.
1. Setup the Starterkit to boot from eMMC or SD
2. Connect the kit to the network with TFTP server supplying the binaries via ethernet on connector ETH1 (X18)
3. Power up the system and interrupt the boot process in U-Boot
Hit any key to stop autoboot: 0 =>
3. Setup the ethernet interface:
Set network settings using DHCP
4. Set U-Boot variable mmcdev according to the drive you want to write to.
=> setenv mmcdev <device_number>
5. Set the file name of the binary to update in U-Boot :
6. Perform Update by running the update command:
=> run update_uboot_mmc
=> run update_fdt_mmc
=> run update_kernel_mmc
2. Save environment U-boot environment (optional):
=> saveenv
3. run the following command to start the update procedure:
=> run install_firmware
To boot the TQMa8MPxS from network you need a working bootloader in eMMC/SD-card or SPI-NOR (placement option on TQMa8MPxS ) which is able to get the kernel image over tftp and to provide the kernel with commandline settings for NFS. The dtb-file and kernel image have to be provided via tftp and the rootfs via nfs.
The bootloader environment needs to be modified to work with your tftp-server and your nfs-server.
1. Prepare network interface:
Set network settings using DHCP
2. set the Uboot variables for TFTP and NFS:
3. Run the uboot script to boot from nfs:
The UUU (Universal Update Utility is an open source programm provided by NXP, it is the successor of NXP's MFG Tools, intended to download and execute code on i.MX SoC family via the Serial Download Protocol (SDP).
Documentation, source code and prebuild releases are available via the NXP mfgtools github repository.
1. Download the latest release from Universal Update Utility repository or build it from source
2. TQMa8MPxS BSP built following the BSP quickstart instructions.
A prebuild UUU release version can be downloaded from the UUU git repository.
The Universal Update Utility (UUU) tool can be compiled manually. The build instructions for Linux, Windows are available in the UUU documentation:
A U-Boot binary with the U-Boot configuration mfgtool is required to use the UUU. This particular U-Boot will be built during the TQMa8MPxS Yocto BSP build process and is located in the build directory deploy folder named imx-boot-tqma8mpxl-mba8mpxl-mfgtool.bin-flash_spl_uboot.
For the sake of siplicity, copy the following components to a new folder e.g. in your home directory:
The following commands are executed in the folder containing the tool and the binaries.
After connecting the kit, it should be automatically detected when it is in serial downloader mode. Run the following command to list all detected devices:
uuu -lsusb
To load the U-boot binary into the RAM and start it from there use the command below:
uuu <u-boot binary>
Example for the STKa8MPxS:
uuu imx-boot-tqma8mpxl-mba8mpxl-mfgtool.bin-flash_spl_uboot
Use the following command to program a U-Boot binary into the eMMC.
uuu -b emmc <u-boot binary>
Example for the STKa8MPxS:
uuu -b emmc imx-boot-tqma8mpxl-mba8mpxl-mfgtool.bin-flash_spl_uboot
Follow the command below to load the mfgtool U-Boot and write an image onto the TQMa8MPxS eMMC afterwards.
uuu -b emmc_all <u-boot binary> <wic-image>
Example for the STKa8MPxS:
uuu -b emmc_all imx-boot-tqma8mpxl-mba8mpxl-mfgtool.bin-flash_spl_uboot.bin tq-image-weston-debug-tqma8mpxs-mb-smarc-2.rootfs.wic
Use a custom workflow:
For a custom workflow uuu commands can be listed in a cmdlist file. The following example shows how to program a wic image to eMMC user area, without writing the bootstream to the eMMC boot partition.
Example cmdlist file on STKa8MPxS:
For the sake of simplicity, create the cmdlist file in the same location as the uuu executable. For example uuu.tqma8mpxs
Example command for the STKa8MPxS using custom cmdlist:
uuu -e BOOTSTREAM=<bootstream for uuu> -e WICIMAGE=<wic image for eMMC> uuu.tqma8mpxs
uuu -e BOOTSTREAM=imx-boot-tqma8mpxl-mba8mpxl-mfgtool.bin-flash_spl_uboot -e WICIMAGE=tq-image-weston-debug-tqma8mpxs-mb-smarc-2.rootfs.wic uuu.tqma8mpxs