From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Schwierzeck Date: Tue, 5 Jul 2016 19:05:49 +0200 Subject: [U-Boot] [mips][cfi] Unable to write into flash under qemu In-Reply-To: References: <577BDBF4.8010807@gmail.com> Message-ID: <577BE8ED.5020804@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Am 05.07.2016 um 18:50 schrieb Alon Bar-Lev: > Thank you so much! > Erase does not complain any more. please do not top-quote on a mailing list. > > However, write is not working. > > Result is always something like: > be040000: 00800080 00800080 00800080 00800080 ................ hm, I can't reproduce that: $ qemu-system-mips -M malta -cpu 24Kc -m 256 -nographic -drive if=pflash,file=/work/u-boot-mips/pflash.bin,format=raw -netdev user,id=ubtest,tftp=/work/u-boot-mips -device pcnet,netdev=ubtest malta # md BE040000 4 be040000: ffffffff ffffffff ffffffff ffffffff ................ malta # erase BE040000 +10000 . done Erased 1 sectors malta # md BE040000 4 be040000: ffffffff ffffffff ffffffff ffffffff ................ and saveenv works for me too: U-Boot 2016.07-rc3-00016-gbf4c649 (Jul 05 2016 - 18:55:54 +0200) Board: MIPS Malta CoreLV DRAM: 256 MiB Flash: 4 MiB *** Warning - bad CRC, using default environment In: serial at 3f8 Out: serial at 3f8 Err: serial at 3f8 Net: pcnet#0 IDE: Bus 0: not available malta # md be3e0000 be3e0000: ffffffff ffffffff ffffffff ffffffff ................ be3e0010: ffffffff ffffffff ffffffff ffffffff ................ be3e0020: ffffffff ffffffff ffffffff ffffffff ................ be3e0030: ffffffff ffffffff ffffffff ffffffff ................ be3e0040: ffffffff ffffffff ffffffff ffffffff ................ be3e0050: ffffffff ffffffff ffffffff ffffffff ................ be3e0060: ffffffff ffffffff ffffffff ffffffff ................ be3e0070: ffffffff ffffffff ffffffff ffffffff ................ be3e0080: ffffffff ffffffff ffffffff ffffffff ................ be3e0090: ffffffff ffffffff ffffffff ffffffff ................ be3e00a0: ffffffff ffffffff ffffffff ffffffff ................ be3e00b0: ffffffff ffffffff ffffffff ffffffff ................ be3e00c0: ffffffff ffffffff ffffffff ffffffff ................ be3e00d0: ffffffff ffffffff ffffffff ffffffff ................ be3e00e0: ffffffff ffffffff ffffffff ffffffff ................ be3e00f0: ffffffff ffffffff ffffffff ffffffff ................ malta # save Saving Environment to Flash... Un-Protected 2 sectors Erasing Flash... .. done Erased 2 sectors Writing to Flash... done Protected 2 sectors malta # md be3e0000 be3e0000: cc07705a 62617564 72617465 3d313135 ..pZbaudrate=115 be3e0010: 32303000 65746861 63743d70 636e6574 200.ethact=pcnet be3e0020: 23300065 74686164 64723d35 323a3534 #0.ethaddr=52:54 be3e0030: 3a30303a 31323a33 343a3536 00666474 :00:12:34:56.fdt be3e0040: 636f6e74 726f6c61 6464723d 38666666 controladdr=8fff be3e0050: 37373030 00737464 6572723d 73657269 7700.stderr=seri be3e0060: 616c4033 66380073 7464696e 3d736572 al at 3f8.stdin=ser be3e0070: 69616c40 33663800 7374646f 75743d73 ial at 3f8.stdout=s be3e0080: 65726961 6c403366 38000000 00000000 erial at 3f8....... be3e0090: 00000000 00000000 00000000 00000000 ................ be3e00a0: 00000000 00000000 00000000 00000000 ................ be3e00b0: 00000000 00000000 00000000 00000000 ................ be3e00c0: 00000000 00000000 00000000 00000000 ................ be3e00d0: 00000000 00000000 00000000 00000000 ................ be3e00e0: 00000000 00000000 00000000 00000000 ................ be3e00f0: 00000000 00000000 00000000 00000000 ................ > > I enabled the debug info of both u-boot and qemu. > I hope it helps. > I am using master of qemu and u-boot, I get similar behavior in qemu > since ever 1.5. > Any clue? I'm also using master of U-Boot and Qemu -- - Daniel -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 473 bytes Desc: OpenPGP digital signature URL: