Discussion:
Android Emulator for FreeBSD + FreeBSD/ARM port
(too old to reply)
Adrian Chadd
2014-09-07 20:32:48 UTC
Permalink
On 7 September 2014 11:01, Alexander Tarasikov
Hi, FreeBSD crowd!
During summer as part of GSoC program I was working on porting FreeBSD
to the Android Emulator.
Cool!
Besides, I have ported Android Emulator to run natively on x86_64 as opposed to
using linuxulator for 32-bit support.
Double cool!
As for the kernel side, I have implemented the support for the
*IRQ, Timer, UART
*MMC
*Ethernet
*Framebuffer (using NEWCONS)
Triple cool!
It allows to mount rootfs and boot up to login prompt with raspberry
pi sd card image.
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.
If anyone is interested, I would like that you read my blog post,
review my kernel commit and suggest ways to improve and push the
changes upstream. As for the Emulator, I think we can get it running
with GUI and everything because it just has too many "#ifdef
__linux__" stuff around the code which should compile and run on
FreeBSD as well, we just need to gradually uncomment each of these
sections.
[kernel code commit]
https://github.com/astarasikov/freebsd/commit/514be1f08a552f54abef83232498559c72e1d33b
[README, compilation instructions]
https://github.com/astarasikov/freebsd/blob/android_goldfish_arm_master/sys/arm/goldfish/README
[Emulator with patches]
https://github.com/astarasikov/qemu/tree/l-preview-freebsd
[blog] http://allsoftwaresucks.blogspot.ru/2014/09/gsoc-results-or-how-i-nearly-wasted.html
This work is awesome. I'll see if I can spin it up!



-a
_______________________________________________
freebsd-***@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-emulation
To unsubscribe, send any mail to "freebsd-emulation-***@freebsd.org"

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Alexander Tarasikov
2014-10-28 05:25:42 UTC
Permalink
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 <***@gmail.com>
Date: Tue, Oct 7, 2014 at 3:16 PM
Subject: Re: Android Emulator for FreeBSD + FreeBSD/ARM port
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
*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
_______________________________________________
freebsd-***@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-emulation
To unsubscribe, send any mail to "freebsd-emulation-***@freebsd.org"

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...