Date: Mon, 17 Mar 2014 18:02:42 +0000 From: "Wojciech A. Koszek" <wkoszek@freebsd.org> To: Ganbold Tsagaankhuu <ganbold@gmail.com> Cc: freebsd-hackers@freebsd.org, "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org>, Alexander Tarasikov <alexander.tarasikov@gmail.com> Subject: Re: [GSoC 2014] Interested in ARM bringup tasks Message-ID: <20140317180242.GJ37327@FreeBSD.org> In-Reply-To: <CAGtf9xNrxgfgPmzpkYWSNcDsArm5oWxBZ-KQjMmGwJUJ-djFdQ@mail.gmail.com> References: <CAMChaFxz7t6-UAUL50CsC9vDE%2BubG=9aBYwEy2hSinLWtoDaDg@mail.gmail.com> <CAGtf9xNrxgfgPmzpkYWSNcDsArm5oWxBZ-KQjMmGwJUJ-djFdQ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 17, 2014 at 08:39:24AM +0800, Ganbold Tsagaankhuu wrote: > Alexander, > > > On Mon, Mar 17, 2014 at 7:19 AM, Alexander Tarasikov < > alexander.tarasikov@gmail.com> wrote: > > > Hello, FreeBSD community! > > > > I am interested in participating in GSoC this year and I'd like to > > pick up one of the tasks related to porting FreeBSD to new > > architectures. I'm now doing my master's degree in software > > engineering at the "Higher School of Economics" in Moscow. > > > > Since I love ARM and smartphones, I've chosen the project to port > > FreeBSD to a smartphone. If that task is already occupied (which > > doesn't seem so), I would be happy to pick up another task suggested > > by the community. > > > > I want to port FreeBSD to the Sony Xperia Z phone. This phone has the > > Qualcomm APQ8064 SoC which is used in a large number of smartphones, > > including Google Nexus 4. Besides, Qualcomm SoCs are developed > > incrementally so there's a high chance that the code for current > > generation of chips will benefit future revisions as well. > > > > Interesting. I'm not quite sure how accessible is some pins like uart in > Experia Z. > I have it here, but I still didn't try to open it yet to see the pins etc. > Probably you meant here some embedded boards like ifc6410. > Plus ifc6410 has docs so that could be useful too. Alexander, Ganbold, To get an access to UART in modern phones you typically get it via phone jack. By building/buying special adapter, you make your microphone jack become a serial cable. There are schematics online. For Nexus 4 the cable looked really simple. > > It is known that debugging like JTAG and flash recovery is not > > available on consumer devices because of DRM and general love for > > obfuscation among the vendors. Therefore, to prevent bricking the > > device, > > > That is the hell, it seems Qualcomm uses lauterbach jtag adapter in that > case. > I and my friend and also some people have tried some adapters like > flyswatter2 with ifc6410, still no luck. > I suggest using the chainloading approach, that is using the > > bootloader that ships with the device and pretend to be a linux image. > > > > That can be done. Their bootloader like maybe LK in case of ifc6410 can > boot freebsd kernel. > Actually I did that for ifc6410. > > > > > > For the mid-term I want to port the u-boot bootloader and add the > > support for accessing the microSD card from it. The u-boot will be > > flashed to the device instead of the linux kernel. If this project was to be attacked, I'd try to check if there's a way to re-use existing bootloader (on the phone) and just try to boot different kernel. Otherwise (if you have to work on U-boot) it's no longer a FreeBSD project. So I'd say: try to research the platform accessibility first. If U-boot work is absolutely necessary, it's probably fine to do something there, but if it's lots of time working on some other stuff, I'm not convinced. Can modern phones netboot/USB boot somehow? > > That could be cool. > > > > > > Since the proprietary bootloader already initializes the display (we > > can also port linux driver to u-boot), it should be possible, at least > > during the initial stage, to use a simple driver in FreeBSD that would > > write to the framebuffer allocated by the bootloader or only write the > > framebuffer address to the display controller. > > > > > That is nice. However first we need uart driver, then either usb ehci, mmc > or sata driver needs to mount rootfs in order to boot freebsd to multiuser > mode. I already have timer driver and minimal console driver so it makes > booting little bit easier. > > > > > > In the past I've successfully ported linux to an Intel XScale-based > > Asus P525 smartphone, ported Android with all hardware working to boot > > from NAND on the Sony Xperia X1 phone and have ported various boards > > from OEM to vanilla kernel trees. Recently I've experimented with the > > XNU kernel (the one which is used in the fruity operating system) and > > ported it to the OMAP5 board. So I think I'll be able to pull it off. > > > > Cool. In case of android or linux there are many people working on various > stuffs so in most case drivers are either written or somebody has got > started working on particular driver already. For FreeBSD case it is > different. You maybe know that very few people are working in case of ARM > platform bringup, so we need more developers and I'm happy that you decided > to work on this direction. > I wonder if SDK shipped by Google could be used to emulate given smartphone. They already ship with the emulator, and pre-defined profiles for devices. I wonder if Android kernel developers know more about running emulated kernels. -- Wojciech A. Koszek wkoszek@FreeBSD.czest.pl http://FreeBSD.czest.pl/~wkoszek/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140317180242.GJ37327>