Search by Tags

Flashing Windows CE 6 / Windows Embedded Compact 7 from Linux

 
Applicable for

Tags

Compare with Revision

Subscribe for this article updates

Colibri T20

First we need the Linux version of NVIDIA's NvFlash tool which comes with our Colibri T20 Linux image package. So download and extract that one as follows:

user@host:~$ wget -c http://developer.toradex.com/files/toradex-dev/uploads/media/Colibri/Linux/Images/Colibri_T20_LinuxImageV2.0_20130305.tar.bz2
user@host:~$ tar xjvf Colibri_T20_LinuxImageV2.0_20130305.tar.bz2

The following extraction error in the root file system part can be ignored as we won't be using any of this now:

tar: Exiting with failure status due to previous errors

Now get your favourite T20 WinCE/WEC package you would like to flash from here: http://developer.toradex.com/frequent-downloads#Colibri_T20

Unfortunately it won't work right now with anything more recent than V1.2 beta 1. As an example the following description proceeds with V1.1. Extract it and cd into it as follows:

user@host:~$ wget -c http://developer.toradex.com/files/toradex-dev/uploads/media/Colibri/WinCE/Images/Tegra_Bootloader\&Image_1.1_T20.zip
user@host:~$ unzip -P I_accept_Toradex_EULA Tegra_Bootloader\&Image_1.1_T20.zip 
user@host:~$ unzip Tegra_Bootloader_Image_1.1_T20.zip
user@host:~$ cd Tegra_Bootloader\&Image_1.1_T20/

As Linux is case sensitive we do have to create a symbolic link to the Eboot bootloader as follows:

user@host:~/Tegra_Bootloader&Image_1.1_T20$ ln -s eboot.nb0 EBOOT.NB0

Now it is time to select the desired embedded windows variant.

WinCE 6:

user@host:~/Tegra_Bootloader&Image_1.1_T20$ ln -fs nk_ce6.nb0 NK.NB0

Or the later WEC 7:

user@host:~/Tegra_Bootloader&Image_1.1_T20$ ln -fs nk_ce7.nb0 NK.NB0

Make sure your module is indeed in recovery mode:

user@host:~/Tegra_Bootloader&Image_1.1_T20$ lsusb | grep -i nvidia
Bus 002 Device 013: ID 0955:7820 NVidia Corp. 

And proceed with the actual flashing (Please note that depending on your module type/version you will have to select the proper BCT):

user@host:~/Tegra_Bootloader&Image_1.1_T20$ sudo LD_LIBRARY_PATH="$(pwd)/../T20_LinuxImageV2.0/nvflash" ../T20_LinuxImageV2.0/nvflash/nvflash --bct ../T20_LinuxImageV2.0/ColibriT20_333_512_V1_2_nand.bct --setbct --configfile wince_nand.cfg --odmdata 0x1 --create --bl ../T20_LinuxImageV2.0/bin/loader.nb0 --go
Nvflash version 19.0041 started
rcm version 0X20001
System Information:
   chip name: t20
   chip id: 0x20 major: 1 minor: 4
   chip sku: 0x8
   chip uid: 0x042890c0443fa557
   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: ../T20_LinuxImageV2.0/ColibriT20_333_512_V1_2_nand.bct
- 4080/4080 bytes sent
../T20_LinuxImageV2.0/ColibriT20_333_512_V1_2_nand.bct sent successfully
odm data: 0x1
downloading bootloader -- load address: 0x8300000 entry point: 0x8300000
sending file: ../T20_LinuxImageV2.0/bin/loader.nb0
\ 360208/360208 bytes sent
../T20_LinuxImageV2.0/bin/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: CE6
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 7 CE6 please wait.. done!
Formatting partition 8 ARG please wait.. done!
Formatting partition 13 USR please wait.. done!
done!
sending file: EBOOT.NB0
- 526760/526760 bytes sent
EBOOT.NB0 sent successfully
sending file: Splashscreen.bmz
- 4426/4426 bytes sent
Splashscreen.bmz sent successfully
sending file: NK.NB0
/ 24330020/24330020 bytes sent
NK.NB0 sent successfully

The following will be shown on the serial console during flashing (Note: Eboot, WinCE/WEC now uses 115200 baud as well):

Toradex Flash Loader 1.0 for Tegra Built Nov 20 2012 18:33:52
GetOnfiFeature(1)=0
SetOnfiFeature(1)=3
GetOnfiFeature(1)=3
Nand Boot Device
PageSize=4 K, BlockSize=256 K
VendorId=0000002C, DeviceId=000000A3
512MB RAM

PartitionTableInit Failed for CE6 (e=4)

Initiating 3P server.

PartId 2: LB[0 12] PB[0 16] IL1  LS[0 768]                                      
PartId 3: LB[12 1] PB[16 5] IL1  LS[768 64]                                     
PartId 4: LB[13 16] PB[21 20] IL1  LS[832 1024]                                 
PartId 5: LB[29 1] PB[41 5] IL1  LS[1856 64]                                    
PartId 7: LB[30 400] PB[46 416] IL1  LS[1920 25600]                             
PartId 8: LB[430 1] PB[462 6] IL1  LS[27520 64]                                 
Partition 13 - number of physical blocks = 3624                                 
PartId 13: LB[431 5] PB[468 4294967295] IL1  LS[27584 231936]                   
Save Region Table copy 0 at CurrBlockNum 4095                                   
Save Region Table copy 1 at CurrBlockNum 4094                                   
Save Region Table copy 2 at CurrBlockNum 4093                                   
Save Region Table copy 3 at CurrBlockNum 4092                                   
Erase Partition part-id=3: Start=16,End=20                                      
Format partition BCT                                                            
Erase Partition part-id=2: Start=0,End=15                                       
Format partition EBT                                                            
Erase Partition part-id=4: Start=21,End=40                                      
Format partition BMP                                                            
Erase Partition part-id=5: Start=41,End=45                                      
Format partition CE6                                                            
Erase Partition part-id=7: Start=46,End=461                                     
Format partition ARG FtlLitePrivCreatePba2LbaMapping                            
NvDdkNandUtilEraseAndTestBlock()                                                
                                                                                
Erase Partition part-id=8: Start=462,End=467                                    
Format partition USR                                                            
Erase Partition part-id=13: Start=468,End=4091                                  
Start Downloading BMP                                                           
                                                                                
End Downloading BMP                                                             
                                                                                
Start Downloading CE6                                                           
                                                                                
End Downloading CE6                                                             
                                                                                
Nand Block dev ioctl opcode=NvDdkBlockDevIoctlType_MapLogicalToPhysicalSector (7
) error 0x14001C Writing back config block                                      
                                                                                
Done                                                                            
Toradex Bootloader 1.1 for Colibri Built Jul 12 2013                            
                                                                                
Press [SPACE] to enter Bootloader Menu                                          
                                                                                
Unknown Product ID Version not set.  SerialNo not set.                          
RAM: 512 MB, CarveOut: 64 MB                                                    
Locating kernel image in flash...Done(1236)                                     
Decompressing IMAGE(24329997, 48091776) from FLASH(00000000) to RAM(00016000)...
Done(536ms)                                                                     
Jumping to image at 0x00016000...                                               

Congratulations, you should now be running WinCE/WEC on your module.

Apalis/Colibri T30

First we need the Linux version of NVIDIA's NvFlash tool which comes with our Apalis/Colibri T30 Linux image packages. So download and extract one as follows:

user@host:~$ wget -c http://developer.toradex.com/files/toradex-dev/uploads/media/Colibri/Linux/Images/Colibri_T30_LinuxImageV2.1Beta1_20131022.tar.bz2
user@host:~$ tar xjvf Colibri_T30_LinuxImageV2.1Beta1_20131022.tar.bz2 

The following extraction error in the root file system part can be ignored as we won't be using any of this now:

tar: Exiting with failure status due to previous errors

Now get your favourite T30 WinCE/WEC package you would like to flash from here: http://developer.toradex.com/frequent-downloads#Colibri_and_Apalis_T30

As an example the following description proceeds with V1.1. Extract it and cd into it as follows:

user@host:~$ wget -c http://developer.toradex.com/files/toradex-dev/uploads/media/Colibri/WinCE/Images/Tegra_Bootloader\&Image_1.1_T30.zip
user@host:~$ unzip -o -P I_accept_Toradex_EULA Tegra_Bootloader\&Image_1.1_T30.zip 
user@host:~$ unzip Tegra_Bootloader_Image_1.1_T30.zip 
user@host:~$ cd Tegra_Bootloader\&Image_1.1_T30/

As Linux is case sensitive we do have to create a symbolic link to the Eboot bootloader as follows:

user@host:~/Tegra_Bootloader&Image_1.1_T30$ ln -s eboot.nb0 EBOOT.NB0

Now it is time to select the desired embedded windows variant.

WinCE 6:

user@host:~/Tegra_Bootloader&Image_1.1_T30$ ln -fs nk_ce6.nb0 NK.NB0

Or the later WEC 7:

user@host:~/Tegra_Bootloader&Image_1.1_T30$ ln -fs nk_ce7.nb0 NK.NB0

Make sure your module is indeed in recovery mode:

user@host:~/Tegra_Bootloader&Image_1.1_T30$ lsusb | grep -i nvidia
Bus 002 Device 033: ID 0955:7130 NVidia Corp. 

And proceed with the actual flashing:

user@host:~/Tegra_Bootloader&Image_1.1_T30$ sudo ../Colibri_T30_LinuxImageV2.1/t30_nvflash/nvflash --bct ColibriT30_533_mmc.bct --setbct --configfile wince_mmc.cfg --odmdata 0x40080105 --create --bl ../Colibri_T30_LinuxImageV2.1/colibri-t30_bin/bootloader.bin --go
Nvflash v1.1.54599 started
rcm version 0X30001
System Information:
   chip name: unknown
   chip id: 0x30 major: 1 minor: 3
   chip sku: 0x81
   chip uid: 0x0164d45483282409
   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
odm data: 0x40080105
downloading bootloader -- load address: 0x80108000 entry point: 0x80108000
sending file: ../Colibri_T30_LinuxImageV2.1/colibri-t30_bin/bootloader.bin
- 841200/841200 bytes sent
../Colibri_T30_LinuxImageV2.1/colibri-t30_bin/bootloader.bin sent successfully
waiting for bootloader to initialize
bootloader downloaded successfully
setting device: 2 3
creating partition: BCT
creating partition: PT
creating partition: EBT
creating partition: BMP
creating partition: CE6
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 7 CE6 please wait.. done!
Formatting partition 8 ARG please wait.. done!
Formatting partition 13 USR please wait.. done!
done!
sending file: EBOOT.NB0
/ 518568/518568 bytes sent
EBOOT.NB0 sent successfully
sending file: Splashscreen.bmz
- 4426/4426 bytes sent
Splashscreen.bmz sent successfully
sending file: NK.NB0
/ 24326932/24326932 bytes sent
NK.NB0 sent successfully

After power-cycling the following will be shown on the serial console (Note: Eboot, WinCE/WEC now uses 115200 baud as well):

Toradex Bootloader 1.1 for Colibri Built Jul 12 2013

Press [SPACE] to enter Bootloader Menu

Colibri T30 1GB V1.1B  SerialNo: 2464306
RAM: 512 MB, CarveOut: 64 MB
Locating kernel image in flash...Done(1314)
Decompressing IMAGE(24326911, 48083596) from FLASH(00000000) to RAM(80020000)...
Done(718ms)
Jumping to image at 0x80020000...

Congratulations, you should now be running WinCE/WEC on your module.