Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
MartinEve
Old
#1  
MartinEve's Avatar
Senior Member - OP
Thanks Meter 11
Posts: 213
Join Date: Aug 2010
Default [Q] Compiling stock HTC kernel; missing board-bee, board-bahamas, board-paradise

Hi all,

I've just got my hands on the source code for the Buzz kernel and thought it would be a good starting point to build it from source without any changes.

I've got my cross-compile environment nicely set up, however, when building, I am halting at:

make[1]: *** No rule to make target `arch/arm/mach-msm/board-bee.o', needed by `arch/arm/mach-msm/built-in.o'. Stop.

This seems to be due to a problem in the Makefile:

Code:
# MSM7225 boards
obj-$(CONFIG_MACH_BUZZ) += board-buzz.o board-buzz-panel.o board-buzz-keypad.o board-buzz-microp.o
obj-$(CONFIG_MACH_BUZZ) += board-buzz-rfkill.o board-buzz-mmc.o board-buzz-wifi.o
obj-$(CONFIG_HTC_OFFMODE_CHARGING) += htc_offmode_charging.o
obj-$(CONFIG_MACH_BEE) += board-bee.o board-bee-panel.o board-bee-keypad.o board-bee-microp.o
obj-$(CONFIG_MACH_BEE) += board-bee-rfkill.o board-bee-mmc.o board-bee-wifi.o
obj-$(CONFIG_MACH_BUZZC) += board-buzzc.o board-buzzc-panel.o board-buzzc-keypad.o board-buzzc-microp.o
obj-$(CONFIG_MACH_BUZZC) += board-buzzc-rfkill.o board-buzzc-mmc.o board-buzzc-wifi.o
obj-$(CONFIG_MACH_PARADISE) += board-paradise.o board-paradise-panel.o board-paradise-keypad.o
obj-$(CONFIG_MACH_PARADISE) += board-paradise-rfkill.o board-paradise-wifi.o
obj-$(CONFIG_MACH_PARADISE) += board-paradise-mmc.o board-paradise-microp.o
obj-$(CONFIG_MACH_BAHAMAS) += board-bahamas.o board-click-panel.o board-bahamas-keypad.o
obj-$(CONFIG_MACH_BAHAMAS) += board-bahamas-mmc.o board-bahamas-rfkill.o
QUESTION 1: board-bee, board-bahamas and board-paradise are not included suffixes for the various boards in the kernel distribution; is the recommended course of action to remove these from the Makefile (as I am intending this kernel purely for Buzz)?

Doing so allows me to complete the build process.

The next step I am taking is to pack this into a boot.img file following the steps at: http://android-dls.com/wiki/index.ph...ck_Boot_Images

I'm using:

Code:
~/eclair/out/host/linux-x86/bin/mkbootimg --cmdline 'no_console_suspend=1 console=null' --kernel ./boot.img-kernel --ramdisk boot.img-ramdisk.cpio.gz -o boot-new.img
where ./boot-img-kernel is the zImage file at arch/arm/boot/

The ramdisk is exactly as I extracted from the device originally.

Finally, in recovery mode (clockworkmod) I executed:

Code:
# cat /dev/zero > /dev/mtd/mtd2
# flash_image boot /sdcard/boot-new.img
# reboot
However, on reboot the device never comes up and, obviously, I can therefore get no meaningful info from adb.

Booting the kernel in an emulator results in:

Command:
Code:
~/android-sdk-linux_86/tools/emulator -kernel ~/Desktop/buzz-2.6.29-534e5f81/arch/arm/boot/zImage -avd 2.1 -show-kernel -verbose -logcat *:v
Output:
Code:
emulator: found SDK root at /home/martin/android-sdk-linux_86
emulator: root virtual device file at /home/martin/.android/avd/2.1.ini
emulator: virtual device content at /home/martin/.android/avd/2.1.avd
emulator: virtual device config file: /home/martin/.android/avd/2.1.avd/config.ini
emulator:     locking user data image at /home/martin/.android/avd/2.1.avd/userdata-qemu.img
emulator:     locking cache image at /home/martin/.android/avd/2.1.avd/cache.img
emulator:     locking SD Card image at /home/martin/.android/avd/2.1.avd/sdcard.img
emulator: found skin 'HVGA' in directory: /home/martin/android-sdk-linux_86/platforms/android-7/skins
emulator: autoconfig: -skin HVGA
emulator: autoconfig: -skindir /home/martin/android-sdk-linux_86/platforms/android-7/skins
emulator: keyset loaded from: /home/martin/.android/default.keyset
emulator: trying to load skin file '/home/martin/android-sdk-linux_86/platforms/android-7/skins/HVGA/layout'
emulator: skin network speed: 'full'
emulator: skin network delay: 'none'
emulator: registered 'boot-properties' qemud service
emulator: registered 'boot-properties' qemud service
emulator: Adding boot property: 'qemu.sf.lcd_density' = '160'
emulator: Adding boot property: 'dalvik.vm.heapsize' = '16m'
emulator: argv[00] = "/home/martin/android-sdk-linux_86/tools/emulator"
emulator: argv[01] = "-kernel"
emulator: argv[02] = "/home/martin/Desktop/buzz-2.6.29-534e5f81/arch/arm/boot/zImage"
emulator: argv[03] = "-initrd"
emulator: argv[04] = "/home/martin/android-sdk-linux_86/platforms/android-7/images//ramdisk.img"
emulator: argv[05] = "-nand"
emulator: argv[06] = "system,size=0x4a00000,initfile=/home/martin/android-sdk-linux_86/platforms/android-7/images//system.img"
emulator: argv[07] = "-nand"
emulator: argv[08] = "userdata,size=0x4200000,file=/home/martin/.android/avd/2.1.avd/userdata-qemu.img"
emulator: argv[09] = "-nand"
emulator: argv[10] = "cache,size=0x4200000,file=/home/martin/.android/avd/2.1.avd/cache.img"
emulator: argv[11] = "-hda"
emulator: argv[12] = "/home/martin/.android/avd/2.1.avd/sdcard.img"
emulator: argv[13] = "-serial"
emulator: argv[14] = "android-kmsg"
emulator: argv[15] = "-serial"
emulator: argv[16] = "stdio"
emulator: argv[17] = "-serial"
emulator: argv[18] = "android-qemud"
emulator: argv[19] = "-append"
emulator: argv[20] = "qemu=1 console=ttyS0 androidboot.console=ttyS1 android.checkjni=1 androidboot.logcat=*:v android.qemud=ttyS2 android.ndns=2"
emulator: argv[21] = "-m"
emulator: argv[22] = "96"
emulator: argv[23] = "-clock"
emulator: argv[24] = "unix"
emulator: mapping 'system' NAND image to /tmp/android/emulator-lc0c1q
emulator: rounding devsize up to a full eraseunit, now 4a1f000

emulator: using 'esd' audio input backend
emulator: using 'esd' audio output backend
emulator: Trace file name is not set

emulator: control console listening on port 5554, ADB on port 5555
emulator: sent '0012host:emulator:5555' to ADB server
emulator: ping program: /home/martin/android-sdk-linux_86/tools/ddms
emulator: ping command: /home/martin/android-sdk-linux_86/tools/ddms ping emulator 6.0
It then hangs at this point.

QUESTION 2: What am I doing wrong? Could this be related to the removed lines above? (seems unlikely as Buzz should be the only configuration being used)

I've attached a zip file that contains the compiled kernel and boot.img files if anybody found a minute or two to look.

Many thanks in advance and best wishes,

Martin
Attached Files
File Type: zip bootimg_HTC_Wildfire.zip - [Click for QR Code] (4.43 MB, 24 views)
 
gnarlyc
Old
#2  
gnarlyc's Avatar
Recognized Developer
Thanks Meter 52
Posts: 441
Join Date: Feb 2010
Location: Raleigh, NC
Can you post your .config? I'll take a look. I don't have a device to test with, but I don't mind testing the compiling part.
 
MartinEve
Old
#3  
MartinEve's Avatar
Senior Member - OP
Thanks Meter 11
Posts: 213
Join Date: Aug 2010
Hi,

Many thanks for the offer; I have since got this working.

It seemed to be due to the wrong offset when packing for the Wildfire (the correct offset I have now posted in the dev forum there).

It is fine to remove the non-included board- references

Best

Martin
 
gnarlyc
Old
#4  
gnarlyc's Avatar
Recognized Developer
Thanks Meter 52
Posts: 441
Join Date: Feb 2010
Location: Raleigh, NC
Quote:
Originally Posted by MartinEve View Post
Hi,

Many thanks for the offer; I have since got this working.

It seemed to be due to the wrong offset when packing for the Wildfire (the correct offset I have now posted in the dev forum there).

It is fine to remove the non-included board- references

Best

Martin
Cool beans. In the mean time, I took a few minutes and worked out one of the scripts needed to add the buzz to Android Builder.

ab_get_Buzz.29
clear

if [ ! -d $KITCHEN_ROOT/source/kernels/buzz/2.6.29/ ]
then
mkdir -p $KITCHEN_ROOT/source/kernels/buzz/2.6.29

cd $KITCHEN_ROOT/source/kernels/buzz/2.6.29
echo "Downloading Buzz 2.6.29 kernel source code"
wget http://member.america.htc.com/downlo...34e5f81.tar.gz
tar xvzf buzz-2.6.29-534e5f81.tar.gz

cp -r buzz-2.6.29-534e5f81/* $KITCHEN_ROOT/source/kernels/buzz/2.6.29/
rm -r buzz-2.6.29-534e5f81/
rm buzz-2.6.29-534e5f81.t*
fi
 
Post Reply+
Tags
compilation, htc, kernel
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...