How to make a port?



  • Hello. I have device meizu m5. It is similar enough to your meizu m5 pro. Will you make a port of ubports to meizu m5 or i can make it by myself?



  • @VadiMeln
    I think there is no Meizu m5 pro
    Probably you mean "Meizu Pro 5"
    If you compare the hardware, this are completely different devices.

    Meizu M5
    http://www.gsmarena.com/meizu_m5-8408.php
    Chipset: Mediatek MT6750
    CPU: Octa-core 1.5 GHz Cortex-A53

    Meizu Pro 5
    http://www.gsmarena.com/meizu_pro_5-7573.php
    Chipset: Exynos 7420 Octa
    CPU: Octa-core (4x2.1 GHz Cortex-A57 & 4x1.5 GHz Cortex-A53)

    This smartphones don't have Intel or AMD CPU, they are using ARM CPU.
    The thing is, that ARM CPU don't have hardware detection, so the operating system must be build exactly for only this specific device. It will not run on any other device.
    That's why it's that hard, porting to different devices.



  • In general Mediatek chipsets are not easy to port but who knows. Currently however we are not working on any new devices until we got our common hardware abstraction layer (see https://halium.org/) and the 16.04 image base ready.

    BR



  • @WLBI said in How to make a port?:

    The thing is, that ARM CPU don't have hardware detection, so the operating system must be build exactly for only this specific device. It will not run on any other device.
    That's why it's that hard, porting to different devices.

    Very interesting, do you have some more info or pointers about why that limitation exists? I always thought it would be possible (but maybe very difficult) to rebase the kernel drivers from the device specific sources on a newer common kernel and use linux auto detection to discover which modules to load.



  • @ZeroPointEnergy said in How to make a port?:

    kernel and use linux auto detection to discover which modules to load.

    Linux autodetection can IMHo only work if a platform supports a list of installed hardware, like it was done for early ISA cards with the PnP standard or with the PCI and later cards with the support of the BIOS.

    An embedded platfrom does probably not have room for all that stuff, so the drivers need to be loaded "statically" and try to find their device on the usual configured addresses.

    BR



  • @ZeroPointEnergy
    ARM processor don't have a PCI bus, so there is no auto detection 😉
    Because of that, you can not build a life system on a boot medium (USB flash drives/CD/DVD) running on all ARM devices, like you know it for example from Knoppix Linux.
    It will only run on one specific device and hardware. If you change hardware, it will not work anymore.



  • Very interesting, I was not aware of that restriction. Thanks both of you for the explanations.



  • Plus if you think how long it took Linux to really be able to run on all PCs... But those years back it was much easier since there were not so many different hardware / firmware variants on the market. And at least most of them had some "compatibility mode" like VGA basic resolution, IDE HDD standard drivers etc. Plus of course Intel CPU basic instruction sets and that AMD made their CPUS compatible.

    In the mobile world, the opposite led to success: Make a possible unique (and cheap) solution, add some undocumented driver (must be in source, can use blob .so´s) and userland blobs (can be 100% closed source), lock everything up behind Android´s abstraction layers and voila you got your mobile phone. Sell 10 Million pieces and get rich quick xD

    BR



  • But I just want to get.answer: is it possible to make a port to mediatek chipset or no,.and if it is possible, how?



  • @VadiMeln, @Flohack answered you already.

    tl;dr Who knows. It doesn't make sense until Halium is ready.



  • I understood, that gonna be difficult, but if it is even hard, or even easy, give me an instruction, pleease.





  • Oh, thank you.