[G1 Android Development] michael-knight:
ezterry's 2708-enabled kernel

http://xdaforums.com/showthread.php?t=831139

Patching kernels to make them support USB Host on the G1

http://xdaforums.com/showthread.php?t=794643

I've been working on this for about a week.

I patched his kernel source with the patch suggested in the guide, and manually patched what wouldn't go in. Then I took the kernel config from the guide and merged anything that said USB on it with the other using Deltawalker,(which is a very handy tool), to make sure I didn't screw up anything to do with the processor.

Attached is the text that resulted after trying to compile the kernel.

Nothing concerns me that much as most of the errors seem to say things like "defined but not used."

The errors that don't are listed below in order of appearance:

scripts/kconfig/conf.c: In function ‘conf_askvalue’:
scripts/kconfig/conf.c:105: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result
scripts/kconfig/conf.c: In function ‘conf_choice’:
scripts/kconfig/conf.c:307: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result

scripts/kallsyms.c: In function ‘read_symbol’:
scripts/kallsyms.c:112: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result

arch/arm/kernel/return_address.c:61:2: warning: #warning "TODO: return_address should use unwind tables"

arch/arm/mach-msm/acpuclock-arm11.c:69:5: warning: "force_turbo" is not defined

arch/arm/mach-msm/clock.c: In function 'clk_set_rate_locked':
arch/arm/mach-msm/clock.c:248: warning: 'ret' may be used uninitialized in this function

arch/arm/mach-msm/pm.c: In function 'msm_pm_init':
arch/arm/mach-msm/pm.c:861: warning: assignment from incompatible pointer type

arch/arm/mach-msm/board-trout.c: In function 'trout_fixup':
arch/arm/mach-msm/board-trout.c:913: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'long unsigned int'

arch/arm/mach-msm/board-sapphire.c: In function 'sapphire_fixup':
arch/arm/mach-msm/board-sapphire.c:1426: warning: format '%x' expects type 'unsigned int', but argument 2 has type 'long unsigned int'

mm/ashmem.c:380: warning: initialization from incompatible pointer type

And this one which makes me the most nervous:

In file included from drivers/media/video/msm/mt9t013.c:28:
arch/arm/mach-msm/include/mach/camera.h:231: warning: 'struct msm_camera_sensor_flash_data' declared inside parameter list
arch/arm/mach-msm/include/mach/camera.h:231: warning: its scope is only this definition or declaration, which is probably not what you want
drivers/media/video/msm/mt9t013.c: In function 'mt9t013_sensor_probe':
drivers/media/video/msm/mt9t013.c:1479: warning: assignment from incompatible pointer type
drivers/media/video/msm/mt9t013.c: In function '__mt9t013_probe':
drivers/media/video/msm/mt9t013.c:1490: warning: passing argument 2 of 'msm_camera_drv_start' from incompatible pointer type
arch/arm/mach-msm/include/mach/camera.h:259: note: expected 'int (*)(struct msm_camera_sensor_info *, struct msm_sensor_ctrl *)' but argument is of type 'int (*)(const struct msm_camera_sensor_info *, struct msm_sensor_ctrl *)'
CC net/802/p8022.o
CC drivers/media/video/msm/mt9t013_reg.o
CC drivers/media/video/msm/ov9665.o
CC [M] fs/nfs/nfs4xdr.o
In file included from drivers/media/video/msm/ov9665.h:23,
from drivers/media/video/msm/ov9665.c:27:
arch/arm/mach-msm/include/mach/camera.h:231: warning: 'struct msm_camera_sensor_flash_data' declared inside parameter list
arch/arm/mach-msm/include/mach/camera.h:231: warning: its scope is only this definition or declaration, which is probably not what you want
CC net/802/psnap.o
CC net/802/stp.o
CC drivers/media/video/msm/ov9665_reg.o
In file included from drivers/media/video/msm/ov9665.h:23,
from drivers/media/video/msm/ov9665_reg.c:19:
arch/arm/mach-msm/include/mach/camera.h:231: warning: 'struct msm_camera_sensor_flash_data' declared inside parameter list
arch/arm/mach-msm/include/mach/camera.h:231: warning: its scope is only this definition or declaration, which is probably not what you want
drivers/media/video/msm/ov9665_reg.c:206: warning: initialization from incompatible pointer type
CC drivers/media/video/msm/msm_camera.o
In file included from drivers/media/video/msm/msm_camera.c:33:
arch/arm/mach-msm/include/mach/camera.h:231: warning: 'struct msm_camera_sensor_flash_data' declared inside parameter list
arch/arm/mach-msm/include/mach/camera.h:231: warning: its scope is only this definition or declaration, which is probably not what you want
LD net/802/built-in.o
CC net/bluetooth/af_bluetooth.o
CC net/bluetooth/hci_core.o
CC drivers/media/video/msm/msm_v4l2.o
CC net/bluetooth/hci_conn.o
In file included from drivers/media/video/msm/msm_v4l2.c:30:
arch/arm/mach-msm/include/mach/camera.h:231: warning: 'struct msm_camera_sensor_flash_data' declared inside parameter list
arch/arm/mach-msm/include/mach/camera.h:231: warning: its scope is only this definition or declaration, which is probably not what you want
drivers/media/video/msm/msm_v4l2.c: In function 'msm_v4l2_qbuf':
drivers/media/video/msm/msm_v4l2.c:337: error: expected expression before '<<' token
drivers/media/video/msm/msm_v4l2.c:343: error: expected expression before '==' token
drivers/media/video/msm/msm_v4l2.c:346: error: expected expression before '>>' token
drivers/media/video/msm/msm_v4l2.c:346:9: error: invalid suffix "ddb..." on integer constant
make[4]: *** [drivers/media/video/msm/msm_v4l2.o] Error 1
make[3]: *** [drivers/media/video/msm] Error 2
make[2]: *** [drivers/media/video] Error 2
make[1]: *** [drivers/media] Error 2
make: *** [drivers] Error 2
make: *** Waiting for unfinished jobs....

net/core/rtnetlink.c: In function 'do_setlink':
net/core/rtnetlink.c:1044: warning: 'err' may be used uninitialized in this function

With that many errors, I don't consider it safe to load this on to my G1.

Well, even if it were safe, I'm not sure I'd get much function out of it. My guess is that the video camera wouldn't work.

Anyway, what can I do to fix these messages, and, after I have, what is the next step?

I have been told that I have to merge it with a ramdisk. I assumed that I would need to pull it from my current phone (which uses the 2708 kernel) because it is likely that it would work.

Unfortunately, after trying this I discovered I don't have the privileges as the SPL is S-ON.

Will using the ramdisk provided in the Android SDK work, and if not, what will?

EDIT: Forgot to attach the full text.