Flash without USB stick

baha2

Super VIP
Messages
6,530
Flash without USB stick by betacentauri

Flashen ohne USB-Stick

Code:
    Ich habe ein Tool geschrieben mit dem man die Box im laufenden Betrieb flashen kann. Entstanden ist es aufgrund der Tatsache, dass gutemine im OpenPli Forum ein ähnliches Tool veröffentlicht hat, aber keinen Source Code dazu. Da dort eigentlich schon alles beschrieben war, habe ich mich dann mal daran gesetzt...

    Kurz vorweg: Ich habe schon mehrfach problemlos mit dem Tool meine Box geflashed. Ich übernehme aber keine Garantie dafür, dass das auch bei euch läuft!!
    Deswegen sollte man unbedingt bevor man loslegt ein Backup auf einen USB-Stick ablegen. Laut OpenPli Forum, kann man angeblich mit den von mir verwendeten Tools seine Box nicht schrotten... ich habe es auch nicht geschafft ;-)

    Nach eine Warnung: Wenn das Root Filesystems geflasht wird, wird erst e2 gestoppt und danach startet die Box neu. D.h. führt das Programm nicht aus, wenn eine Aufnahme läuft!!

    Man benötigt neben dem angehängten Binary entweder ein passendes Backup oder ein neues Image für die Box.
       [LIST]
[*]Die Datei ofgwrite_v1.8.zip auf die Box kopieren und entpacken (unzip ofgwrite_v1.8.zip). Die Datei ofgwrite kann irgendwo hin entpackt werden. Beispielsweise nach /tmp oder nach /hdd. Ich gehe desweiteren davon aus, dass die Datei unter /hdd liegt.
[*]        Falls die Datei nicht ausführbar ist "chmod 755 ofgwrite" ausführen
[*]        Ins Backupverzeichnis wechseln bzw. das neue Image auf die Box kopieren, entpacken und in das Verzeichnis wechseln. Danach sollte man sich je nach Box im Verzeichnis et9x00, et6x00,... befinden
[*]        ofgwrite aufrufen: /hdd/ofgwrite Parameter siehe unten
[/LIST]



    Parameter:
    Usage: ofgwrite <parameter> <image_directory>
    Options:
    -k --kernel flash kernel (default)
    -r --rootfs flash root (default)
    -n --nowrite show only found image and mtd partitions (no write)
    -h --help show help

    Ohne Parameter wird nur diese Info angezeigt. Wenn man sehen will, was das Tool genau macht, ohne das aber wirklich etwas geändert wird, kann 
[code]ofgwrite -n -r -k <image_dir>
aufrufen. Keine Angst bei -n passiert wirklich nichts.
Zum Flashen ruft man es im Normalfall so auf: ofgwrite -r -k ./ (wenn man schon im richtigen Verzeichnis ist) ansonsten /hdd/ofgwrite -r -k /hdd/fullbackup/2013..../et9x00/

Man kann auch nur den Kernel flashen (nur -k). Dann sollte man aber darauf achten, dass der Kernel zu den installierten Kernelmodulen passt. Also ein Kernel aus einem 3.6.0 Backup einzuspielen, wenn auf der Maschine nur die aktuellen 3.8.7 Kernelmodule zu finden sind, ist keine gute Idee!

Falls ihr Probleme habt, postet mal bitte die Ausgaben!

Edit: Neue Version 1.8 angehangen. Diese Version zeigt nach der Beendigung von E2 auf dem Fernseher eine Fortschrittsanzeige an (siehe angehängtes Bild)

Der aktuelle Source Code ist hier zu finden: https://github.com/openatv/ofgwrite
[/CODE]

Google translate to english:

Code:
[B]Flash without USB stick[/B]

I wrote a tool which allows you to flash the box during operation. It was created due to the fact that has gutemine published a similar tool in the OpenPLi forum, but no source code to do this . Since there actually everything was already described , I then set myself even think ...

Short first: I have multiple problems with the tool flashed my box . But I take no guarantee that the runs with you !
Therefore, you should definitely take a backup before taking action on a USB stick . According OpenPLi forum , you can supposedly do not scrap with the tools I use his box ... I have not done ;-)

After a warning : If the root file system is flashed , is only stopped e2 and then the box reboots. I.e. not executing the program , if a recording is in progress !

One next to the appended binary requires either a suitable backup or create a new image for the box.

[LIST]
[*]Ofgwrite_v1.8.zip copy the file to the box and unpack ( unzip ofgwrite_v1.8.zip ) . The file can be unpacked ofgwrite go somewhere . For example, the / tmp or / hdd . I go further assume that the file is located in / hdd .
[*]    If the file is not executable " chmod 755 ofgwrite " Run
[*]    Change to the backup directory and copy the new image on the box , unpack it and change into the directory . After that you should be in the directory box , depending on ET9X00 , ET6X00 , ... are
[*]    ofgwrite call : / hdd / ofgwrite parameters see below
[/LIST]


parameter:
Usage: ofgwrite <parameter> <image_directory>
Options :
-k - kernel flash kernel (default)
-r - rootfs flash root ( default)
-n - show only nowrite found image and mtd partitions ( no write)
-h - help show help

Without parameters, only this info is displayed. If you want to see what makes the tool exactly, but really anything is changed without the , can
[code]ofgwrite -n -r -k <image_dir>
calling. Do not be afraid, for n nothing really happened.
To flash and run it normally like so: ofgwrite-r-k / (if you are already in the correct directory) otherwise / hdd / ofgwrite-r-k / hdd/fullbackup/2013..../et9x00 /.

You can also just flash the kernel (-k only). But then you should make sure that the kernel of the installed kernel modules fit. So einzuspielen a kernel from a 3.6.0 backup, if only the current 3.8.7 kernel modules are available on the machine is not a good idea!

If you have any problems, please spending time posting!

Edit: New version 1.8 is appended. This version shows after the completion of E2 on the television a progress bar (see attached image)

The current source code can be found here: https://github.com/openatv/ofgwrite[/CODE]

Thx to betacentauri
 
Top