Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Oct 2014 09:25:42 +0400
From:      Alexander Tarasikov <alexander.tarasikov@gmail.com>
To:        Gavin Atkinson <gavin@freebsd.org>
Cc:        freebsd-hackers@freebsd.org, "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>, freebsd-emulation@freebsd.org
Subject:   Fwd: Android Emulator for FreeBSD + FreeBSD/ARM port
Message-ID:  <CAMChaFyurhJbiQ-tHNcZCYPKKW%2B-pSiZz3D8i%2Bq43u-F7UYsoQ@mail.gmail.com>
In-Reply-To: <CAMChaFzF5hsrmH9KVLKR7r-nxs3pVwPi6XtDZQof%2B4VbTBssiQ@mail.gmail.com>
References:  <CAMChaFyKff2W4_caU86=trdC9ZhGF9xYJBtV%2BCma7pAuiwa79g@mail.gmail.com> <alpine.BSF.2.11.1410051841300.20681@ury.york.ac.uk> <CAMChaFzF5hsrmH9KVLKR7r-nxs3pVwPi6XtDZQof%2B4VbTBssiQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi! I'm forwarding the message I sent directly to Gavin some time ago

Also, I've pushed a small fix for the kernel compilation error and replaced
a couple of __linux__ ifdefs with __FreeBSD__ in the emulator.

I also think it is necessary to mount libprocfs even if using a FreeBSD build
because the emulator uses /proc to find its binary

The result is that I now have the emulator running on FreeBSD which has
X11/Framebuffer working. Here is a screenshot in which I connect to a
FreeBSD host using "ssh -Y" in Mac OS X and run the emulator

https://drive.google.com/file/d/0B7wcN-tOkdeRZTlzdWh3V0d0VGM/view?usp=sharing

https://github.com/astarasikov/freebsd
https://github.com/astarasikov/qemu/tree/l-preview-freebsd

---------- Forwarded message ----------
From: Alexander Tarasikov <alexander.tarasikov@gmail.com>
Date: Tue, Oct 7, 2014 at 3:16 PM
Subject: Re: Android Emulator for FreeBSD + FreeBSD/ARM port
To: Gavin Atkinson <gavin@freebsd.org>


On Sun, Oct 5, 2014 at 9:58 PM, Gavin Atkinson <gavin@freebsd.org> wrote:
> On Sun, 7 Sep 2014, Alexander Tarasikov wrote:
>> During summer as part of GSoC program I was working on porting FreeBSD
>> to the Android Emulator.
>> Besides, I have ported Android Emulator to run natively on x86_64 as opposed to
>> using linuxulator for 32-bit support.
>>
>> As for the kernel side, I have implemented the support for the
>> following hardware:
>>  *IRQ, Timer, UART
>>  *MMC
>>  *Ethernet
>>  *Framebuffer (using NEWCONS)
>>
>> It allows to mount rootfs and boot up to login prompt with raspberry
>> pi sd card image.
>
> I'm now in a position where I'm starting to look at getting this in shape
> ready to push it into the main tree.

Hi! That's interesting

>
>> As for the emulator, it's a bit complicated. FreeBSD boots fine if you
>> launch the emulator on Linux or Mac OS X. I have fixed some parts of
>> the build system and headers to make it compile and pass the tests on
>> FreeBSD. Unfortunately, the GUI doesn't work right now and only
>> console output (virtual UART) works.
>
> Firstly, I'd like to get the emulator into the ports tree.  I was
> originally planning on using the Linux binary (I've been doing all of my
> testing so far with the Linux binary) but if you have patches for FreeBSD
> I think that's likely the best way forward, or it may make sense to import
> both?

It's complicated. Afaiu, linux compatibility mode only supports 32-bit
binaries. So we'll need to rebuild the emulator on 32-bit linux (to
get a 'git' version which works).

If we run the emulator on Linux or OS X, everything works including
framebuffer, mmc and network. As for running natively on FreeBSD, it
currently supports the UART and GUI fails at some X11 call. I think we
will get it working by removing some unnecessary ifdefffery.

>
> Then, I'd like to get the Goldfish code into the main FreeBSD tree.  It
> would be nice to get at least bidirectional UART working before we can do
> that, are there any issues with the emulator that would prevent this?
> I've also not managed to get ethernet or the framebuffer working, though
> I've not looked deep into this and especially for the network interface it
> may be related to how I'm running the emulator - I guess you have been
> passing through a device into the emulator?
>
> I think once we can get the bidirectional UART fully functional, we can
> push this into the tree.  Also, goldfish_mmc.c is missing a copyright
> statement - can you add one please?

Okay, I will look into it. I will be present at irc on weekends.

>
> Thanks,
>
> Gavin



--
Regards, Alexander


-- 
Regards, Alexander



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMChaFyurhJbiQ-tHNcZCYPKKW%2B-pSiZz3D8i%2Bq43u-F7UYsoQ>