Jump to content


Photo

unpack openpli image on linux


  • This topic is locked This topic is locked
67 replies to this topic

#1 kzayed

  • Member
  • 2 posts

0
Neutral

Posted 7 December 2012 - 08:13

Hi all
Are there specific scripts for unpacking and repacking openpli nfi image in linux
i used the attached scripts(succeeded in cvs image) but with openli the output extracted folder contains only boot directory

Attached Files


Edited by kzayed, 7 December 2012 - 08:15.


Re: unpack openpli image on linux #2 scruff1963

  • Member
  • 44 posts

0
Neutral

Posted 7 December 2012 - 12:45

I would find it easier to load the image to the box then tar it up to the hdd then transfer to the computer by ftp.
You may get moaned at for the clone bootloaders as pli doesn't support clones.

Re: unpack openpli image on linux #3 Happysat

  • Senior Member
  • 685 posts

+42
Good

Posted 7 December 2012 - 14:00

You can use nfidump to extract PLi images under Linux.

Usage: ./nfidump *.nfi /path to extract/

Attached Files


'Wie weet spreekt niet, wie spreekt weet niet'

Sunray Vu Solo2/DM800SE V2 DVB-S2/C/T T-85 (28e,23e,19e,13e,9e,4e,1w,5w)


Re: unpack openpli image on linux #4 DrData

  • Senior Member
  • 99 posts

+2
Neutral

Posted 7 December 2012 - 15:35

Is there a Version for Mac OSX ? Or Source Code avaible ?

Re: unpack openpli image on linux #5 mfaraj57

  • Senior Member
  • 1,605 posts

+286
Excellent

Posted 7 December 2012 - 16:43

You can use nfidump to extract PLi images under Linux.

Usage: ./nfidump *.nfi /path to extract/

i used nfidump to extract image in ubunto 12 but this the result
nfidump: nfidump: cannot execute binary file
chmod 755 given and the path for image and the path for extraction
/bin$ sh nfidump original.nfi /image4
without sh give me this

No command 'nfidump' found, did you mean:
Command 'nfdump' from package 'nfdump' (universe)
nfidump: command not found

Re: unpack openpli image on linux #6 Happysat

  • Senior Member
  • 685 posts

+42
Good

Posted 7 December 2012 - 18:52

I just tried with todayś 3.0 image on Ubuntu 12,

#!/bin/sh
cd /home/happysat/Dreambox/image
nfidump *.nfi /home/happysat/Dreambox/image/extract
exit

happysat@happysat-VirtualBox ~ $ nfidump.sh
>>>>>> nfidump 0.4.1 by gutemine <<<<<<
based on code from tmbinc, noggie and others
extracting dm800se nfi image ...
extracting boot.jffs2 from nfi ...
extracting boot from boot.jffs2 ...
extracting root.jffs2 from nfi ...
extracting root from root.jffs2 ...
>>>>>> nfidump finished <<<<<<

Image was extracted okay no errors.

The binairy is placed in /usr/bin

Edited by Happysat, 7 December 2012 - 18:53.

'Wie weet spreekt niet, wie spreekt weet niet'

Sunray Vu Solo2/DM800SE V2 DVB-S2/C/T T-85 (28e,23e,19e,13e,9e,4e,1w,5w)


Re: unpack openpli image on linux #7 mfaraj57

  • Senior Member
  • 1,605 posts

+286
Excellent

Posted 7 December 2012 - 19:04

i don not know what is wrong
but same result
/cobra/bin$ nfidump original.nfi /image4/
No command 'nfidump' found, did you mean:
Command 'nfdump' from package 'nfdump' (universe)
nfidump: command not found

i am sure nfidump in cobra/bin directory and attribute as excecutable

Edited by mfaraj57, 7 December 2012 - 19:06.


Re: unpack openpli image on linux #8 mfaraj57

  • Senior Member
  • 1,605 posts

+286
Excellent

Posted 7 December 2012 - 19:18

i don not know what is wrong
but same result
/cobra/bin$ nfidump original.nfi /image4/
No command 'nfidump' found, did you mean:
Command 'nfdump' from package 'nfdump' (universe)
nfidump: command not found

i am sure nfidump in cobra/bin directory and attribute as excecutable

i am not good in linux but no permission to add nfidump to usr/bin

Edited by mfaraj57, 7 December 2012 - 19:19.


Re: unpack openpli image on linux #9 Happysat

  • Senior Member
  • 685 posts

+42
Good

Posted 7 December 2012 - 19:25

Copy it as root user to /usr/bin e.g sudo cp nfidump(location) /usr/bin

'Wie weet spreekt niet, wie spreekt weet niet'

Sunray Vu Solo2/DM800SE V2 DVB-S2/C/T T-85 (28e,23e,19e,13e,9e,4e,1w,5w)


Re: unpack openpli image on linux #10 mfaraj57

  • Senior Member
  • 1,605 posts

+286
Excellent

Posted 7 December 2012 - 19:34

thanks my friend
the binary should be in usr/bin,although this is not the case in dreambox linux
now ok
>>>>>> nfidump 0.4.1 by gutemine <<<<<<

based on code from tmbinc, noggie and others

extracting dm7020 nfi image ...

>>>>>> nfidump finished <<<<<<

Edited by mfaraj57, 7 December 2012 - 19:34.


Re: unpack openpli image on linux #11 Happysat

  • Senior Member
  • 685 posts

+42
Good

Posted 7 December 2012 - 19:41

Yes true , but when placed in /bin you can execute it anywhere :)

'Wie weet spreekt niet, wie spreekt weet niet'

Sunray Vu Solo2/DM800SE V2 DVB-S2/C/T T-85 (28e,23e,19e,13e,9e,4e,1w,5w)


Re: unpack openpli image on linux #12 fairbird

  • Senior Member
  • 413 posts

+20
Neutral

Posted 18 December 2012 - 01:13

@Happysat
Hi friend...
about unpack it was done well from your nfidump binary file but the problem is pack it again "How to?"
I have tried with those scripts on start topic but an image freezed on boot step doesn't booted well .. Do you have any scripts or any way to pack to nfi again?

Edited by fairbird, 18 December 2012 - 01:16.

DM500s
DM800

DM800se

DM920UHD


Re: unpack openpli image on linux #13 Happysat

  • Senior Member
  • 685 posts

+42
Good

Posted 18 December 2012 - 02:45

No not really im struggeling with it to :unsure:

'Wie weet spreekt niet, wie spreekt weet niet'

Sunray Vu Solo2/DM800SE V2 DVB-S2/C/T T-85 (28e,23e,19e,13e,9e,4e,1w,5w)


Re: unpack openpli image on linux #14 hemispherical1

  • Senior Member
  • 1,596 posts

+49
Good

Posted 18 December 2012 - 07:38

Steal the required binaries (buildimage & mkfs.jffs2) & info from build-nfi-image.sh from nfibackup... Then Happysat can write a script to automate it... ;)

Something like:

mkfs.jffs2 --root=/path/to/boot --faketime --output=/path/where/I/want/boot.jffs2 --eraseblock=0x4000 -n -l
mkfs.jffs2 --root=/path/to/root-of-filesystem --faketime --output=/path/where/I/want/root.jffs2 --eraseblock=0x4000 -n -l

buildimage --brcmnand --arch dm800 -e 0x4000 -f 0x4000000 -s 512 -b 0x40000:/path/to/SSL.bin.gz -d 0x3C0000:$/path/to/boot.jffs2 -d 0x3C00000:/path/to/root.jffs2 > NewImage.nfi

--
hemi

Ps. IIRC recent versions of nfidump can extract the SSL also from orig image, making 1 less thing to track down...

Edited by hemispherical1, 18 December 2012 - 07:48.


Re: unpack openpli image on linux #15 fairbird

  • Senior Member
  • 413 posts

+20
Neutral

Posted 18 December 2012 - 18:49

@hemispherical1
I had tried before same as what you wrote but never succeed, Box doesn't complete booted...
Thank you

DM500s
DM800

DM800se

DM920UHD


Re: unpack openpli image on linux #16 MostlyHarmless

  • Member
  • 32 posts

0
Neutral

Posted 18 December 2012 - 20:26

Strange, as gutemine can do this nicely :-)

But gutemine doesn't need to steal/borrow binaries ...

Edited by MostlyHarmless, 18 December 2012 - 20:28.


Re: unpack openpli image on linux #17 hemispherical1

  • Senior Member
  • 1,596 posts

+49
Good

Posted 18 December 2012 - 21:44

I tried it on my PC and sure enough the image did not boot, SSL loaded then it just hung. Of course that makes zero sense as it "should" work.

I repeated the whole procedure on my dm800 and the resulting image booted and runs. I guess something in the PC versions of either nfidump, buildimage, or mkfs.jffs2 does not play well with others. Since the PC versions of buildimage and mkfs.jffs2 work to build images from source, I'm leaning twords a problem with nfidump on pc. The version on my PC is 0.41 while the one on my DB is 0.42. Regardless, this worked on my DM800:

mkdir /hdd/tmp (make working directory)
cp desired_image /hdd/tmp (copy nfi image to work directory)
cd /hdd/tmp (change to work directory)
nfidump --loaderextract ./desired_image.nfi image (extract desired_image to /hdd/tmp/image & SSL to /hdd/tmp/secondstage-dm800.bin)
mv /hdd/tmp/image/boot /hdd/tmp (seperate /boot out of the root filesystem)
mkdir /hdd/tmp/image/boot (recreate /boot mountpoint in root filesystem)
(make any desired edits to image)
mkfs.jffs2 --root=boot --faketime --output=boot.jffs2 --eraseblock=0x4000 -n -l (create boot.jffs2 image)
mkfs.jffs2 --root=image --faketime --output=root.jffs2 --eraseblock=0x4000 -n -l (create root.jffs2 image)
buildimage --brcmnand --arch dm800 -e 0x4000 -f 0x4000000 -s 512 -b 0x40000:secondstage-dm800.bin -d 0x3C0000:boot.jffs2 -d 0x3C00000:root.jffs2 > NewImage.nfi (build NewImage.nfi)
Note the commands are identical to ones run on my PC that created a broken image....
--
hemi

Edited by hemispherical1, 18 December 2012 - 21:54.


Re: unpack openpli image on linux #18 fairbird

  • Senior Member
  • 413 posts

+20
Neutral

Posted 18 December 2012 - 22:07

will try and give feedback.... :)

DM500s
DM800

DM800se

DM920UHD


Re: unpack openpli image on linux #19 gjstroom

  • Senior Member
  • 483 posts

+13
Neutral

Posted 18 December 2012 - 23:00

Like Hemi already said, this should work:

mount /dev/mtdblock2 /tmp/boot -t jffs2
mount /dev/mtdblock3 /tmp/root -t jffs2

nfidump/bin/mkfs.jffs2 --root=/tmp/boot --faketime --compression-mode=size --output=boot.jffs2 --eraseblock=0x4000 -n -l
nfidump/bin/mkfs.jffs2 --root=/tmp/root --faketime --compression-mode=size --output=root.jffs2 --eraseblock=0x4000 -n -l
nfidump/bin/buildimage --brcmnand --arch dm800se -e 0x4000 -f 0x4000000 -s 512 -b 0x40000:ssl.bin -d 0x3C0000:boot.jffs2 -d 0x3C00000:root.jffs2 > "image.nfi"

Amiko8240, DM500HD, DM800, DM800SE, DM800SESR4, DM800SEV2, VU+ SoloSEV2


Re: unpack openpli image on linux #20 fairbird

  • Senior Member
  • 413 posts

+20
Neutral

Posted 19 December 2012 - 23:18

@gjstroom
Try it also again doesn't booting...
Please and one can upload wright binary files for linux...

DM500s
DM800

DM800se

DM920UHD



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users