Set network settings using DHCP
Write the U-Boot image (bootstream) to QSPI-NOR:
This script uses the bootstream defined in the environment variable uboot, which is set to bootstream.bin by default. Make sure to either name the file on the TFTP server root accordingly or rewrite the variable uboot using setenv uboot <name>. The corresponding file in the BSP is u-boot-with-spl-qspi-2023.04-r0.imx.
run update_uboot_spi
Write the rootfs to QSPI-NOR:
It is mandatory to prepare the MTD root partition initially.
This script erases the rootfs partition on the SPI and creates a new ubi volume.
run prepare_ubi_part
This script uses the UBIFS defined in the environment variable ubirootfs, which is set to rootfs.ubifsby default. Make sure to either name the file on the TFTP server root accordingly or rewrite the variable ubirootfs using setenv ubirootfs <name>. The corresponding file in the BSP is tq-image-small-debug-tqma6ulx-mba6ulx.rootfs.ubifs.
run update_rootfs_spi
tftp boot-ubi.scr
sf probe
sf update ${loadaddr} script ${filesize}
Finally, power off and set the DIP switches to QSPI NOR boot.
There are two common ways to write the image to an SD card: using the highly recommended bmaptool (which is significantly faster) or the standard dd command.
The bmaptool provides a faster and safer way to flash images. It automatically utilizes the .bmap file to skip empty blocks, verifies the integrity during flashing, and can flash compressed images (like .wic.zst) on the fly without manual extraction.
$ cd <path to your image> $ sudo bmaptool copy tq-image-weston-debug-tqma7x-mba7x.rootfs.wic.zst /dev/sdc #Assuming the SD card is assigned to /dev/sdc
Alternatively, the uncompressed 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-debug-tqma7x-mba7x.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
| Symlink | File |
|---|---|
| tq-image-weston-tqma6ulx-mba6ulx.rootfs.wic | tq-image-weston-tqma6ulx-mba6ulx-<build_timestamp>.rootfs.wic |
| Symlink | File |
|---|---|
| u-boot-tqma6ulx-mba6ulx.imx-sd | u-boot-sd-2016.03-r0.imx |
| Symlink | File |
|---|---|
| u-boot-tqma6ulx-mba6ulx.imx-qspi | u-boot-qspi-2016.03-r0.imx |
| Symlink | File |
|---|---|
| zImage zImage-tqma6ulx-mba6ulx.bin | zImage–5.4-r0-tqma6ulx-mba6ulx-<build_timestamp>.bin |
| Symlink | Description |
|---|---|
| imx6ul-mba6ulx.dtb imx6ul-mba6ulx-tqma6ulx-mba6ulx.dtb | device tree blob for TQMa6ULx on MBa6ULx |
| imx6ul-mba6ulx-lvds.dtb imx6ul-mba6ulx-lvds-tqma6ulx-mba6ulx.dtb | device tree blob for LVDS Display |
| imx6ul-mba6ulx-dmb-ct21.dtb imx6ul-mba6ulx-dmb-ct21-tqma6ulx-mba6ulx.dtb | device tree blob for Display CT21 |
| imx6ul-mba6ulx-dmb-ct44.dtb imx6ul-mba6ulx-dmb-ct44-tqma6ulx-mba6ulx.dtb | device tree blob for Display CT44 |
| imx6ul-mba6ulx-glyn-etm0700g0edh6.dt imx6ul-mba6ulx-glyn-etm0700g0edh6-tqma6ulx-mba6ulx.dtb | device tree bolb for glyn Display |
| Symlink | File |
|---|---|
| tq-image-weston-tqma6ullx-mba6ulx.ext4 | tq-image-weston-tqma6ulx-mba6ulx-<build_timestamp>.rootfs.ext4 |
| tq-image-weston-tqma6ullx-mba6ulx.tar.gz | tq-image-weston-tqma6ulx-mba6ulx-<build_timestamp>.rootfs.tar.gz |
| Symlink | File |
|---|---|
| tq-image-weston-tqma6ulx-512mb-mba6ulx.rootfs.wic | tq-image-weston-tqma6ulx-512mb-mba6ulx-<build_timestamp>.rootfs.wic |
| Symlink | File |
|---|---|
| u-boot-tqma6ulx-512mb-mba6ulx.imx-sd | u-boot-sd-2016.03-r0.imx |
| Symlink | File |
|---|---|
| u-boot-tqma6ulx-512mb-mba6ulx.imx-qspi | u-boot-qspi-2016.03-r0.imx |
| Symlink | File |
|---|---|
| zImage zImage-tqma6ulx-512mb-mba6ulx.bin | zImage–5.4-r0-tqma6ulx-512mb-mba6ulx-<build_timestamp>.bin |
| Symlink | Description |
|---|---|
| imx6ul-mba6ulx.dtb imx6ul-mba6ulx-tqma6ulx-mba6ulx.dtb | device tree blob for TQMa6ULx on MBa6ULx |
| imx6ul-mba6ulx-lvds.dtb imx6ul-mba6ulx-lvds-tqma6ulx-512mb-mba6ulx.dtb | device tree blob for LVDS Display |
| imx6ul-mba6ulx-dmb-ct21.dtb imx6ul-mba6ulx-dmb-ct21-tqma6ulx-512mb-mba6ulx.dtb | device tree blob for Display CT21 |
| imx6ul-mba6ulx-dmb-ct44.dtb imx6ul-mba6ulx-dmb-ct44-tqma6ulx-512mb-mba6ulx.dtb | device tree blob for Display CT44 |
| imx6ul-mba6ulx-glyn-etm0700g0edh6.dt imx6ul-mba6ulx-glyn-etm0700g0edh6-tqma6ulx-mba6ulx.dtb | device tree bolb for glyn Display |
| Symlink | File |
|---|---|
| tq-image-weston-tqma6ulx-512mb-mba6ulx.ext4 | tq-image-weston-tqma6ulx-512mb-mba6ulx-<build_timestamp>.rootfs.ext4 |
| tq-image-weston-tqma6ulx-512mb-mba6ulx.tar.gz | tq-image-weston-tqma6ulx-512mb-mba6ulx-<build_timestamp>.rootfs.tar.gz |
| Symlink | File |
|---|---|
| tq-image-weston-tqma6ulx-lga-mba6ulx.rootfs.wic | tq-image-weston-tqma6ulx-lga-mba6ulx-<build_timestamp>.rootfs.wic |
| Symlink | File |
|---|---|
| u-boot-tqma6ulx-lga-mba6ulx.imx-sd | u-boot-sd-2016.03-r0.imx |
| Symlink | File |
|---|---|
| u-boot-tqma6ulx-lga-mba6ulx.imx-qspi | u-boot-qspi-2016.03-r0.imx |
| Symlink | File |
|---|---|
| zImage zImage-tqma6ulx-lga-mba6ulx.bin | zImage–5.4-r0-tqma6ulx-lga-mba6ulx-<build_timestamp>.bin |
| Symlink | Description |
|---|---|
| imx6ul-lga-mba6ulx.dtb imx6ul-lga-mba6ulx-tqma6ulx-lga-mba6ulx.dtb | device tree blob for TQMa6ULx on MBa6ULx |
| imx6ul-lga-mba6ulx-lvds.dtb imx6ul-lga-mba6ulx-lvds-tqma6ulx-lga-mba6ulx.dtb | device tree blob for LVDS Display |
| imx6ul-lga-mba6ulx-dmb-ct21.dtb imx6ul-lga-mba6ulx-dmb-ct21-tqma6ulx-lga-mba6ulx.dtb | device tree blob for Display CT21 |
| imx6ul-lga-mba6ulx-dmb-ct44.dtb imx6ul-lga-mba6ulx-dmb-ct44-tqma6ulx-lga-mba6ulx.dtb | device tree blob for Display CT44 |
| imx6ul-lga-mba6ulx-glyn-etm0700g0edh6.dt imx6ul-lga-mba6ulx-glyn-etm0700g0edh6-tqma6ulx-lga-mba6ulx.dtb | device tree bolb for glyn Display |
| Symlink | File |
|---|---|
| tq-image-weston-tqma6ulx-lga-mba6ulx.ext4 | tq-image-weston-tqma6ulx-lga-mba6ulx-<build_timestamp>.rootfs.ext4 |
| tq-image-weston-tqma6ulx-lga-mba6ulx.tar.gz | tq-image-weston-tqma6ulx-lga-mba6ulx-<build_timestamp>.rootfs.tar.gz |
| Symlink | File |
|---|---|
| tq-image-weston-tqma6ullx-mba6ulx.rootfs.wic | tq-image-weston-tqma6ullx-mba6ulx-<build_timestamp>.rootfs.wic |
| Symlink | File |
|---|---|
| u-boot-tqma6ullx-mba6ulx.imx-sd | u-boot-sd-2016.03-r0.imx |
| Symlink | File |
|---|---|
| u-boot-tqma6ullx-mba6ulx.imx-qspi | u-boot-qspi-2016.03-r0.imx |
| Symlink | File |
|---|---|
| zImage zImage-tqma6ullx-mba6ulx.bin | zImage–5.4-r0-tqma6ullx-mba6ulx-<build_timestamp>.bin |
| Symlink | Description |
|---|---|
| imx6ull-mba6ulx.dtb imx6ull-mba6ulx-tqma6ulx-mba6ulx.dtb | device tree blob for TQMa6ULx on MBa6ULx |
| imx6ull-mba6ulx-lvds.dtb imx6ull-mba6ulx-lvds-tqma6ulx-mba6ulx.dtb | device tree blob for LVDS Display |
| imx6ull-mba6ulx-dmb-ct21.dtb imx6ull-mba6ulx-dmb-ct21-tqma6ulx-mba6ulx.dtb | device tree blob for Display CT21 |
| imx6ull-mba6ulx-dmb-ct44.dtb imx6ull-mba6ulx-dmb-ct44-tqma6ulx-mba6ulx.dtb | device tree blob for Display CT44 |
| imx6ull-mba6ulx-glyn-etm0700g0edh6.dt imx6ull-mba6ulx-glyn-etm0700g0edh6-tqma6ulx-mba6ulx.dtb | device tree bolb for glyn Display |
| Symlink | File |
|---|---|
| tq-image-weston-tqma6ullx-mba6ulx.ext4 | tq-image-weston-tqma6ullx-mba6ulx-<build_timestamp>.rootfs.ext4 |
| tq-image-weston-tqma6ullx-mba6ulx.tar.gz | tq-image-weston-tqma6ullx-mba6ulx-<build_timestamp>.rootfs.tar.gz |
| Symlink | File |
|---|---|
| tq-image-weston-tqma6ullx-512mb-mba6ulx.rootfs.wic | tq-image-weston-tqma6ullx-512mb-mba6ulx-<build_timestamp>.rootfs.wic |
| Symlink | File |
|---|---|
| u-boot-tqma6ullx-512mb-mba6ulx.imx-sd | u-boot-sd-2016.03-r0.imx |
| Symlink | File |
|---|---|
| u-boot-tqma6ullx-512mb-mba6ulx.imx-qspi | u-boot-qspi-2016.03-r0.imx |
| Symlink | File |
|---|---|
| zImage zImage-tqma6ullx-512mb-mba6ulx.bin | zImage–5.4-r0-tqma6ullx-512mb-mba6ulx-<build_timestamp>.bin |
| Symlink | Description |
|---|---|
| imx6ull-mba6ulx.dtb imx6ull-mba6ulx-tqma6ullx-mba6ulx.dtb | device tree blob for TQMa6ULx on MBa6ULx |
| imx6ull-mba6ulx-lvds.dtb imx6ull-mba6ulx-lvds-tqma6ullx-512mb-mba6ulx.dtb | device tree blob for LVDS Display |
| imx6ull-mba6ulx-dmb-ct21.dtb imx6ull-mba6ulx-dmb-ct21-tqma6ullx-512mb-mba6ulx.dtb | device tree blob for Display CT21 |
| imx6ull-mba6ulx-dmb-ct44.dtb imx6ull-mba6ulx-dmb-ct44-tqma6ullx-512mb-mba6ulx.dtb | device tree blob for Display CT44 |
| imx6ull-mba6ulx-glyn-etm0700g0edh6.dt imx6ull-mba6ulx-glyn-etm0700g0edh6-tqma6ullx-mba6ulx.dtb | device tree bolb for glyn Display |
| Symlink | File |
|---|---|
| tq-image-weston-tqma6ullx-512mb-mba6ulx.ext4 | tq-image-weston-tqma6ullx-512mb-mba6ulx-<build_timestamp>.rootfs.ext4 |
| tq-image-weston-tqma6ullx-512mb-mba6ulx.tar.gz | tq-image-weston-tqma6ullx-512mb-mba6ulx-<build_timestamp>.rootfs.tar.gz |
| Symlink | File |
|---|---|
| tq-image-weston-tqma6ullx-lga-mba6ulx.rootfs.wic | tq-image-weston-tqma6ullx-lga-mba6ulx-<build_timestamp>.rootfs.wic |
| Symlink | File |
|---|---|
| u-boot-tqma6ulx-lga-mba6ullx.imx-sd | u-boot-sd-2016.03-r0.imx |
| Symlink | File |
|---|---|
| u-boot-tqma6ulx-lga-mba6ullx.imx-qspi | u-boot-qspi-2016.03-r0.imx |
| Symlink | File |
|---|---|
| zImage zImage-tqma6ullx-lga-mba6ulx.bin | zImage–5.4-r0-tqma6ullx-lga-mba6ulx-<build_timestamp>.bin |
| Symlink | Description |
|---|---|
| imx6ull-lga-mba6ulx.dtb imx6ull-lga-mba6ulx-tqma6ullx-lga-mba6ulx.dtb | device tree blob for TQMa6ULx on MBa6ULx |
| imx6ull-lga-mba6ulx-lvds.dtb imx6ull-lga-mba6ulx-lvds-tqma6ullx-lga-mba6ulx.dtb | device tree blob for LVDS Display |
| imx6ull-lga-mba6ulx-dmb-ct21.dtb imx6ull-lga-mba6ulx-dmb-ct21-tqma6ullx-lga-mba6ulx.dtb | device tree blob for Display CT21 |
| imx6ull-lga-mba6ulx-dmb-ct44.dtb imx6ull-lga-mba6ulx-dmb-ct44-tqma6ullx-lga-mba6ulx.dtb | device tree blob for Display CT44 |
| imx6ull-lga-mba6ulx-glyn-etm0700g0edh6.dt imx6ull-lga-mba6ulx-glyn-etm0700g0edh6-tqma6ullx-lga-mba6ulx.dtb | device tree bolb for glyn Display |
| Symlink | File |
|---|---|
| tq-image-weston-tqma6ullx-lga-mba6ulx.ext4 | tq-image-weston-tqma6ullx-lga-mba6ulx-<build_timestamp>.rootfs.ext4 |
| tq-image-weston-tqma6ullx-lga-mba6ulx.tar.gz | tq-image-weston-tqma6ullx-lga-mba6ulx-<build_timestamp>.rootfs.tar.gz |
| 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 … 0x000001 | 0x0001 sector / 512 B | none | |||
0x000002 … 0x000800 | 0x07FE sector / 1023 kiB | U-Boot | |||
0x000801 … 0x001000 | 0x0800 sector / 1 MiB | U-Boot environment | |||
0x001001 … 0x002000 | 0x1000 sector / 2 MiB | reserved | |||
0x002001 … 0x012000 | 0x10000 sector / 32 MiB | firmware (Kernel, devicetrees) | mmcblk1p1 | mmcblk0p1 | /boot |
0x012001 … | 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-tqma6ulx-mba6ulx-<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 TODO!!
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
=> run
=> run
1. Run the following commands in the Uboot shell to create update script:
setenv root_loop 'setenv start 12000 && setenv r1 $rootblks16 && while itest $r1 -gt 0; do if itest $r1 -gt 0x50000; then setenv count 0x50000; else setenv count $r1; fi && mmc dev 1 && mmc read $loadaddr $start $count && mmc dev 0 && mmc write $loadaddr $start $count && setexpr start $start + $count && setexpr r1 $r1 - $count; done; setenv r1; setenv start; setenv count'
setenv install_firmware 'echo MBR... && mmc dev 1 && mmc read $loadaddr 0 1 && mmc dev 0 && mmc write $loadaddr 0 1 && echo U-Boot... && mmc dev 1 && mmc read $loadaddr 1 1FFF && mmc dev 0 && mmc write $loadaddr 1 1FFF && echo Firmware Partition... && mmc dev 1 && mmc read $loadaddr 2000 10000 && mmc dev 0 && mmc write $loadaddr 2000 10000 && echo Root FS... && run root_loop'
2. Create the environment variable rootblks16 and set the value accordingly to the size of the RootFS in this case 323MB.
setenv rootblks16 0xA1800
2. Save environment U-boot environment (optional):
=> saveenv
3. run the following command to start the update procedure:
=> run install_firmware
To boot the TQMa6ULx from network you need a working bootloader in eMMC/SD-card or SPI-NOR (placement option on TQMa6ULx ) 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:
=> run netboot