nand-dynamic_partitions.patch
commite05835df019027391f58f9d8ce5e1257d6924798
authorHarald Welte <laforge@openmoko.org>
Fri, 11 Apr 2008 13:26:48 +0000 (11 14:26 +0100)
committerwarmcat <andy@warmcat.com>
Fri, 11 Apr 2008 13:26:48 +0000 (11 14:26 +0100)
tree78a37fada16bebc83dae547acd3392c4aa0a4d03
parent2be17241a7c5133b49c14f9f9219a32f14e700ac
nand-dynamic_partitions.patch
This patch adds support for 'dynamic partitions'.  This basically
works as follows:
* The nand code generates a bad-block-table at the first scan of the chip
* The dynamic partition code calculates the raw partition sizes based on
  the bad block table.  E.g. if you have a partition of size 0x30000, and there are
  two bad blocks (0x4000 each) in it, the raw size will increase to 0x38000, and the
  following partitions get shifted towards the end of flash.

Please note that currently the desired partition sizes are stored at compile-time
in an array in drivers/nand/nand_bbt.c, so this definitely needs to change before
submitting/merging upstream.

In order to calculate the partiton map (and set mtdparts accordingly), you can use
the 'dynpart' command at the prompt.  Use 'saveenv' to make the setting permanent.

Signed-off-by: Harald Welte <laforge@openmoko.org>
board/neo1973/gta01/gta01.c
board/qt2410/qt2410.c
common/cmd_dynenv.c
common/cmd_jffs2.c
common/cmd_nand.c
drivers/mtd/nand/nand_bbt.c
include/configs/neo1973_gta01.h
include/configs/qt2410.h
include/util.h