[ELDK] [PATCH RFSB] Add generation of ubifs image
Stefano Babic
sbabic at denx.de
Fri Apr 23 17:21:02 CEST 2010
Detlev Zundel wrote:
> Hi Stefano,
Hi Detlev,
> Thanks, but I have some doubts. It is very hard to come up with good
> defaults for the values we need here,
...there are no defaults at all. A wrong value generates a unusable
image....
> so either we attach a big warning
> at all options or default them to 0 and generate an error when trying to
> generate the filesystem telling the user what he has to do to find the
> correct values.
>
> Specifiying arbitrary values here is a recipe for disaster.
>
> What do you think?
I agree it is better to default all values to zero, because zero is a
not allowed value. And checking during image generation for a zero value
can report an error if a value is not set.
>> + Minimum I/O size for the MTD device
>
> So maybe add a comment that this parameter depends on the actual device
> being used? For nor-flash it is 1, for nand maybe add some comment that
> the correct setting can be found by running "mtdinfo -u" on the target
> system?
>
> Maybe even include this URL:
>
> http://www.linux-mtd.infradead.org/doc/ubi.html#L_min_io_unit
Yes, thanks for URL. I will change it.
>
>> +
>> +config UBIFS_LEB_SIZE
>> + depends IMAGE_UBIFS
>> + int "Default ubi leb size"
>> + default 16384
>> + help
>> + Default leb size as reported by mtdinfo utility
>
> Again, please add a comment that the default very likely is not correct.
ok, I sill set the default to zero and I will add a comment.
>> +$(UBIFS_FILE): $(STAMP_ROOTFS)
>> + @echo Generating UBIFS image
>> + mkfs.ubifs $(UBIFS_FLAGS) --root=$(BUILD_RFS) --leb-size=$(UBIFS_LEB_SIZE) \
>> + --min-io-size=$(UBIFS_MIN_IO_SIZE) \
>> + --max-leb-cnt=$(UBIFS_MAX_LEB_COUNT) -o $(UBIFS_FILE)
>
> Or include a 0 check here and throw an instruction on how to find the
> parameters.....
A check here is a good thing, I will introduce it in the next patch version.
Stefano
--
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
More information about the eldk
mailing list