===== Deployment =====
we suggest to read the following pages before you proceed with this page\\
- [[@lang@:@mod_arch@:@mod_name_code@:@bsp_name@:prepare|preparing Development Host]]
- [[@lang@:@mod_arch@:@mod_name_code@:@bsp_name@:build_bsp|Building BSP with PTXdist]]
- [[@lang@:@mod_arch@:@mod_name_code@:@bsp_name@:adapt_bsp|Customizing BSP for own Product]]
==== PTXdist Images ====
Finally, you will find the built images in //platform-/images//.
{{section>:..:..:@lang@:@mod_arch@:@mod_name_code@:data#ptxdist_images&noheader}}
==== Create SD Card with BSP Image ====
We recommend to use SD cards to install new firmware for testing purposes.
$ cd /platform-/images
$ sudo dd if=@bsp_image_name@ of=/dev/sdf bs=1M conv=fsync #Assuming the SD card is assigned to /dev/sdf
To determine which device file the SD card has, type "dmesg" after connecting 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
----
==== Updating existing firmware over ethernet ====
\\
To update bootloader / kernel / devicetree in a running system you have to copy the images to a tftp directory and upload them to the eMMC or SD Card.\\
Please see [[en:general_information:tftp|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**
{{section>:..:..:@lang@:@mod_arch@:@mod_name_code@:data#device_assignment&noheader}}
**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 (e.g.: setenv serverip 192.168.100.110)
* => setenv ipaddr (e.g.: setenv ipaddr 192.168.100.111)
* => setenv netmask (e.g.: setenv netmask 255.255.255.0)
\\
**5. Provide U-Boot the file name of the desired image on the tftp server:**
* For U-Boot update on eMMC/SD Card : => setenv uboot \\
* For U-Boot update on QSPI NOR : => setenv uboot-qspi \\
* For Device Tree update on eMMC/SD Card and QSPI NOR : => setenv fdt_file \\
* For Kernel update on eMMC/SD Card and QSPI NOR : => setenv zimage \\
\\
**6. Perform Update: **
{{section>:..:..:@lang@:@mod_arch@:@mod_name_code@:data#update_commands_uboot&noheader}}
----
==== Using NFS boot ====
== Prerequisites ==
* [[en:nfs|How to setup the NFS Server on your Host Computer]]
* [[en:tftp|How to setup the TFTP Server on your Host Computer]]
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.
* setenv autoload no
* setenv serverip (e.g.: setenv serverip 192.168.100.1)
* setenv ipaddr (e.g.: setenv ipaddr 192.168.0.10)
* setenv netmask (e.g.: setenv netmask 255.255.255.0)
* setenv rootpath (NFS share has to set in /etc/exports on the Computer that runs the NFS server first)
* setenv fdt_file (name of devicetree file to be downloaded from the tftp server)
* setenv zimage (name of the Linux kernel image to be downloaded from the tftp server)
If you have tftp and NFS installed on your server, run the following commands from the U-boot environment:
setenv autoload no
setenv serverip [Server IP]
setenv ipaddr [Starterkit IP]
setenv netmask 255.255.255.0
setenv rootpath [root directory on server] e.g. /home/embedded/workspace/TQMa6x-BSP-REV.0109/platform-MBa6x/root (NFS share from /etc/exports)
setenv bootcmd run netboot
setenv fdt_file [Device Tree]
Refer to [[intern:general_information:tutorial:nfs_tftp|this tutorial]] to install and set up NFS and tftp on Ubuntu 14.04
{{section>:..:..:@lang@:@mod_arch@:@mod_name_code@:data#serial_downloader}}
{{section>:..:..:@lang@:@mod_arch@:@mod_name_code@:data#usage_of_serial_downloader_tool}}