Dies ist eine alte Version des Dokuments!
A login shell can be accessed through UART-A on the Colibri Evaluation board with a null modem cable. The communication settings are: 115200 8N1.
If you are using our Controller Board (cb20) you need a special USB/TTL-Serial-UART converter cable. The connector on the board is a 6-pin SIL connector, e.g. http://ch.farnell.com/ftdi/ttl-232r-3v3/kabel-usb-ttl-pegel-seriell-umsetzung/dp/1329311
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: inf004/ftp/colibri_imx6/RT/
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 gatewayip 146.136.36.1 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
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 -- Partition Type: DOS Part Start Sector Num Sectors UUID Type 1 8192 32768 000bb5ae-01 06 Boot 2 40960 262144 000bb5ae-02 83 3 303104 3891200 000bb5ae-03 83
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/512=197256 → 0x30288. So check the size of your image and calculate the corresponding size.
uboot> mmc write $loadaddr 4a000 30288
Change emmcargs:
uboot> setenv emmcargs ip=off root=/dev/mmcblk0p3 rw,noatime rootfstype=ext4 rootwait
Save the new Environment variable:
uboot> saveenv
After booting do not forget to run the init script as described in rootfs.
If you use our standard rootfs as described above, you have GCC 5.3 installed. For crossdevelopment you need the same toolchain (same gcc and library version) on the host and the target. Download this toolchain from out FTP: inf004/ftp/colibri_imx6/RT/host_tc_arm_gcc5_3_RT.zip
and extract with
$ tar –xzvf host_tc_arm_gcc5_3_RT.zip
To build an application for that system, provide CMake the path to the CMake toolchainfile. This file can be found in your toolchain folder and from there navigate to /usr/share/buildroot/toolchainfile.cmake
.
UART-A (used for console, see above) and UART-B can be accessed on the cb20 board. Both can be written to with
echo "hello world" | sudo tee /dev/ttymxc0 # for console echo "hello world" | sudo tee /dev/ttymxc1 # for UART-B
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:
$ cd path/to/working/dir $ export WD=$(pwd)
After the first complete build, the environment variables can be set by a script (env.sh):
export WD=/home/userXY/path/to/working/dir export PATH=$WD/buildroot/output/host/usr/bin:$PATH export PATH=$WD/u-boot/tools:$PATH export ARCH=arm export CROSS_COMPILE=arm-buildroot-linux-uclibcgnueabihf- export KERNELDIR=$EFS/linux
Source this script to load the variables:
$ . env.sh
After loading your new rootfs run the initial-setup.sh
script in /opt/cb20/bin
to allow the generation of SSH-Keys. Also the read-write partition mounted at /mnt/data is formatted.
The device tree binary for the cb20 and evaluation board can be found on the NTB FTP server (\\inf004\ftp)