[Nexus 7 Original Development] Facegarden:
Hey everyone!

I'm working on building this kernel, but I have some questions. I previously followed Google's instructions to build the kernel from their sources, but once I had the zImage I found that there's no clear info on how to actually make that bootable. I tried taking the zip from this kernel and swapping the zImage, but that didn't work (CWM tells me its a bad zip), so now I'm just trying to build this instead since I don't really care which kernel I build, I just need to modify one damn line of code in the battery charger driver (yes, I know I can break many many things, this is for work and we need to make the change).

So I see that someone has built this and successfully swapped out the zImage they created with one from a zip in the beginning of this thread. I've already built this before from Google's source, but I'm having trouble getting it to build.

I found this post:

http://xdaforums.com/showthread.php?p=29430733&highlight=zimage#post29430733

Where he says he "adjusted my path to use include the bin directory in there first, and set the proper variables". Well, I know how to add a directory to the path, but which variables are needed? I set the ones the google example wants, and one extra one I found in some web example, but I am still getting errors. I'm at the point now where its saying it can't find files in directories that I added to the path, so I don't know what to think.

This is my build script:

#!/bin/bash
# Build Grouper Kernel
export PATH=$/home/taylor/android/android-toolchain-eabi/arm-eabi/bin/:/home/taylor/android/android-toolchain-eabi/libexec/gcc/arm-eabi/4.7.3/:/home/taylor/android/android-toolchain-eabi/lib/gcc/arm-eabi/4.7.3/include/:$PATH
export CCOMPILER=$/home/taylor/android/android-toolchain-eabi/arm-eabi/bin/
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=/home/taylor/android/android-toolchain-eabi/arm-eabi/bin/
cd /home/taylor/android/Kernel-Nexus7
echo $PATH; read -n1
sudo make clean
make grouper_defconfig
make

And this is the error I get with that (after already adding some stuff to the path to fix some errors, as indicated above):

scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/linux/version.h
CHK include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
CC arch/arm/kernel/asm-offsets.s
In file included from include/linux/sched.h:55:0,
from arch/arm/kernel/asm-offsets.c:13:
include/linux/kernel.h:12:20: fatal error: stdarg.h: No such file or directory
compilation terminated.
make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2

It says it can't find stdarg.h, but I checked and its definitely in one of the directories included in the path above, and the line in my script that prints the path shows them being properly included.

Am I not supposed to use grouper_defconfig? Or am I missing something?

I tried switching back to google's precompiled GCC but I got some funny errors so I figured that was a dead end.

Any help would be greatly appreciated. I've now been messing with this for two days and I've learned... some things... but apparently not enough.

Also, I'm fine with just compiling this and getting things to work that way, but side note - does anyone know the *proper* way to get a zImage onto a device? I tried two different kitchen script sets with several different inputs, and even unpacking a working boot.img and reassembling it would result in failure, and they seem very hacky (perhaps they only feel that way because they don't work). I saw some murmurs about those tools only working on certain filesystems and I wonder then what filesystem we have? Anyway, thanks for the help.