Hallo Bastian,

> An ubifs image created with RFSB can be placed in an ubi image.
> This image can be flashed with the ubiformat utility.
>
> Signed-off-by: Bastian Ruppert <[email protected]>

Thanks for doing the requested changes.  Actually trying out the patch,
I found two last things which I want you to change:

[...]

> +config UBI_ERASE_BLOCK_SIZE
> +       depends IMAGE_UBI
> +       int "ubi Eraseblock size in KiB"
> +       default 0
> +       help
> +         You must set this value because it is device dependent.  Set
> +      the Eraseblock size (peb-size) as reported by the mtdinfo utility.

Please don't prescribe the "KiB" here.  All the other parameters have no
default of being in kilobytes, so this one shouldn't either.  Actually I
entered 16384 here (not reading the text fully) only to see an error :)

[...]

> +image_ubi: $(UBI_FILE) $(UBIFS_FILE)
> +
> +$(UBI_FILE): $(STAMP_ROOTFS)
> +     @echo Generating UBI image
> +     @if [[ $(UBI_SUB_PAGE_SIZE) == 0 || $(UBI_ERASE_BLOCK_SIZE) == 0 
> ]];then \
> +             echo "ERROR: Not all UBI parameters set.  Fix your 
> configuration and try again" >&2 ; \
> +     else \
> +     echo "[ubifs]" > $(UBI_CFG_FILE);       \
> +     echo "mode=ubi" >> $(UBI_CFG_FILE);     \
> +     echo "image="$(UBIFS_FILE) >> $(UBI_CFG_FILE);  \
> +     echo "vol_id=0" >> $(UBI_CFG_FILE);     \
> +     echo "vol_size="$(IMAGE_SIZE)"KiB" >> $(UBI_CFG_FILE); \
> +     echo "vol_type=dynamic" >> $(UBI_CFG_FILE);\
> +     echo "vol_name="$(UBI_CFG_VOL_NAME) >> $(UBI_CFG_FILE);\
> +     echo "vol_flags=autoresize" >> $(UBI_CFG_FILE);\
> +     $(UBINIZE) --output=$(UBI_FILE) --min-io-size=$(UBIFS_MIN_IO_SIZE) \
> +             --peb-size=$(UBI_ERASE_BLOCK_SIZE)KiB 
> --sub-page-size=$(UBI_SUB_PAGE_SIZE) \
> +             $(UBI_CFG_FILE);\

When ubinize errors out, it still writes a file with size 0.  So fixing
the problem and re-running make will not do anything useful.  So please
add an '|| (rm $@; false)' at the end of the command.  This way we
remove the file and still pass the error up to make.

Thanks
  Detlev

-- 
Per Anhalter durch die Galaxis hat den gewissen Effekt,  den auch eine Sendung
von Monty Python auslöst;  es läßt alles, was direkt danach in Radio, im Fern-
sehen oder sonstwo auftaucht, absolut lächerlich wirken. Es hat dieses gewisse
Etwas, das alles in einem gereinigten Licht erscheinen läßt.  - Robert Cushman
--
DENX Software Engineering GmbH,      MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich,  Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: [email protected]
_______________________________________________
eldk mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/eldk

Reply via email to