public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [mips][cfi] Unable to write into flash under qemu
Date: Tue, 5 Jul 2016 19:05:49 +0200	[thread overview]
Message-ID: <577BE8ED.5020804@gmail.com> (raw)
In-Reply-To: <CAOazyz250xgUDKbLYs0EGn_5zQ4Te8wVvSd8wVYy7wi8qs+OBA@mail.gmail.com>



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: <http://lists.denx.de/pipermail/u-boot/attachments/20160705/df69fd14/attachment.sig>

  reply	other threads:[~2016-07-05 17:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-05  0:08 [U-Boot] [mips][cfi] Unable to write into flash under qemu Alon Bar-Lev
2016-07-05 12:04 ` Alon Bar-Lev
2016-07-05 16:10   ` Daniel Schwierzeck
2016-07-05 16:50     ` Alon Bar-Lev
2016-07-05 17:05       ` Daniel Schwierzeck [this message]
2016-07-05 17:17         ` Alon Bar-Lev
2016-07-05 17:34           ` Daniel Schwierzeck
2016-07-05 17:57             ` Alon Bar-Lev
2016-07-10 20:50     ` Alon Bar-Lev
2016-07-18  8:38       ` Stefan Roese
2016-07-18 12:13         ` Daniel Schwierzeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=577BE8ED.5020804@gmail.com \
    --to=daniel.schwierzeck@gmail.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox