UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. edc
    3. Best
    E
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 6
    • Groups 0

    Posts

    Recent Best Controversial
    • Building the kernel

      Can anyone give me / point me towards any instructions on how to build the kernel for a given channel?
      Also is it possible to build and flash just the kernel or would it be easier to build everything?

      I'm on bacon, 15.04 rc at the moment and there are a couple of config options I think should be changed, although I would like to test them first for myself:

      The max cpu frequency is currently limited to 1958400 (normal max frequency is 2457600) -- the original commit for this says it was to reduce UI stuttering due to thermal throttling, but it was later removed (at least in LineageOS, not sure about other repos) and I never experienced any thermal throttling on Android. In fact I found the higher max cpu frequency also used less battery, presumably due to fewer cores being hotplugged or not being online for as long.

      Ondemand governer is not built into the kernel at the moment, and (for the kinds of things I used my phone for in Android) I always found ondemand more responsive and more battery friendly than interactive.

      posted in Support
      E
      edc
    • RE: Building the kernel

      Finally got everything working.

      Notes here in case anyone else is interested, or I forget what I did later.

      Building the kernel and android system using phablet-tools is much easier and actually takes up less space than manually doing a repo sync for just the kernel! (Fits comfortably in a 30GB vm).

      On an ubuntu 16.04 vm:

      sudo add-apt-repository ppa:phablet-team/tools
      sudo apt-get update
      sudo apt-get install phablet-tools
      

      Install build requirements:

      sudo dpkg --add-architecture i386
      sudo apt-get update
      sudo apt-get install git gnupg flex bison gperf build-essential \
        zip bzr curl libc6-dev libncurses5-dev:i386 x11proto-core-dev \
        libx11-dev:i386 libreadline6-dev:i386 libgl1-mesa-glx:i386 \
        libgl1-mesa-dev g++-multilib tofrodos \
        python-markdown libxml2-utils xsltproc zlib1g-dev:i386 schedtool \
        g++-4.8-multilib
      

      Ignore section about installing repo, there is already a package for it which is a dependency of phablet-tools

      mkdir ~/phablet
      cd ~/phablet
      repo init -u https://github.com/ubports/android -b ubp-5.1
      

      local manifest (for oneplus one):

      touch .repo/local_manifests/oneplus_bacon.xml
      

      I used this for oneplus_bacon.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <manifest>
      <project path="device/oneplus/bacon" name="ubports/android_device_oneplus_bacon-1" remote="ubp" />
      <project path="device/oppo/common" name="ubports/android_device_oppo_common" remote="ubp" />
      <project path="device/qcom/common" name="android_device_qcom_common" remote="cm" />
      <project path="kernel/oneplus/msm8974"     name="ubports/android_kernel_oneplus_msm8974"     remote="ubp" revision="refs/heads/ubp-5.1-caf"   />
      <project path="vendor/oppo" name="proprietary_vendor_oppo" remote="them" />
      <project path="vendor/oneplus" name="proprietary_vendor_oneplus" remote="them" />
      </manifest>
      

      Then:

      repo sync
      

      ...and wait for a long time...

      change whatever you want, then:

      . build/envsetup.sh
      lunch
      

      and select 9 (cm_bacon-userdebug)

      make
      

      My experiments were not very successful - I thought that some of the high battery usage might be partially due to the kernel not being properly tuned for the way the phone operates and wakes on ubuntu-touch.

      Unfortunately, nothing I tried made much difference really - the phone is simply waking a lot and doing a lot in the background and no kernel tuning is going to make a big difference to the amount of power that uses.
      RC OTA-4 (16.04) has just been released though, so I'll have a play with that and have another look at the kernel later.

      posted in Support
      E
      edc
    • RE: Building the kernel

      @doniks yes, I'm just using the ubports installer, then after, flashing changes to boot.img and system.img to an already working ubuntu-touch phone (bacon)

      posted in Support
      E
      edc