From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Fri, 22 Jul 2016 20:10:35 -0400 Subject: [U-Boot] [U-Boot, v5, 04/26] spl: Lightweight UBI and UBI fastmap support In-Reply-To: <1468348114-11442-5-git-send-email-ladis@linux-mips.org> References: <1468348114-11442-5-git-send-email-ladis@linux-mips.org> Message-ID: <20160723001035.GA14698@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tue, Jul 12, 2016 at 08:28:12PM +0200, Ladislav Michl wrote: > From: Thomas Gleixner > > Booting a payload out of NAND FLASH from the SPL is a crux today, as > it requires hard partioned FLASH. Not a brilliant idea with the > reliability of todays NAND FLASH chips. > > The upstream UBI + UBI fastmap implementation which is about to > brought to u-boot is too heavy weight for SPLs as it provides way more > functionality than needed for a SPL and does not even fit into the > restricted SPL areas which are loaded from the SoC boot ROM. > > So this provides a fast and lightweight implementation of UBI scanning > and UBI fastmap attach. The scan and logical to physical block mapping > code is developed from scratch, while the fastmap implementation is > lifted from the linux kernel source and stripped down to fit the SPL > needs. > > 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 > > The code requires quite some storage. The largest and unknown part of > it is the number of fastmap blocks to read. Therefor the data > structure is not put into the BSS. The code requires a pointer to free > memory handed in which is initialized by the UBI attach code itself. > > See doc/README.ubispl for further information on how to use it. > > This shares the ubi-media.h and crc32 implementation of drivers/mtd/ubi > There is no way to share the fastmap code, as UBISPL only utilizes the > slightly modified functions ubi_attach_fastmap() and ubi_scan_fastmap() > from the original kernel ubi fastmap implementation. > > Signed-off-by: Thomas Gleixner > Signed-off-by: Ladislav Michl > Acked-by: Heiko Schocher > Reviewed-by: Tom Rini Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: