From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Sat, 12 Jul 2014 06:54:19 +0200 Subject: [U-Boot] [patch 0/2] SPL: Lightweight UBI and UBI fastmap support In-Reply-To: <20140705092042.528529053@linutronix.de> References: <20140705092042.528529053@linutronix.de> Message-ID: <53C0BF7B.1050801@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 Thomas, Am 05.07.2014 11:48, schrieb Thomas Gleixner: > Utilizing NAND FLASH requires proper wear leveling and bitflip > management. Linux choice for this is UBI. The upstream UBI > implementation is far too big for a SPL, but it is desired to load > arbitrary payload including u-boot itself from a UBI managed NAND > FLASH. That restricts the non-UBI managed part of the NAND flash to > the first few eraseblocks which are reserved for the SoC boot ROM to > load the SPL. > > The following patches provide a lightweight and fast UBI attach and > load code, which supports fastmap and full scan mode. Thnaks for your work. I try to look into this patches ASAP... > The text foot print on the board which I used for development is: > > 6854 0 0 6854 1abd drivers/mtd/ubispl/built-in.o > > Attaching a NAND chip with 4096 physical eraseblocks (4 blocks are > reserved for the SPL) takes: > > In full scan mode: 1172ms > In fastmap mode: 95ms > > With that and a moderate sized kernel image, I'm able to hand off to > the kernel within less than 500ms. Great! > The scan and logical to physical block mapping code is developed from > scratch, while the fastmap functions are lifted from the linux kernel > source and adjusted to fit the SPL needs. > > The implementation is paranoid and carefully preserves the UBI > robustness. > > For now I keep a private copy of ubi-media.h which should be shared > with the drivers/mtd/ubi/ one once Heiko has synced it to the 3.14 > source. Yes, that was also my first thought, as I looked roughly over your patches. > There is room for more boot time optimizations: > > - Implement sub page reads for nand_spl_simple > > - Hand the UBI data from SPL to kernel to avoid rescan of the > fastmap/flash bye, Heiko -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany