In this how-to section, you will update to the latest pre-built Linux image provided by Toradex.
In this module you will:
The following table lists the items required:
|List of items required|
|Micro SD card with more than 2GB|
Note: The following steps are meant to be run in the development workstation, and not on the target module, unless otherwise stated. Note: Whenever there is a reference to SD card, it means the micro SD card plus an adapter connected to the host machine, unless otherwise noted.
Install the prerequisites for generating the SD card:
sudo dpkg --add-architecture i386sudo apt-get updatesudo apt-get install dosfstools e2fsprogs gawk mtools partedsudo apt-get install zlib1g:i386 liblzo2-2:i386 libuuid1:i386 libusb-1.0-0:i386sudo apt-get install gparted
Before inserting the SD card in your host computer, list the hard-disks and partitions being used by your system. See the example below:
user@host:~$ df -hFilesystem Size Used Avail Use% Mounted onudev 3,9G 0 3,9G 0% /devtmpfs 792M 50M 743M 7% /run/dev/sda7 42G 30G 10G 75% /tmpfs 3,9G 145M 3,8G 4% /dev/shmtmpfs 5,0M 8,0K 5,0M 1% /run/locktmpfs 3,9G 0 3,9G 0% /sys/fs/cgroup/dev/sda5 922M 340M 520M 40% /boot/dev/sda8 178G 28G 141G 17% /usr/local/dev/sdb5 620G 558G 31G 95% /hometmpfs 792M 92K 792M 1% /run/user/1000
Notice that there are two hard-disks: /dev/sda and /dev/sdb. The indexes list different partitions inside the disks and can be ignored.
Insert the SD card in the host computer. A pop-up message should appear. Select the option Do Nothing, as illustrated in the picture below:
Notice that some SD cards have a physical lock that enables read-only mode, therefore you have to make sure this lock is not enabled. If the lock is enabled, further steps from this how-to section will not work.
List the hard-disks and partitions being used by your system. See the example below:
user@host:~$ df -hFilesystem Size Used Avail Use% Mounted onudev 3,9G 0 3,9G 0% /devtmpfs 792M 50M 743M 7% /run/dev/sda7 42G 30G 10G 75% /tmpfs 3,9G 145M 3,8G 4% /dev/shmtmpfs 5,0M 8,0K 5,0M 1% /run/locktmpfs 3,9G 0 3,9G 0% /sys/fs/cgroup/dev/sda5 922M 340M 520M 40% /boot/dev/sda8 178G 28G 141G 17% /usr/local/dev/sdb5 620G 558G 31G 95% /hometmpfs 792M 92K 792M 1% /run/user/1000/dev/mmcblk0p1 7,5G 296M 7,2G 4% /media/<user>/3E18-AADE
Notice that there is a new device, /dev/mmcblk0, and this is the SD card.
If you use an SD card to USB adapter, your device may be listed as /dev/sdX, being X a character that depends on how many disks your system have. For the computer from the exemple, the device is /dev/sdc:
/dev/sdc1 7,5G 296M 7,2G 4% /media/<user>/3E18-AADE
Attention: Proceed carefully through the next steps. If you use the wrong device, you will erase the computer hard-disk and permanently lose data.
Note: The following steps assume the SD card is listed as /dev/mmcblk0. Please adjust the instructions accordingly.
Warning: Backup your SD card data. The SD card will be formatted and all data will be lost.
Start gparted from command-line using the SD card device as an argument:
sudo gparted /dev/mmcblk0
A window such as presented in the figure below will open. In the top-right corner of the window, only the SD card device must be listed:
Warning: If you do not pass the SD card as an argument to gparted, all your drives will be listed and, therefore, you are more prone to formatting your machine's HD.
From the Partition menu, select the Unmount option:
Delete all of the partitions from the SD card, by using the option Delete from the menu Partition:
From the Partition menu, select the New option. A new window will appear:
From the File system drop-down menu, select the fat32 option:
Also create a label for your partition, such as data. This is not mandatory, but when the system automatically mounts the SD card, it will use this label as the name of the directory where the device will be mounted.
Start the process by clicking the green check button Apply All operations, and acknowledge the warning message:
A window will display information during the process. Just wait until it finishes:
In the end, you must have a Gparted window such as the one below. You can then close Gparted.
Mount the SD card. Two easy ways of doing it are: - Either to click the SD card icon in the launcher to the left of the screen, or - Open the files manager and click the SD card partition label listed at the left side of the window.
Both options are illustrated in the figure below:
Notice that the default mount path for Ubuntu is:
Where user is the user you are logged in, and partition_label is the label chosen at step 10, or a random alphanumeric value if the label was left blank.
Download the pre-built Linux image. Find the latest Toradex pre-built image for your module here.
Note: Due to the limited amount of RAM available on Colibri VF50, the full LXDE demo image simply won't fit. Please use the console-tdx-image aka Colibri-VF_Console-Image instead.
Extract the compressed file contents with root privileges:
Note: You must execute as root to preserve the target root filesystem permissions.
sudo tar xjvf Colibri-VF_LXDE-Image_<bsp-version>-<date>.tar.bz2
To flash the SD card, enter the Linux image directory and run the update.sh script:
cd Colibri-VF_LXDE-Image_<bsp-version>./update.sh -o /media/<user>/<partition_label>/
Unmount the SD card and remove it from the development workstation:
Insert the micro SD card in the SD/MMC connector, as illustrated. Notice that for this step, the SD/USB adapter is not required:
Make sure that you have a working serial terminal application on your host PC.
Note: You can go back to the last section if there are any doubts regarding the serial terminal application and its configuration.
On your PC, select your terminal application to get the focus. Press the SPACE key and keep it pressed while turning on the Toradex system.
This procedure will stop the bootloader and you will see the following text in the terminal application:
Toradex Bootloader 1.1 BETA 2 for Colibri Built Apr 28 2015CPU: MVF61 500 MhzFlash: 512 MBRAM: 256 MBUsing ECC Type: 7Booting from fuses.Colibri VF61 module version 1.2APress [SPACE] to enter Bootloader MenuInitiating image launch in 1 seconds.BootLoader Configuration:C) Clear Flash RegistryX) Enter CommandPrompt ModeD) Download image to RAM nowF) Download image to FLASH nowL) Launch existing flash resident image nowEnter your selection:
Note: If you press the SPACE key too late, the system will start booting. Power-off and try again.
Press X to enter the CommandPrompt mode, then enter flashloader colibri_vf/u-boot-nand.imx to flash U-Boot:
...Enter your selection: x>flashloader colibri_vf/u-boot-nand.imxBootloader image size: 424728 bytes.Loading done.Flashing bootloader.Writing 208 sector(s) of bootloader code from sector 64.Erasing block 1................................................................Erasing block 2................................................................Erasing block 3................................................................Erasing block 4................Flashing completed.
Enter reboot or power-cycle the board, immediately pressing any key to prevent the system from booting.
Note: If you press any key too late, the system will start booting. Power-off and try again.
To finish updating the system, run the commands:
nand erase.part ubirun setupdaterun update
After a while, the system will boot with the updated Linux image and you will see the login message:
If you are new to Linux or the command-line interface and want to learn some basic commands, please read this article