Deployment Yocto

  1. All images are intended for the usage on a @stk_name@
  2. The symlinks point to the files of the last build

Use an SD card to install a new firmware.
The following commands write the image from the host system to the SD card:

$ cd <BSP project>/platform-<platform_name>/images
$ sudo dd if=@bsp_image_name@-<build Timestamp>.rootfs.wic of=/dev/sdc bs=1M conv=fsync #Assuming the SD card is assigned to /dev/sdc

You have to use the raw device of the SD card not a partition!

The command dmesg can be used to identify the SD card:

  1. execute dmesg (sd card not plugged in)
  2. insert SD Card and wait a few seconds
  3. Run dmesg again
 dmesg 
 #plug in SD Card into socket
 dmesg 




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

The variables can be saved with the command saveenv to keep the values even after a reboot

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.>


3. Connect device via ethernet on @eth_prime@ to a tftp server supplying the image

4. Prepare network interface:

Set network settings manually

Set network settings using DHCP


5. Provide U-Boot the file name of the desired image on the tftp server:

  • For U-Boot update: ⇒ setenv uboot <filename>
  • For Device Tree update: ⇒ setenv fdt_file <filename>
  • For Kernel update: ⇒ setenv image <filename>

6. Perform Update:

  • U-Boot update: ⇒ run update_uboot
  • Device Tree update: ⇒ run update_fdt
  • Kernel update: ⇒ run update_kernel

  • Write Image to SD card (use dd command under linux or Win32diskImager under Windows)
  • Set Starterkit to boot from SD, please see DIP Switch Settings
  • Interrupt the boot process to get to the U-Boot prompt
  • Use the following commands to copy the SD card to eMMMC

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.


2. Save environment with the saveenv command (optional):

=> saveenv


3. run the following command to start the update procedure:

=> run install_firmware

Prerequisites

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.

Configuration of U-Boot Environment

The bootloader environment needs to be modified to work with your tftp-server and your nfs-server.

1. Prepare network interface:

Set network settings manually

Set network settings using DHCP

2. set the Uboot variables for TFTP and NFS:

  • setenv rootpath <rootpath> (NFS directory has to set in /etc/exports on the Computer that runs the NFS server first)
  • setenv fdt_file <fdt_file> (name of devicetree file to be downloaded from the tftp server)
  • setenv image <image> (name of the Linux kernel image to be downloaded from the tftp server)

3. Run the uboot script to boot from nfs:

Disclaimer
TQ-Systems GmbH provides the Board Support Packages (BSP) free of charge. The software included in the shipment has been configured individually for the starter kits. The software is only intended to evaluate the module. The use of the Board Support Packages (BSP) is only allowed within the scope of functionality described by TQ-Systems GmbH. TQ-Systems GmbH does not accept any liability for all further changes of the Board Support Package and for any damage resulting from its use.