public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Heiko Schocher <hs@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RFC][DFU] Unification of dfu_alt_info alt settings description + command execution
Date: Fri, 01 Nov 2013 07:15:32 +0100	[thread overview]
Message-ID: <52734704.5010606@denx.de> (raw)
In-Reply-To: <20131031182541.3a3020c6@amdc308.digital.local>

Hello Lukasz,

Am 31.10.2013 18:25, schrieb Lukasz Majewski:
> Dear All,
>
> As a follow up from u-boot's mini-summit at ELCE 2013, I would like to
> once again share the new format of dfu_alt_info env variable (for those
> who couldn't attend).
>
> dfu_alt_info_cleanup:
>
>      |---+-------------+-------------+---------+----------------------|
>      |   |<dev_name>: |<alt_name>, |<type>   | extra params         |
>      |---+-------------+-------------+---------+----------------------|
>      | 1 | mmc0:       | rootfs,     | part;   | -                    |
>      | 2 | mmc0:       | uImage,     | file,   | part, dir;           |
>      | 3 | nand0:      | u-boot.bin, | raw,    | start, size;         |

One more usecase for nand (just for documentation):

        | 4 | nand0:      | u-boot      | part,   | -                    |

Here is "alt_name" == "mtd partition name" -> start, size from mtd info

>      | 4 | mmc0:       | u-boot.bin, | raw,    | start_lba, size_lba; |
>      | 5 | ram0:       | uImage,     | ram,    | start, size;         |
>      | 6 | ubi0:       | kernel0,    | raw;    | -                    |

There are 2 usecases with ubi (Please correct me, if I am wrong):

a) update a complete ubi device:

        | 6 | ubi0:      | kernel,     | part    | -                    |
        | 7 | ubi0:      | kernel,     | raw     | start, size          |

with them, we can update a complete "ubi device" with n ubi volumes
in it (This is currently used on the am335x based siemens boards).

I am not sure if ubi is more a "device" or more a "type". But as ubi can
be used also on nor flash, I think in the meantime, it is more a device
than a type in the sight of dfu ... but I vary here in my opinion...

This usecase is currently implemented for nand, and same code is
used as for "raw" or "part" nand usecases, just in the ubi case a
flag is set, which does:

- erase nand sectors with WITH_DROP_FFS
- erase spare sectors at the end of the area

b) update single ubi volume.

We need this infos for updating a ubi volume

- ubi device name = mtd partition name
- vid header offset
- ubi volume name
- ubi volume size
- ubi volume type

- steps for updating a ubi volume
   - attach to an ubi device
     "ubi part device_name vid_header_offset"
   - if volume_name !exist, create it
     "ubi create volume_name size type"
   - write ubi volume
     "ubi write img_addr volume_name size"


        | 8 | ubi0:      | data,        | volume  | vid_off, vol_nam, vol_sz, vol_type |
                           ^
                           device name
   You see, the list gets long ... or maybe we can cover this usecase
   with dfu command?

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany

      parent reply	other threads:[~2013-11-01  6:15 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-16 15:35 [U-Boot] [RFC][DFU] Unification of dfu_alt_info alt settings description + command execution Lukasz Majewski
2013-07-16 21:27 ` Tormod Volden
2013-07-16 21:46   ` Lukasz Majewski
2013-07-17 10:26 ` Heiko Schocher
2013-07-17 14:34   ` Lukasz Majewski
2013-07-17 17:32     ` Tormod Volden
2013-07-18  5:36     ` Heiko Schocher
2013-07-18  7:13       ` Lukasz Majewski
2013-07-18  4:17   ` Marek Vasut
2013-07-18  5:16     ` Heiko Schocher
2013-07-18  8:09       ` Wolfgang Denk
2013-07-18 15:10         ` Marek Vasut
2013-07-19  4:45           ` Heiko Schocher
2013-07-19 13:55             ` Marek Vasut
2013-07-18 16:39 ` Tom Rini
2013-07-18 17:30   ` Michael Cashwell
2013-07-18 20:17     ` Lukasz Majewski
2013-07-18 22:33       ` Tom Rini
2013-08-23 10:07     ` Lukasz Majewski
2013-10-31 17:25 ` Lukasz Majewski
2013-10-31 20:32   ` Wolfgang Denk
2013-10-31 21:20     ` Lukasz Majewski
2013-10-31 23:11       ` Wolfgang Denk
2013-11-04  6:52         ` Lukasz Majewski
2013-11-01  6:15   ` Heiko Schocher [this message]

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=52734704.5010606@denx.de \
    --to=hs@denx.de \
    --cc=u-boot@lists.denx.de \
    /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