Jump to content


Photo

extracteur ubifs dream


  • Please log in to reply
7 replies to this topic

#1 loulou2000

  • Senior Member
  • 37 posts

0
Neutral

Posted 9 March 2014 - 12:08

hello I would like created my own image nfi UBIFS extractor, but there is a dream sousi not use standard parameter is created that is how their UBIFS Image
"mkfs.ubifs -r /hdd/image/rootfs -o /hdd/image/rootfs.ubifs.img -m 2048 -e 126976 -c 1961 -x favor_lzo -F"  the-c option is problematic because what is set to 1961 should be 2048, is that someone has a solution


here is my complete script to extract a picture UBIFS

 

#!/bin/sh

MEDIA=media
AUTOFS=autofs
UBIFS=/dev/mtd3
UBI=ubi3_0 
UBIDEVICE=3
VERSION=3.3.0
KERNEL=`uname -r`
umount /tmp/ubi > /dev/null 2>&1

ln -s /hdd/image /image

/usr/vuplus-executeur/ubidetach -p /dev/mtd3 > /dev/null 2>&1

rmmod nandsim  > /dev/null 2>&1
mkdir /tmp/ubi > /dev/null 2>&1

cd /image
unzip *.zip
sleep 2

cd /hdd

if [ -f "swapfile" ]; then
	find swapfile | grep swapfile
else
	if [ -f "/dev/zero" ]; then
	        dd if=/dev/zero of=/media/hdd/swapfile bs=1024 count=132768
                sleep 2
                mkswap /media/hdd/swapfile
	fi
fi

insmod /usr/vuplus-executeur/nandsim-$KERNEL-et9x00.ko cache_file=/hdd/image/my_image first_id_byte=0xec second_id_byte=0xd3 \
  third_id_byte=0x51 fourth_id_byte=0x95 > /dev/null 2>&1

/usr/vuplus-executeur/flash_eraseall -q $UBIFS

cd /image 

if [ -f "/image/et9x00/rootfs.bin" ]; then
         nandwrite -p /dev/mtd3 /image/et9x00/rootfs.bin
else
if [ -f "/image/et6x00/rootfs.bin" ]; then
         nandwrite -p /dev/mtd3 /image/et6x00/rootfs.bin
else
if [ -f "image/et5x00/rootfs.bin" ]; then
         nandwrite -p /dev/mtd3 /image/et5x00/rootfs.bin
else
if [ -f "/image/et4x00/rootfs.bin" ]; then
         nandwrite -p /dev/mtd3 /image/et4x00/rootfs.bin
else
if [ -f "/image/xp1000/rootfs.bin" ]; then
         nandwrite -p /dev/mtd3 /image/xp1000/rootfs.bin
else
if [ -f "/image/venton-hd1/rootfs.bin" ]; then
         nandwrite -p /dev/mtd3 /image/venton-hd1/rootfs.bin
else
if [ -f "/image/venton-hdx/rootfs.bin" ]; then
         nandwrite -p /dev/mtd3 /image/venton-hdx/rootfs.bin
else
if [ -f "/image/vuplus/duo/root_cfe_auto.jffs2" ]; then
         nandwrite -p /dev/mtd3 /image/vuplus/duo/root_cfe_auto.jffs2
else
if [ -f "/image/vuplus/solo2/root_cfe_auto.bin" ]; then
         nandwrite -p /dev/mtd3 /image/vuplus/solo2/root_cfe_auto.bin
else
if [ -f "/image/en2/rootfs.bin" ]; then
         nandwrite -p /dev/mtd3 /image/en2/rootfs.bin
else
if [ -f "/image/odinm9/rootfs.bin" ]; then
         nandwrite -p /dev/mtd3 /image/odinm9/rootfs.bin
else
if [ -f "/image/odinm7/rootfs.bin" ]; then
         nandwrite -p /dev/mtd3 /image/odinm7/rootfs.bin 
else
if [ -f "/image/root.ubi" ]; then
         nandwrite -p /dev/mtd3 /image/root.ubi                          
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi

/usr/vuplus-executeur/ubiattach /dev/ubi_ctrl -O 2048 -m $UBIDEVICE -d $UBIDEVICE

sleep 3

mkdir /tmp/ubi > /dev/null 2>&1

sleep 1

mount -t ubifs $UBI /tmp/ubi

cd /hdd/image

rm -Rf et* xp1000 vuplus venton-hd* en2 odinm*
rm -Rf *.zip
rm -Rf /image



echo 4 "installatation de l'image terminé"

exit 0

for nfi, I cut manually for now, just wanted to ente UBI



Re: extracteur ubifs dream #2 Lost in Space

  • Senior Member
  • 876 posts

+69
Good

Posted 9 March 2014 - 18:23

Well it looks like you are not even understandig what -c the maxlebcount does. Please read ubifs FAQ

Re: extracteur ubifs dream #3 Lost in Space

  • Senior Member
  • 876 posts

+69
Good

Posted 10 March 2014 - 19:44

http://www.linux-mtd...l#L_max_leb_cnt



Re: extracteur ubifs dream #4 Lost in Space

  • Senior Member
  • 876 posts

+69
Good

Posted 11 March 2014 - 19:14

One more hint for a real solution (if you don't like my ubidump), instead of your 'borrowed' shellscript and playing around with nandsim:

 

https://github.com/j...uitt/ubi_reader



Re: extracteur ubifs dream #5 loulou2000

  • Senior Member
  • 37 posts

0
Neutral

Posted 4 May 2014 - 12:26

bonjour,merci,sur pc linux sa fonctionne,mais sa ne marche pas sur enigma2 mipsel ,sa marque toujour cette erreur no module name lzo,pourtant le fichier lzo.so je l'ai trouvé en version précompilé est je l'ai installé ,ou il me manque un paquet pour les les python .so ? faut il un paquet suplémentaire pour les python .so


hello, thank you, it works on linux pc, but its not working on mipsel enigma2, brand Still this error no Module name lzo, yet lzo.so file I found is precompiled version I installed, or I'm missing a package for python. so? be it an aditional package for Python .so ?



Re: extracteur ubifs dream #6 loulou2000

  • Senior Member
  • 37 posts

0
Neutral

Posted 4 May 2014 - 19:11

there I found the solution, it is necessary to lzo.so in the python2.7 directory, against the image of the dream does not work



Re: extracteur ubifs dream #7 Lost in Space

  • Senior Member
  • 876 posts

+69
Good

Posted 8 May 2014 - 20:02

Nonsense, if you are not able to get the ubifs image out of the nfi it is not my fault.

Attached Files


Edited by gutemine, 8 May 2014 - 20:06.


Re: extracteur ubifs dream #8 loulou2000

  • Senior Member
  • 37 posts

0
Neutral

Posted 11 May 2014 - 20:57

yes




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users