From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Fri, 01 Nov 2013 07:15:32 +0100 Subject: [U-Boot] [RFC][DFU] Unification of dfu_alt_info alt settings description + command execution In-Reply-To: <20131031182541.3a3020c6@amdc308.digital.local> References: <20130716173521.3dd7ec9e@amdc308.digital.local> <20131031182541.3a3020c6@amdc308.digital.local> Message-ID: <52734704.5010606@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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: > > |---+-------------+-------------+---------+----------------------| > | |: |, | | 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