• Thomas Gleixner's avatar
    spl: Lightweight UBI and UBI fastmap support · 6f4e7d3c
    Thomas Gleixner authored
    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: default avatarThomas Gleixner <tglx@linutronix.de>
    Signed-off-by: default avatarLadislav Michl <ladis@linux-mips.org>
    Acked-by: default avatarHeiko Schocher <hs@denx.de>
    Reviewed-by: default avatarTom Rini <trini@konsulko.com>
    6f4e7d3c
Name
Last commit
Last update
..
DocBook Loading commit data...
SPI Loading commit data...
SPL Loading commit data...
device-tree-bindings Loading commit data...
driver-model Loading commit data...
uImage.FIT Loading commit data...
I2C_Edge_Conditions Loading commit data...
README.440-DDR-performance Loading commit data...
README.AMCC-eval-boards-cleanup Loading commit data...
README.ARC Loading commit data...
README.ARM-memory-map Loading commit data...
README.AVR32 Loading commit data...
README.AVR32-port-muxing Loading commit data...
README.Heterogeneous-SoCs Loading commit data...
README.JFFS2 Loading commit data...
README.JFFS2_NAND Loading commit data...
README.LED Loading commit data...
README.LED_display Loading commit data...
README.MPC866 Loading commit data...
README.N1213 Loading commit data...
README.NDS32 Loading commit data...
README.NetConsole Loading commit data...
README.OFT Loading commit data...
README.POST Loading commit data...
README.SNTP Loading commit data...
README.SPL Loading commit data...
README.TPL Loading commit data...
README.VLAN Loading commit data...
README.VSC3316-3308 Loading commit data...
README.ag101p Loading commit data...
README.android-fastboot Loading commit data...
README.android-fastboot-protocol Loading commit data...
README.arm-caches Loading commit data...
README.arm-relocation Loading commit data...
README.arm64 Loading commit data...
README.at91 Loading commit data...
README.at91-soc Loading commit data...
README.atmel_mci Loading commit data...
README.atmel_pmecc Loading commit data...
README.autoboot Loading commit data...
README.b4860qds Loading commit data...
README.bedbug Loading commit data...
README.bitbangMII Loading commit data...
README.blackfin Loading commit data...
README.bootmenu Loading commit data...
README.bus_vcxk Loading commit data...
README.cfi Loading commit data...
README.clang Loading commit data...
README.commands Loading commit data...
README.commands.itest Loading commit data...
README.commands.spl Loading commit data...
README.console Loading commit data...
README.davinci Loading commit data...
README.davinci.nand_spl Loading commit data...
README.dfutftp Loading commit data...
README.displaying-bmps Loading commit data...
README.distro Loading commit data...
README.dns Loading commit data...
README.drivers.eth Loading commit data...
README.efi Loading commit data...
README.enetaddr Loading commit data...
README.esbc_validate Loading commit data...
README.ext4 Loading commit data...
README.falcon Loading commit data...
README.fdt-control Loading commit data...
README.fec_mxc Loading commit data...
README.fsl-clk Loading commit data...
README.fsl-ddr Loading commit data...
README.fsl-dpaa Loading commit data...
README.fsl-esdhc Loading commit data...
README.fsl-hwconfig Loading commit data...
README.fsl-trustzone-components Loading commit data...
README.fsl_iim Loading commit data...
README.fuse Loading commit data...
README.generic-board Loading commit data...
README.generic_usb_ohci Loading commit data...
README.gpt Loading commit data...
README.hwconfig Loading commit data...
README.i2c Loading commit data...
README.idma2intr Loading commit data...
README.imx25 Loading commit data...
README.imx27 Loading commit data...
README.imx31 Loading commit data...
README.imx5 Loading commit data...
README.imx6 Loading commit data...
README.imximage Loading commit data...
README.iomux Loading commit data...
README.kconfig Loading commit data...
README.kwbimage Loading commit data...
README.link-local Loading commit data...
README.lynxkdi Loading commit data...
README.m54418twr Loading commit data...
README.m68k Loading commit data...
README.malta Loading commit data...
README.marubun-pcmcia Loading commit data...
README.memory-test Loading commit data...
README.menu Loading commit data...
README.mips Loading commit data...
README.mpc5xx Loading commit data...
README.mpc74xx Loading commit data...
README.mpc83xx.ddrecc Loading commit data...
README.mpc83xxads Loading commit data...
README.mpc85xx Loading commit data...
README.mpc85xx-sd-spi-boot Loading commit data...
README.mpc85xx-spin-table Loading commit data...
README.mpc85xxads Loading commit data...
README.mpc85xxcds Loading commit data...
README.mxc_hab Loading commit data...
README.mxc_ocotp Loading commit data...
README.mxs Loading commit data...
README.mxsimage Loading commit data...
README.nand Loading commit data...
README.nand-boot-ppc440 Loading commit data...
README.ne2000 Loading commit data...
README.nios2 Loading commit data...
README.nokia_rx51 Loading commit data...
README.odroid Loading commit data...
README.omap-reset-time Loading commit data...
README.omap-ulpi-viewport Loading commit data...
README.omap3 Loading commit data...
README.pblimage Loading commit data...
README.plan9 Loading commit data...
README.power-framework Loading commit data...
README.ppc440 Loading commit data...
README.pxe Loading commit data...
README.qemu-mips Loading commit data...
README.ramboot-ppc85xx Loading commit data...
README.rmobile Loading commit data...
README.rockchip Loading commit data...
README.s5pc1xx Loading commit data...
README.sata Loading commit data...
README.sched Loading commit data...
README.scrapyard Loading commit data...
README.semihosting Loading commit data...
README.serial_multi Loading commit data...
README.sh Loading commit data...
README.sh7752evb Loading commit data...
README.sh7753evb Loading commit data...
README.sha1 Loading commit data...
README.silent Loading commit data...
README.socfpga Loading commit data...
README.spear Loading commit data...
README.splashprepare Loading commit data...
README.srio-pcie-boot-corenet Loading commit data...
README.standalone Loading commit data...
README.t1040-l2switch Loading commit data...
README.ti-secure Loading commit data...
README.trace Loading commit data...
README.ubi Loading commit data...
README.ubispl Loading commit data...
README.ublimage Loading commit data...
README.unaligned-memory-access.txt Loading commit data...
README.uniphier Loading commit data...
README.update Loading commit data...
README.usb Loading commit data...
README.vf610 Loading commit data...
README.video Loading commit data...
README.vxworks Loading commit data...
README.watchdog Loading commit data...
README.x86 Loading commit data...
README.zfs Loading commit data...
README.zynq Loading commit data...
feature-removal-schedule.txt Loading commit data...
git-mailrc Loading commit data...
kwboot.1 Loading commit data...
mkimage.1 Loading commit data...