Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Kernel compile results in 558.3 MB size linux-image

Linux Kernel, Network, and Services configuration.
Post Reply
Message
Author
valerie94
Posts: 14
Joined: 2012-07-18 22:04

Kernel compile results in 558.3 MB size linux-image

#1 Post by valerie94 »

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

vbrummond
Posts: 4432
Joined: 2010-03-02 01:42

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

#2 Post by vbrummond »

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.
Always on Debian Testing

valerie94
Posts: 14
Joined: 2012-07-18 22:04

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

#3 Post by valerie94 »

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?

vbrummond
Posts: 4432
Joined: 2010-03-02 01:42

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

#4 Post by vbrummond »

Worth a try. :P
Always on Debian Testing

valerie94
Posts: 14
Joined: 2012-07-18 22:04

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

#5 Post by valerie94 »

Thank you! Though I fear the savings won't be that much and it's a 3 hours wait...

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

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

#6 Post by Quantum »

.
Last edited by Quantum on 2012-08-13 00:45, edited 1 time in total.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

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

#7 Post by stevepusser »

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?
MX Linux packager and developer

valerie94
Posts: 14
Joined: 2012-07-18 22:04

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

#8 Post by valerie94 »

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.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

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

#9 Post by stevepusser »

Well, yes, Debian will eventually include those updated Intel drivers, but only after the bugs are worked out.
MX Linux packager and developer

quhan
Posts: 4
Joined: 2012-08-11 17:49

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

#10 Post by quhan »

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) ~$

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

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

#11 Post by Quantum »

.

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

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

#12 Post by fratzola »

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!

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

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

#13 Post by stevepusser »

Most often the patch is only meant for one specific kernel version, and you have another version.
MX Linux packager and developer

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

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

#14 Post by fratzola »

But i downloaded the one they suggest in the pdf :/

booherbg
Posts: 1
Joined: 2012-11-21 21:43

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

#15 Post by booherbg »

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!

BigSammy
Posts: 1
Joined: 2012-12-27 23:52

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

#16 Post by BigSammy »

But i downloaded the one they suggest in the pdf :/
I got this same error trying this patch for drivers/gpu/drm/ttm/ttm_page_alloc.c as part of the 3.6 kernel. It appears that this file has already been updated in this version, so I think it's okay to skip.

Post Reply