Hey jiilik, I was able to get the kernel to compile (into a zImage) and now I'm figuring out how to put this into a flashable image.
Aside from that, the only other issue I'm having is errors with building the Android source. Specifically:
Step 2 where it says: And, merge the source into the android source code(gingerbread)
Step 3 where it says: You have to add google original prebuilt source(toolchain) before running build scripts.
Any insight into what exactly I should do/enter?
For what it's worth, I've done alot of C++ development but only in a Windows environment mainly with MFC (shudder). So Linux is still fairly new to me. I did tend to use Java alot before my current job so I have much more experience with that.
EDIT
So I can build AOSP Gingerbread checkout just fine, but the moment I try to "merge" the downloaded zip in, I get errors when attempting to compile webkit/WebCore and so on.
1) Android kernel 101:
When you have a rom, there's two main parts: system.img and boot.img. The former is the contents of /system that will be flashed - it's pretty straightforward in that's it's just a filesystem to be flashed to a partition. The boot.img file is more interesting.
Inside boot.img is two things: the first, a zImage (the kernel) and secondly a mini-filesystem called initrd or 'initial ram disk'. On a normal linux system, an initrd would contain just enough supporting programs to get the main filesystem mounted. Boot scripts are in here.
Unfortunately, the structure of boot.img is a bit complicated (as is system.img, actually).
What I do to make my roms is use a tool called dsi's xda kitchen. It's ever so slightly out of date now, since he stopped developing it a few months ago, but it does a nice job.
It's basically a bunch of command line scripts and ready to use programs put together in a nice menu interface. It allows a set of custom modifications to be easily performed on roms (like adding root, apps2sd, etc.). karendar and I have both been using it to modify and package up our roms as it looks after things like signing the zip file.
In this program, you load an existing rom. It unpacks system.img and lets your much around inside the file system. It also gives you access to boot.img (if you use option '20', then unpack the boot.img). When boot.img is unpacked, you can replace the zImage with the one you built yourself. You can also modify the boot scripts and other files in the initrd.
Lastly, if the kernel built any modules (wireless.ko is the most important), you need to ensure that they get copied into the appropriate place in system.img, replacing the existing .ko files.
Then, you use the kitchen to repack boot.img, and finally, create the flashable zip file. At least, that's how I've been doing it.
I'm pretty sure there's a more official way to build the sources which just creates system.img, boot.img, etc. ready for flashing. I might still use the kitchen scripts to package the final zip file, since it'll look after zipaligning, signing, etc. Plus, I have a workflow now
Why change
The good news is that your build environment is working as well as mine, and your kernel is probably perfectly sound. We should start sharing patches and config files and such. I'll see what I can put together from what I've got.
2) Okay, I got the same issue building the sources that LG provides. Here's what I'm thinking: their instructions suck and their sources suck more.
I know it says to get 2.3.3, but I think LG is actually using 2.3.3 from a different source than google. I believe it is the gingerbread branch from the
Code Aurora Forum.
Tangent: The Code Aurora Forum, although representing itself as a community driven website, is really just Qualcomm's official dumping ground for their open source projects. It's proof that open projects do not automatically develop a vibrant developer community. Nevertheless, it looks like any phones using Qualcomm chips will use their version of android since it includes all the relevant drivers and such. If you start poking around in the kernel source code for our phone, you'll see that it's actually certainly the case here where LG has taken the kernel that is provided by the Code Aurora Forum and used that as their basis. Hell, half the drivers for our phone are
Copyright Code Aurora Forum, All rights reserved. End Tangent.
Okay, so the good news is that we have the same build results - we can both build the generic android sources from google, and we both fail to build LG's sources when merging them (failing on webkit).
I've just checked out the gingerbread branch from codeaurora and it weighs in at a whopping 10GB - it's also version 2.3.6 - whatever. They have pretty good instructions on building at
their wiki page.
Anyway, I haven't got that one building yet. Sleepy time.