Jump to content


Photo

unpack image of dm8000 on linux

ubi dm8000 unpack

  • Please log in to reply
22 replies to this topic

#1 crashman

  • Senior Member
  • 76 posts

0
Neutral

Posted 17 May 2013 - 15:48

Hi,

 

I usually look into an image with modprobe mdtram and ubi or with nandsim and ubi on my linux PC before I load it up my DM.

 

nfidump can't extract the ubi root filesystem. maybe there are alternatives?

 

the boot partition is still jffs2 as I see. (because SSL can't read ubifs probably)

 

thanks.



Re: unpack image of dm8000 on linux #2 crashman

  • Senior Member
  • 76 posts

0
Neutral

Posted 17 May 2013 - 15:50

I meant that I usually look into the jffs2 root filesystem using modprobe jffs2 and using nfidump. Now it is the first time I want to look into ubi root fs.



Re: unpack image of dm8000 on linux #3 Lost in Space

  • Senior Member
  • 876 posts

+69
Good

Posted 18 May 2013 - 08:54

Then use a current nfidump version which can unpack ubifs images nicely.

 

But it uses the block2mtd driver which is much simplier and already inlcuded in the Dreambox kernel so that it works out of the box without any other modules or binaries.

 

AND it can unpack *root*.bin images from other boxes too.

 

BUT this will not work on a PC unless you build block2mtd with all necessary patches.

 

BUT then you still have the problem that i don't do any PC versions of nfidump anymore.

 

BUT you still can use nfidump to extract the root.img and then you can start reading my How-To on how to unpack this on a PC with nandsim module but it is more or less the same that you do now.


Edited by gutemine, 18 May 2013 - 08:57.


Re: unpack image of dm8000 on linux #4 crashman

  • Senior Member
  • 76 posts

0
Neutral

Posted 20 May 2013 - 16:11

can you refresh me where I can find latest nfidump? openpli plugin? or somewhere on the net?



Re: unpack image of dm8000 on linux #5 Lost in Space

  • Senior Member
  • 876 posts

+69
Good

Posted 20 May 2013 - 16:18

You can find the latest kit at OoZooN's board, BUT it will only run on the Dreambox, the intel binaries there alre already quite old.

 

with nfdiump --i imagename.nfi imagedir you can get thew root.img and from then on it is very similar to extract ubifs as on the non-Dreamboxes.



Re: unpack image of dm8000 on linux #6 crashman

  • Senior Member
  • 76 posts

0
Neutral

Posted 21 May 2013 - 08:40

Your howto page, is it somewhere on oozoon?

can't find it via google.



Re: unpack image of dm8000 on linux #7 Lost in Space

  • Senior Member
  • 876 posts

+69
Good

Posted 21 May 2013 - 23:32

No, it is a thread in iHAD but it is in German, here is the relevant passage on how to extract on the PC:

Also fangen wir mal an mit dem How-To, das im Wesentlichen auf diesen 2 Quellen basiert wenn wer zusätzliche Lesestoff braucht:

http://www.chinadigi.../post21948.html

Diese Beschreibung gibts aber an einer Vielzahl anderen Stellen auch da Android Handies oft ubifs verwenden und es daher recht interessant ist wie man die aus und wieder einpackt - wobei wir für unser Problem nur den Auspackteil der Anleitung benötigen.

http://www.linux-mtd...rg/faq/ubi.html

Da findet man auch eine Menge mehr infos über ubifs und seine Vor- und Nachteile.

Zuerst braucht man mal einen Linux PC mit halbwegs aktueller Distribution, ich habe es mit Fedora 15 gemacht, aktuelles Ubuntu oder Debian sollten es aber genauso tun.

Der Grund ist relativ simpel - für ubifs gibt es derzeit kein Extract Programm um die files direkt zu extrahieren, man kann es nur mit dem mtdblock dummy Treiber mounten um die Files rauszuholen.

Wobei das kovertieren auf dem PC in unserem Fall auch mehr als ausreicht.

Und ja wenn Ihr Inputs habt (z.B. wie die jeweiligen Treiberpakete in Eurer Distribution heissen) nur her damit.

Zuerst holt man sich aber mal ein entsprechendes ubifs Image - diese werden meistens als *_usb.zip angeboten.

Das ZIP packt man einfach mit unzip aus und kriegt dann im Image subdirectory folgende files:

unzip *usb.zip.

Jetzt ab ins Imagedirectory mit den files:

cd et*
ls

imageversion
kernel.bin
noforce
rootfs.bin

Eigentlich brauchen wir nur das rootfs.bin weil den kernel braucht man ja nur zum booten auf der jeweiligen box.

 

Und /boot mit den Bootlogo links ist bei diesen Images auch im rootfs.bin dabei.

Dann geht es ans eigentliche auspacken und konvertieren des ubifs. Ab hier sollten wir als root user arbeiten, also ggf. noch su eingeben und das rootpassword eingeben.

mkdir ubi (oder der jeweilige imagename wenn ihr den wollt)

Dann laden wir die benötigten Treiber auf unserem Linux PC:

modprobe mtdblock
modprobe ubi
modprobe nandsim first_id_byte=0x20 second_id_byte=0xaa third_id_byte=0x00 fourth_id_byte=0x15

Falls einer der Treiber nicht vorhanden ist benutzt die Paketsuche in eurer Linux distribution um das gesuchte Paket nachzuladen.

Dann checked man ob die Treiber die entsprechenden Devices angelegt haben:

cat /proc/mtd
dev: size erasesize name
mtd0: 10000000 00020000 "NAND simulator partition 0"

ls /dev/mtd*
/dev/mtd0 /dev/mtd0ro /dev/mtdblock0

Dann kopiert man einfach mit dd das ubifs image auf das Blockdevice

dd if=rootfs.bin of=/dev/mtdblock0 bs=2048
24384+0 Datensätze ein
24384+0 Datensätze aus
49938432 Bytes (50 MB) kopiert, 2,8963 s, 17,2 MB/s

Dann kommt der eigentliche spannende Moment dieses nun befüllte simulierte Blockdevice als ubifs bekannt zu machen:

ubiattach /dev/ubi_ctrl -m 0 -O 2048

Das gibt folgendes Ergebnis:

UBI device number 0, total 2048 LEBs (260046848 bytes, 248.0 MiB), available 0 LEBs (0 bytes), LEB size 126976 bytes (124.0 KiB)

Wenn das also geklappt hat kontrolliert man ob das entsprechende device angelegt wurde:

ls /dev/ubi*
/dev/ubi0 /dev/ubi0_0 /dev/ubi_ctrl

Wobei es auf das Mittlere device ubi0_0 ankommt, alles andere gibt es schon vor dem ubiattach.

Jetzt kann man dieses device bereits mounten:

mount -t ubifs ubi0_0 ./ubi (oder imagename, je nachdem was man oben angelegt hat)

Dort sollte sich einem dann bereits das gemountete rootfilesystem des ubifs zeigen:

ls ubi (oder imagename)

autofs bin boot dev etc hdd home lib media mnt proc sbin share sys tmp usr var

 

Das kann man jetzt als tar sichern, wegkopieren,...


Edited by gutemine, 21 May 2013 - 23:35.


Re: unpack image of dm8000 on linux #8 javier3034

  • Senior Member
  • 54 posts

+1
Neutral

Posted 24 May 2013 - 01:59

Hello dear gutemine,

 

I need only change a bootlogo image in a UBIFS image,

 

I have three files: "usb_auto_update_mb62.txt", "mboot.bin (705 Kb)" and "mb62_en.bin (25.729 Kb)", this is for a TV. and only need change de bootlogo image.

 

I need for this uncompres the .bin files like your explain for only change de image.tif for a diferent image at start the TV? or have another process more easy?

 

In case I need unpack this .bin file, when I repack the files in .bin for install in the TV, the file .bin are the same of first .bin whit the old imge logo, and the same Kb?

 

I have a big problem for only change this logo and is very urgent 

 

Thanks for your help.

 

Regards


Edited by javier3034, 24 May 2013 - 02:02.


Re: unpack image of dm8000 on linux #9 Lost in Space

  • Senior Member
  • 876 posts

+69
Good

Posted 24 May 2013 - 13:32

You can easily change the logos on the box itself, and for this there are plynty of How-Tos available - so there is no urgency ...


Edited by gutemine, 24 May 2013 - 13:32.


Re: unpack image of dm8000 on linux #10 dirocca

  • Senior Member
  • 1,667 posts

+59
Good

Posted 24 May 2013 - 14:07

@ javier3034

 

Attached File  Logo Generator.rar   3.77MB   51 downloads

 

grtz Philip

 

 


vuduo2 openpli6.1 1TB HDD 2xdualS2tuner

av receiver denon - samsung 4k hdr+ 65inch UE65MU7000 - bose accoustimas 7.1 :rolleyes:

tvv kaart & schotel(64cm), duo lnb, OSCAM

logitech harmony ultimate

 

 

 


Re: unpack image of dm8000 on linux #11 javier3034

  • Senior Member
  • 54 posts

+1
Neutral

Posted 24 May 2013 - 18:34

Thanks gutemine and dirocca.

 

In this TVs whit UBIFS image, don't have connector rj45 and don't have wiffi, 

 

Only have a usb for install the firm.

 

Put this three files as I say in my post in a usb-pen, whith the TV disconnectet off the fire electric, connect de usb-pen in a usb of TV and at the same time, connect the electrical fire and pres the OK button of a rc commandament, 

 

In the screen dont have nothing, only the red led of power is intermitent, when finnish the install a firm, automatic reboot and apers the first screen, of languaje, search channels,...

 

In the menus don't have a option for nothing, only the normals options like image, channels, audio,... the options of a normal TVs.

 

I say this is urgent, because is not for my, is for a five TVs for a client of my work, and don't have nothing more information of this TVs, only this three files I say, one in txt and 2 in .bin.

 

I open the "mboot.bin" whit a hex editor and I loock that the firm is a Ubi or ubifs. 

 

I contribute for more time in openpli and another forums, for enigma1 and 2, and I have a dreambox 800-hd and a VU+ duo,

 

But this problem whit change this logo in this TVs is for my work and for one client of the enterprise I work.

 

I know if your remember my, but I are the first spanish people in registri in the I-have forum when I have mi first dream-7000, and I'am moderatot of a spannish forums like archivos.tv, tododream, for more ages a go, but the last 1 year I don`t post nothing in the forums, because I'm so exhausted and years pass and unforgiving.

 

Because of my job I had to hard study android and now I'm doing a course for mobile application development.

 

In Spain the work is very bad, the politicians are very "chorizos", sorry for saying this, but it's true.

 

And now I have this problem with these TVs and my boss ask my resolve, for not keep the customer.

 
sorry for this post so long.
 
I read your link to your post and I have to install fedora and other things, but I can only have for work this files .bin and go installing with the usb-pen until I get to change the logo on boot, no way to connect the Tv with the PC to see anything. uffffff, lasting is this life, and I have 52 years and I feel very fatigued.
 
If you think that there is any solution, I would greatly appreciate your help
 
It's amazing the time you've been with all this, you have much strength Gutemine
 
And thanks dirocca, but is imposible connect de PC and TV.
 
Regards my friends


Re: unpack image of dm8000 on linux #12 Lost in Space

  • Senior Member
  • 876 posts

+69
Good

Posted 24 May 2013 - 18:48

If you 'have' to do this for a customer tell your boss that he should buy you a network cable. With a crossover cable for 2 EUR you don't even need a router as you can set fixed IPs on the box and on the Notebook.



Re: unpack image of dm8000 on linux #13 javier3034

  • Senior Member
  • 54 posts

+1
Neutral

Posted 25 May 2013 - 02:16

Dear gutemine, my inglish is very bad,

 

The Tv don't have a input connector rj45 for connect a ethernet crossover or parallel cable rj45. If I have this imput conector in the Tv, I read in the link of your post (http://www.linux-mtd...rg/faq/ubi.html) what connect TV an PC. But this TVs don't have imput conections for ethernet cable and nothing rs232. Only have one imput connector USB.

 

This TVs is very very simple, and in the mother board I don't view for connect a rs232, for example, for ttl conection or another protocol por conect the TV and PC.

 

My friend, If a TV or another box have a imput for ethernet cable or a imput for rs232 I know connect a box or TV with PC direct or with router,

 

The problem is this TVs don't have nothing of this conectors, only one input conector for USB, nothing more conectors.

 

For uncompres this files ,bin, the only metod is install fedora and all say in the web your say?

 

For install in this Tvs a firm, need copy the three files I say in my first post in to a USB-pen, connect the usb-pen in the USB of TV and install the firm in to the usb-pen in a flash the Tv.

 

The first file read the TV before install the the 2 flles .bin is de file in .txt, The txt have "setenv" orders, like a terminal.

 

Plis read this, is the first file that TV read before install the firm  (the 2 ,bin files):

 

# <- this is for comment / total file size must be less than 4KB

 
#set partition
dynpart edb64M-nand:0x320000(KL),0xB20000(CONF),0x1600000(UBIA),0x1900000(UBIB),-(NA)
saveenv
 
#mboot
fatload usb 0:1 80400000 mboot.bin
spi_wrc 0x80400000 0x00000000 0x00DFFFF
 
#mb62.bin
fatload usb 0:1 80400000 mb62_en.bin
aes_test 0x80400000 0x82000000 0x01920010
 
## Must erase NAND before making factory.bin
nand bad
nand scrub
nand bad
 
## Add fake bad block BEFORE making factory.bin ONLY!!!
## 0x10 = 16; 16x512x32=0.25M
## "rsv" command is available since mboot V105
#rsv bad KL A
#rsv bad CONF 10
#rsv bad UBIA 10
 
#kernel
#nand erase KL
nand write.e 0x82000010 KL 0x320000
 
#nand erase UBIA
ubi part UBIA
ubi create RFS 0x600000
ubi create VEN 0xE00000
 
#ROOTFS
ubi write 0x82320010 RFS 0x600000
 
#VENDOR
ubi write 0x82920010 VEN 0xE00000
 
#CLEAN CRC32
mw 0x81000000 0xFFFFFFFF 0x04
spi_wrc 0x81000000 0xF1000 0x04
 
#CRC32 Create
#ubifsmount VEN
#ubifsload 0x82000000 /vendor/aurora.elf
#crc32 0x82000000 0x000000 0x81F00000
#md 0x81F00000
#spi_wrc 0x81F00000 0xF1000 0x04
 
#conf, please mark below 4 line if you want to keep conf
#nand erase CONF
ubi part CONF
ubi create CON 0xA00000
ubi write 0x83720010 CON 0x200000
 
#bootargs
setenv MS_UBI ubi.mtd=1 ubi.mtd=2,512 root=ubi1:RFS rootfstype=ubifs rw
setenv MS_MEM LX_MEM=0x3400000 EMAC_MEM=0 DRAM_LEN=0x8000000
setenv bootargs console=ttyS0,115200 $(MS_UBI) $(MS_MEM) $(mtdparts)
saveenv
 
#bootcmd
setenv bootcmd ' nand read.e 81000000 KL; bootm 81000000;
saveenv
 
#bootdelay
setenv bootdelay 0
saveenv
 
printenv
 
## Read all 64M to RAM,
## then copy 64M from RAM to USB
#rsv good
#nand read.raw 80400000 0x0 0x41CE800
#fatwrite usb 0:1 80400000 factory.bin 0x41CE800
 
## KL=0x0, size=0x30FC00
## CONF=0x339000, size=0xB37000
## UBIA=0xEB2000, size=0x166E000
## PARA=0x41BE000,size=0x4200
#reset
 
% <- this is end of file symbol

 

Look the line in red color "#ubifsload 0x82000000 /vendor/aurora.elf" 

 

Your know if I put in to the usb-pen a "image.mvi" (the new image logo), with the order "ibifsload" he write the image.mvi in the block "0x82000000" ? you or another friend know this?

 

I think my only solution is uncompres this .bin files like your say in you post and in the web your say, and if I have the folders and files, look where it should be the logo, and then try to compress in. bin and try to install the firmware via USB, which is the only connector in this TVs

 
I think don't have another solution for these TVs, as they don't have other connectors, only one USB,
 
Uffff.,
 
If you know any other way to put this logo in the proper place, I would greatly appreciate it or if know this another friend.
 
Thanks


Re: unpack image of dm8000 on linux #14 Lost in Space

  • Senior Member
  • 876 posts

+69
Good

Posted 25 May 2013 - 10:02

Look you started this thread with the question how to unpack a Dreambox image, now sudenly we want to hack the Firmware of a TV - what help are you expecting ?

 

And an elf image is a binary executable not a filesystem.


Edited by gutemine, 25 May 2013 - 10:03.


Re: unpack image of dm8000 on linux #15 javier3034

  • Senior Member
  • 54 posts

+1
Neutral

Posted 26 May 2013 - 07:18

Ok, sorry and thank your.for your help. And sorry for take help in this thread

 

But I don't hack nothing gutemine, 

 

I try insert a logo in a TV that the constructor of this TVs he closed they factory, and he users don't have any support, OK dear gutemine.

 

Your remember the box ufs-910-hd of Kahtrein, or other boxes?

 

Is a hack your solution for run enigma2 in a pen or hdd, because de firm in this box are very symple and very bad?

 

Dear gutemine, I'am not a hacker and I think your or other developers aren't a hackers, For hacking have other forums, not this forum.

 

This and other forums is for develop firms for a very boxes that they vendors don't develop like need the users and this is not hack the boxes, Ok dear gutemine.

 

Because unpack or dump a dreambox image like your how-to, for hacking the dreambox image or for what??

 

Ok, your have razon, this is not a thread for my problem and answer, but I not take help for hacking nothing, only help for insert a logo or bootlogo in a firm that I don't know and the constructor of this he disapers, like other constructors of boxs or other products.

 

Regards and thank your



Re: unpack image of dm8000 on linux #16 Lost in Space

  • Senior Member
  • 876 posts

+69
Good

Posted 26 May 2013 - 08:38

Look, you got all the needed information in this thread, if you can't use it it is not our fault.

 

I'm only a little bit suspicious if somebody asks for help and not telling the truth, and your arguments are still strange, as there is no MUST to change a TV's logo, especially if not manufactured anymore.

 

Anyway, have a nice day

 

gutemine



Re: unpack image of dm8000 on linux #17 javier3034

  • Senior Member
  • 54 posts

+1
Neutral

Posted 26 May 2013 - 19:00

I seem to understand that calling me a liar?

You know me for something?

put in google my last nick "javier3034" and see if I have or not a suspicious or a liar, and do not say anything of my previous nick because you do not care to know who it was.

Only been in this forum two months more than me and no one and neither here or in any forum have my called suspicious or a liar, you're the first after more than 20 years with boxes that say my this.

The company where I work, buy thousands of units of different products and different vendors, also has all rights to what they buy, but one to blame if a manufacturer is closed and can not get the source code to tailor a custom logo that will our client interests, distributing products all over the world, hotels, hospitals ... who want to get TVs with their custom logo, we have and pay those rights, okay?

You know in europe a big or litle distributor that he construct nothing?, ALL is constructed or manufactured in china, turkia, india,....


If I have the firm in bin do I don't know and the company as manufactured thousands of units for the enterprise I work and this manufacture as closed and I asked in this forum in which I know, I'am a liar and suspicious????

I've offended enough, is the typical arrogant comment of the I-have-FAQ if you have you lied to all users, you want to explain in detail your stories and lies with dream multimedia?

I not suspect as you say that my suspicious, I say you and demonstrated truths of your I-have forum with the users, your know as I say?, are your including in their truths, and for very very suspicious razon? is public and all know that...

You've spent

Edited by javier3034, 26 May 2013 - 19:03.


Re: unpack image of dm8000 on linux #18 Lost in Space

  • Senior Member
  • 876 posts

+69
Good

Posted 30 May 2013 - 15:57

Please read again the title of the thread that you opened and the keywords you opened and then the rest of the thread. I simply summarized where we started and where we ended and that you got all the information you needed and except doing you job for that you seem to be  paid for this is all I can offer based on the informations you gave.


Edited by gutemine, 30 May 2013 - 15:57.


Re: unpack image of dm8000 on linux #19 javier3034

  • Senior Member
  • 54 posts

+1
Neutral

Posted 8 June 2013 - 09:13

Please read again the title of the thread that you opened and the keywords you opened and then the rest of the thread. I simply summarized where we started and where we ended and that you got all the information you needed and except doing you job for that you seem to be  paid for this is all I can offer based on the informations you gave.

Send my a MP and say my what your need, I think your say is logic.

 

I advance your, all work good but in "ubiatach........", say errors, sorry but I don't remeber this errors.

 

I read in other forum, that for this ubifs.bin images, need create a MTD particions with name of the particions, becouse for number is variable and fail de ubiatach.

 

If your think that for your is possible insert this "fuking" logo hotel in the firm.bin, like I say, send my a MP and take my your need.

 

Remeber like I paste in the other post, the real nand ram is 64Mb not 200 and the name and bloks aren in the past .txt in my post, but if your need all I have, I send your.

 

If your insert this logo in this firm .bin, I drink seven beers.

 

I'm not lying, I have two days without sleep, because if Monday I don't have the logo on startup, I think my boss would take the job, the client calls 9 times each day.

 
I know enigma. android, but this and only with the two .bin, I don't know.
 
Please, send my a MP.
 
Regards


Re: unpack image of dm8000 on linux #20 Lost in Space

  • Senior Member
  • 876 posts

+69
Good

Posted 8 June 2013 - 14:39

I'm sorry if you misunderstood my reply. I'm not volunteering for this job or aksing for money. I will simply not help any further. This is a big board and lots of people are available, if nobody else volunteers after reading this thread this is not my fault. And no, if you have a simulated ubifs name is not pthe point, you always can mount by ubifs volume name but also by ubifs device.




2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users