Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revisionBoth sides next revision | ||
en:arm:tqma6x:data [2019/02/28 09:13] – [Images PTXdist] bujupib | en:arm:tqma6x:data [2019/02/28 09:22] – bujupib | ||
---|---|---|---|
Line 694: | Line 694: | ||
===== Deployment PTXdist ===== | ===== Deployment PTXdist ===== | ||
+ | |||
+ | ==== Create SD Card with BSP Image ==== | ||
+ | |||
+ | To install a new firmware use SD cards. To copy the built images on the host system to a connected card type: | ||
+ | <code bash> | ||
+ | $ cd <BSP project>/ | ||
+ | $ sudo dd if=u-boot_< | ||
+ | </ | ||
+ | <WRAP round tip>You have to use the raw device of the SD card not a partition!</ | ||
+ | To find out what device file the SD card has, type " | ||
+ | At the bottom you'll see some " | ||
+ | <code bash> | ||
+ | [ 8197.588395] | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Updating existing firmware over ethernet ==== | ||
+ | \\ | ||
+ | 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 [[en: | ||
+ | |||
+ | |||
+ | 1. Boot from eMMC or SD and stop autoboot in U-Boot\\ | ||
+ | < | ||
+ | =></ | ||
+ | |||
+ | 2. Set U-Boot variable // | ||
+ | < | ||
+ | <WRAP round info 30%> | ||
+ | //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: | ||
+ | * => setenv autoload no | ||
+ | * => setenv serverip < | ||
+ | * => setenv ipaddr < | ||
+ | * => setenv netmask < | ||
+ | \\ | ||
+ | 5. Provide U-Boot the file name of the desired image on the tftp server: | ||
+ | * For U-Boot update: => setenv uboot < | ||
+ | * For Device Tree update: => setenv fdt_file < | ||
+ | * For Kernel update: => setenv zimage < | ||
+ | \\ | ||
+ | 6. Perform Update: | ||
+ | * U-Boot update: => run update_uboot\\ | ||
+ | * Device Tree update: => run update_fdt\\ | ||
+ | * Kernel update: => run update_kernel\\ | ||
+ | |||
+ | <WRAP round info> | ||
+ | The u-boot update scripts automatically implement the selection of the primary copy to boot. | ||
+ | </ | ||
+ | \\ | ||
+ | ---- | ||
+ | ==== Copy Firmware from SD card to eMMC using U-Boot ==== | ||
+ | |||
+ | * Write Image to SD card (use dd command under linux or Win32diskImager under Windows) | ||
+ | * Set Starterkit to boot from SD, please see [[en: | ||
+ | * Interrupt the boot process to get to the U-Boot prompt | ||
+ | * Use the following command to copy the SD card to eMMMC | ||
+ | |||
+ | === Generic command === | ||
+ | |||
+ | < | ||
+ | mmc dev 1 && mmc rescan && mmc read ${loadaddr} 0 (number of blocks) | ||
+ | </ | ||
+ | |||
+ | <WRAP round important> | ||
+ | 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. | ||
+ | </ | ||
+ | |||
+ | ++++Example for precompiled SD card image included in BSP Rev.0109| | ||
+ | |||
+ | * Size of uboot_tqma6q_hd.img in byte = 276.824.064 | ||
+ | * 276.824.064 / 512 = 540.672 | ||
+ | * 540.672 converted to hex value = h840000 | ||
+ | |||
+ | < | ||
+ | mmc dev 1 && mmc rescan && mmc read ${loadaddr} 0 0x84000 | ||
+ | </ | ||
+ | ++++ | ||
+ | \\ | ||
+ | |||
+ | |||
+ | ==== Copy rootfs from SD card to eMMC ==== | ||
+ | |||
+ | The rootfs is located in the second partition of the SD card/ | ||
+ | |||
+ | example for TQMa6Q | ||
+ | |||
+ | <code bash> | ||
+ | dd if=/ | ||
+ | </ | ||
+ | |||
+ | <WRAP round important 50%> | ||
+ | please keep in mind to resize the eMMC rootfs partition, | ||
+ | if the rootfs size was changed in BSP configuration | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Using NFS boot ==== | ||
+ | |||
+ | == Prerequisites == | ||
+ | |||
+ | * [[en: | ||
+ | * [[en: | ||
+ | |||
+ | To boot the <label mod_name> | ||
+ | The dtb-file and kernel image have to be provided via tftp and the rootfs via nfs.\\ | ||
+ | |||
+ | |||
+ | == Configuration of U-Boot Environment == | ||
+ | |||
+ | The bootloader environment needs to be modified to work with your tftp-server and your nfs-server. | ||
+ | |||
+ | * setenv autoload no | ||
+ | * setenv serverip < | ||
+ | * setenv ipaddr < | ||
+ | * setenv netmask < | ||
+ | * setenv rootpath < | ||
+ | * setenv fdt_file < | ||
+ | * setenv zimage < | ||
+ | |||
+ | ===== TQMa6x serial downloader ===== | ||
+ | |||
+ | <WRAP round important> | ||
+ | </ | ||
+ | <WRAP round info> | ||
+ | We recommend to use Ubuntu 14.04 64bit for the imx-usb tool | ||
+ | </ | ||
+ | |||
+ | |||
+ | Starting with TQMa6x-BSP-REV.0109 we deliver a Linux tool to upload U-Boot into the TQMa6X RAM from your development host and start it. | ||
+ | After building the BSP the tool is located under \\ | ||
+ | **.../ | ||
+ | |||
+ | You have to apply the following steps before you can start to work with the tool: | ||
+ | |||
+ | * Copy the content of folder .../ | ||
+ | * Copy the content of folder .../ | ||
+ | |||
+ | ==== Usage of serial downloader tool ==== | ||
+ | |||
+ | - Set Starterkit to boot-mode " | ||
+ | - Connect Starterkit connector X8 (Micro USB cable provided with the Starterkit) to your host | ||
+ | - Connect Starterkit connector X15 (RS232) to your host | ||
+ | - Power up Starterkit | ||
+ | - Please check that Linux recognized a new USB device, see output of command **dmesg | grep -i usb**. You should see something like the following :< | ||
+ | hid-generic 0003: | ||
+ | </ | ||
+ | - Open a serial terminal on your host e.g. TeraTerm | ||
+ | - Open a Linux terminal and naviagate to folder " | ||
+ | - Start the serial downloader **imx_usb** as super user with the desired U-Boot as parameter <WRAP round important> | ||
+ | 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=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 </ | ||
+ | parse / | ||
+ | 15a2: | ||
+ | Interface 0 claimed | ||
+ | HAB security state: development mode (0x56787856) | ||
+ | == work item | ||
+ | filename u-boot-TQMa6Q_MBa6x.imx | ||
+ | load_size 0 bytes | ||
+ | load_addr 0x00000000 | ||
+ | dcd 1 | ||
+ | clear_dcd 0 | ||
+ | plug 1 | ||
+ | jump_mode 2 | ||
+ | jump_addr 0x00000000 | ||
+ | == end work item | ||
+ | main dcd length 308 | ||
+ | sub dcd length 304 | ||
+ | |||
+ | loading binary file(u-boot-TQMa6Q_MBa6x.imx) to 4fbff400, skip=0, fsize=5cc00 type=aa | ||
+ | |||
+ | <<< | ||
+ | succeeded (status 0x88888888) | ||
+ | jumping to 0x4fbff400 | ||
+ | </ | ||
+ | - Now you can see the U-Boot messages in the serial terminal programm | ||
+ | |||
+ | Next steps are:\\ | ||
+ | * write U-Boot using tftp to eMMC, see [[en: | ||
+ | * write kernel image using tftp to eMMC, see [[en: | ||
+ | |||
+ | |||
+ | |||
===== Images PTXdist ===== | ===== Images PTXdist ===== | ||
Line 838: | Line 1041: | ||
++++ | ++++ | ||
- | |||
- | ===== device assignment ===== | ||
- | <WRAP round info 30%> | ||
- | //mmcdev 0// = eMMC\\ | ||
- | //mmcdev 1// = SD Card\\ | ||
- | </ | ||
- | |||
- | ===== update commands uboot ===== | ||
- | |||
- | * U-Boot update: => run update_uboot\\ | ||
- | * Device Tree update: => run update_fdt\\ | ||
- | * Kernel update: => run update_kernel\\ | ||
- | |||
- | |||
- | |||
- | === serial downloader === | ||
- | <WRAP round important> | ||
- | </ | ||
- | <WRAP round info> | ||
- | We recommend to use Ubuntu 14.04 64bit for the imx-usb tool | ||
- | </ | ||
- | |||
- | |||
- | Starting with TQMa6x-BSP-REV.0109 we deliver a Linux tool to upload U-Boot into the TQMa6X RAM from your development host and start it. | ||
- | After building the BSP the tool is located under \\ | ||
- | **.../ | ||
- | |||
- | You have to apply the following steps before you can start to work with the tool: | ||
- | |||
- | * Copy the content of folder .../ | ||
- | * Copy the content of folder .../ | ||
- | |||
- | |||
- | |||
- | |||
- | === Usage of serial downloader tool === | ||
- | |||
- | - Set Starterkit to boot-mode " | ||
- | - Connect Starterkit connector X8 (Micro USB cable provided with the Starterkit) to your host | ||
- | - Connect Starterkit connector X15 (RS232) to your host | ||
- | - Power up Starterkit | ||
- | - Please check that Linux recognized a new USB device, see output of command **dmesg | grep -i usb**. You should see something like the following :< | ||
- | hid-generic 0003: | ||
- | </ | ||
- | - Open a serial terminal on your host e.g. TeraTerm | ||
- | - Open a Linux terminal and naviagate to folder " | ||
- | - Start the serial downloader **imx_usb** as super user with the desired U-Boot as parameter <WRAP round important> | ||
- | 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=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 </ | ||
- | parse / | ||
- | 15a2: | ||
- | Interface 0 claimed | ||
- | HAB security state: development mode (0x56787856) | ||
- | == work item | ||
- | filename u-boot-TQMa6Q_MBa6x.imx | ||
- | load_size 0 bytes | ||
- | load_addr 0x00000000 | ||
- | dcd 1 | ||
- | clear_dcd 0 | ||
- | plug 1 | ||
- | jump_mode 2 | ||
- | jump_addr 0x00000000 | ||
- | == end work item | ||
- | main dcd length 308 | ||
- | sub dcd length 304 | ||
- | |||
- | loading binary file(u-boot-TQMa6Q_MBa6x.imx) to 4fbff400, skip=0, fsize=5cc00 type=aa | ||
- | |||
- | <<< | ||
- | succeeded (status 0x88888888) | ||
- | jumping to 0x4fbff400 | ||
- | </ | ||
- | - Now you can see the U-Boot messages in the serial terminal programm | ||
- | |||
- | Next steps are:\\ | ||
- | * write U-Boot using tftp to eMMC, see [[en: | ||
- | * write kernel image using tftp to eMMC, see [[en: | ||
- | |||