diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2016-07-12 20:28:12 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-07-22 09:53:00 -0400 |
commit | 6f4e7d3c75a81decc20de0218729e9770448ffc0 (patch) | |
tree | 2f0a4f9a9e0fbe9016390e2abfef930f6a9d6f7e /drivers/Makefile | |
parent | 735717d18a012a6f34c74dd98cec8f46bac5c51c (diff) | |
download | u-boot-6f4e7d3c75a81decc20de0218729e9770448ffc0.zip u-boot-6f4e7d3c75a81decc20de0218729e9770448ffc0.tar.gz u-boot-6f4e7d3c75a81decc20de0218729e9770448ffc0.tar.bz2 |
spl: Lightweight UBI and UBI fastmap support
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 <tglx@linutronix.de>
Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Acked-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'drivers/Makefile')
-rw-r--r-- | drivers/Makefile | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/Makefile b/drivers/Makefile index b3ac8a6..ad5cbae 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -27,6 +27,7 @@ obj-$(CONFIG_SPL_MTD_SUPPORT) += mtd/ obj-$(CONFIG_SPL_NAND_SUPPORT) += mtd/nand/ obj-$(CONFIG_SPL_ONENAND_SUPPORT) += mtd/onenand/ obj-$(CONFIG_SPL_SPI_FLASH_SUPPORT) += mtd/spi/ +obj-$(CONFIG_SPL_UBI) += mtd/ubispl/ obj-$(CONFIG_SPL_DMA_SUPPORT) += dma/ obj-$(CONFIG_SPL_ETH_SUPPORT) += net/ obj-$(CONFIG_SPL_ETH_SUPPORT) += net/phy/ |