From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Stile Date: Fri, 21 Dec 2012 16:00:46 -0800 Subject: [U-Boot] no mtdparted from U-Boot> prompt In-Reply-To: <20121221231341.39F5F201213@gemini.denx.de> References: <1356047588.28896.58.camel@genx> <50D43318.8090904@atmel.com> <1356114581.28896.89.camel@genx> <1356130404.28896.135.camel@genx> <20121221231341.39F5F201213@gemini.denx.de> Message-ID: <1356134446.28896.137.camel@genx> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, 2012-12-22 at 00:13 +0100, Wolfgang Denk wrote: > Dear John Stile, > > In message <1356130404.28896.135.camel@genx> you wrote: > > > > > I had the impression there was also an interactive command-line tool for > > > mtdparts, from the u-boot prompt. > > > > This post give me the impression that there should be a uboot mtdparts > > command in addtion to the kernel option. > > http://stackoverflow.com/questions/8585864/nand-partitioning-in-u-boot > > Yes, there is. > > For example: > > => mtdparts -? > mtdparts - define flash/nand partitions > > Usage: > mtdparts > - list partition table > mtdparts delall > - delete all partitions > mtdparts del part-id > - delete partition (e.g. part-id = nand0,1) > mtdparts add [@] [] [ro] > - add partition > mtdparts default > - reset partition table to defaults > > ----- > > this command uses three environment variables: > > 'partition' - keeps current partition identifier > > partition := > := ,part_num > > 'mtdids' - linux kernel mtd device id <-> u-boot device id mapping > > mtdids=[,,...] > > := = > := 'nand'|'nor'|'onenand' > := mtd device number, 0... > := unique device tag used by linux kernel to find mtd device (mtd->name) > > 'mtdparts' - partition list > > mtdparts=mtdparts=[;...] > > := :[,...] > := unique device tag used by linux kernel to find mtd device (mtd->name) > := [@][][] > := standard linux memsize OR '-' to denote all remaining space > := partition start offset within the device > := '(' NAME ')' > := when set to 'ro' makes partition read-only (not used, passed to kernel) > > > > => mtdparts > > device nor0 , # parts = 7 > #: name size offset mask_flags > 0: firmware 0x00100000 0x00000000 0 > 1: dtb 0x00040000 0x00100000 0 > 2: kernel 0x00240000 0x00140000 0 > 3: small-fs 0x00280000 0x00380000 0 > 4: initrd 0x00200000 0x00600000 0 > 5: misc 0x00800000 0x00800000 0 > 6: big-fs 0x01000000 0x01000000 0 > > active partition: nor0,0 - (firmware) 0x00100000 @ 0x00000000 > > defaults: > mtdids : nor0=fc000000.flash > mtdparts: mtdparts=fc000000.flash:1m(firmware),256k(dtb),2304k(kernel),2560k(small-fs),2m(initrd),8m(misc),16m(big-fs) > => > > > > > Now it contains: > > > #define CONFIG_JFFS2_NAND 1 > > > #define CONFIG_JFFS2_CMDLINE 1 > > > #define CONFIG_CMD_JFFS2 > > > #define CONFIG_CMD_MTDPARTS" > > If this is an exact copy, then please remove this '"' > It actually reads this: #define CONFIG_JFFS2_NAND 1 #define CONFIG_JFFS2_CMDLINE 1 #define CONFIG_CMD_JFFS2 1 // Required to include cmd_jffs2.c #define CONFIG_CMD_MTDPARTS 1 // Required for mtdparts command in uboot But the command is not available on my system. Would it help to post my .h or maybe my build log?