FreeBSD for phone/tablet

When you want something practically useful as phone or tablet, you either have to construct it yourself (like for example Pine does) or reuse HW already on the market like for example custom Android ROMs do. Both ways have major roadblock at the start - most of the functions of such device is performed by one or two chips for which documentation is not freely available, you have to sign NDA, do orders in tens of thousands etc.
I'd frankly challenge you to define 'practically useful'. Something for yourself or for someone else? If I'm doing something for myself, I don't mind putting in the effort and then living with imperfections. It's my homebrew project, after all. If I'm doing it for someone else - it would be on request of that someone else, and with knowledge that they're willing to live with the imperfections as well. The alternative to doing it yourself is to buy something commercially available.
 
I'd frankly challenge you to define 'practically useful'. [...]It's my homebrew project, after all.
This was covered by the "only" discovery/educational/fun endeavor for person(s) involved part. In regards of my understanding of practically useful in the light of FreeBSD on the phone discussion you can imagine something what is working and known on the market, for example Jolla/Sailfish or PalmOS resurrection. The first one is delivering (with hiccups), second one died and ended as Smart TV OS. I really wished them both succeed. But both delivered something what regular person may want to buy, even if that was niche product.
 
Just take a look at the architectures that 13-RELEASE supports! The download area provides images for Pine64, Pi-B, and a few others! FreeBSD is famous for working on BeagleBone SoC's, too! I'd suggest the following approach:
  1. Figure out the architectures that 13-RELEASE even supports. You'll be surprised to no end!
  2. Do some homework to see if your hardware is even on that list.
  3. You may need to adjust your expectations based on the research above. A few options that I see:
    1. (If hardware is in fact supported) Install FreeBSD anyway, just for different use cases than initially expected.
    2. Install something else that is compatible, and has the features you want.
    3. (If you enjoy the process) Figure out how to make a driver work on the device under FreeBSD, figure out how to maintain a port.
I already checked - my SoC is supported. The first step, I guess is to compile BSD for my SoC. Next step is to focus on the drivers, but the question is - drivers for android are still C, so shouldn't it be possible to rip them out of the OEM android rom and splice them into BSD? It's not ideal, but I'm thinking along the lines of a linux kernel compat layer for the bsd kernel... is such a thing possible?

The problem with writing your own drivers for devices used on an android device, is that most of the drivers are proprietary and lack documentation, same goes for the devices themselves.

I suppose it might be possible to decompile into assembler and try to RE them for BSD, but..
 
Next step is to focus on the drivers, but the question is - drivers for android are still C, so shouldn't it be possible to rip them out of the OEM android rom and splice them into BSD?
Just because they've been written in C doesn't mean it'll work. The kernel interfaces of the Android (Linux) and FreeBSD kernels are completely different.
but I'm thinking along the lines of a linux kernel compat layer for the bsd kernel... is such a thing possible?
Yes, no, sort of.
The problem with writing your own drivers for devices used on an android device, is that most of the drivers are proprietary and lack documentation, same goes for the devices themselves.
And that's the reason why FreeBSD is lacking a lot of those drivers.
 
Next step is to focus on the drivers, but the question is - drivers for android are still C, so shouldn't it be possible to rip them out of the OEM android rom and splice them into BSD? It's not ideal, but I'm thinking along the lines of a linux kernel compat layer for the bsd kernel... is such a thing possible?
I'd first check to see if the defaults even work. FreeBSD does provide a few pre-made drivers. Take a look at boot logs - what hardware does the kernel even 'see' ? If you don't have a driver included by default, it may be possible to hunt something down - just ask around on these forums. Writing your own driver would be really a last resort. You can start looking here for some guidance on how to write a driver for a FreeBSD-based SoC. Usually, SoC's are very simple devices with just USB ports for input.

If you enjoy the process, you're more than welcome to try and port an Android device driver (although I think you'll probably just use it as a template to write a FreeBSD-compatible device driver from ground up, rather than copy-paste any C code). FWIW, this is more that I'd be willing to take on, but this is something that's fun to watch from the sidelines.
 
I'd first check to see if the defaults even work. FreeBSD does provide a few pre-made drivers. Take a look at boot logs - what hardware does the kernel even 'see' ? If you don't have a driver included by default, it may be possible to hunt something down - just ask around on these forums. Writing your own driver would be really a last resort. You can start looking here for some guidance on how to write a driver for a FreeBSD-based SoC. Usually, SoC's are very simple devices with just USB ports for input.

If you enjoy the process, you're more than welcome to try and port an Android device driver (although I think you'll probably just use it as a template to write a FreeBSD-compatible device driver from ground up, rather than copy-paste any C code). FWIW, this is more that I'd be willing to take on, but this is something that's fun to watch from the sidelines.
The driver for Huawei do it ?
 
Back
Top