qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: Rob Landley <rob@landley.net>
Cc: qemu-devel@nongnu.org, Rich Felker <dalias@libc.org>
Subject: Re: [Qemu-devel] qemu-system-sh4 -M r2d serial is broken.
Date: Tue, 6 Jun 2017 18:21:01 +0200	[thread overview]
Message-ID: <20170606162101.fa6gu2usiwgujllt@aurel32.net> (raw)
In-Reply-To: <766ffd59-4913-9bb8-6760-4de66af92ade@landley.net>

On 2017-06-05 17:29, Rob Landley wrote:
> On 05/18/2017 06:01 PM, Aurelien Jarno wrote:
> > On 2017-05-18 17:37, Rob Landley wrote:
> >> On 05/18/2017 02:00 PM, Aurelien Jarno wrote:
> >>> On 2017-05-18 11:08, Rob Landley wrote:
> >>>> Serial input hangs after the first character in the 4.11 kernel:
> >>>>
> >>>>   http://www.spinics.net/lists/linux-sh/msg51183.html
> >>>>
> >>>> Because they enabled support for a buffer size thing QEMU doesn't
> >>>> emulate right:
> >>>>
> >>>>   http://www.spinics.net/lists/linux-sh/msg51189.html
> >>>
> >>> Indeed the SCIF emulation in QEMU is quite limited. The problem is that
> >>> it exposes many internal states to the software (and that's the same for
> >>> the SH4 CPU in general), and that's not really compatible with quick
> >>> emulation. In that case the timer should depend on the baud rate which
> >>> we don't really emulate.
> >>>
> >>> I'll try to have a look, that said my test environment is stuck with
> >>> kernel 4.8 due to the broken futex support on UP in kernel 4.9 (and
> >>> that's not QEMU specific). I'll try to build a more recent kernel with
> >>> additional patches.
> >>
> >> I thought Rich fixed that. Rich?
> > 
> > I have sent a patch already, but TTBOMK it hasn't been applied yet.
> > 
> > Aurelien
> 
> I poked Rich about the futex patch again today, he's been buried up to
> his neck in work but has to flush his bugfix queue before -rc5 so that
> should get sorted this week.

Thanks!

> Also, how do I tell the kernel to read the persistent clock on r2d? Both
> CONFIG_RTC_DRV_R9701 (from r2d defconfig) and CONFIG_RTC_DRV_SH give
> error messages and fail to read anything at boot time.

The R2D has such a RTC chip, but it is not emulated in QEMU. Someone has
to write it.

> If you need a new test environment (simple one that doesn't use futexes
> that I'm aware of) https://github.com/landley/mkroot is nearing its
> first release. You'll need to follow the README instructions to build
> musl-cross-make toolchains and set up the mcm symlink, but then:
> 
>   ./cross.sh sh4 ./mkroot.sh kernel
>   cd output/sh4
>   ./qemu-sh4.sh
>
> Should boot you to a shell prompt. And given that the root filesystem
> builder (mkroot.sh) is ~300 lines of bash and module/kernel is another
> 300 lines (mostly a big target-specific if/else staircase), it shouldn't
> be too hard to pull apart. :)

Ok, thanks.

> Right now sh4 is the only target in the release list that hasn't got the
> full "boots to a shell prompt and exits when you type exit, clock is set
> to correct time, block device works, network card works" functionality
> list. (That's all working on arm64 armv5l armv7l i486 i686 mips mipsel
> powerpc s390x x86-64.)

Patches to fix that are welcome.

Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                 http://www.aurel32.net

  reply	other threads:[~2017-06-06 16:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-18 16:08 [Qemu-devel] qemu-system-sh4 -M r2d serial is broken Rob Landley
2017-05-18 19:00 ` Aurelien Jarno
2017-05-18 22:37   ` Rob Landley
2017-05-18 23:01     ` Aurelien Jarno
2017-06-05 22:29       ` Rob Landley
2017-06-06 16:21         ` Aurelien Jarno [this message]
2017-05-18 19:57 ` Paolo Bonzini
2017-05-18 20:10   ` Aurelien Jarno
2017-05-18 20:48     ` Paolo Bonzini
2017-05-18 22:35   ` Rob Landley
2017-05-18 23:00     ` Aurelien Jarno
2017-05-19  5:05       ` Rob Landley

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=20170606162101.fa6gu2usiwgujllt@aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=dalias@libc.org \
    --cc=qemu-devel@nongnu.org \
    --cc=rob@landley.net \
    /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;
as well as URLs for NNTP newsgroup(s).