public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [patch 0/2] SPL: Lightweight UBI and UBI fastmap support
@ 2014-07-05  9:48 Thomas Gleixner
  2014-07-05  9:48 ` [U-Boot] [patch 1/2] nand_spl_simple: Add a simple flash read function Thomas Gleixner
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Thomas Gleixner @ 2014-07-05  9:48 UTC (permalink / raw)
  To: u-boot

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.

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.

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.

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

Thanks,

	tglx

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-09-30  4:49 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-05  9:48 [U-Boot] [patch 0/2] SPL: Lightweight UBI and UBI fastmap support Thomas Gleixner
2014-07-05  9:48 ` [U-Boot] [patch 1/2] nand_spl_simple: Add a simple flash read function Thomas Gleixner
2014-07-05  9:48 ` [U-Boot] [patch 2/2] spl: Lightweight UBI and UBI fastmap support Thomas Gleixner
2014-08-08 18:56   ` Tom Rini
2014-09-01  7:44     ` Thomas Gleixner
2014-09-29 22:21   ` Richard Weinberger
2014-09-30  4:49     ` Heiko Schocher
2014-07-12  4:54 ` [U-Boot] [patch 0/2] SPL: " Heiko Schocher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox