All this is done on Ubuntu 10.04Extract!1. Create folder to mount in.
2. Load modules
3. Validate
4. Copy the contents block device(orginal firmware is not as big)
First time it will ask you to install mtd-utils.
5. Mount the shit!
And now in the folder /mnt/ubi will the files be found.Rebuild!1. Create the ubifs image
2. Create an ubi image around the ubifs image, start with ini file
It should contain:
Then create the image.
Then replace the original ubi.img with the one you just created and flash like normal.Good Luck!
Code:
mkdir /mnt/ubi
Code:
modprobe mtdblockmodprobe ubimodprobe nandsim first_id_byte=0x20 second_id_byte=0xaa third_id_byte=0x00 fourth_id_byte=0x15
Code:
cat /proc/mtddev: size erasesize namemtd[COLOR=red]0[/COLOR]: 10000000 00020000 "NAND simulator partition 0"
Code:
ls -l /dev/mtd*crw-rw---- 1 root root 90, 0 2010-08-04 15:17 /dev/mtd0crw-rw---- 1 root root 90, 1 2010-08-04 15:17 /dev/mtd0robrw-rw---- 1 root disk 31, 0 2010-08-04 15:17 /dev/mtdblock[COLOR=red]0[/COLOR]
Code:
dd if=ubi.img of=/dev/mtdblock[COLOR=red]0[/COLOR] bs=204848000+0 records in48000+0 records out98304000 bytes (98 MB) copied, 3.20704 s, 30.7 MB/s
Code:
ubiattach /dev/ubi_ctrl -m [COLOR=red]0[/COLOR]UBI device number 0, total 2048 LEBs (264241152 bytes, 252.0 MiB), available 0 LEBs (0 bytes), LEB size 129024 bytes (126.0 KiB)
Code:
ls -l /dev/ubi*crw-rw---- 1 root root 250, 0 2010-08-04 15:29 /dev/ubi0crw-rw---- 1 root root 250, 1 2010-08-04 15:29 /dev/ubi0_0crw-rw---- 1 root root 10, 54 2010-08-04 15:17 /dev/ubi_ctrl
Code:
mount -t ubifs ubi0_0 /mnt/ubi
Code:
mkfs.ubifs -m 2048 -e 129024 -c 2047 -r /mnt/ubi ubifs.img
Code:
nano ubi.ini
Code:
[ubifs]mode=ubiimage=ubifs.imgvol_id=0vol_size=200MiBvol_type=dynamicvol_name=rootfsvol_flags=autoresize
Code:
ubinize -o ubi.img -p 131072 -m 2048 -s 512 ubi.ini