# [SOLVED] Trying to compile kernel



## ghost_og (Nov 15, 2011)

I recently completed a successful build of CM7 on an Ubuntu 10.10 VM. I then attempted to compile faux's kernel from source, but have had some issues and was hoping someone may be able to help out. Whenever I'm done compiling, my packaged boot.img is always 3.6mb instead of 2.6mb.
I'm able to unpack, repack, and boot other working boot.img's, but my final boot.img will never run.

Here's a brief rundown of what I did:

```
<br />
mkdir kernel<br />
cd kernel<br />
git clone [URL=git://github.com/Atrix-Dev-Team/kernel-moto-atrix4g]git://github.com/Atrix-Dev-Team/kernel-moto-atrix4g[/URL].git<br />
cd kernel-moto-atrix4g<br />
adb pull /proc/config.gz ~/kernel/kernel-moto-atrix4g/config.gz (<----after pluggin in my phone)<br />
cat config.gz | gunzip > .config<br />
export ARCH=arm<br />
export CROSS_COMPILE=~/android/system/prebuilt/linux-x86/toolchain/arm-eabi-4.4.0/bin/arm-eabi-<br />
make menuconfig<br />
```
I then select load a custom config and point it to: ~/kernel/kernel-moto-atrix-4g/.config. I do not make any changes, save, and then run: make. It will finish without any errors, but my zImage will end up being 3.5mb and my packaged boot.img will be 3.6mb and not boot.

I also tried all of this, but using the specific branch in a different folder

```
<br />
git clone [URL=git://github.com/Atrix-Dev-Team/kernel-moto-atrix4g.git]git://github.com/Atrix-Dev-Team/kernel-moto-atrix4g.git[/URL] -b CM_kernel<br />
```
Did I miss a step somewhere?


----------



## Climber Ty (Jan 13, 2012)

ghost_og said:


> [...]
> Did I miss a step somewhere?


I'll take a look and see if I can get it going this weekend, I'll let you know what I find out.


----------



## ghost_og (Nov 15, 2011)

Got it figured out. I started from scratch and re-cloned the source, then did everything over again. Got the correct size zImage this time. Plus, it turned out I had extra stuff in my mkbootimg options. I shouldn't have included the --cmdline from the tutorial when re-packaging. Had I paid better attention to the output when using split_bootimg.pl, I'm sure it wouldn't have been such a headache. Live and learn.


----------



## kennywickstrom (Apr 21, 2012)

Were you able to successfully build and use the wifi module? I have been about to build CM7 and faux123's kernel, but I cannot get wifi to work. The module builds successfully (I get dhd.ko at the end), but it doesn't seem to fully load. Below is the dmesg when trying my kernel and module


```
<br />
<4>[   24.504982] sdhci_tegra_wlan_detect Detecting WLAN<br />
<4>[   24.504998] mot_wifi_set_carddetect: Nobody to notify<br />
<4>[   24.507937]<br />
<4>[   24.507940] Dongle Host Driver, version 4.218.248.31<br />
<4>[   24.507944] Compiled in /home/kenny/android/atrix-wifi-module/open-src/src/dhd/linux/../.. on Apr 17 2012 at 06:54:15<br />
<6>[   24.724025] request_suspend_state: wakeup (3->0) at 13492036210 (2012-04-21 19:25:46.351491984 UTC)<br />
<6>[   24.725196] lm3532_brightness_set: lcd-backlight, 0x4c(76), webtop=0<br />
<7>[   25.088713] mmc1: queuing CIS tuple 0x91 length 3<br />
<6>[   25.088824] mmc1: new SDIO card at address 0001<br />
<6>[   25.534772] usb_ether_get_stats
```
However, if I use a different ROM/kernel (I still think it is faux123's kernel), the info below is displayed in the dmesg.


```
<br />
[   49.811365] sdhci_tegra_wlan_detect Detecting WLAN<br />
[   49.811403] mot_wifi_set_carddetect: Nobody to notify<br />
[   49.812815]<br />
[   49.812818] Dongle Host Driver, version 4.218.248.31<br />
[   49.812822] Compiled in /home/paul/Froyo/system/vendor/bcm/wlan/osrc/open-src/src/dhd/linux/../.. on Dec 17 2011 at 19:58:57<br />
[   50.108317] mmc1: queuing CIS tuple 0x91 length 3<br />
[   50.108350] mmc1: new SDIO card at address 0001<br />
[   50.136595] alloc static buf at e9980000!<br />
[   50.136975] F1 signature read @0x18000000=0x9934329<br />
[   50.139716] DHD: dongle ram size is set to 294912(orig 294912)<br />
[   50.143537] wl_iw_attach [URL=thr:6d0]thr:6d0[/URL] started<br />
[   50.143598] wl_iw_bt_init [URL=thr:6d1]thr:6d1[/URL] started<br />
[   50.143655] dhd_attach [URL=thr:6d2]thr:6d2[/URL] started<br />
[   50.143706] dhd_attach [URL=thr:6d3]thr:6d3[/URL] started<br />
[   50.143749] dhd_attach [URL=thr:6d4]thr:6d4[/URL] started<br />
[   50.191722] dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.<br />
[   50.273753] wifi_get_mac_addr<br />
[   50.274700] Firmware version = wl0: May  6 2011 13:09:01 version 4.218.248.31<br />
[   50.442416] eth0: Broadcom Dongle Host Driver mac=40:fc:89:13:a8:83
```
If you have any suggestions, they would be greatly appreciated.


----------

