* [U-Boot] is any bug in cp? [not found] <mailman.3.1302775202.27468.u-boot@lists.denx.de> @ 2011-04-15 6:01 ` hacklu.uboot 2011-04-15 8:44 ` Wolfgang Denk 2011-04-15 13:58 ` Charles Krinke 0 siblings, 2 replies; 7+ messages in thread From: hacklu.uboot @ 2011-04-15 6:01 UTC (permalink / raw) To: u-boot hi,in my uboot. there is some bugs when I cp to flash like this: cp.b addr1 addr2 0x100 when the two addr in the same bank of a flash. it go wrongs finally the date of addr2 is 0x8080808080... cp to another bank of flash is work correctly. cp from mem to flash or from flash to mem also correctly. how is this?? ^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] is any bug in cp? 2011-04-15 6:01 ` [U-Boot] is any bug in cp? hacklu.uboot @ 2011-04-15 8:44 ` Wolfgang Denk 2011-04-15 9:15 ` hacklu.uboot 2011-04-15 13:58 ` Charles Krinke 1 sibling, 1 reply; 7+ messages in thread From: Wolfgang Denk @ 2011-04-15 8:44 UTC (permalink / raw) To: u-boot Dear "hacklu.uboot", In message <201104151401034442433@gmail.com> you wrote: > > there is some bugs when I cp to flash like this: > cp.b addr1 addr2 0x100 > > when the two addr in the same bank of a flash. it go wrongs > > finally the date of addr2 is 0x8080808080... > > cp to another bank of flash is work correctly. > cp from mem to flash or from flash to mem also correctly. You cannot copy directly within the same bank of NOR flash. While in programming mod, you cannot read any user data from that device. This is a "feature" of how NOR flash works and no bug in the code. Just don't do it. 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: wd at denx.de There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies and the other is to make it so complicated that there are no obvious defi- ciencies. - Charles Anthony Richard Hoare ^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] is any bug in cp? 2011-04-15 8:44 ` Wolfgang Denk @ 2011-04-15 9:15 ` hacklu.uboot 2011-04-15 10:21 ` Wolfgang Denk 0 siblings, 1 reply; 7+ messages in thread From: hacklu.uboot @ 2011-04-15 9:15 UTC (permalink / raw) To: u-boot em.. how linux does that? does linux read the data to mem first before it write to the same bank of a nor flash? thanks much~ ------------------ hacklu.uboot 2011-04-15 ------------------------------------------------------------- ????????????Wolfgang Denk ???????????????2011-04-15 16:44:47 ????????????hacklu.uboot ?????????u-boot ?????????Re: [U-Boot] is any bug in cp? Dear "hacklu.uboot", In message <201104151401034442433@gmail.com> you wrote: > > there is some bugs when I cp to flash like this: > cp.b addr1 addr2 0x100 > > when the two addr in the same bank of a flash. it go wrongs > > finally the date of addr2 is 0x8080808080... > > cp to another bank of flash is work correctly. > cp from mem to flash or from flash to mem also correctly. You cannot copy directly within the same bank of NOR flash. While in programming mod, you cannot read any user data from that device. This is a "feature" of how NOR flash works and no bug in the code. Just don't do it. 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: wd at denx.de There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies and the other is to make it so complicated that there are no obvious defi- ciencies. - Charles Anthony Richard Hoare ^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] is any bug in cp? 2011-04-15 9:15 ` hacklu.uboot @ 2011-04-15 10:21 ` Wolfgang Denk 2011-04-18 1:49 ` hacklu.uboot 0 siblings, 1 reply; 7+ messages in thread From: Wolfgang Denk @ 2011-04-15 10:21 UTC (permalink / raw) To: u-boot Dear "=?utf-8?B?aGFja2x1LnVib290?=", In message <201104151715238470584@gmail.com> you wrote: > em.. > how linux does that? What exactly are you doing in Linux? Are we talking about user-space access through a file sytem (and thus block devices) based on the MTD layer? Or about raw access to the flash devices? Or about in-kernel code directly accessing some CFI driver routines? > does linux read the data to mem first before it write to the same bank of a nor flash? For user space operations on file system level: yes. 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: wd at denx.de In any group of employed individuals the only naturally early riser is _always_ the office manager, who will _always_ leave reproachful little notes ... on the desks of their subordinates. - Terry Pratchett, _Lords and Ladies_ ^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] is any bug in cp? 2011-04-15 10:21 ` Wolfgang Denk @ 2011-04-18 1:49 ` hacklu.uboot 0 siblings, 0 replies; 7+ messages in thread From: hacklu.uboot @ 2011-04-18 1:49 UTC (permalink / raw) To: u-boot thanks , I have understanded. ------------------ hacklu.uboot 2011-04-18 ------------------------------------------------------------- ????????????Wolfgang Denk ???????????????2011-04-15 18:21:23 ????????????hacklu.uboot ?????????u-boot ?????????Re:Re: Re: [U-Boot] is any bug in cp? Dear "=?utf-8?B?aGFja2x1LnVib290?=", In message <201104151715238470584@gmail.com> you wrote: > em.. > how linux does that? What exactly are you doing in Linux? Are we talking about user-space access through a file sytem (and thus block devices) based on the MTD layer? Or about raw access to the flash devices? Or about in-kernel code directly accessing some CFI driver routines? > does linux read the data to mem first before it write to the same bank of a nor flash? For user space operations on file system level: yes. 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: wd at denx.de In any group of employed individuals the only naturally early riser is _always_ the office manager, who will _always_ leave reproachful little notes ... on the desks of their subordinates. - Terry Pratchett, _Lords and Ladies_ ^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] is any bug in cp? 2011-04-15 6:01 ` [U-Boot] is any bug in cp? hacklu.uboot 2011-04-15 8:44 ` Wolfgang Denk @ 2011-04-15 13:58 ` Charles Krinke 2011-04-18 1:47 ` hacklu.uboot 1 sibling, 1 reply; 7+ messages in thread From: Charles Krinke @ 2011-04-15 13:58 UTC (permalink / raw) To: u-boot This makes sense as one should *not* copy from one sector in a flash to the same sector in a flash. Flash is erased in sectors, usually 128K and should be treated as a complete sector. The cp command is usually used to copy from RAM to FLASH or from FLASH to RAM. What you are doing seems illogical. Charles On Thu, Apr 14, 2011 at 11:01 PM, hacklu.uboot <hacklu.uboot@gmail.com>wrote: > hi,in my uboot. > > there is some bugs when I cp to flash like this: > cp.b addr1 addr2 0x100 > > when the two addr in the same bank of a flash. it go wrongs > > finally the date of addr2 is 0x8080808080... > > cp to another bank of flash is work correctly. > cp from mem to flash or from flash to mem also correctly. > > how is this? > > > _______________________________________________ > U-Boot mailing list > U-Boot at lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot > > -- Charles Krinke ^ permalink raw reply [flat|nested] 7+ messages in thread
* [U-Boot] is any bug in cp? 2011-04-15 13:58 ` Charles Krinke @ 2011-04-18 1:47 ` hacklu.uboot 0 siblings, 0 replies; 7+ messages in thread From: hacklu.uboot @ 2011-04-18 1:47 UTC (permalink / raw) To: u-boot 'cp' can also copy from flash to another bank of flash. I have test it. thanks all the same ------------------ hacklu.uboot 2011-04-18 ------------------------------------------------------------- ????????????Charles Krinke ???????????????2011-04-15 22:02:13 ????????????hacklu.uboot ?????????u-boot ?????????Re: [U-Boot] is any bug in cp? This makes sense as one should *not* copy from one sector in a flash to the same sector in a flash. Flash is erased in sectors, usually 128K and should be treated as a complete sector. The cp command is usually used to copy from RAM to FLASH or from FLASH to RAM. What you are doing seems illogical. Charles On Thu, Apr 14, 2011 at 11:01 PM, hacklu.uboot <hacklu.uboot@gmail.com>wrote: > hi,in my uboot. > > there is some bugs when I cp to flash like this: > cp.b addr1 addr2 0x100 > > when the two addr in the same bank of a flash. it go wrongs > > finally the date of addr2 is 0x8080808080... > > cp to another bank of flash is work correctly. > cp from mem to flash or from flash to mem also correctly. > > how is this??? > > > _______________________________________________ > U-Boot mailing list > U-Boot at lists.denx.de > http://lists.denx.de/mailman/listinfo/u-boot > > -- Charles Krinke ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-04-18 1:49 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.3.1302775202.27468.u-boot@lists.denx.de>
2011-04-15 6:01 ` [U-Boot] is any bug in cp? hacklu.uboot
2011-04-15 8:44 ` Wolfgang Denk
2011-04-15 9:15 ` hacklu.uboot
2011-04-15 10:21 ` Wolfgang Denk
2011-04-18 1:49 ` hacklu.uboot
2011-04-15 13:58 ` Charles Krinke
2011-04-18 1:47 ` hacklu.uboot
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox