Dear Alexandre Gambier, In message <4d52b843.5010...@ftemaximal.fr> you wrote: > > I'm using u-boot to boot a Linux-based device. > I created some MTD partitions for my NOR and NAND flashes. > > Here is the configuration: > > device nor0 <NOR>, # parts = 4 > #: name size offset mask_flags > 0: U-Boot 0x00080000 0x00000000 0 > 1: Environment 0x00020000 0x00080000 0 > 2: Kernel 0x00400000 0x000a0000 0 > 3: FreeNOR 0x00360000 0x004a0000 0 > ... > When I want to erase the U-Boot partition I can't use the command `erase > U-Boot`, the following error occurs : "incorrect device type in U-Boot". > I must use the command `erase 1:0-7`. > > Is-it normal ?
There are many ways to specify a flash area. When referring to MTD partitions, the synatx is "<device name>,<partition number>", i. e. for the partition named "U-Boot" above you use erase nor0,0 So yes, the behaviour is normal. > My second question is when I try to read the Environment partition with > the command `md.b Environment 128` I get the following dump (which is > not correct). > > 0000000e: 0e 40 ff e0 18 40 c0 cb 18 40 18 40 0c cb 03 61 > .@...@...@.@...a ... Only very few commands (and only flash related ones) accept MTD partition specifications for addresses. "md" does not. What happpens here is that the argument "Environment" gets parsed as a hex number. Only the first character, 'E', can successfully be converted, then the conversion stops (without error message). Then you get the dump starting at 0x0000000E. > Is-it normal as well ? Yes, it is. Best regards, Wolfgang Denk -- 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: w...@denx.de There are certain things men must do to remain men. -- Kirk, "The Ultimate Computer", stardate 4929.4 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot