mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-10 04:26:19 -04:00
Separate mtdparts command from jffs2
On Thu, Mar 19, 2009 at 01:30:36PM +0100, Stefan Roese wrote: > Currently the mtdparts commands are included in the jffs2 command support. > This doesn't make sense anymore since other commands (e.g. UBI) use this > infrastructure as well now. This patch separates the mtdparts commands from > the jffs2 commands making it possible to only select mtdparts when no JFFS2 > support is needed. One more leftover... Let nboot command know about partitions even if JFFS2 support is not enabled. Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Acked-by: Stefan Roese <sr@denx.de>
This commit is contained in:
parent
67c2e57c08
commit
0c8a84916c
@ -29,7 +29,7 @@
|
|||||||
#include <jffs2/jffs2.h>
|
#include <jffs2/jffs2.h>
|
||||||
#include <nand.h>
|
#include <nand.h>
|
||||||
|
|
||||||
#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_CMD_MTDPARTS)
|
#if defined(CONFIG_CMD_MTDPARTS)
|
||||||
|
|
||||||
/* parition handling routines */
|
/* parition handling routines */
|
||||||
int mtdparts_init(void);
|
int mtdparts_init(void);
|
||||||
@ -105,7 +105,7 @@ static int
|
|||||||
arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, size_t *size)
|
arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, size_t *size)
|
||||||
{
|
{
|
||||||
int idx = nand_curr_device;
|
int idx = nand_curr_device;
|
||||||
#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_CMD_MTDPARTS)
|
#if defined(CONFIG_CMD_MTDPARTS)
|
||||||
struct mtd_device *dev;
|
struct mtd_device *dev;
|
||||||
struct part_info *part;
|
struct part_info *part;
|
||||||
u8 pnum;
|
u8 pnum;
|
||||||
@ -153,7 +153,7 @@ arg_off_size(int argc, char *argv[], nand_info_t *nand, ulong *off, size_t *size
|
|||||||
*size = nand->size - *off;
|
*size = nand->size - *off;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_CMD_MTDPARTS)
|
#if defined(CONFIG_CMD_MTDPARTS)
|
||||||
out:
|
out:
|
||||||
#endif
|
#endif
|
||||||
printf("device %d ", idx);
|
printf("device %d ", idx);
|
||||||
@ -598,7 +598,7 @@ int do_nandboot(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
|
|||||||
char *boot_device = NULL;
|
char *boot_device = NULL;
|
||||||
int idx;
|
int idx;
|
||||||
ulong addr, offset = 0;
|
ulong addr, offset = 0;
|
||||||
#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_CMD_MTDPARTS)
|
#if defined(CONFIG_CMD_MTDPARTS)
|
||||||
struct mtd_device *dev;
|
struct mtd_device *dev;
|
||||||
struct part_info *part;
|
struct part_info *part;
|
||||||
u8 pnum;
|
u8 pnum;
|
||||||
@ -643,7 +643,7 @@ int do_nandboot(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])
|
|||||||
offset = simple_strtoul(argv[3], NULL, 16);
|
offset = simple_strtoul(argv[3], NULL, 16);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
#if defined(CONFIG_CMD_JFFS2) && defined(CONFIG_CMD_MTDPARTS)
|
#if defined(CONFIG_CMD_MTDPARTS)
|
||||||
usage:
|
usage:
|
||||||
#endif
|
#endif
|
||||||
cmd_usage(cmdtp);
|
cmd_usage(cmdtp);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user