update swupdate in raw nand flash

497 views
Skip to first unread message

floria...@gmail.com

unread,
Feb 1, 2016, 8:30:18 AM2/1/16
to swupdate
Hi,

I was able to build swupdate with yocto and copied the
'ext3.gz.u-boot' image
to nand flash (mtd device) with 'nandwrite -p'. This works well and i was already able to update the rootfs with swupdate (imx6 board with uboot).

Then i wanted to update swupdate itself.
This is where i get an error
'nand: nand_do_write_ops: attempt to write non page aligned data'

When i investigated further, i found out that writing to raw nand is not encouraged and one should better use ubi and ubifs.

Is it adviced to run swupdate from ubi? i know normally you shouldn't risk to update the update/rescue system but there may be cases where it might be worth the risk.

Best regards,
Florian

Stefano Babic

unread,
Feb 1, 2016, 8:54:02 AM2/1/16
to floria...@gmail.com, swupdate
Hi Florian,

On 01/02/2016 14:30, floria...@gmail.com wrote:
> Hi,
>
> I was able to build swupdate with yocto and copied the
> 'ext3.gz.u-boot' image
> to nand flash (mtd device) with 'nandwrite -p'.

So you ask nandwrite to pad for you.

> This works well and i was already able to update the rootfs with swupdate (imx6 board with uboot).
>
> Then i wanted to update swupdate itself.
> This is where i get an error
> 'nand: nand_do_write_ops: attempt to write non page aligned data'
>
> When i investigated further, i found out that writing to raw nand is not encouraged and one should better use ubi and ubifs.

This is a general issue with NAND flash - nobody will help you if some
sectors are containing ECC errors if the data is not in a UBI container,
and you will discover it only when the sector becomes bad, that is too late.

>
> Is it adviced to run swupdate from ubi?

Why not ? There is no restriction in swupdate, and you can of course put
is where is the best location for your project.

> i know normally you shouldn't risk to update the update/rescue system but there may be cases where it might be worth the risk.

Yes, it is.

Best regards,
Stefano Babic

--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=====================================================================

floria...@gmail.com

unread,
Feb 1, 2016, 12:26:15 PM2/1/16
to swupdate, floria...@gmail.com, sba...@denx.de
Hi Stefano,

thank you for your fast reply!
I am just getting a grip on the whole subject.
I'll have to reconfigure u-boot to build with ubi/ubifs support.

This project is really great. Thank you.

best regards,
Florian Voit

Reply all
Reply to author
Forward
0 new messages