Dear Kyungmin Park,

2008/10/28 Kyungmin Park <[EMAIL PROTECTED]>:
> UBI (Latin: "where?") stands for "Unsorted Block Images". It is a volume 
> management system for flash devices which manages multiple logical volumes on 
> a single physical flash device and spreads the I/O load (i.e, wear-leveling) 
> across the whole flash chip.
>
> In a sense, UBI may be compared to the Logical Volume Manager (LVM). Whereas 
> LVM maps logical sectors to physical sectors, UBI maps logical eraseblocks to 
> physical eraseblocks. But besides the mapping, UBI implements global 
> wear-leveling and I/O errors handling.
>
> For more details, Please visit the following URL.
> http://www.linux-mtd.infradead.org/doc/ubi.html
>
> Signed-off-by: Kyungmin Park <[EMAIL PROTECTED]>
> ---
> diff --git a/include/ubi_uboot.h b/include/ubi_uboot.h
> new file mode 100644
> index 0000000..b4b2fa2
> --- /dev/null
> +++ b/include/ubi_uboot.h
> @@ -0,0 +1,218 @@
> +/*
> + * Header file for UBI support for U-Boot
> + *
> + * Adaptation from kernel to U-Boot
> + *
> + *  Copyright (C) 2005-2007 Samsung Electronics
> + *  Kyungmin Park <[EMAIL PROTECTED]>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
> + */
> +
> +#ifndef __UBOOT_UBI_H
> +#define __UBOOT_UBI_H
> +
> +#include <common.h>
> +#include <malloc.h>
> +#include <div64.h>
> +#include <linux/crc32.h>
> +#include <linux/mtd/mtd.h>
> +
> +#ifdef CONFIG_CMD_ONENAND
> +#include <onenand_uboot.h>
> +#endif
> +
> +#include <asm/errno.h>
> +
> +#define DPRINTK(format, args...)                                       \
> +do {                                                                   \
> +       printf("%s[%d]: " format "\n", __func__, __LINE__, ##args);     \
> +} while (0)
> +
> +/* configurable */
> +#define CONFIG_MTD_UBI_WL_THRESHOLD    4096
> +#define CONFIG_MTD_UBI_BEB_RESERVE     1
> +#define UBI_IO_DEBUG                   0
> +
> +/* #define CONFIG_MTD_UBI_DEBUG */
> +/* #define CONFIG_MTD_UBI_DEBUG_PARANOID */
> +
> +#define CONFIG_MTD_UBI_DEBUG_DISABLE_BGT
> +/* #define CONFIG_MTD_UBI_DEBUG_MSG */
> +/* #define CONFIG_MTD_UBI_DEBUG_MSG_EBA */
> +/* #define CONFIG_MTD_UBI_DEBUG_MSG_WL */
> +/* #define CONFIG_MTD_UBI_DEBUG_MSG_IO */
> +/* #define CONFIG_MTD_UBI_DEBUG_MSG_BLD */

These configs should be documented somewhere, e.g. in doc/README.ubi .


Regards, Magnus
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to