Jump to content


Photo

block2mtd oder nandsim modules on Softwarefeed ?


  • Please log in to reply
60 replies to this topic

#1 Lost in Space

  • Senior Member
  • 876 posts

+69
Good

Posted 20 May 2013 - 21:17

Hi !

 

I have a simple question:

 

On the non-Dreamboxes you PLi is not building the block2mtd driver in the kernel - OK, as you are not having any advantage from of it on these boxes (yet).

 

But what alternatives do you have available ?

 

Is the block2mtd driver then at least built as a module and available on the PLi Softwarefeed ?

 

Is the nandsim module built as a module and available on PLs Softwarefeed ?

 

Reason why I'm asking is that I use block2mtd for my nfidump binary for image extraction, which works nicely and easy as the driver is in the kernel of all Dreamboxes (well, except the old 800).

 

If this driver is not on the feed of the other boxes then live is not so easy, so I''m simply looking for alternatives.

 

gutemine



Re: block2mtd oder nandsim modules on Softwarefeed ? #2 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 20 May 2013 - 21:25

I see no need to emulate an mtd device on the box; mtd devices only make sense on a flash device in real life.
And if you would want to extract a ubifs image, you can do this far easier (and faster) on a pc.

Re: block2mtd oder nandsim modules on Softwarefeed ? #3 Lost in Space

  • Senior Member
  • 876 posts

+69
Good

Posted 20 May 2013 - 21:47

Well, live is not that easy for some applications and on boxes with small flash for example.

 

But where is the problem to have one or both on the feed, so that people or applications can install them if needed ?

 

You just force people to other images with the driver(s) included, or at least on the feed, that's the simple reason why I'm asking.

 

gutemine


Edited by gutemine, 20 May 2013 - 21:48.


Re: block2mtd oder nandsim modules on Softwarefeed ? #4 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 20 May 2013 - 22:02

but what would you want to use block2mtd for exactly?

Re: block2mtd oder nandsim modules on Softwarefeed ? #5 Lost in Space

  • Senior Member
  • 876 posts

+69
Good

Posted 20 May 2013 - 22:19

Actually I have 3 different ways of using it in the meatime:

 

nfidump uses it to extract ubifs images with a single binary without the need to load any further modules like nandsim

 

rambo allows you to boot the root image with ubifs or jffs2 from an USB or SATA device by using block2mtd. In this case it is not expaneded or extracted, the box's root really runs this way via block2mtd.

 

A still non-public version of this allows you even to flash the ubifs images to SATA or USB rawdevices, but without block2mtd you can't mount or boot the devices.

 

Finally all my tools that use nfidump to extracti mages to USB or SATA, either for single or multibooting are doing this in case of UBIFS with the help of block2mtd (but nandsim can do the job also, I don't have any preferences, except that lbock2mtd is so lightweight that it even fits in the kernel nicely so you avoid the hassle of modules installing and loading)

 

Buiding the modules and putting them on the feed should not be any problem in my understanding, as in DMMs OE 2.0 a simple bitbake is all that is needed to get them, and I was assuming that the same applies to OpenPLi, that's why your answer that they are not needed surprises me a little bit.


Edited by gutemine, 20 May 2013 - 22:21.


Re: block2mtd oder nandsim modules on Softwarefeed ? #6 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 20 May 2013 - 22:38

Making block2mtd available is not as simple as running bitbake, the kernels need to be patched (block2mtd is not part of the standard kernel).
And having external patches means having to rebase them all the time, for kernel updates.
(I know this isn't a problem for dmm, who have released exactly one kernel update in the last 5 years), but some other manufacturors release their drivers for the latest kernel version, every month or two.

And as far as I understand, the main reason to have block2mtd is to use a tool called 'nfidump'. Which sounds like it is only needed on a dreambox. (all other manufacturors use plain ubi or ubifs files).
So at the moment, I see not real reason to justify the additional maintenance work.

Edited by pieterg, 20 May 2013 - 22:39.


Re: block2mtd oder nandsim modules on Softwarefeed ? #7 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 20 May 2013 - 22:50

the kernels need to be patched (block2mtd is not part of the standard kernel).

to be more precise, block2mtd is part of the standard kernel, but in it's standard form you cannot use it to emulate NAND (just NOR).

Re: block2mtd oder nandsim modules on Softwarefeed ? #8 Lost in Space

  • Senior Member
  • 876 posts

+69
Good

Posted 20 May 2013 - 22:52

nfidump root_cfe.bin works nicely, so the name is a little bit misleading :-)

 

And I'm pretty sure that block2mtd.c doesn't need any 'strange' kernel patches, as it is part of the mainstream kernel since ages now and only uses other stuff like mtdcore which is also needed anyway or you would not boot from nandflash at all.

 

BTW you have the block2mtd module includes on your dreambox kernels when you added the UBIFS support so you have the patches needed already in your OE and all of them except one are even signed off by the mtd devs :-)

 

And the NOR Flash only story is not true since mid 2012 if i remember correctly (at least since then I use it without any troubles), since then you can easily run jffs2 on it, the patches needed are only to make ubifs happy.

 

Regarding the nandsim module - there is at least one imageteam which builds them in their vu image (as module) and has them also on their softwarefeed and it loads nicely also into an OpenPLi image is was told, so there the argument with strange kernel patches needed doesn't work either.

 

If you want I could try to download the nandsim ipk of one of these boxes and you can test if they do any harm.


Edited by gutemine, 20 May 2013 - 22:56.


Re: block2mtd oder nandsim modules on Softwarefeed ? #9 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 20 May 2013 - 23:06

Trust me, you can only use it to emulate NOR.
(Unless you want to put a jffs2 filesystem on it, but (almost) nobody is using jffs2 anymore, I don't think I need to remind you of that)
UBI images are created for a fixed (sub)page size, so the in-kernel block2mtd won't be useful.
Just have a look if you don't believe me.

Re: block2mtd oder nandsim modules on Softwarefeed ? #10 Lost in Space

  • Senior Member
  • 876 posts

+69
Good

Posted 20 May 2013 - 23:12

I will NOT trust you on something which works since 2 months now like a charm as I had more then a look and made it work

 

And if you are emulating and don't have real Flash underneath there is no real need for subpages either.

 

But we can make a deal - you check in the same patches as you already checked in for the Dreamboxes for the other boxes too and I proove you that I'm right and ubifs works nicely ;)

 

And regarding the nandsim module - for this there are 0 patches needed, you can take them as they are and they will build nicely working modules for ALL up to date kernel versions.


Edited by gutemine, 20 May 2013 - 23:14.


Re: block2mtd oder nandsim modules on Softwarefeed ? #11 pieterg

  • PLi® Core member
  • 32,766 posts

+245
Excellent

Posted 20 May 2013 - 23:22

Yes I know block2mtd works if you apply some patches, I believe I mentioned that already.

nandsim will work out of the box, but obviously requires quite a bit of free and, most importantly, unfragmented ram.
In my experience, for this reason it only works after a relatively short uptime.

Re: block2mtd oder nandsim modules on Softwarefeed ? #12 Lost in Space

  • Senior Member
  • 876 posts

+69
Good

Posted 20 May 2013 - 23:31

First you said it is not kernel standard, then your said yes, second you said it works not with NAND flash, then you said yes, third you said it doesn't work with ubifs, then you said yes - I'm a little bit confused and hereby ask for better explainations in the first run :)

 

And nandsim has a nice file cachhing mechanism and off course you have to use this on a reciever instead of buffering everything in ram as you would do it on a PC.

 

And there is only 1 single patch needed to make ubifs work, you have to kick out the writesize=1 single byte parameter. All the other patches are just for memory saving on the fix freespace mount of ubifs, or for allowing also block2mtd unload of devices. The only patch I added was to specifiy writesize as an option to allow using the standard ubifs settings equal to what the flash has. I collected these patches and DMM checked them in, and I'm pretty sure that they know what they have done.

 

If you consider this as too complicated, I will have to accept this - even when it is hard to understand.

 

But then we are back to the question why the nandsim module is not avalable in Standard OpenPLi ?


Edited by gutemine, 20 May 2013 - 23:33.


Re: block2mtd oder nandsim modules on Softwarefeed ? #13 Lost in Space

  • Senior Member
  • 876 posts

+69
Good

Posted 21 May 2013 - 10:24

OK, looks like we have to use the look and see approach once more ...

 

Could the Users please Flash a Black Hole image and do the following:

 

cd /tmp

opkg update

opkg download kernel-module-nandsim

 

This should produce the needed ipk at /tmp which you then can FTP to your PC, flash the OpenPLi image and install it.

 

Then please do a modprobe nandsim and report back if this works without problems.

 

If this is OK I will enable the nandsim support in nfidump and we can test if live is easier after this detour ...


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


Re: block2mtd oder nandsim modules on Softwarefeed ? #14 rtzhjgg0

  • Senior Member
  • 568 posts

+13
Neutral

Posted 21 May 2013 - 10:51

I followed your instructions, generated a kernel-module-nandsim_3.3.6-r6-bsp14_vusolo2.ipk in BH, flashed PLi, installed nandsim module and rebooted.

Pli works (till now) without problems.

 

----------------------
root@vusolo2:~# opkg install /tmp/*.ipk
Installing kernel-module-nandsim (3.3.6-r6-bsp14) to root...
Configuring kernel-module-nandsim.
Please migrate your /etc/modutils/_vuplus file to /etc/modules-load.d/*.conf
----------------------
 

 

Attached Files


Selfsat H50M4
Ultimo4K /2xTwinS2, VTI, PLi, ATV...
NAS: Qnap221

Re: block2mtd oder nandsim modules on Softwarefeed ? #15 Lost in Space

  • Senior Member
  • 876 posts

+69
Good

Posted 21 May 2013 - 11:20

Thanks, but maybe some other users with other boxes could donate also their nandsim module, so that we can test on a broader basis.

 

If you are aware also of other images on ET/CT boxes which habe the nandsim module on their imagesfeed please check and download them also, then you could also test if on these boxes if nandsim works or does any harm.

 

The easiest way to check if there is a nandsim modul on the feed or in an image is like this:

 

On the feed:

 

opkg update

opkg list | grep nandsim

 

In the image:

 

modprobe nandsim

grep nandsim /proc/modules


Edited by gutemine, 21 May 2013 - 11:22.


Re: block2mtd oder nandsim modules on Softwarefeed ? #16 Lost in Space

  • Senior Member
  • 876 posts

+69
Good

Posted 21 May 2013 - 11:36

I'm not sure if it helps for the testing but you get precompiled nandsim modules for varios kernel versions also here:

 

https://github.com/a...ot/nandsim_2637

 

https://github.com/a...oot/nandsim_322

 

https://github.com/a...oot/nandsim_360

 

use uname -a to get your kernel version and insmod nandsim_xxx (with full path if the nandsim_xxx is not in current directory) will then load the module


Edited by gutemine, 21 May 2013 - 11:39.


Re: block2mtd oder nandsim modules on Softwarefeed ? #17 WTE

  • Senior Member
  • 821 posts

+37
Good

Posted 21 May 2013 - 12:35

Why do I need for non dreambox NFIdump with an expire date?

 

I get the feeling you want to make somekind of online cloud solution in the end.


Mut@nt HD51 STB 4K

   :rolleyes:                :rolleyes:


Re: block2mtd oder nandsim modules on Softwarefeed ? #18 Persian Prince

  • Senior Member
  • 1,982 posts

+247
Excellent

Posted 21 May 2013 - 12:44

Why do I need for non dreambox NFIdump with an expire date?

 

I get the feeling you want to make somekind of online cloud solution in the end.

 

i don't understand what the hell is your problem ?!

 

when you don't need simply go somewhere else why are you spamming always ?!

 

when a developer wants to do something let him do his job then decide about it

 

i'm not a fan of gutemine's work but he can do something that i can't and maybe in future i can use some of them who knows

 

----------

 

nandsim kernel 3.1.1 (vuplus) attached

 

i can build nandsim for all brands , it's a simple "CONFIG_MTD_NAND_NANDSIM=m"


Open Vision sources: https://github.com/OpenVisionE2


Re: block2mtd oder nandsim modules on Softwarefeed ? #19 Persian Prince

  • Senior Member
  • 1,982 posts

+247
Excellent

Posted 21 May 2013 - 12:46

I followed your instructions, generated a kernel-module-nandsim_3.3.6-r6-bsp14_vusolo2.ipk in BH, flashed PLi, installed nandsim module and rebooted.

Pli works (till now) without problems.

 

----------------------
root@vusolo2:~# opkg install /tmp/*.ipk
Installing kernel-module-nandsim (3.3.6-r6-bsp14) to root...
Configuring kernel-module-nandsim.
Please migrate your /etc/modutils/_vuplus file to /etc/modules-load.d/*.conf
----------------------
 

 

new kernel for solo2/duo2 is 3.3.8 not 3.3.6 ;)

 

and for other vuplus models is 3.1.1


Open Vision sources: https://github.com/OpenVisionE2


Re: block2mtd oder nandsim modules on Softwarefeed ? #20 rtzhjgg0

  • Senior Member
  • 568 posts

+13
Neutral

Posted 21 May 2013 - 13:11

I followed your instructions, generated a kernel-module-nandsim_3.3.6-r6-bsp14_vusolo2.ipk in BH, flashed PLi, installed nandsim module and rebooted.

Pli works (till now) without problems.

 

----------------------
root@vusolo2:~# opkg install /tmp/*.ipk
Installing kernel-module-nandsim (3.3.6-r6-bsp14) to root...
Configuring kernel-module-nandsim.
Please migrate your /etc/modutils/_vuplus file to /etc/modules-load.d/*.conf
----------------------
 

 

new kernel for solo2/duo2 is 3.3.8 not 3.3.6 ;)

 

and for other vuplus models is 3.1.1

Indeed, with 3.3.8 I get:

BH 2.0.3:
----------
root@vusolo2:/var/volatile/tmp# opkg download kernel-module-nandsim
Downloading http://feeds.vuplus-...p0_vusolo2.ipk.
Downloaded kernel-module-nandsim as ./kernel-module-nandsim_3.3.8-r0-bsp0_vusolo2.ipk.
----------

PLi:
----------
oot@vusolo2:~# opkg install /tmp/*.ipk
Installing kernel-module-nandsim (3.3.8-r0-bsp0) to root...
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for kernel-module-nandsim:
 *      kernel-3.3.8-2.0 *
 * opkg_install_cmd: Cannot install package kernel-module-nandsim.
----------


Selfsat H50M4
Ultimo4K /2xTwinS2, VTI, PLi, ATV...
NAS: Qnap221


7 user(s) are reading this topic

0 members, 7 guests, 0 anonymous users