[Reference] Building Android / Kernels for the LG E980 (ATT)

Search This thread

Gotroot

Senior Member
Jun 27, 2008
684
289
www.sbhacker.net
No just asking I'm still getting the same error as me and ap got a few pages back... I rebuilt my whole ubuntu box from the floor up..

Sent from my LG-E980 using xda premium
 

thecubed

Inactive Recognized Developer
Aug 19, 2008
1,046
10,458
Austin, TX
No just asking I'm still getting the same error as me and ap got a few pages back... I rebuilt my whole ubuntu box from the floor up..

Sent from my LG-E980 using xda premium

You and I need to look at your build box, I suspect something is not entirely correct with it...

I just pushed my commits for the TWRP flags, in case anyone is following along at home.
 

MaddMan420

Senior Member
Apr 25, 2011
129
20
Miami, FL
You and I need to look at your build box, I suspect something is not entirely correct with it...

I just pushed my commits for the TWRP flags, in case anyone is following along at home.

I kind of want to dive head first into developing and I decided to dual boot linux on my pc. I have adb and fastboot set up, and i think i can grasp the bit of terminal work needed to try building 10.1.

Is it okay to cross-reference this guide with the cm wiki for building 10.1 on the LG OG?

Also, should I even bother at this point or should I be waiting for something before messing around with it?

I appreciate it!

Sent from my LG-E980 using xda app-developers app
 
  • Like
Reactions: adizzle23

thecubed

Inactive Recognized Developer
Aug 19, 2008
1,046
10,458
Austin, TX
Hey all,

I just pushed the proper file to make the kernel build-- sorry about that! Apparently LGE has a .gitignore file in firmware/ in the kernel that makes it ignore the .bin firmware files... ugh.

I've removed that and pushed the update to my github. You should be able to build successfully now!
Happy building!
 

fronti90

Senior Member
Mar 29, 2012
639
1,589
Hey all,

I just pushed the proper file to make the kernel build-- sorry about that! Apparently LGE has a .gitignore file in firmware/ in the kernel that makes it ignore the .bin firmware files... ugh.

I've removed that and pushed the update to my github. You should be able to build successfully now!
Happy building!

Hey,
first of all thanks, i am trying to get SlimBean working atm and you are doing a great job! I noticed that you still have the .gitignore file and created a second one called .gitignore_old. I guess you forgot to delete the original one there ;)
 

Timisone

Senior Member
Feb 9, 2013
191
25
Hey,
first of all thanks, i am trying to get SlimBean working atm and you are doing a great job! I noticed that you still have the .gitignore file and created a second one called .gitignore_old. I guess you forgot to delete the original one there ;)

if you need anyone to test let me know. Is it going to be 4.2.2?
 

Gotroot

Senior Member
Jun 27, 2008
684
289
www.sbhacker.net
AS arch/arm/boot/compressed/head.o
LZO arch/arm/boot/compressed/piggy.lzo
/bin/sh: 1: lzop: not found
make[2]: *** [arch/arm/boot/compressed/piggy.lzo] Error 1
make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2
make: *** [zImage] Error 2


Thats the new error I get when build kernel
 

Timisone

Senior Member
Feb 9, 2013
191
25
AS arch/arm/boot/compressed/head.o
LZO arch/arm/boot/compressed/piggy.lzo
/bin/sh: 1: lzop: not found
make[2]: *** [arch/arm/boot/compressed/piggy.lzo] Error 1
make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2
make: *** [zImage] Error 2


Thats the new error I get when build kernel
Can you use the Kernal that hkfriends just built?
 

apascual89

Inactive Recognized Contributor
Jan 17, 2011
5,558
13,306
Atlanta, GA
AS arch/arm/boot/compressed/head.o
LZO arch/arm/boot/compressed/piggy.lzo
/bin/sh: 1: lzop: not found
make[2]: *** [arch/arm/boot/compressed/piggy.lzo] Error 1
make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2
make: *** [zImage] Error 2


Thats the new error I get when build kernel

Install Lzop

you can get it in the Ubuntu software center
 

Gotroot

Senior Member
Jun 27, 2008
684
289
www.sbhacker.net
Ok i reinstall lp and it seems to be working now lol so I finally made a "stock" kernel.. Now time to figuer out how to make a custom one
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 18
    Howdy Everyone!

    Here's my quick guide to compiling Android for the Optimus G Pro for ATT.

    Basic Reference

    For reference, this phone's codename is "geefhd" per the stock boot.img, however the kernel defconfig is "gkatt_bcm".
    Simplicity sake dictates that I would like to use the kernel defconfig's name as the device codename.

    From here on out, I'd like to refer to this phone in code as gkatt, yet we'll call the kernel source dir geefhd.

    Prerequisites

    Building Android for this phone requires quite a bit of familiarity with the Android build system. If you are unfamiliar with things like makefiles and bash, I do not recommend trying this, as you'll pull out more of your hair than you can afford to lose.

    That said, I'd recommend you have at least repo installed, or in your $PATH variable to make this guide a little easier to follow.

    You also need to have the build utilities installed. See the CyanogenMod wiki for the build dependencies and how to install them.

    Getting your tree set up

    Well, it ain't Christmas, but let's put up the tree anyway.

    For this guide, I'm going to assume you're like me, and you put all your Android projects in ~/android/.

    Let's begin.

    Code:
    mkdir -p ~/android/cm-10.1/
    cd ~/android/cm-10.1/
    repo init -u git://github.com/CyanogenMod/android.git -b cm-10.1
    repo sync

    Now after a few hours, you'll have a empty tree set up. Let's decorate!

    Getting the device repos set up

    Once you have the basic CM skeleton in place, we need to add our device support files.

    Code:
    mkdir -p ~/android/cm-10.1/device/lge
    cd ~/android/cm-10.1/device/lge
    git clone -b cm-10.1 https://github.com/TeamLGOG/android_device_lge_gee-common.git gee-common
    git clone https://github.com/thecubed/android_device_lge_gkatt.git gkatt

    Congrats. Now you have the Android side of things ready, however you're not fully ready to start building-- you need a kernel!

    Getting the kernel repos ready

    Next up: kernel.

    Code:
    mkdir -p ~/android/cm-10.1/kernel/lge
    cd ~/android/cm-10.1/kernel/lge
    git clone https://github.com/thecubed/android_kernel_lge_geefhd.git geefhd

    You should now have a nice folder containing the kernel and everything you need to build it.

    Great! What do I do with this?

    You now have two options -- do you want to build Android AND a kernel, or just a kernel?

    Let's assume you want to build a kernel only first.

    Code:
    cd ~/android/cm-10.1/kernel/lge/geefhd
    . envsetup.sh

    Now you'll see some neat text from my setup script, it'll tell you what commands it just added to your shell and how to use them.
    To build a kernel do this:

    Code:
    make mrproper
    make gkatt_bcm-perf_defconfig
    make zImage

    Then you can look in arch/arm/boot for a file called zImage, which is the kernel itself, ready to be used and abused.

    Once you're done and want to clean up, just run make clean or make mrproper to erase all tracks of ever building.

    Keep in mind, "mrproper" erases your ".config" file, so before you can build again, you have to issue "make gkatt_bcm-perf_defconfig".
    My envsetup script will warn you of that, just incase you forget ;)

    Now, let's assume you want to build an Android recovery image!

    Code:
    cd ~/android/cm-10.1/
    . build/envsetup.sh
    lunch cm_gkatt-userdebug

    The environment is now ready for you to build...

    Code:
    mka recoveryimage

    In about 10 mins you'll have a full recovery.img in $OUT.
    The neat thing about this is it builds the kernel inline with your build -- so you build a recovery AND a kernel at the same time.
    This will save you a LOT of time testing kernels, since you don't have to manually unpack and repack the boot image after modifying the kernel.

    To see your shiny new recovery.img file:
    Code:
    cd $OUT

    KEEP IN MIND you CANNOT flash these images! Flashing them will result in a security error!
    You can only fastboot boot these images. I'll post fastboot instructions shortly.

    How do I get help??

    Well, first things first, ask on IRC.

    I'm nearly always around on Freenode. Join #lg-optimus-g and ask if I'm around.
    I go by the name IOMonster on IRC. When I'm at work, I'm IOMonster_work.

    Please don't just ask to ask a question, ask your full question.
    Don't PM me unless you ask first, it's weird to get 20 PM windows open on my IRC client and not have any idea who is who or what they want... basic courtesy please :)

    If by chance/miracle I'm not on IRC, post here. Again, I will not answer questions related to this via PM on XDA. I like answering things publicly so that others can read the answer. Google doesn't index PM's (yet, at least haha), so it doesn't do anyone any good to help you over PM unless it's something private.

    I <3 you so much, how do I show my love?

    You are so kind :D

    I most definitely do not expect donations of any kind, however they are appreciated a lot.
    I purchased this phone off-contract just to get it unlocked, if you are a kind soul and would like to send me a token of your appreciation I would love you forever. :)

    XDA has a neat "Donate to me" button that should be on the left side of this page under my name. Donations go to purchasing new hardware to work on and other neat stuff, so they're always appreciated.

    Let me know if I missed anything!
    3
    Noticed one more thing:
    You are copying vold.fstab in device.mk (https://github.com/thecubed/android_device_lge_gkatt/blob/master/device.mk line 59) but there actually is no vold.fstab in your device tree
    How are you setting mountpoints? Or is this not necessary anyway?


    if you need anyone to test let me know. Is it going to be 4.2.2?

    yeah sure, newest slim version is on 4.2.2

    Edit: same thing for gps.conf, which should be in configs/
    Edit2: and for libpn544_fw.so, which should be in prebuilt/
    2
    Awesome work! How can we get the vendor files to build cm-10.1? For now, could we use the same as the OG ?

    Check http://github.com/TeamLGOG :D

    The vendor files there should work fine for this device, minus the wlan props and any modem/DSP related firmware.

    This phone is *very* similar to the OG/N4, it's just got a larger screen and different wlan chip (Broadcom instead of Qualcomm)

    However, all that said, I've yet to build it for the phone-- I'm focused on getting it more unlocked right now.
    2
    Hey all,

    I just pushed the proper file to make the kernel build-- sorry about that! Apparently LGE has a .gitignore file in firmware/ in the kernel that makes it ignore the .bin firmware files... ugh.

    I've removed that and pushed the update to my github. You should be able to build successfully now!
    Happy building!
    2
    I'm not sure why you guys are getting those errors. I'm able to build the kernel just fine...

    Maybe my repo is missing something that I have locally? I'll try re-syncing everything to a new dir and testing again later.