Howto rebuild UBports image for specific device from sources?



  • Is there a guide / how to, which covers details needed to rebuild UBports image for specific device from sources?

    I am having troubles figuring out the following:

    • Pre-requisites/requirements for setting up development environment, i.e. preferred OS, required tools, dependencies, versions (if relevant) etc.
    • How to setup environment?
    • How to get sources needed to build UBports image for specific device?
    • How to build, install, test?
    • ...

    So far, I've found https://docs.ubports.com/en/latest/systemdev/testing-locally.html but got stuck pretty fast on crossbuilder setup-lxd which results for me in error:

    LXD was installed but is not accessible. Please restart your computer.
    

    Note that I tried reboot and it does not help :(

    I've also seen found porting guide, but it covers initial creation of UBports image for new device, not rebuild UBports image for specific device from sources.



  • So, the rootfs is not specific to a device. Pretty much everything that can be built via crossbuilder is part of the rootfs, which you do not need to rebuild for your device. The linked "systemdev" documentation is about developing components at this level (services that run inside ubuntu, unity8 shell, system-settings, etc…).

    If what you want to build is a port for your device, the best place to start is https://docs.halium.org and the porting guide. They describe how to build the device-specific parts.



  • @dobey said in Howto rebuild UBports image for specific device from sources?:

    So, the rootfs is not specific to a device. Pretty much everything that can be built via crossbuilder is part of the rootfs, which you do not need to rebuild for your device. The linked "systemdev" documentation is about developing components at this level (services that run inside ubuntu, unity8 shell, system-settings, etc…).

    Well, what I am looking for is description of steps that one needs to do, if he would like to try fix something in e.g. system-settings.

    If what you want to build is a port for your device, the best place to start is https://docs.halium.org and the porting guide. They describe how to build the device-specific parts.

    I want to understand, full development -> build -> deployment -> test cycle for supported device I have.



  • Well, what I am looking for is description of steps that one needs to do, if he would like to try fix something in e.g. system-settings.

    You can just build new debs with crossbuilder, push them to the device, make the rootfs r/w, and install the new specific debs (not all the binary packages that get built are necessarily installed). Or if there's a PR, CI will build debs in a repo, and you can use the ubports-qa tool on your device to upgrade the packages for a specific PR, to test. There's no need to rebuild and reflash the whole rootfs to test specific fixes.

    I want to understand, full development -> build -> deployment -> test cycle for supported device I have.

    Basically as described above. In case of changes to kernel or recovery, those pieces would be rebuilt and flashed on. Testing against a full flashed image is done by installing the current devel or RC for a device, to validate the image for promotion. Images in devel are built automatically on a daily basis, by CI.



  • @dobey said in Howto rebuild UBports image for specific device from sources?:

    Well, what I am looking for is description of steps that one needs to do, if he would like to try fix something in e.g. system-settings.

    You can just build new debs with crossbuilder,

    Well, I can't get even through this step, since as mentioned in the first message, crossbuilder just does not work for me.

    push them to the device, make the rootfs r/w, and install the new specific debs (not all the binary packages that get built are necessarily installed). Or if there's a PR, CI will build debs in a repo, and you can use the ubports-qa tool on your device to upgrade the packages for a specific PR, to test. There's no need to rebuild and reflash the whole rootfs to test specific fixes.

    Thanks for the story above, but at the moment stuff that seem to be so obvious to you does not make any sense to me... Need to do the first step - build something with crossbuilder, then I will try to decipher the rest.



  • I suppose you are on 18.10 as well, so you may want to join in on https://forums.ubports.com/topic/2140/how-to-setup-crossbuilder-in-ubuntu-18-10 instead.


Log in to reply
 

Looks like your connection to UBports Forum was lost, please wait while we try to reconnect.