It is possible to flash Linux to a Colibri T20/T30 or Apalis T30 using a computer running Windows.
This can be useful in a Production Environment where you already have Windows infrastructure.
- The root file system binary blob can only be generated on a computer running Linux.
The root file system is part of our Linux Image. These files are packed into one file by the mkyaffs2image tool once the Colibri Module Version is known.
The file containing the binary blob for a 512MB V1_2 module is named USR.yaffs2_512_V1_2.
You will need to generate this file under Linux with the update.sh script and copy it to Windows. The correct version and ram size must be used. You may generate files for different types / ram sizes.
- Flashing to SD card has not been tested and will probably not work.
- The root file system image needs to be created on a Linux computer, e.g. flash one Colibri from Linux as described in the BSP's release notes
- Make sure the files within the *bin folder are accessible from Windows
- Download and unzip the WinCE image V1.1 into a new directory (version 1.1 includes a nvflash utility compatible to the Linux boot loader):
http://developer.toradex.com/files/toradex-dev/uploads/media/Colibri/WinCE/Images/old/Tegra_Bootloader&Image_1.1_T20.zip
- Unzip the contained ZIP file 'Tegra_Bootloader_Image_1.1_T20.zip' using the password in the Password.txt file
- Install the APX driver from the folder usbpcdriver_32_64.
- Create a folder inside the 'Tegra_Bootloader&Image_1.1_T20' folder e.g 'T20_Linux'.
- Copy files from your Linux computer were you unpacked the image tarball and generated the root file system image.
copy the content of *bin/* into T20_Linux.
check that bin/u-boot.bin and bin/uImage have not been copied as (not working) symbolic links. i.e. their size should be the same as the versioned u-boot-colibri.... and uImage-3.1.10... files. If not delete them and make a copy of the versioned files.
- Replace the file T20_Linux\loader.nb0 with the file loader.nb0 in Tegra_Bootloader&Image_1.1_T20.
You should now have something like:
C:\Tegra_Bootloader_Image_1.1_T20
│ Password.txt
│ Tegra_Bootloader_Image_1.1_T20.zip
│ Toradex Toradex Windows CE and Windows Embedded Compact EULA V1.2.pdf
│
└───Tegra_Bootloader_Image_1.1_T20
│ nvflash.exe
│
├───T20_Linux
│ ColibriT20_333_256_hsmmc.bct
│ ColibriT20_333_256_V1_1_nand.bct
│ ColibriT20_333_256_V1_2_nand.bct
│ ColibriT20_333_512_hsmmc.bct
│ ColibriT20_333_512_V1_1_nand.bct
│ ColibriT20_333_512_V1_2_nand.bct
│ configblock_256.bin
│ configblock_512.bin
│ fastboot.bin
│ genext2fs
│ genext3fs.sh
│ i2c-dev-user.h
│ lnx_hsmmc.cfg
│ lnx_nand.cfg
│ loader.nb0
│ mkbootimg
│ u-boot-colibri-t20-r3+gitr16a9368a88a28252ea1daedc1df03ccc49ea5b22-r3.bin
│ u-boot-hsmmc-colibri-t20-r3+gitr16a9368a88a28252ea1daedc1df03ccc49ea5b22-r3.bin
│ u-boot-hsmmc.bin
│ u-boot.bin
│ uImage
│ uImage-3.1.10+gitr01451bf9a6ac778b401173b341adb1e32688e73f-V2.0a2-colibri-t20-20121018205757.bin
│ update.bat
│ USR.yaffs2_256_V1_1
│ USR.yaffs2_512_V1_2
│
├───Tegra_Bootloader&Image_1.2beta1_T20
│ Colibri240x240.bmz
│ ColibriT20_333_nand.bct
│ eboot.nb0
│ loader.nb0
│ nk_ce6.nb0
│ nk_ce7.nb0
│ readme.txt
│ Splashscreen.bmz
│ update.bat
│ Update.exe
│ wince_nand.cfg
│
└───usbpcdriver_32_64
│ NvidiaUsb.inf
│
├───amd64
│ WdfCoInstaller01007.dll
│ WinUSBCoInstaller.dll
│ WUDFUpdate_01007.dll
│
└───i386
WdfCoInstaller01007.dll
WinUSBCoInstaller.dll
WUDFUpdate_01007.dll
Start a cmd window and navigate into the T20_Linux folder.
Bring the module into recovery mode and execute update.bat with the parameters module type and ram size.
After the flashing the Colibri goes through reset and, if you do not keep it in recovery mode the module will boot Linux.
C:\Tegra_Bootloader&Image_1.1_T20\Tegra_Bootloader_Image_1.1_T20\T20_Linux>update.bat V1_2 512
Toradex NVFlash Update Script
***********************************
1 file(s) copied.
Nvflash version 2.0 started
rcm version 0X20001
System Information:
chip name: t20
chip id: 0x20 major: 1 minor: 3
chip sku: 0x8
chip uid: 0x0428104041616557
macrovision: disabled
hdcp: enabled
sbk burned: false
dk burned: false
boot device: nand
operating mode: 3
device config strap: 0
device config fuse: 4128
sdram config strap: 0
sending file: ColibriT20_333_512_V1_2_nand.bct
- 4080/4080 bytes sent
ColibriT20_333_512_V1_2_nand.bct sent successfully
downloading bootloader -- load address: 0x8300000 entry point: 0x8300000
sending file: loader.nb0
| 454736/454736 bytes sent
loader.nb0 sent successfully
waiting for bootloader to initialize
bootloader downloaded successfully
setting device: 1 0
creating partition: BCT
creating partition: PT
creating partition: EBT
creating partition: BMP
creating partition: ENV
creating partition: LNX
creating partition: ARG
creating partition: USR
Formatting partition 2 BCT please wait.. done!
Formatting partition 3 PT please wait.. done!
Formatting partition 4 EBT please wait.. done!
Formatting partition 5 BMP please wait.. done!
Formatting partition 6 ENV please wait.. done!
Formatting partition 7 LNX please wait.. done!
Formatting partition 8 ARG please wait.. done!
Formatting partition 13 USR please wait.. done!
done!
sending file: u-boot.bin
- 559216/559216 bytes sent
u-boot.bin sent successfully
sending file: uImage
/ 4405068/4405068 bytes sent
uImage sent successfully
sending file: USR.yaffs2
- 260603904/260603904 bytes sent
USR.yaffs2 sent successfully
.
Alternatively don't pass parameters and interactively enter module type and ram size.
C:\Tegra_Bootloader&Image_1.1_T20\Tegra_Bootloader_Image_1.1_T20\T20_Linux>update.bat
Toradex NVFlash Update Script
***********************************
Do you like to program:
1) Moduletype V1.1
2) Moduletype V1.2
3) use SD Card (for V1.1 or V1.2)
Please choose a number:
2
Modules RAM size is:
1) 256MB
2) 512MB
Please choose a number:
1
- For T30 based devices, a SD-card prepared using the scripts available for Linux need to be created first (see release notes of the respective module). Only newer U-Boot versions along with the SD-card flash process is supported with the Windows flashing process. Images starting from V2.3Beta3 use the SD-card based flashing mechanism.
- Download the image and create a SD-card using the update.sh script (see release notes of the respective image). The SD-card will contain all the data required for flashing, the boot loader, the kernel and the root file system image.
- Download and unzip the WinCE image V1.2 into a new directory (Windows CE Images)
- Unzip the contained ZIP file 'Tegra_WinCE_Image_1.2.zip' using the password in the Password.txt file
- Install the APX driver from the folder usbpcdriver_32_64.
- Download the Linux image (Images) and unzip the file "u-boot-dtb-tegra-...." located under apalis-t30_bin/ or colibri-t30_bin/ (Note: it needs to be the file with the long filename, since this is the actual file. The other files are symlinks, which are not extracted correctly on Windows)
- Rename the file to uboot.bin and move it into the unzipped folder "Tegra_Bootloader&Image_1.2"
- Insert the prepared SD-card into the target device
- Open a Windows Command Line (cmd) and switch to the unzipped folder, "Tegra_Bootloader&Image_1.2"
- Connect a serial console to UART_A (Colibri T30)/UART1 (Apalis T30)
- Use nvflash.exe to download U-Boot:
...\Tegra_Bootloader&Image_1.2>nvflash.exe --bct ColibriT30_533_mmc.bct --setbct --bl uboot.bin --go
Nvflash version 2.0 started
rcm version 0X30001
System Information:
chip name: unknown
chip id: 0x30 major: 1 minor: 3
chip sku: 0xb1
chip uid: 0x015d4bdee7440c18
macrovision: disabled
hdcp: enabled
sbk burned: false
dk burned: false
boot device: emmc
operating mode: 3
device config strap: 0
device config fuse: 0
sdram config strap: 0
sending file: ColibriT30_533_mmc.bct
- 6128/6128 bytes sent
ColibriT30_533_mmc.bct sent successfully
downloading bootloader -- load address: 0x80108000 entry point:
0x80108000
sending file: uboot.bin
| 410159/410159 bytes sent
uboot.bin sent successfully
waiting for bootloader to initialize
bootloader failed NvError 0x0
command failure: bootloader download failed
- Although nvflash.exe shows an error message at the end, U-Boot starts successfully on the target.
U-Boot SPL 2014.10 (Nov 14 2014 - 19:05:20)
U-Boot 2014.10 (Nov 14 2014 - 19:05:20)
TEGRA30
Board: Toradex Apalis T30
I2C: ready
DRAM: 2 GiB
MMC: Tegra SD/MMC: 0, Tegra SD/MMC: 1, Tegra SD/MMC: 2
*** Warning - bad CRC, using default environment
tegra-pcie: PCI regions:
tegra-pcie: I/O: 0x2000000-0x2010000
tegra-pcie: non-prefetchable memory: 0x20000000-0x30000000
tegra-pcie: prefetchable memory: 0x30000000-0x40000000
tegra-pcie: 4x1, 1x2 configuration
tegra-pcie: probing port 2, using 1 lanes
In: serial
Out: serial
Err: serial
Net: e1000: no NVM
e1000#0
Hit any key to stop autoboot: 0
Apalis T30 #
- Use the appropriate update commands in the U-Boot propmpt to start the flashing process on the target (refer to the release notes, usually run setupdate; run update should be sufficient).
Apalis T30 # run setupdate
MMC: no card present
** Bad device mmc 1 **
reading flash_mmc.img
3514 bytes read in 14 ms (245.1 KiB/s)
## Executing script at 81000000
enter "run update" to update the entire module
Apalis T30 # run update
switch to partitions #1, OK
mmc0(part 1) is current device
MMC read: dev # 0, block # 8191, count 1 ... 1 blocks read: OK
reading apalis_t30.img
427008 bytes read in 35 ms (11.6 MiB/s)
switch to partitions #1, OK
mmc0(part 1) is current device
MMC write: dev # 0, block # 0, count 834 ... 834 blocks written: OK
reading mbr.bin
512 bytes read in 10 ms (49.8 KiB/s)
switch to partitions #0, OK
mmc0(part 0) is current device
MMC write: dev # 0, block # 0, count 1 ... 1 blocks written: OK
reading boot.vfat
16777216 bytes read in 775 ms (20.6 MiB/s)
switch to partitions #0, OK
mmc0(part 0) is current device
MMC write: dev # 0, block # 8192, count 32768 ... 32768 blocks written: OK
reading root.ext3
Note: Instead of using the SD-card it is also possible to download the data over Ethernet by using TFTP (there was a Bug in the flash_eth.img scripts in the V2.3Beta3 release, use the update scripts from this Git repository)