From: shizheng <shizheng@mail.ustc.edu.cn>
To: linux-mtd@lists.infradead.org, vinit.agnihotri@gmail.com
Subject: Re: why ubimkvol can't recognize /dev/ubi0?
Date: Mon, 07 Jan 2008 13:51:39 +0800 [thread overview]
Message-ID: <399685257.10363@ustc.edu.cn> (raw)
Message-ID: <4781BDEB.7000207@mail.ustc.edu.cn> (raw)
In-Reply-To: <399646872.11492@ustc.edu.cn>
By default nandsim creates device of 8MB.
# cat /proc/mtd
dev: size erasesize name
mtd0: 08000000 00004000 "NAND simulator partition 0"
>
> Vinit Agnihotri wrote:
>> yeah & 1 more...use mtdram instead of nandsim.
>> modprobe mtdram=40960 will create mtd device of size 40MB,
>> besides that you can write small tool for creating & deleting volumes,
>> its simple.
>> you can find ioctl's & structures code in include/mtd/ubi-user.h.
>>
>> --Vinit.
>>
>> On Jan 6, 2008 1:23 PM, Vinit Agnihotri <vinit.agnihotri@gmail.com> wrote:
>>
>>> You have loaded Nandsim with default, may be theres not enough space
>>> on nandsim to create 20Mib volume,
>>> I guess by default nandsim creates device of 8MB. you can check it by
>>> looking a /proc/mtd.
>>> so try creating volume of smaller size or pass appropriate module
>>> parameters to nandsim module,
>>> do a modinfo nandsim or straight way have look in its code, I assume
>>> that you have proper privileges to run ubimkvol.
>>> still I dont have justification for that strange error, but try this out.
>>>
>>> --Vinit.
>>>
>>>
>>> On Jan 6, 2008 11:14 AM, 时正 <shizheng@mail.ustc.edu.cn> wrote:
>>>
>>>> Hi all,
>>>> I wanna have a try of ubifs on nandsim, and do as what the ubifs wiki
>>>> tells me
>>>> (http://osl.sed.hu/wiki/ubifs/index.php/Download_the_source).
>>>>
>>>> 1. compile, install and boot the new kernel(2.6.23)
>>>> the configuration option for ubi and nandsim is default turned on as module.
>>>>
>>>>
>>>> 2. make the mtd-utils to produce ubimkvol
>>>>
>>>> 3. create a ubi when I got the error
>>>> # modprobe nandsim
>>>> # modprobe ubi mtd=0
>>>> # ls /dev/ubi0 -l
>>>> crw-rw---- 1 root root 253, 0 2007-12-25 01:46 /dev/ubi0
>>>> # ls /sys/class/ubi -l
>>>> drwxr-xr-x 3 root root 0 2007-12-25 01:46 ubi0
>>>> -r--r--r-- 1 root root 4096 2007-12-25 01:49 version
>>>> # ubimkvol /dev/ubi0 -n 0 -N test -s 20MiB
>>>> libubi error: readdir failed on "/sys/class/ubi"
>>>> readdir: No such file or directory
>>>> ubimkvol error: "/dev/ubi0" is not an UBI device node
>>>>
>>>> it's so strange about the readdir failure, because there is the ubi0
>>>> entry in sysfs.
>>>>
>>>> did I miss any step, such as kernel configuration or mtd-tools installation?
>>>>
>>>> Thanks a lot!
>>>>
>>>> best wishes, shizheng
>>>>
>>>>
>>>> ______________________________________________________
>>>> Linux MTD discussion mailing list
>>>> http://lists.infradead.org/mailman/listinfo/linux-mtd/
>>>>
>>>>
>>>
>>> --
>>> Life is so short. So, follow some rules. Forgive quickly, believe
>>> slowly, love truly, laugh loudly & never avoid anything that makes U
>>> smile.
>>>
>>>
>>
>>
>>
next prev parent reply other threads:[~2008-01-07 5:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4781288A.8080407@mail.ustc.edu.cn>
2008-01-06 19:14 ` why ubimkvol can't recognize /dev/ubi0? 时正
[not found] ` <4781BDEB.7000207@mail.ustc.edu.cn>
2008-01-07 5:51 ` shizheng [this message]
[not found] ` <4781BFA6.4010207@mail.ustc.edu.cn>
2008-01-07 5:59 ` shizheng
2008-01-07 7:49 ` Adrian Hunter
2008-01-15 8:08 ` Artem Bityutskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=399685257.10363@ustc.edu.cn \
--to=shizheng@mail.ustc.edu.cn \
--cc=linux-mtd@lists.infradead.org \
--cc=vinit.agnihotri@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox