Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Android Emulator for FreeBSD + FreeBSD/ARM port

231 views
Skip to first unread message

Alexander Tarasikov

unread,
Sep 7, 2014, 2:01:10 PM9/7/14
to
Hi, FreeBSD crowd!

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.

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.

Relevant links:
[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

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

Adrian Chadd

unread,
Sep 7, 2014, 4:32:48 PM9/7/14
to
On 7 September 2014 11:01, Alexander Tarasikov
<alexander...@gmail.com> wrote:
> 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
> following hardware:
> *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.
>
> Relevant links:
> [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

Gavin Atkinson

unread,
Oct 5, 2014, 1:58:51 PM10/5/14
to
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.

> 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?

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?

Thanks,

Gavin
0 new messages