• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[Kernel][D850|1|2|5/F400/LS990/VS985]Unified Kernel Source repository/compilation

Search This thread

$droyd$

Inactive Recognized Developer
Dec 23, 2012
5,576
12,904
Portage
I need an aosp boot.img for tmo.. Can anyone help me.. If i can get one i believe ill have a booting aosp rom. D851
 
  • Like
Reactions: oska3

hisname

Senior Member
Jul 9, 2012
2,532
553
Singapore
yo @Tectas. i tried compiling the kernel, appears that
Code:
ERROR: modpost: Found 2 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
To build the kernel despite the mismatches, build with:
'make CONFIG_NO_ERROR_ON_MISMATCH=y'
(NOTE: This is not recommended)
make[1]: *** [vmlinux.o] Error 1
make: *** [vmlinux.o] Error 2
changed the flags to
Code:
make CONFIG_DEBUG_SECTION_MISMATCH=y
hope it works.
also there is a small tiny error in OP
Code:
git clone https://github.com/tectas/android_kernel_lge_msm8974ac.git -b kitkat .
how come there is a full stop at the end of the command?isn't it wrong?



edit: i compiled with make -j5 ARCH=arm
edit edit:
Code:
WARNING: vmlinux.o(.data+0x80e8): Section mismatch in reference from the variable msm_mpm_debug_mask to the function .init.text:mpm_irq_domain_linear_size()
The variable msm_mpm_debug_mask references
the function __init mpm_irq_domain_linear_size()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

WARNING: vmlinux.o(.data+0x8100): Section mismatch in reference from the variable msm_mpm_debug_mask to the function .init.text:mpm_irq_domain_legacy_size()
The variable msm_mpm_debug_mask references
the function __init mpm_irq_domain_legacy_size()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

To build the kernel despite the mismatches, build with:
'make CONFIG_NO_ERROR_ON_MISMATCH=y'
(NOTE: This is not recommended)
make[1]: *** [vmlinux.o] Error 1
make: *** [vmlinux.o] Error 2
 
Last edited:

Tectas

Senior Member
Jul 26, 2011
3,344
2,942
yo @Tectas. i tried compiling the kernel, appears that
Code:
ERROR: modpost: Found 2 section mismatch(es).
To see full details build your kernel with:
'make CONFIG_DEBUG_SECTION_MISMATCH=y'
To build the kernel despite the mismatches, build with:
'make CONFIG_NO_ERROR_ON_MISMATCH=y'
(NOTE: This is not recommended)
make[1]: *** [vmlinux.o] Error 1
make: *** [vmlinux.o] Error 2
changed the flags to
Code:
make CONFIG_DEBUG_SECTION_MISMATCH=y
hope it works.
also there is a small tiny error in OP
Code:
git clone https://github.com/tectas/android_kernel_lge_msm8974ac.git -b kitkat .
how come there is a full stop at the end of the command?isn't it wrong?



edit: i compiled with make -j5 ARCH=arm
edit edit:
Code:
WARNING: vmlinux.o(.data+0x80e8): Section mismatch in reference from the variable msm_mpm_debug_mask to the function .init.text:mpm_irq_domain_linear_size()
The variable msm_mpm_debug_mask references
the function __init mpm_irq_domain_linear_size()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

WARNING: vmlinux.o(.data+0x8100): Section mismatch in reference from the variable msm_mpm_debug_mask to the function .init.text:mpm_irq_domain_legacy_size()
The variable msm_mpm_debug_mask references
the function __init mpm_irq_domain_legacy_size()
If the reference is valid then annotate the
variable with __init* or __refdata (see linux/init.h) or name the variable:
*_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

To build the kernel despite the mismatches, build with:
'make CONFIG_NO_ERROR_ON_MISMATCH=y'
(NOTE: This is not recommended)
make[1]: *** [vmlinux.o] Error 1
make: *** [vmlinux.o] Error 2

First, welcome :)
Now to the point, I'll check the error, but first:
The dot is intended to clone into the current directory and not make a subdirectory with the name of the repository.
Also, if you're just compiling with MAKE - j5 ARCH=arm, you're not using the right toolchain, nor defconfig nor you're building the right image.

Sent from my LG-D855
 

Top Liked Posts

  • There are no posts matching your filters.
  • 42
    Just for developers!

    Hey guys and girls,

    I fixed and uploaded the stock kernel source for the G3 to my github which other developers can use as base for their kernels or just take it as it is to build their roms, currently the source for the D855, D851, D850, D852, VS985, F400 and LS990 are merged.
    As said, it's just the fixed stock source for now!
    There is for sure still the bootloader lock problem, but anyways, when this is fixed (which is hopefully soon) this may be helpful for some and it may can speed up things a bit.

    There may be some additional things coming, but for now, that's it.

    Have fun.

    Repository

    https://github.com/tectas/android_kernel_lge_msm8974ac

    Changelog

    14.08.2014
    • include/asm-generic: Change per_cpu_offset to take last element of array instead of returning 0 if out of bounds
    • firmware: Fix to compile prebuild firmware only once

    13.08.2014
    • kernel: quick fix
    • Fix -Warray-bounds warnings
    • Makefile: reenable -Wframe-larger-than
    • Makefile: ifeq y instead of ifdef at CONFIG_CC_OPTIMIZE_SPEED and CONFIG_CC_OPTIMZE_DEFAULT
    • init/Kconfig: Removed CC_OPTIMIZE_SIZE (default now) and added CC_OPTIMIZE_SPEED and CC_OPTIMIZE_DEFAULT
    • arch/sh/lib|arch/title:Changes for CC_OPTIMIZE_SPEED and CC_OPTIMIZE_DEFAULT

    12.08.2014
    • arch/arm/mach-msm|fs|ipc|kernel|mm: fix uninitialized warnings
    • arch/arm/configs: CONFIG_FRAME_WARN added, CONFIG_CC_OPTIMIZE_SPEED disabled
    • Makefile: Options for -O3, -O2 and -Os added
    • Makefile: Disabled warnigs for array-bounds and uninitialized
    • Makefile: linaro build optimizations
    • Makefile: started to add flags for -O3 linaro builds
    • net: bluetooth: linaro fix
    • drivers: cpufreq: Fixes for linaro at interactive governor

    11.08.2014
    • Fix Compiling Firmware
    • Cleanup of generated files
    • Reset of CONFIG_NF_CONNTRACK_SIP to default value
    • dtsi fix for VS985
    • Changes for D852
    • Changes for VS985
    • Changed CONFIG_NF_CONNTRACK_SIP to default value
    • Changes for F400

    ...

    Full list of commits can be found here

    Currently supported devices

    • D855
    • D851
    • D850
    • LS990
    • F400
    • VS985
    • D852

    Bugs

    • You tell me

    Toolchain

    Currently just the default android toolchain is officially supported, but it should work with others fine as well, if not, just tell me and i will fix it for the given toolchain.

    Credits

    9
    How to compile

    Preperation

    Check out aosp source and switch to it's directory (https://source.android.com/source/downloading.html)

    In the terminal:
    Code:
    mkdir -p kernel/lge/msm8974ac
    cd kernel/lge/msm8974ac
    git clone https://github.com/tectas/android_kernel_lge_msm8974ac.git -b kitkat .

    Compilation

    All Variants

    Code:
    export PATH=$PATH:tools/lz4demo

    D855

    Code:
    make ARCH=arm CROSS_COMPILE=../../../prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi- g3-global_com-perf_defconfig zImage-dtb -j4


    D851

    Code:
    make ARCH=arm CROSS_COMPILE=../../../prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi- g3-tmo_us-perf_defconfig zImage-dtb -j4

    D850

    Code:
    make ARCH=arm CROSS_COMPILE=../../../prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi- g3-att-perf_defconfig zImage-dtb -j4

    LS990

    Code:
    make ARCH=arm CROSS_COMPILE=../../../prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi- g3-spr_us-perf_defconfig zImage-dtb -j4

    F400

    Code:
    make ARCH=arm CROSS_COMPILE=../../../prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi- g3-lgu-perf_defconfig zImage-dtb -j4

    VS985

    Code:
    make ARCH=arm CROSS_COMPILE=../../../prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi- g3-vzw-perf_defconfig zImage-dtb -j4

    D852

    Code:
    make ARCH=arm CROSS_COMPILE=../../../prebuilts/gcc/linux-x86/arm/arm-eabi-4.7/bin/arm-eabi- g3-bell-perf_defconfig zImage-dtb -j4

    Wait till it compiled

    The resulting dtb zImage can be found at arch/arm/boot and is named zImage-dtb

    Any suggestions for improvement? Feel free to comment :)
    7
    Glad to see you are here too, couldn't wait to see a SD kernel for G3. ??

    Sent from my LG-D855 using XDA Premium 4 mobile app

    Yep, kernel and ROM are coming soon ;) already in testing!
    5
    The flashing of the rom, yes, the boot.img is the problem i guess (and without proper kernel and ramdisk no aosp rom will work). It can be flashed as well, but if it doesn't match the stock one, the bootloader throws a security exception when you try to boot from it. At least that's what I faced, when i tried to flash TWRP directly to my device instead of just temporarly booting it, so, I guess it's the same with the kernel.

    This is true, I work with LG and they sent the company I work for a tool that loads code into the bootloader allowing unsigned code to run (we need it since we run vitual environments), I wonder if this tool is only for the LG device we test it on (can't tell you the model) or can be used on any device,
    it allows fastboot to write code to kernel + bootloader, something that always fails with the default tot without this app.


    I will test it on my g3, hope it doesn't brick it, if it doesn't on one hand this may be the key to unlock and develop ROMs, on the other hand since the software is company property that could get me fired, I won't be able to release it to everyone, maybe if I understand how it works, if it works at all on the g3, I can develop my own tool, but this is all wishful thinking.

    EDIT: the special file that is loaded into the app (you choose a file, I think it overides bootloader security chain certificate), just causes the app to crash on the G3, so no luck there unless I get this file from LG (we are not working on the G3 at this time in my company), so no hope with that, but there is a way obviously since this app without root is able to bypass bootloader (it shows a warning about security on the bootloader after)
    5
    Is interactive the default gov? That's super weird for on demand not to work as its generally the best for balance of performance and battery life. Interactive has horrible battery life and ime is laggy. I wouldnt be surprised tho, this kernel source is horrible.. :/

    Interactive is the default governor for many devices since jellybean. On demand has better battery life, but interactive is more responsive.
    For my opinion the source isn't as bad, Sammy did worse, at least at the s3.

    -----------

    Added a new branch to the repository, it's the same as the default branch, except that I added ioscheduler (default is set to vr) and voltage control, will maybe add some additional stuff within the next days and release it in another thread, just to your knowledge, to those interested.

    Sent from my LG-D855