Hardware:CST:Anleitungen:U-Boot Flash

Aus TuxBoxWIKI
Version vom 24. April 2014, 20:05 Uhr von PauleFoul (Diskussion | Beiträge) (Weitere Anleitung eingefügt)
Wechseln zu: Navigation, Suche


Review-KandidatDieser Artikel befindet sich derzeit im Reviewprozess. Hilf mit, ihn zu verbessern! Falls du bei weiteren Artikeln helfen willst, findest du hier eine Auswahl offener Artikel.

U-Boot Syntax

Oder wie mache ich mich dem U-Boot verständlich.

Hier gibt es eine komplette Dokumentation: U-Boot Command Line Interface (English)


Speicheradressen

Coolstream HD1
Device Größe (hex) Löschgröße (hex) Name Start - Endadresse (hex) absolute Größe
mtd0 0x80000 0x20000 "U-Boot" 0xF0000000 - 0xF007FFFF 512 KByte
mtd1 0x400000 0x20000 "kernel" 0xF0080000 - 0xF047FFFF 4096 KByte
mtd2 0x1b80000 0x20000 "systemFS" 0xF0480000 - 0xF1FFFFFF 28160 KByte
Coolstream Zee, Neo, Neo²
Device Größe (hex) Löschgröße (hex) Name Start - Endadresse (hex) absolute Größe
mtd0 0x60000 0x20000 "U-Boot" 0xF0000000 - 0xF005FFFF 384 KByte
mtd1 0x20000 0x20000 "Splash" 0xF0060000 - 0xF007FFFF 128 KByte
mtd2 0x400000 0x20000 "kernel" 0xF0080000 - 0xF047FFFF 4096 KByte
mtd3 0x1b80000 0x20000 "systemFS" 0xF0480000 - 0xF1FFFFFF 28160 KByte

Berechnen der Länge (count)

Dieser Wert wird im Folgenden dringend benötigt, daher hier mal ein Beispiel wie man den Wert berechnet.

Nach Eingabe von 'usb start' kann man mit 'fatload usb 0 0 kernel.img' das Image laden, als Antwort erhält man dann z.B. '4133333 bytes read'.

Der Name muss natürlich nicht zwingend kernel.img lauten, jeder andere Dateiname ist ebenso möglich. Wichtig ist ja nur das Ergebnis.

Die 4133333 bytes werden durch 4 geteilt und das Ergebnis aufgerundet:

4133333 / 4 = 1033333,25 => 1033334

1033334 in HEX wandeln = FC476 => 0xFC476

Dieser Wert wird dann beim 'copy' benötigt.


Wichtige Befehle richtig benutzt

USB Geräte einbinden:

usb start

Hiermit wird das USB Subsystem im U-Boot gestartet, ein Zugriff auf USB Geräte am USB Port ist dadurch erst möglich. Sofern der USB Stick z.B. vom U-Boot erkennt und unterstützt wird kann auf die Dateien auf diesem zugegriffen werden.

Image/Datei von USB in den Speicher laden

fatload usb 0 0 kernel.img

Dadurch kopiert man die Datei von USB in den RAM, als Antwort erhält man die Anzahl der gelesenen Bytes. Der Wert ist im weiteren Verlauf noch sehr wichtig!

den Flash löschen:

erase [start] [end]

Beispiel: erase 0xf0080000 0xf047ffff #um dem Flashbereich löschen in dem der Kernel liegt

Image kopieren:

cp [.b, .w, .l] source target count 

Beispiel: cp 0 0xf0080000 0xfc476 #kopiert von Adresse 0 an in die Adresse 0xf0080000 und das mit einer Länge von 0xfc476
Wobei 0xfc476 die Größe (count) des Images ist.


Alternative Anleitung

NEVER USE NOT OFICIAL SOFTWARE, OR YOU DO IT ON YOUR OWN RISK
 
Coolstream Emergency Tool for Neo
---------------------------------
  
To Upgrade your Coolstream receiver please copy kernel.img (kernel) and sysroot.img.img (filesystem) on USB STICK (must be FAT32 Formated).
Insert USB STICK in Coolstream USB Port(front), connect serial Cable between PC and Coolstream STB, and start the program on your Windows PC 
following the Instructions to update Kernel and/or Filesystem.       After  the tool recognise your Coolstream please wait few seconds bevore 
push the button for kernel or filesys update.

Note: If the Update doesnt succeed just change to another USB STICK, maybe this one you have is not supported by our bootloader! 
Or if you use some usb to serial Cable the communication in windows may  disturbed, so remove and insert it again.

Manual Update
-------------

You can flash over serial direct from bootloader, set your serial port to 115 200 baud and press enter after power up, you will get a prompt 
from the bootloader (dont forget to insert the usb stick with needed files):
Hdx>
there you have to use this command according to what you need to flash.

Kernel update:
-------------

HDx>usb start
HDx>fatload usb 0 0x0E000000 kernel.img
 
 
reading kernel.img
.........................................................................................................................................................................................................
 
2060560 bytes read
HDx>erase 0xF0080000 +0x00400000

................................
Erased 32 sectors
HDx>cp.b 0x0E000000 0xF0080000 0x00400000

Copy to Flash... ................................
done
HDx>re
to reset STB

Filesystem Update:
------------------
HDx> usb start                                                                  
(Re)start USB...                                                                
USB:   ehci_hcd_init();                                                         
CX2450x init hccr e8000100 and hcor e8000140 hc_length 64                       
Register 10011 NbrPorts 1                                                       
USB EHCI 1.00                                                                   
scanning bus for devices... 2 USB Device(s) found                               
scanning bus for storage devices... 1 Storage Device(s) found            
HDx> fatload usb 0 0x0E000000 sysroot.img                                                    
reading sysroot.img                                                                 
.                                                                               
................................................................................
..............................................................                  
                                                                                
19239496 bytes read   <-----here we must calculate and convert to HEX value, for example 23601412 / 4 =   5A0841                                                       
HDx> erase 0xF0480000 0xF1FFFFFF                                                
................................................................................
................................................................................
Erased 220 sectors                                                              
HDx> cp 0x0E000000 0xF0480000 0x5A0841                                                
Copy to Flash... ...............................................................
......................................................                          
done                                                                            
HDx> re