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.





  • Thanks @advocatux, that got me started. I haven't got much further though.
    Anyone know why I might be getting these errors? Haven't found anything that seems relevant on google yet.

    arch/arm/crypto/aesbs-core.S: Assembler messages:
    arch/arm/crypto/aesbs-core.S:451: Error: thumb conditional instruction should be in IT block -- `addeq r6,r6,#0x10'
    arch/arm/crypto/aesbs-core.S:906: Error: thumb conditional instruction should be in IT block -- `addeq r6,r6,#0x10'
    make[1]: *** [arch/arm/crypto/aesbs-core.o] Error 1
    

    but it looks to me (after some searching and with only a very basic understanding of assembly) that they are in IT blocks:

    $ grep -C 2 -n addeq arch/arm/crypto/aesbs-core.S
    449-	vldmia	r6, {q12}		@ .LISR
    450-	ite	eq			@ Thumb2 thing, sanity check in ARM
    451:	addeq	r6,r6,#0x10
    452-	bne	.Ldec_loop
    453-	vldmia	r6, {q12}		@ .LISRM0
    --
    904-	vldmia	r6, {q12}		@ .LSR
    905-	ite	eq			@ Thumb2 thing, samity check in ARM
    906:	addeq	r6,r6,#0x10
    907-	bne	.Lenc_loop
    908-	vldmia	r6, {q12}		@ .LSRM0
    

    Are there any other guides I should look at? I'm sure I saw some on the old wiki, but I can't find them now.

    EDIT(2018-05-01):

    @doniks said in Atom Build Clickable (March 18):

    Maybe you're still not using the right compiler. Please give more context. Post all the commands you ran to get there.

    @rulionlisk said in Building the kernel:

    Are there any other guides I should look at? I'm sure I saw some on the old wiki, but I can't find them now.

    https://github.com/ubports/wiki.ubports.com

    Thanks @doniks, I'll have a read through that and try again

    As to context for the above errors, it was run on an ubuntu 14.04.5 LTS image on AWS (because I believe kernels older than 3.18 require gcc 4.8)

    git clone -b ubp-5.1-caf https://github.com/ubports/android_kernel_oneplus_msm8974.git
    cd android_kernel_oneplus_msm8974
    make ARCH=arm bacon_defconfig
    make ARCH=arm CROSS_COMPILE=/usr/bin/arm-linux-gnueabihf-
    

    I then tried to setup the android build environment manually following google AOSP instructions and using ubports/android manifest but didn't get very far with that...
    I'm going to try and set up the build environment again with those wiki instructions using the phablet team ppa and hopefully I'll get a bit further.



  • @rulionlisk maybe consider that hack with the bin-gcc-4.8 folder at the start of your PATH to make sure it picks the right compiler


Log in to reply
 

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