Separate mtdparts command from jffs2
Subsystems (2)
PATCH v2 1/1 Separate mtdparts command from jffs2
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.
---
v2:
This patch is based in the original version by Kyungmin Park with some additional changes by Jean-Christophe Plagniol-Villard. Changes are the patch description and removal of the compilation errors/warnings.
README | 1 +
board/fads/fads.h | 4 +-
common/Makefile | 1 +
common/cmd_flash.c | 12 +-
common/cmd_jffs2.c | 1725 +-------------------------------
common/{cmd_jffs2.c => cmd_mtdparts.c} | 378 +-------
common/cmd_nand.c | 10 +-
include/config_cmd_all.h | 1 +
include/configs/ADNPESC1.h | 4 +-
include/configs/Alaska8220.h | 4 +-
include/configs/BAB7xx.h | 4 +-
include/configs/BC3450.h | 2 +-
include/configs/CATcenter.h | 4 +-
include/configs/DB64360.h | 4 +-
include/configs/DB64460.h | 4 +-
include/configs/DK1C20.h | 4 +-
include/configs/DK1S10.h | 4 +-
include/configs/ELPPC.h | 4 +-
include/configs/FPS850L.h | 2 +-
include/configs/FPS860L.h | 2 +-
include/configs/LANTEC.h | 4 +-
include/configs/MHPC.h | 4 +-
include/configs/MIP405.h | 4 +-
include/configs/ML2.h | 4 +-
include/configs/MPC8266ADS.h | 4 +-
include/configs/NC650.h | 4 +-
include/configs/NETTA.h | 4 +-
include/configs/PPChameleonEVB.h | 4 +-
include/configs/R360MPI.h | 4 +-
include/configs/RBC823.h | 4 +-
include/configs/Rattler.h | 4 +-
include/configs/SIMPC8313.h | 2 +-
include/configs/SXNI855T.h | 4 +-
include/configs/TB5200.h | 2 +-
include/configs/TQM5200.h | 2 +-
include/configs/TQM823L.h | 2 +-
include/configs/TQM823M.h | 2 +-
include/configs/TQM834x.h | 2 +-
include/configs/TQM850L.h | 2 +-
include/configs/TQM850M.h | 2 +-
include/configs/TQM855L.h | 2 +-
include/configs/TQM855M.h | 2 +-
include/configs/TQM85xx.h | 4 +-
include/configs/TQM860L.h | 2 +-
include/configs/TQM860M.h | 2 +-
include/configs/TQM862L.h | 2 +-
include/configs/TQM862M.h | 2 +-
include/configs/TQM866M.h | 2 +-
include/configs/ZUMA.h | 4 +-
include/configs/apollon.h | 2 +-
include/configs/cm5200.h | 2 +-
include/configs/debris.h | 4 +-
include/configs/ep7312.h | 4 +-
include/configs/ep8260.h | 4 +-
include/configs/fx12mm.h | 2 +-
include/configs/hymod.h | 4 +-
include/configs/idmr.h | 2 +-
include/configs/impa7.h | 4 +-
include/configs/imx31_litekit.h | 2 +-
include/configs/imx31_phycore.h | 2 +-
include/configs/incaip.h | 4 +-
include/configs/innokom.h | 4 +-
include/configs/microblaze-generic.h | 2 +-
include/configs/modnet50.h | 4 +-
include/configs/motionpro.h | 2 +-
include/configs/mx1fs2.h | 4 +-
include/configs/mx31ads.h | 2 +-
include/configs/netstar.h | 2 +-
include/configs/omap2420h4.h | 4 +-
include/configs/qong.h | 2 +-
include/configs/sc3.h | 2 +-
include/configs/sc520_cdp.h | 4 +-
include/configs/sc520_spunk.h | 4 +-
include/configs/smmaco4.h | 2 +-
include/configs/trab.h | 2 +-
include/configs/v37.h | 4 +-
include/configs/vct.h | 2 +-
include/configs/virtlab2.h | 2 +-
include/configs/voiceblue.h | 2 +-
include/configs/xilinx-ppc.h | 4 +-
include/configs/xsengine.h | 4 +-
81 files changed, 131 insertions(+), 2223 deletions(-)
copy common/{cmd_jffs2.c => cmd_mtdparts.c} (84%)README +1 -0
@@ -633,6 +633,7 @@ The following options need to be configured: CONFIG_CMD_MII * MII utility commands CONFIG_CMD_NAND * NAND support CONFIG_CMD_NET bootp, tftpboot, rarpboot + CONFIG_CMD_MTDPARTS * MTD partition support CONFIG_CMD_PCA953X * PCA953x I2C gpio commands CONFIG_CMD_PCA953X_INFO * PCA953x I2C gpio info command CONFIG_CMD_PCI * pciinfo
board/fads/fads.h +2 -2
@@ -241,7 +241,7 @@* */ /* No command line, one static partition, whole device */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nor0"#define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF#define CONFIG_JFFS2_PART_OFFSET 0x00000000
@@ -249,7 +249,7 @@/* mtdparts command line support */ /* Note: fake mtd_id used, no linux mtd map file */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=fads0,nor1=fads-1,nor2=fads-2,nor3=fads-3" #define MTDPARTS_DEFAULT "mtdparts=fads-0:- at 1m(user1),fads-1:-(user2),fads-2:-(user3),fads-3:-(user4)" */
common/Makefile +1 -0
@@ -98,6 +98,7 @@ COBJS-$(CONFIG_CMD_IMMAP) += cmd_immap.o COBJS-$(CONFIG_CMD_IRQ) += cmd_irq.o COBJS-$(CONFIG_CMD_ITEST) += cmd_itest.o COBJS-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o +COBJS-$(CONFIG_CMD_MTDPARTS) += cmd_mtdparts.o COBJS-$(CONFIG_CMD_LICENSE) += cmd_license.o COBJS-y += cmd_load.o COBJS-$(CONFIG_LOGBUFFER) += cmd_log.o
common/cmd_flash.c +6 -6
@@ -31,7 +31,7 @@#include <dataflash.h> #endif -#if defined(CONFIG_CMD_JFFS2 ) && defined(CONFIG_JFFS2_CMDLINE ) +#if defined(CONFIG_CMD_JFFS2 ) && defined(CONFIG_CMD_MTDPARTS )#include <jffs2/jffs2.h> /* parition handling routines */
@@ -325,7 +325,7 @@ int do_flerase (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])flash_info_t *info;ulong bank, addr_first, addr_last;int n, sect_first, sect_last; -#if defined(CONFIG_CMD_JFFS2 ) && defined(CONFIG_JFFS2_CMDLINE ) +#if defined(CONFIG_CMD_JFFS2 ) && defined(CONFIG_CMD_MTDPARTS )struct mtd_device *dev;struct part_info *part;u8 dev_type, dev_num, pnum;
@@ -357,7 +357,7 @@ int do_flerase (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])return rcode; } -#if defined(CONFIG_CMD_JFFS2 ) && defined(CONFIG_JFFS2_CMDLINE ) +#if defined(CONFIG_CMD_JFFS2 ) && defined(CONFIG_CMD_MTDPARTS )/* erase <part-id> - erase partition */ if ((argc ==2 ) && (id_parse (argv[1 ],NULL , &dev_type, &dev_num) ==0 )) {mtdparts_init ();
@@ -470,7 +470,7 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])#endif /* CONFIG_SYS_NO_FLASH */ ulong addr_first, addr_last;int p; -#if defined(CONFIG_CMD_JFFS2 ) && defined(CONFIG_JFFS2_CMDLINE ) +#if defined(CONFIG_CMD_JFFS2 ) && defined(CONFIG_CMD_MTDPARTS )struct mtd_device *dev;struct part_info *part;u8 dev_type, dev_num, pnum;
@@ -563,7 +563,7 @@ int do_protect (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])return rcode; } -#if defined(CONFIG_CMD_JFFS2 ) && defined(CONFIG_JFFS2_CMDLINE ) +#if defined(CONFIG_CMD_JFFS2 ) && defined(CONFIG_CMD_MTDPARTS )/* protect on/off <part-id> */ if ((argc ==3 ) && (id_parse (argv[2 ],NULL , &dev_type, &dev_num) ==0 )) {mtdparts_init ();
@@ -698,7 +698,7 @@ int flash_sect_protect (int p, ulong addr_first, ulong addr_last)/**************************************************/ -#if defined(CONFIG_CMD_JFFS2 ) && defined(CONFIG_JFFS2_CMDLINE ) +#if defined(CONFIG_CMD_JFFS2 ) && defined(CONFIG_CMD_MTDPARTS )# define TMP_ERASE "erase <part-id>\n - erase partition\n"# define TMP_PROT_ON "protect on <part-id>\n - protect partition\n"# define TMP_PROT_OFF "protect off <part-id>\n - make partition writable\n"
common/cmd_jffs2.c +3 -1722
1,771 lines not on this page · raw message
common/cmd_mtdparts.c renamed from common/cmd_jffs2.c +1 -377
454 lines not on this page · raw message
common/cmd_nand.c +5 -5
@@ -29,7 +29,7 @@#include <jffs2/jffs2.h> #include <nand.h> -#if defined(CONFIG_CMD_JFFS2 ) && defined(CONFIG_JFFS2_CMDLINE ) +#if defined(CONFIG_CMD_JFFS2 ) && defined(CONFIG_CMD_MTDPARTS )/* parition handling routines */ 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) { int idx = nand_curr_device; -#if defined(CONFIG_CMD_JFFS2 ) && defined(CONFIG_JFFS2_CMDLINE ) +#if defined(CONFIG_CMD_JFFS2 ) && defined(CONFIG_CMD_MTDPARTS )struct mtd_device *dev;struct part_info *part;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; } -#if defined(CONFIG_CMD_JFFS2 ) && defined(CONFIG_JFFS2_CMDLINE ) +#if defined(CONFIG_CMD_JFFS2 ) && defined(CONFIG_CMD_MTDPARTS ) out:#endif printf ("device %d " , idx);
@@ -590,7 +590,7 @@ int do_nandboot(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[])char *boot_device =NULL ;int idx;ulong addr, offset =0 ; -#if defined(CONFIG_CMD_JFFS2 ) && defined(CONFIG_JFFS2_CMDLINE ) +#if defined(CONFIG_CMD_JFFS2 ) && defined(CONFIG_CMD_MTDPARTS )struct mtd_device *dev;struct part_info *part;u8 pnum;
@@ -635,7 +635,7 @@ int do_nandboot(cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) offset =simple_strtoul (argv[3 ],NULL ,16 );break ;default : -#if defined(CONFIG_CMD_JFFS2 ) && defined(CONFIG_JFFS2_CMDLINE ) +#if defined(CONFIG_CMD_JFFS2 ) && defined(CONFIG_CMD_MTDPARTS ) usage:#endif cmd_usage (cmdtp);
include/config_cmd_all.h +1 -0
@@ -62,6 +62,7 @@#define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ #define CONFIG_CMD_NFS /* NFS support */ #define CONFIG_CMD_ONENAND /* OneNAND support */ +#define CONFIG_CMD_MTDPARTS /* mtd parts support */ #define CONFIG_CMD_PCI /* pciinfo */ #define CONFIG_CMD_PCMCIA /* PCMCIA support */ #define CONFIG_CMD_PING /* ping support */
include/configs/ADNPESC1.h +2 -2
@@ -673,14 +673,14 @@* */ /* No command line, one static partition */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nor"#define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF#define CONFIG_JFFS2_PART_OFFSET 0x00000000/* mtdparts command line support */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "" #define MTDPARTS_DEFAULT "" */
include/configs/Alaska8220.h +2 -2
@@ -320,7 +320,7 @@/* No command line, one static partition */ /* -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS #define CONFIG_JFFS2_DEV "nor0" #define CONFIG_JFFS2_PART_SIZE 0x00400000 #define CONFIG_JFFS2_PART_OFFSET 0x00000000
@@ -328,7 +328,7 @@/* mtdparts command line support */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=alaska-0" #define MTDPARTS_DEFAULT "mtdparts=alaska-0:4m(user)" */
include/configs/BAB7xx.h +2 -2
@@ -219,7 +219,7 @@* */ /* No command line, one static partition */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nor"#define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF#define CONFIG_JFFS2_PART_OFFSET 0x00000000
@@ -229,7 +229,7 @@* Note: fake mtd_id used, no linux mtd map file */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=bab7xx-0" #define MTDPARTS_DEFAULT "mtdparts=bab7xx-0:-(jffs2)" */
include/configs/BC3450.h +1 -1
@@ -346,7 +346,7 @@#define CONFIG_SYS_FLASH_WRITE_TOUT 500/* Flash Write Timeout (in ms) */ /* Dynamic MTD partition support */ -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=TQM5200-0"#define MTDPARTS_DEFAULT "mtdparts=TQM5200-0:640k(firmware)," \ "1408k(kernel)," \
include/configs/CATcenter.h +2 -2
@@ -781,7 +781,7 @@* */ /* No command line, one static partition */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nand"#define CONFIG_JFFS2_PART_SIZE 0x00200000#define CONFIG_JFFS2_PART_OFFSET 0x00000000
@@ -791,7 +791,7 @@* Note: fake mtd_id used, no linux mtd map file */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nand0=catcenter" #define MTDPARTS_DEFAULT "mtdparts=catcenter:2m(nand)" */
include/configs/DB64360.h +2 -2
@@ -230,7 +230,7 @@ ip=${ipaddr}:${serverip}${bootargs_end}; bootm 0x400000;\0"* */ /* No command line, one static partition, whole device */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nor1"#define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF#define CONFIG_JFFS2_PART_OFFSET 0x00000000
@@ -242,7 +242,7 @@ ip=${ipaddr}:${serverip}${bootargs_end}; bootm 0x400000;\0"* Note: fake mtd_id's used, no linux mtd map file. */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor1=db64360-1" #define MTDPARTS_DEFAULT "mtdparts=db64360-1:-(jffs2)" */
include/configs/DB64460.h +2 -2
@@ -168,7 +168,7 @@ ip=${ipaddr}:${serverip}${bootargs_end}; bootm 0x400000;\0"* */ /* No command line, one static partition, whole device */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nor1"#define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF#define CONFIG_JFFS2_PART_OFFSET 0x00000000
@@ -180,7 +180,7 @@ ip=${ipaddr}:${serverip}${bootargs_end}; bootm 0x400000;\0"* Note: fake mtd_id's used, no linux mtd map file. */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor1=db64460-1" #define MTDPARTS_DEFAULT "mtdparts=db64460-1:-(jffs2)" */
include/configs/DK1C20.h +2 -2
@@ -539,14 +539,14 @@* */ /* No command line, one static partition, whole device */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nor0"#define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF#define CONFIG_JFFS2_PART_OFFSET 0x00000000/* mtdparts command line support */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "" #define MTDPARTS_DEFAULT "" */
include/configs/DK1S10.h +2 -2
@@ -545,14 +545,14 @@* */ /* No command line, one static partition, whole device */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nor0"#define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF#define CONFIG_JFFS2_PART_OFFSET 0x00000000/* mtdparts command line support */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "" #define MTDPARTS_DEFAULT "" */
include/configs/ELPPC.h +2 -2
@@ -196,7 +196,7 @@* */ /* No command line, one static partition, whole device */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nor0"#define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF#define CONFIG_JFFS2_PART_OFFSET 0x00000000
@@ -204,7 +204,7 @@/* mtdparts command line support */ /* Note: fake mtd_id used, no linux mtd map file */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=elppc-0,nor1=elppc-1" #define MTDPARTS_DEFAULT "mtdparts=elppc-0:-(jffs2),elppc-1:-(user)" */
include/configs/FPS850L.h +1 -1
@@ -216,7 +216,7 @@/*----------------------------------------------------------------------- * Dynamic MTD partition support */ -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=TQM8xxL-0"#define MTDPARTS_DEFAULT "mtdparts=TQM8xxL-0:256k(u-boot)," \
include/configs/FPS860L.h +1 -1
@@ -216,7 +216,7 @@/*----------------------------------------------------------------------- * Dynamic MTD partition support */ -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=TQM8xxL-0"#define MTDPARTS_DEFAULT "mtdparts=TQM8xxL-0:256k(u-boot)," \
include/configs/LANTEC.h +2 -2
@@ -352,14 +352,14 @@* */ /* No command line, one static partition, whole device */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nor0"#define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF#define CONFIG_JFFS2_PART_OFFSET 0x00000000/* mtdparts command line support */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "" #define MTDPARTS_DEFAULT "" */
include/configs/MHPC.h +2 -2
@@ -200,7 +200,7 @@* */ /* No command line, one static partition, whole device */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nor0"#define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF#define CONFIG_JFFS2_PART_OFFSET 0x00000000
@@ -208,7 +208,7 @@/* mtdparts command line support */ /* Note: fake mtd_id used, no linux mtd map file */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=mhpc-0" #define MTDPARTS_DEFAULT "mtdparts=mhpc-0:-(jffs2)" */
include/configs/MIP405.h +2 -2
@@ -243,7 +243,7 @@* */ /* No command line, one static partition, whole device */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nor0"#define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF#define CONFIG_JFFS2_PART_OFFSET 0x00000000
@@ -251,7 +251,7 @@/* mtdparts command line support */ /* Note: fake mtd_id used, no linux mtd map file */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=mip405-0" #define MTDPARTS_DEFAULT "mtdparts=mip405-0:-(jffs2)" */
include/configs/ML2.h +2 -2
@@ -249,7 +249,7 @@* */ /* No command line, one static partition, whole device */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nor0"#define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF#define CONFIG_JFFS2_PART_OFFSET 0x00080000
@@ -257,7 +257,7 @@/* mtdparts command line support */ /* Note: fake mtd_id used, no linux mtd map file */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=ml2-0" #define MTDPARTS_DEFAULT "mtdparts=ml2-0:- at 512k(jffs2)" */
include/configs/MPC8266ADS.h +2 -2
@@ -563,14 +563,14 @@* */ /* No command line, one static partition, whole device */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nor0"#define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF#define CONFIG_JFFS2_PART_OFFSET 0x00000000/* mtdparts command line support */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "" #define MTDPARTS_DEFAULT "" */
include/configs/NC650.h +2 -2
@@ -440,13 +440,13 @@*/ /* No command line, one static partition */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nand0"#define CONFIG_JFFS2_PART_SIZE 0x00400000#define CONFIG_JFFS2_PART_OFFSET 0x00000000/* mtdparts command line support */ -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=nc650-0,nand0=nc650-nand"#define MTDPARTS_DEFAULT "mtdparts=nc650-0:1m(kernel1),1m(kernel2)," \
include/configs/NETTA.h +2 -2
@@ -702,7 +702,7 @@* */ /* No command line, one static partition, whole device */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nand0"#define CONFIG_JFFS2_PART_SIZE 0x00100000#define CONFIG_JFFS2_PART_OFFSET 0x00200000
@@ -710,7 +710,7 @@/* mtdparts command line support */ /* Note: fake mtd_id used, no linux mtd map file */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nand0=netta-nand" #define MTDPARTS_DEFAULT "mtdparts=netta-nand:1m at 2m(jffs2)" */
include/configs/PPChameleonEVB.h +2 -2
@@ -804,14 +804,14 @@*/ /* No command line, one static partition */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nand0"#define CONFIG_JFFS2_PART_SIZE 0x00400000#define CONFIG_JFFS2_PART_OFFSET 0x00000000/* mtdparts command line support */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=PPChameleon-0,nand0=ppchameleonevb-nand" */
include/configs/R360MPI.h +2 -2
@@ -167,14 +167,14 @@*/ /* No command line, one static partition * use all the space starting at offset 3MB*/ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nor0"#define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF#define CONFIG_JFFS2_PART_OFFSET 0x00300000/* mtdparts command line support */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=r360-0" #define MTDPARTS_DEFAULT "mtdparts=r360-0:- at 3m(user)" */
include/configs/RBC823.h +2 -2
@@ -429,7 +429,7 @@* */ /* No command line, one static partition, whole device */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nor0"#define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF#define CONFIG_JFFS2_PART_OFFSET 0x00000000
@@ -437,7 +437,7 @@/* mtdparts command line support */ /* Note: fake mtd_id used, no linux mtd map file */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "" #define MTDPARTS_DEFAULT "" */
include/configs/Rattler.h +2 -2
@@ -202,7 +202,7 @@* */ /* No command line, one static partition */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nor0"#define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF#define CONFIG_JFFS2_PART_OFFSET 0x00100000
@@ -210,7 +210,7 @@/* mtdparts command line support */ /* Note: fake mtd_id used, no linux mtd map file */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=rattler-0" #define MTDPARTS_DEFAULT "mtdparts=rattler-0:- at 1m(jffs2)" */
include/configs/SIMPC8313.h +1 -1
@@ -189,7 +189,7 @@#define CONFIG_JFFS2_DEV "nand0"/* mtdparts command line support */ -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nand0=nand0"#define MTDPARTS_DEFAULT "mtdparts=nand0:2M(u-boot),6M(kernel),-(jffs2)"
include/configs/SXNI855T.h +2 -2
@@ -174,7 +174,7 @@* */ /* No command line, one static partition */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS/* #define CONFIG_JFFS2_DEV "nor0"
@@ -189,7 +189,7 @@/* mtdparts command line support */ /* Note: fake mtd_id used, no linux mtd map file */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=sixnet-0,nand0=sixnet-nand" #define MTDPARTS_DEFAULT "mtdparts=sixnet-0:7680k at 512k();sixnet-nand:2m(jffs2-nand)" */
include/configs/TB5200.h +1 -1
@@ -275,7 +275,7 @@(= chip selects) */ /* Dynamic MTD partition support */ -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=TQM5200-0"#if defined(CONFIG_TQM5200_B )#define MTDPARTS_DEFAULT "mtdparts=TQM5200-0:768k(firmware)," \
include/configs/TQM5200.h +1 -1
@@ -407,7 +407,7 @@#endif /* Dynamic MTD partition support */ -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=TQM5200-0"#ifdef CONFIG_STK52XX
include/configs/TQM823L.h +1 -1
@@ -231,7 +231,7 @@/*----------------------------------------------------------------------- * Dynamic MTD partition support */ -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=TQM8xxL-0"#define MTDPARTS_DEFAULT "mtdparts=TQM8xxL-0:256k(u-boot)," \
include/configs/TQM823M.h +1 -1
@@ -227,7 +227,7 @@/*----------------------------------------------------------------------- * Dynamic MTD partition support */ -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=TQM8xxM-0"#define MTDPARTS_DEFAULT "mtdparts=TQM8xxM-0:512k(u-boot)," \
include/configs/TQM834x.h +1 -1
@@ -537,7 +537,7 @@ extern int tqm834x_num_flash_banks;* JFFS2 partitions */ /* mtdparts command line support */ -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=TQM834x-0"/* default mtd partition table */
include/configs/TQM850L.h +1 -1
@@ -216,7 +216,7 @@/*----------------------------------------------------------------------- * Dynamic MTD partition support */ -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=TQM8xxL-0"#define MTDPARTS_DEFAULT "mtdparts=TQM8xxL-0:256k(u-boot)," \
include/configs/TQM850M.h +1 -1
@@ -216,7 +216,7 @@/*----------------------------------------------------------------------- * Dynamic MTD partition support */ -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=TQM8xxM-0"#define MTDPARTS_DEFAULT "mtdparts=TQM8xxM-0:512k(u-boot)," \
include/configs/TQM855L.h +1 -1
@@ -221,7 +221,7 @@/*----------------------------------------------------------------------- * Dynamic MTD partition support */ -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=TQM8xxL-0"#define MTDPARTS_DEFAULT "mtdparts=TQM8xxL-0:256k(u-boot)," \
include/configs/TQM855M.h +1 -1
@@ -256,7 +256,7 @@/*----------------------------------------------------------------------- * Dynamic MTD partition support */ -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=TQM8xxM-0"#define MTDPARTS_DEFAULT "mtdparts=TQM8xxM-0:512k(u-boot)," \
include/configs/TQM85xx.h +2 -2
@@ -597,14 +597,14 @@#define CONFIG_JFFS2_NAND 1 -#ifdef CONFIG_JFFS2_CMDLINE +#ifdef CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nand0=TQM85xx-nand"#define MTDPARTS_DEFAULT "mtdparts=TQM85xx-nand:-"#else #define CONFIG_JFFS2_DEV "nand0"/* NAND device jffs2 lives on */ #define CONFIG_JFFS2_PART_OFFSET 0/* start of jffs2 partition */ #define CONFIG_JFFS2_PART_SIZE 0x200000/* size of jffs2 partition */ -#endif /* CONFIG_JFFS2_CMDLINE */ +#endif /* CONFIG_CMD_MTDPARTS */ #endif /* CONFIG_NAND */
include/configs/TQM860L.h +1 -1
@@ -220,7 +220,7 @@/*----------------------------------------------------------------------- * Dynamic MTD partition support */ -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=TQM8xxL-0"#define MTDPARTS_DEFAULT "mtdparts=TQM8xxL-0:256k(u-boot)," \
include/configs/TQM860M.h +1 -1
@@ -221,7 +221,7 @@/*----------------------------------------------------------------------- * Dynamic MTD partition support */ -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=TQM8xxM-0"#define MTDPARTS_DEFAULT "mtdparts=TQM8xxM-0:512k(u-boot)," \
include/configs/TQM862L.h +1 -1
@@ -224,7 +224,7 @@/*----------------------------------------------------------------------- * Dynamic MTD partition support */ -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=TQM8xxL-0"#define MTDPARTS_DEFAULT "mtdparts=TQM8xxL-0:256k(u-boot)," \
include/configs/TQM862M.h +1 -1
@@ -225,7 +225,7 @@/*----------------------------------------------------------------------- * Dynamic MTD partition support */ -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=TQM8xxM-0"#define MTDPARTS_DEFAULT "mtdparts=TQM8xxM-0:512k(u-boot)," \
include/configs/TQM866M.h +1 -1
@@ -265,7 +265,7 @@/*----------------------------------------------------------------------- * Dynamic MTD partition support */ -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=TQM8xxM-0"#define MTDPARTS_DEFAULT "mtdparts=TQM8xxM-0:512k(u-boot)," \
include/configs/ZUMA.h +2 -2
@@ -130,7 +130,7 @@* */ /* No command line, one static partition, whole device */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nor0"#define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF#define CONFIG_JFFS2_PART_OFFSET 0x00000000
@@ -138,7 +138,7 @@/* mtdparts command line support */ /* Note: fake mtd_id used, no linux mtd map file */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor1=zuma-1,nor2=zuma-2" #define MTDPARTS_DEFAULT "mtdparts=zuma-1:-(jffs2),zuma-2:-(user)" */
include/configs/apollon.h +1 -1
@@ -258,7 +258,7 @@#define CONFIG_ENV_ADDR 0x00020000#ifdef CONFIG_SYS_USE_UBI -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "onenand0=onenand"#define MTDPARTS_DEFAULT "mtdparts=onenand:128k(bootloader)," \ "128k(params)," \
include/configs/cm5200.h +1 -1
@@ -222,7 +222,7 @@/* * MTD configuration */ -#define CONFIG_JFFS2_CMDLINE 1 +#define CONFIG_CMD_MTDPARTS 1#define MTDIDS_DEFAULT "nor0=cm5200-0"#define MTDPARTS_DEFAULT "mtdparts=cm5200-0:" \ "384k(uboot),128k(env)," \
include/configs/debris.h +2 -2
@@ -234,7 +234,7 @@* */ /* No command line, one static partition, whole device */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nor0"#define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF#define CONFIG_JFFS2_PART_OFFSET 0x00000000
@@ -246,7 +246,7 @@* Note: fake mtd_id's used, no linux mtd map file. */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=debris-0" #define MTDPARTS_DEFAULT "mtdparts=debris-0:-(jffs2)" */
include/configs/ep7312.h +2 -2
@@ -158,7 +158,7 @@* */ /* No command line, one static partition, whole device */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nor0"#define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF#define CONFIG_JFFS2_PART_OFFSET 0x00000000
@@ -166,7 +166,7 @@/* mtdparts command line support */ /* Note: fake mtd_id used, no linux mtd map file */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=ep7312-0" #define MTDPARTS_DEFAULT "mtdparts=ep7312-0:-(jffs2)" */
include/configs/ep8260.h +2 -2
@@ -758,7 +758,7 @@* */ /* No command line, one static partition, whole device */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nor0"#define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF#define CONFIG_JFFS2_PART_OFFSET 0x00000000
@@ -766,7 +766,7 @@/* mtdparts command line support */ /* Note: fake mtd_id used, no linux mtd map file */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "" #define MTDPARTS_DEFAULT "" */
include/configs/fx12mm.h +1 -1
@@ -37,7 +37,7 @@/* cmd config */ #define CONFIG_CMD_JFFS2 -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #undef CONFIG_CMD_NET/* sdram */
include/configs/hymod.h +2 -2
@@ -730,14 +730,14 @@* */ /* No command line, one static partition, whole device */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nor0"#define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF#define CONFIG_JFFS2_PART_OFFSET 0x00000000/* mtdparts command line support */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "" #define MTDPARTS_DEFAULT "" */
include/configs/idmr.h +1 -1
@@ -229,7 +229,7 @@/* Dynamic MTD partition support */ -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=idmr-0"#define MTDPARTS_DEFAULT "mtdparts=idmr-0:128k(u-boot)," \
include/configs/impa7.h +2 -2
@@ -160,14 +160,14 @@* */ /* No command line, one static partition, whole device */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nor0"#define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF#define CONFIG_JFFS2_PART_OFFSET 0x00020000/* mtdparts command line support */ /* -#define CONFIG_JFFS2_CMDLINE +#define CONFIG_CMD_MTDPARTS #define MTDIDS_DEFAULT "nor0=impA7 NOR Flash Bank #0,nor1=impA7 NOR Flash Bank #1" #define MTDPARTS_DEFAULT "mtdparts=impA7 NOR Flash Bank #0:-(FileSystem1);impA7 NOR Flash Bank #1:-(FileSystem2)" */
include/configs/imx31_litekit.h +1 -1
@@ -170,7 +170,7 @@/* * JFFS2 partitions */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nor0"#endif /* __CONFIG_H */
include/configs/imx31_phycore.h +1 -1
@@ -175,7 +175,7 @@/* * JFFS2 partitions */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nor0"/* EET platform additions */
include/configs/incaip.h +2 -2
@@ -168,14 +168,14 @@* JFFS2 partitions */ /* No command line, one static partition, use all space on the device */ -#undef CONFIG_JFFS2_CMDLINE +#undef CONFIG_CMD_MTDPARTS#define CONFIG_JFFS2_DEV "nor1"#define CONFIG_JFFS2_PART_SIZE 0xFFFFFFFF#define CONFIG_JFFS2_PART_OFFSET 0x00000000/* mtdparts command line support */ /*
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
1.6.1.3
Part of the diff is not shown here. View the raw message.
PATCH v2 1/1 Separate mtdparts command from jffs2
Dear Stefan Roese,
Quoted 8 lines · In message <[email protected]> you 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.
Signed-off-by Stefan Roese <[email protected]>Signed-off-by Kyungmin Park <[email protected]>
...
README The following options need to be configured: · line 636
Quoted 9 lines
README +1
-0@@ -633,6 +633,7 @@ The following options need to be configured: CONFIG_CMD_MII * MII utility commands CONFIG_CMD_NAND * NAND support CONFIG_CMD_NET bootp, tftpboot, rarpboot + CONFIG_CMD_MTDPARTS * MTD partition support
Please keep list sorted.
common/Makefile COBJS-$(CONFIG_CMD_IMMAP) += cmd_immap.o · line 102
Quoted 10 lines
common/Makefile +1
-0@@ -98,6 +98,7 @@ COBJS-$(CONFIG_CMD_IMMAP) += cmd_immap.o COBJS-$(CONFIG_CMD_IRQ) += cmd_irq.o COBJS-$(CONFIG_CMD_ITEST) += cmd_itest.o COBJS-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o +COBJS-$(CONFIG_CMD_MTDPARTS) += cmd_mtdparts.o COBJS-$(CONFIG_CMD_LICENSE) += cmd_license.o
Please keep list sorted.
Quoted 32 lines
common/cmd_jffs2.c +0
-24@@ -136,40 +136,6 @@* field for read-only partitions */ #define MTD_WRITEABLE_CMD 1 -#ifdef CONFIG_JFFS2_CMDLINE -/* default values for mtdids and mtdparts variables */ -#if defined(MTDIDS_DEFAULT ) -static const char *const mtdids_default =MTDIDS_DEFAULT ; -#else -#warning "MTDIDS_DEFAULT not defined!" -static const char *const mtdids_default =NULL ; -#endif - -#if defined(MTDPARTS_DEFAULT ) -static const char *const mtdparts_default =MTDPARTS_DEFAULT ; -#else -#warning "MTDPARTS_DEFAULT not defined!" -static const char *const mtdparts_default =NULL ; -#endif - -/* copies of last seen 'mtdids', 'mtdparts' and 'partition' env variables */ -#define MTDIDS_MAXLEN 128 -#define MTDPARTS_MAXLEN 512 -#define PARTITION_MAXLEN 16 -static char last_ids[MTDIDS_MAXLEN ]; -static char last_parts[MTDPARTS_MAXLEN ]; -static char last_partition[PARTITION_MAXLEN ]; -
common/cmd_jffs2.c line 172
Quoted 10 lines
common/cmd_jffs2.c +0
-10-/* low level jffs2 cache cleaning routine */ -extern void jffs2_free_cache (struct part_info *part); - -/* mtdids mapping list, filled by parse_ids() */ -struct list_head mtdids; - -/* device/partition list, parse_cmdline() parses into here */ -struct list_head devices; -#endif /* #ifdef CONFIG_JFFS2_CMDLINE */ -
Hm... here and downwards the whole mtdparts code gets deleted. But I see no place where that functionality gets added again?
You can see this also from the patch statistics:
81 files changed, 131 insertions(+), 2223 deletions(-)
We drop > 2000 lines of code here, which represents a lot of important functions.
I wonder if this patch has ever been tested?
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Gew?hnlich glaubt der Mensch, wenn er nur Worte h?rt, es m?sse sich dabei doch auch was denken lassen. -- Goethe, Faust I
PATCH v2 1/1 Separate mtdparts command from jffs2
Quoted 11 lines · Wolfgang Denk
README The following options need to be configured: · line 636
Quoted 9 lines
README +1
-0@@ -633,6 +633,7 @@ The following options need to be configured: CONFIG_CMD_MII * MII utility commands CONFIG_CMD_NAND * NAND support CONFIG_CMD_NET bootp, tftpboot, rarpboot + CONFIG_CMD_MTDPARTS * MTD partition supportPlease keep list sorted.
OK.
Quoted 4 lines
Quoted 4 lines
common/Makefile +0
-0
Quoted 8 lines
common/Makefile COBJS-$(CONFIG_CMD_IMMAP) += cmd_immap.o · line 102
Quoted 6 lines
common/Makefile +1
-0@@ -98,6 +98,7 @@ COBJS-$(CONFIG_CMD_IMMAP) += cmd_immap.o COBJS-$(CONFIG_CMD_IRQ) += cmd_irq.o COBJS-$(CONFIG_CMD_ITEST) += cmd_itest.o COBJS-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o +COBJS-$(CONFIG_CMD_MTDPARTS) += cmd_mtdparts.o COBJS-$(CONFIG_CMD_LICENSE) += cmd_license.oPlease keep list sorted.
OK.
Quoted 46 lines
Quoted 32 lines
common/cmd_jffs2.c +0
-17@@ -136,40 +136,6 @@* field for read-only partitions */ #define MTD_WRITEABLE_CMD 1 -#ifdef CONFIG_JFFS2_CMDLINE -/* default values for mtdids and mtdparts variables */ -#if defined(MTDIDS_DEFAULT ) -static const char *const mtdids_default =MTDIDS_DEFAULT ; -#else -#warning "MTDIDS_DEFAULT not defined!" -static const char *const mtdids_default =NULL ; -#endif - -#if defined(MTDPARTS_DEFAULT ) -static const char *const mtdparts_default =MTDPARTS_DEFAULT ; -#else -#warning "MTDPARTS_DEFAULT not defined!" -static const char *const mtdparts_default =NULL ; -#endif - -/* copies of last seen 'mtdids', 'mtdparts' and 'partition' env variables */ -#define
MTDIDS_MAXLEN128common/cmd_jffs2.c +0
-6-#define MTDPARTS_MAXLEN 512 -#define PARTITION_MAXLEN 16 -static char last_ids[MTDIDS_MAXLEN ]; -static char last_parts[MTDPARTS_MAXLEN ]; -static char last_partition[PARTITION_MAXLEN ]; -common/cmd_jffs2.c line 172
Quoted 10 lines
common/cmd_jffs2.c +0
-10-/* low level jffs2 cache cleaning routine */ -extern void jffs2_free_cache (struct part_info *part); - -/* mtdids mapping list, filled by parse_ids() */ -struct list_head mtdids; - -/* device/partition list, parse_cmdline() parses into here */ -struct list_head devices; -#endif /* #ifdef CONFIG_JFFS2_CMDLINE */ -Hm... here and downwards the whole mtdparts code gets deleted. But I see no place where that functionality gets added again?
Quoted 8 lines
You can see this also from the patch statistics:
81 files changed, 131 insertions(+), 2223 deletions(-)We drop > 2000 lines of code here, which represents a lot of important functions.
I wonder if this patch has ever been tested?
Yes, it has.
I generated this patch with the "find-copies-harder" option. This makes the status output harder to read. I'll send an updated patch in short while.
Best regards,
Stefan
=====================================================================
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de
=====================================================================
PATCH v2 1/1 Separate mtdparts command from jffs2
Dear Stefan Roese,
Quoted 1 line · In message <[email protected]> you wrote:
...
Quoted 9 lines
Quoted 4 lines
We drop > 2000 lines of code here, which represents a lot of important functions.
I wonder if this patch has ever been tested?
Yes, it has.
I generated this patch with the "find-copies-harder" option. This makes the status output harder to read. I'll send an updated patch in short while.
You are right. Stupid me.
So here the rest of my review comments:
common/cmd_jffs2.c static struct mtdids* id_find_by_mtd_id(const char *mtd_id, unsigned int mtd_id_ · line 220
Quoted 6 lines
common/cmd_jffs2.c +1
-1@@ -1142,7 +217,7 @@ static struct mtdids* id_find_by_mtd_id(const char *mtd_id, unsigned int mtd_id_* @param dev_num parsed device number (output) * @return 0 on success, 1 otherwise */ -int id_parse (const char *id,const char **ret_id,u8 *dev_type,u8 *dev_num) +static int id_parse (const char *id,const char **ret_id,u8 *dev_type,u8 *dev_num)
...
mtd_id_parse() ?
common/cmd_mtdparts.c static int part_parse(const char *const partdef, const char **ret, struct part_i · line 766
Quoted 6 lines
common/cmd_mtdparts.c renamed from common/cmd_jffs2.c +1
-1@@ -782,7 +763,7 @@ static int part_parse(const char *const partdef, const char **ret, struct part_i* @param dev device to validate * @return 0 if device is valid, 1 otherwise */ -static int device_validate (u8 type,u8 num,u32 *size) +int device_validate (u8 type,u8 num,u32 *size)
mtd_device_validate() ?
Now that we make these funtions publicly visible we whould make sure that there will be no namespace collissions. I think we shoudl therefor rename these functions.
include/config_cmd_all.h line 68
Quoted 12 lines
include/config_cmd_all.h +1
-0@@ -62,6 +62,7 @@#define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ #define CONFIG_CMD_NFS /* NFS support */ #define CONFIG_CMD_ONENAND /* OneNAND support */ +#define CONFIG_CMD_MTDPARTS /* mtd parts support */ #define CONFIG_CMD_PCI /* pciinfo */ #define CONFIG_CMD_PCMCIA /* PCMCIA support */ #define CONFIG_CMD_PING /* ping support */
Please keep lists sorted.
Best regards,
Wolfgang Denk
Signature · 6 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de When properly administered, vacations do not diminish productivity: for every week you're away and get nothing done, there's another when your boss is away and you get twice as much done. -- Daniel B. Luten