Kernel compile results in 558.3 MB size linux-image

Kernels & Hardware, configuring network, installing services

Kernel compile results in 558.3 MB size linux-image

Postby valerie94 » 2012-07-23 23:35

Note: This was done in ubuntu 12.04. Those with chronic buntu-phobia need not reply.

So I compiled the mainline kernel for my Ubuntu 12.04 install based on instructions from Intel (they just released the graphics driver for my chip). Anyway, the problem is I'm getting a ridiculously large linux-image deb. I wonder what I was doing wrong? Do I have to disable debug symbols?

This is the official instructions from Intel: http://download.intel.com/support/mothe ... ntu_12.pdf

This is the procedure I followed (I used "make deb-pkg" instead of "make install" so I can have deb packages):
Code: Select all
1. download kernel
$ wget http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.1.tar.gz


2. copy patch and kernel tarballs to build directory and untar both
$ tar xjf cdv-gfx-drivers-1.0.1_bee.tar.bz2
$ tar xzf linux-3.1.tar.gz


3. cd to kernel directory and apply patches
$ cd linux-3.1
$ patch -p1 < ../cdv-gfx-drivers-1.0.1_bee/src/kernel-ttm-clear-high.patch
$ patch -p1 < ../cdv-gfx-drivers-1.0.1_bee/src/cedarview-kernel-v1.0.1_bee.patch


4. configure using current kernel install - SKIPPED
$ cp /boot/config-$(uname -r) .config
$ yes '' | make oldconfig


5. Edit drivers/staging/Kconfig and add the following line:
source "drivers/staging/cdv/Kconfig"

Edit drivers/staging/Makefile and add the following line:
obj-$(CONFIG_DRM_INTEL_CDV)   += cdv/


6. configure the kernel using menuconfig utility
$ make menuconfig

The kernel configuration window pops-up and looks like the following:
Figure 2: Menu Config Utility Screen
a) Select "Processor type and features --- >" by using the arrow key and enter
b) Select "High Memory Support (64GB) --->" by using the arrow key and enter
c) Move the cursor to 4 GB and hit spacebar to select
d) Exit one level
e) Select "Device driver --- >" by using arrow key and enter
f) Select "staging drivers --- >" by using arrow key and enter
g) Select "Intel CDV (load along with IMG driver)" and hit the space bar. This will load the release driver.
h) Exit and save


7 compile the kernel
$ make clean
$ make -j3 deb-pkg
valerie94
 
Posts: 14
Joined: 2012-07-18 22:04

Re: Kernel compile results in 558.3 MB size linux-image

Postby vbrummond » 2012-07-23 23:42

valerie94 wrote:Note: This was done in ubuntu 12.04. Those with chronic buntu-phobia need not reply.

I fail to see how you have the authority to give orders.

Do I have to disable debug symbols?

Yes, disable all the rubbish under the kernel hacking most specifically the kernel debugging.
vbrummond
 
Posts: 4343
Joined: 2010-03-02 01:42

Re: Kernel compile results in 558.3 MB size linux-image

Postby valerie94 » 2012-07-23 23:46

vbrummond wrote:
valerie94 wrote:Do I have to disable debug symbols?

Yes, disable all the rubbish under the kernel hacking most specifically the kernel debugging.


So this is all I have to do to get a normal-sized linux-image?
valerie94
 
Posts: 14
Joined: 2012-07-18 22:04

Re: Kernel compile results in 558.3 MB size linux-image

Postby vbrummond » 2012-07-23 23:49

Worth a try. :P
vbrummond
 
Posts: 4343
Joined: 2010-03-02 01:42

Re: Kernel compile results in 558.3 MB size linux-image

Postby valerie94 » 2012-07-23 23:52

Thank you! Though I fear the savings won't be that much and it's a 3 hours wait...
valerie94
 
Posts: 14
Joined: 2012-07-18 22:04

Re: Kernel compile results in 558.3 MB size linux-image

Postby Quantum » 2012-07-24 04:45

.
Last edited by Quantum on 2012-08-13 00:45, edited 1 time in total.
Quantum
 
Posts: 1455
Joined: 2006-03-21 19:06
Location: Seattle, Ecotopia

Re: Kernel compile results in 558.3 MB size linux-image

Postby stevepusser » 2012-07-26 04:17

The savings should be enormous--your kernel deb should be only a few tens of MB. A good deal of that 3 hours was spent compressing debugging symbols with tar.gz into that 550 MB deb, so your build should be faster. However, "make oldconfig" should have loaded the current kernel's config without debugging, so how debugging got turned on is anyone's guess, unless you skipped that command?
stevepusser
 
Posts: 3727
Joined: 2009-10-06 05:53

Re: Kernel compile results in 558.3 MB size linux-image

Postby valerie94 » 2012-07-28 10:27

You're right Steve.

To disable debug symbols, edit .config file and make sure CONFIG_DEBUG_INFO is not set (commented out or deleted) then run the following commands:
Code: Select all
$ make INSTALL_MOD_STRIP=1 modules_install
$ make clean
$ make INSTALL_MOD_STRIP=1 deb-pkg -j3


I installed debian wheezy and tried Intel's cedarview patches on the current kernel (3.2) but it won't build. On ubuntu, I have kernel 3.2 with hardware acceleration enabled using drivers from this ppa https://launchpad.net/~sarvatt/+archive/cedarview/. I already decided not to use the drivers released by intel as it only works with kernel 3.1 (no downgrade for me thank you).

I'm still hoping there will be cedarview compatibility with debian in the future. Until then, I'm using Ubuntu 12.04 LTS.
valerie94
 
Posts: 14
Joined: 2012-07-18 22:04

Re: Kernel compile results in 558.3 MB size linux-image

Postby stevepusser » 2012-07-28 19:48

Well, yes, Debian will eventually include those updated Intel drivers, but only after the bugs are worked out.
stevepusser
 
Posts: 3727
Joined: 2009-10-06 05:53

Re: Kernel compile results in 558.3 MB size linux-image

Postby quhan » 2012-08-11 17:54

valerie94,
I install the cdv driver as your post, step by step..but it is still error..
what's the wrong?
I use debian wheezy, and download the linux 3.1 source from kernel.org, then patch, then compile
these are the errors following:
drivers/staging/cdv/pvr/services4/srvkm/env/linux/osfunc.c: In function ‘OSMapLinToCPUPhys’:
drivers/staging/cdv/pvr/services4/srvkm/env/linux/osfunc.c:1087:17: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
drivers/staging/cdv/pvr/services4/srvkm/env/linux/osfunc.c:1087:44: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
drivers/staging/cdv/pvr/services4/srvkm/env/linux/osfunc.c: In function ‘OSTimerCallbackWrapper’:
drivers/staging/cdv/pvr/services4/srvkm/env/linux/osfunc.c:1829:42: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
drivers/staging/cdv/pvr/services4/srvkm/env/linux/osfunc.c: In function ‘OSAddTimer’:
drivers/staging/cdv/pvr/services4/srvkm/env/linux/osfunc.c:1915:34: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
drivers/staging/cdv/pvr/services4/srvkm/env/linux/osfunc.c:1917:12: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
drivers/staging/cdv/pvr/services4/srvkm/env/linux/osfunc.c: In function ‘GetTimerStructure’:
drivers/staging/cdv/pvr/services4/srvkm/env/linux/osfunc.c:1923:25: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
drivers/staging/cdv/pvr/services4/srvkm/env/linux/osfunc.c: In function ‘CPUVAddrToPFN’:
drivers/staging/cdv/pvr/services4/srvkm/env/linux/osfunc.c:2243:5: error: right shift count >= width of type [-Werror]
drivers/staging/cdv/pvr/services4/srvkm/env/linux/osfunc.c: In function ‘OSAcquirePhysPageAddr’:
drivers/staging/cdv/pvr/services4/srvkm/env/linux/osfunc.c:2357:34: error: cast from pointer to integer of different size [-Werror=pointer-to-int-cast]
drivers/staging/cdv/pvr/services4/srvkm/env/linux/osfunc.c: In function ‘FindMMapBaseVAddr’:
drivers/staging/cdv/pvr/services4/srvkm/env/linux/osfunc.c:2707:16: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
drivers/staging/cdv/pvr/services4/srvkm/env/linux/osfunc.c: At top level:
drivers/staging/cdv/pvr/services4/srvkm/env/linux/osfunc.c:3070:2: error: #error "Implement CPU cache flush/clean/invalidate primitives for this CPU!"
drivers/staging/cdv/pvr/services4/srvkm/env/linux/osfunc.c:2719:10: error: ‘CheckExecuteCacheOp’ defined but not used [-Werror=unused-function]
cc1: all warnings being treated as errors
make[4]: *** [drivers/staging/cdv/pvr/services4/srvkm/env/linux/osfunc.o] Error 1
make[3]: *** [drivers/staging/cdv] Error 2
make[2]: *** [drivers/staging] Error 2
make[1]: *** [drivers] Error 2
make[1]: Leaving directory `/usr/src/linux-source-3.1'
make: *** [debian/stamp/build/kernel] Error 2
root@router-nas-htpc:/usr/src/linux-source-3.1# Write failed: Broken pipe
(301) ~$
quhan
 
Posts: 4
Joined: 2012-08-11 17:49

Re: Kernel compile results in 558.3 MB size linux-image

Postby Quantum » 2012-08-11 20:08

.
Quantum
 
Posts: 1455
Joined: 2006-03-21 19:06
Location: Seattle, Ecotopia

Re: Kernel compile results in 558.3 MB size linux-image

Postby fratzola » 2012-10-15 21:58

I have also tried patching using the step-by-step guide by Intel.
I'm stuck in this very early stage, any ideas why the kernel won't patch?

Error log:

Code: Select all
> patch –p1 < ../cdv-gfx-drivers-1.0.1_bee/src/kernel-ttm-clear-high.patch

patching file –p1
Hunk #1 FAILED at 708.
1 out of 1 hunk FAILED -- saving rejects to file –p1.rej


Thanks!
fratzola
 
Posts: 2
Joined: 2012-10-15 21:55

Re: Kernel compile results in 558.3 MB size linux-image

Postby stevepusser » 2012-10-16 02:52

Most often the patch is only meant for one specific kernel version, and you have another version.
stevepusser
 
Posts: 3727
Joined: 2009-10-06 05:53

Re: Kernel compile results in 558.3 MB size linux-image

Postby fratzola » 2012-10-16 20:15

But i downloaded the one they suggest in the pdf :/
fratzola
 
Posts: 2
Joined: 2012-10-15 21:55

Re: Kernel compile results in 558.3 MB size linux-image

Postby booherbg » 2012-11-21 21:47

Hi guys. I'm having the hardest time w/ this. I'm running Wheezy, built the custom kernel patched, applied the binary patches (which I can verify fixed the messed up framebuffer problem) but now the main issue I'm having is that I need Xorg server v1.11 since the intel binary module requires it.

I've built the XServer successfully, did "make install" and verified that Xorg -v shows 1.11, however startx still gives me the same error: module version (11) does not match server (12).

Is my old server still hanging around somewhere? What about all my modules that Xorg needs (fbdev, intel, etc.), will those get rebuilt in 1.11 or do I need to specify them?

Sorry for being vague, I'm a bit burned out at the end of all this and need a little bit of guidance. I'm so close (driver is working!) but can't get xserver to start up. Thanks!
booherbg
 
Posts: 1
Joined: 2012-11-21 21:43

Next

Return to System configuration

Who is online

Users browsing this forum: ratcheer and 13 guests

fashionable