Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Nächste Überarbeitung | Vorhergehende ÜberarbeitungNächste ÜberarbeitungBeide Seiten der Revision | ||
software:linux:toradex:loading [2018-12-21 11:00] – Externe Bearbeitung 127.0.0.1 | software:linux:toradex:loading [2023-07-07 14:19] – Urs Graf | ||
---|---|---|---|
Zeile 7: | Zeile 7: | ||
If you are using our [[embedded_systems: | If you are using our [[embedded_systems: | ||
- | ==== Loading new Kernel ==== | ||
- | For the Colibri iMX6 of Toradex we have a customized standard Preempt-RT Kernel (3.14) with Buildroot rootfs and device tree available. These images can be downloaded from our FTP: '' | ||
- | |||
- | Copy the uImage and the DTB onto a FTP server. Turn the evaluation board on and interrupt autoboot by hitting any key. First you have to set the u-boot variables for the network settings. Serverip must be set to the ip address of your FTP and ipaddr must be the address under which your Colibri board can be reached in your network. | ||
- | < | ||
- | uboot> setenv serverip 146.136.xx.xx | ||
- | uboot> setenv netmask 255.255.252.0 | ||
- | uboot> setenv ipaddr 146.136.xx.xx | ||
- | uboot> saveenv | ||
- | </ | ||
- | |||
- | Load and save the uImage from the FTP server: | ||
- | |||
- | < | ||
- | uboot> tftp $loadaddr uImage | ||
- | </ | ||
- | |||
- | Override the existing uImage with the new one: | ||
- | |||
- | < | ||
- | uboot> fatwrite mmc 0:1 $loadaddr uImage $filesize | ||
- | </ | ||
- | |||
- | Load the DTB: | ||
- | |||
- | < | ||
- | uboot> tftp $loadaddr imx6dl-colibri-cb20.dtb | ||
- | </ | ||
- | |||
- | Write DTB to flash: | ||
- | |||
- | < | ||
- | uboot> fatwrite mmc 0:1 $loadaddr imx6dl-colibri-cb20.dtb $filesize | ||
- | </ | ||
- | |||
- | Change to desired DTB-File for boot: | ||
- | < | ||
- | uboot> setenv fdt_file imx6dl-colibri-cb20.dtb | ||
- | </ | ||
- | |||
- | ==== Loading new rootfs ==== | ||
- | Copy rootfs and MBR onto your FTP server and same as loading a new Kernel, interrupt autoboot by hitting any key after power-up. Load the rootfs and MBR: | ||
- | |||
- | Load MBR: | ||
- | < | ||
- | uboot> tftp $loadaddr mbr.img | ||
- | </ | ||
- | |||
- | Write MBR to MMC: | ||
- | < | ||
- | uboot> mmc write $loadaddr 0 1 | ||
- | </ | ||
- | Afterwards the Partition Map for MMC device 0 should look as follows: | ||
- | < | ||
- | uboot> mmc part | ||
- | |||
- | Partition Map for MMC device 0 -- | ||
- | |||
- | Part Start Sector | ||
- | 1 | ||
- | 2 | ||
- | 3 | ||
- | </ | ||
- | |||
- | Load the rootfs image: | ||
- | < | ||
- | uboot> tftp $loadaddr rootfs.ext2 | ||
- | … | ||
- | done | ||
- | Bytes transferred = 100995072 (6051000 hex) | ||
- | </ | ||
- | |||
- | The rootfs has to be loaded to the rootfs partition (3), the start address has to be converted to hex: 303104 -> 0x4A000 | ||
- | The number of blocks for mmc write has to be calculated out of the filesize, which can be seen above: 100995072/ | ||
- | < | ||
- | uboot> mmc write $loadaddr 4a000 30288 | ||
- | </ | ||
- | |||
- | Change emmcargs: | ||
- | < | ||
- | uboot> setenv emmcargs ip=off root=/ | ||
- | </ | ||
- | |||
- | Save the new Environment variable: | ||
- | < | ||
- | uboot> saveenv | ||
- | </ | ||
- | After booting do not forget to run the init script as described in [[.: | ||
===== Crossdeveloping Applications ===== | ===== Crossdeveloping Applications ===== | ||
Zeile 112: | Zeile 24: | ||
</ | </ | ||
- | ===== Build new System Images ===== | ||
- | ==== System Setup ==== | ||
- | Environment variables are used for building the components. On the first time, everything has to be build in the correct order. The first variable is the working directory: | + | ===== First steps with a newly flashed board ===== |
- | < | + | After loading your new rootfs |
- | $ cd path/ | + | |
- | $ export WD=$(pwd) | + | |
- | </ | + | |
- | + | ||
- | * [[ .:toolchain | Toolchain (for the kernel and modules) ]] | + | |
- | * [[ .: | + | |
- | * [[ .: | + | |
- | * [[ .: | + | |
- | * [[ .:eim | EIM driver ]] | + | |
- | * [[ .:rootfs | + | |
- | * [[ .:wifi | WiFi on iMX6]] | + | |
- | + | ||
- | + | ||
- | After the first complete build, the environment variables can be set by a script (env.sh): | + | |
- | + | ||
- | < | + | |
- | export WD=/home/userXY/path/to/ | + | |
- | export PATH=$WD/ | + | |
- | export PATH=$WD/u-boot/ | + | |
- | export ARCH=arm | + | |
- | export CROSS_COMPILE=arm-buildroot-linux-uclibcgnueabihf- | + | |
- | export KERNELDIR=$EFS/linux | + | |
- | </code> | + | |
- | + | ||
- | Source this script to load the variables: | + | |
- | + | ||
- | < | + | |
- | $ . env.sh | + | |
- | </ | + | |