Date: Tue, 22 Apr 2014 00:54:38 +0400 From: Alexander Tarasikov <alexander.tarasikov@gmail.com> To: "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org> Subject: GSoC 2014 - FreeBSD on Android Emulator and (possibly) a phone Message-ID: <CAMChaFzveqszLB0abSV0N-=6H=wgnoTgtmRaHfqG1OF_3%2BvY8A@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hello, FreeBSD hackers! It's great news that I was accepted to GSoC 2014 for the project of porting FreeBSD to Android Emulator. I would like to report some of my progress and get advice on further directions. So I started by looking into the FreeBSD port to ARM Versatile board by Oleksandr Tymoshenko and got the image booting in QEMU which indicates that the cross-compiler toolchain is working correctly. I have added rudimentary Goldfish board (which is the virtual SoC and board emulated by the Android Emulator) to FreeBSD kernel and pushed a branch named 'android_goldfish_arm_10.0.0' based on release-10.0.0 to my github fork at https://github.com/astarasikov/freebsd/tree/android_goldfish_arm_10.0.0 Currently I did not manage to get it booting on the emulator yet. I have attached the GDB and verified that it gets loaded to the correct address and single-stepped it, but looks like MMU is not getting set up correctly and as soon as the kernel loads the program counter with the virtual address, it booms. I have tried various ARM revisions in both FreeBSD kernel and Android Emulator, but it's still not there. However, it was an overnight hack I made today so I need to invest more time into debugging and understanding FreeBSD Virtual Memory management. Since Android Emulator is based on QEMU, I will probably try adding Goldfish board to the source code of the QEMU version on which I had Versatile kernel running, but I think it's rather my fault :) Currently I'm running QEMU with Versatile inside FreeBSD and Android Emulator in Linux. I will look into using linux emulation to run the latest version of Android SDK and Emulator on FreeBSD. I think it would be good to get the latest version of emulator into ports, but that will depend on whether I have time for it. So currently for the midterm I want to get the kernel running with MMU :). If that goes well, porting MMC and Ethernet (SMC chip) emulation should be relatively easy. If I don't get drowned in debugging VM issues, we may have everything working quite soon. So I would like to ask the community which features would you recommend to implement during the course of the project except kernel with the support of block devices and networking? I can think of prebuilt images that could be easily deployed to Android Emulator on any platform. In previous mails it was discusses that it would be cool to get FreeBSD also running on some popular phone. If the emulator port does not take the whole summer, I could look into that. Unfortunately my phone (Sony Xperia Z) broke (the modem is not working and the screen is damaged partially though it can boot) so I'm thinking of getting some used Android Phone for hacking. I'm choosing between a Nexus 5 and Galaxy Note 3. I don't like Qualcomm but Nexus 5 is very popular (and has UART schematics available) while the exynos-based Galaxy Note is more freedom-friendly and the SoC is supported by the FreeBSD. -- Regards, Alexander
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMChaFzveqszLB0abSV0N-=6H=wgnoTgtmRaHfqG1OF_3%2BvY8A>