we suggest to read the following pages before you proceed with this page
Finally, you will find the built images in platform-<platformname>/images.
To install a new firmware use SD cards. To copy the built images on the host system to a connected card type:
$ cd <BSP project>/platform-<platform_name>/images $ sudo dd if=u-boot_@mod_name_code@_hd.img of=/dev/sdf bs=1M conv=fsync #Assuming the SD card is assigned to /dev/sdf
To find out what device file the SD card has, type “dmesg” after you connect the card to see the system messages. At the bottom you'll see some “Attached scsi …” messages along with something like:
[ 8197.588395] sdf: sdf1
To update bootloader / kernel / devicetree in a running system you have to copy the images in your tftp directory and upload them to the eMMC or SD Card.
Please see How to setup TFTP Server
1. Boot from eMMC or SD and stop autoboot in U-Boot
Hit any key to stop autoboot: 0 =>
2. Set U-Boot variable mmcdev according to the drive you want to write to
=> setenv mmcdev <Nr.>
Device assignement:
mmcdev 0 = eMMC
mmcdev 1 = SD Card
3. Connect device via ethernet to a tftp server supplying the image
4. Provide the correct network configuration in U-Boot:
5. Provide U-Boot the file name of the desired image on the tftp server:
6. Perform Update:
The u-boot update scripts automatically implement the selection of the primary copy to boot.
mmc dev 1 && mmc rescan && mmc read ${loadaddr} 0 (number of blocks) && mmc dev 0 && mmc rescan && mmc write ${loadaddr} 0 (number of blocks)
You have to set the number of blocks according to the image size to read entire data that is stored on the SD card and write the same number of blocks to the eMMC.
Formula to calulate the number of blocks
Size of SD card image in bytes / 512. Convert the result to a hex value.
Since the data is stored in the SDRAM on the module the size of the image must not exeed the size of the SDRAM.
mmc dev 1 && mmc rescan && mmc read ${loadaddr} 0 0x8c000 && mmc dev 0 && mmc rescan && mmc write ${loadaddr} 0 0x8c000
The rootfs is located in the second partition of the SD card/eMMC please seePartition Scheme
example for TQMa7x
dd if=/dev/mmcblk0p2 of=/dev/mmcblk1p2 bs=1M
please keep in mind to resize the eMMC rootfs partition,
if the rootfs size was changed in BSP configuration
To boot the @mod_name@ from network you need a working bootloader in eMMC/SD-card or SPI-NOR (placement option on @mod_name@) 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.
You have to set the Starterkit to boot-mode “serial downloader”, please see MBa7x DIP switch settings
Starting with TQMa7x-BSP-REV.0105 we deliver a Linux tool to upload U-Boot into the TQMa7x RAM from your development host and start it.
After building the BSP the tool is located in:
…/TQMa7x.BSP.SW.SRC.0105/platform-MBa7x-FSL/packages/host-imx_usb_loader-48a85c0b84611c089cf870638fd1241619324b1d/
You have to apply the following steps before you can start to work with the tool:
usb 3-2.1: Manufacturer: Freescale SemiConductor Inc hid-generic 0003:15A2:0076.0006: hiddev0,hidraw1: USB HID v1.10 Device [Freescale SemiConductor Inc SE Blank ULT1] on usb-0000:03:00.0-2.1/input0
Keep in mind to select a U-Boot that is corresponding to your module, please see deployment
e.g.
embedded@ubuntu:~/workspace/TQMa7x.BSP.SW.SRC.0105/platform-MBa7x-FSL/images$ sudo imx_usb u-boot-fsl-1gb-mba7-mmc.imx
host console output after starting the serial downloader
config file <./imx_usb.conf> vid=0x066f pid=0x3780 file_name=mx23_usb_work.conf vid=0x15a2 pid=0x004f file_name=mx28_usb_work.conf vid=0x15a2 pid=0x0052 file_name=mx50_usb_work.conf vid=0x15a2 pid=0x0054 file_name=mx6_usb_work.conf vid=0x15a2 pid=0x0061 file_name=mx6_usb_work.conf vid=0x15a2 pid=0x0063 file_name=mx6_usb_work.conf vid=0x15a2 pid=0x0071 file_name=mx6_usb_work.conf vid=0x15a2 pid=0x007d file_name=mx6_usb_work.conf vid=0x15a2 pid=0x0076 file_name=mx7_usb_work.conf vid=0x15a2 pid=0x0041 file_name=mx51_usb_work.conf vid=0x15a2 pid=0x004e file_name=mx53_usb_work.conf vid=0x15a2 pid=0x006a file_name=vybrid_usb_work.conf vid=0x066f pid=0x37ff file_name=linux_gadget.conf config file <./mx7_usb_work.conf> parse ./mx7_usb_work.conf 15a2:0076(mx7) bConfigurationValue =1 Interface 0 claimed HAB security state: development mode (0x56787856) == work item filename /home/embedded/Desktop/uboot/u-boot-fsl-512mb-mba7-mmc.imx load_size 0 bytes load_addr 0x00000000 dcd 1 clear_dcd 0 plug 1 jump_mode 2 jump_addr 0x00000000 == end work item <<<0, 492 bytes>>> succeeded (status 0x128a8a12) loading binary file(/home/embedded/Desktop/uboot/u-boot-fsl-512mb-mba7-mmc.imx) to 9fbff400, skip=0, fsize=87c00 type=aa <<<556032, 556032 bytes>>> succeeded (status 0x88888888) jumping to 0x9fbff400
9. Now you can see the U-Boot messages in the serial terminal programm
Next steps are: