qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] qemu-system-sh4 -M r2d serial is broken.


From: Aurelien Jarno
Subject: Re: [Qemu-devel] qemu-system-sh4 -M r2d serial is broken.
Date: Tue, 6 Jun 2017 18:21:01 +0200
User-agent: NeoMutt/20170113 (1.7.2)

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
address@hidden                 http://www.aurel32.net



reply via email to

[Prev in Thread] Current Thread [Next in Thread]