# getting started with zen sources

## Ric95

I'm doing a fresh install and I'd like to try zen sources for the kernel, but I'm not sure the docs are up to date, and info seems scattered all over. 

http://www.gentoo-wiki.info/Zen-sources

Is it normal to install both gentoo and zen sources?, then symlink to zen for the kernel compile, symlink back when its done?

Is the BFS patch compatible with zen ? or is the zen scheduler just as good anyhow?

*edit*

I'm going to log the steps I've taken, so anyone searching for similar info has it easy.

emerge zen-sources.  They install into /usr/src/ .

If I just use

```
genkernel  --kerneldir=/usr/src/linux-2.6.31-zen7 all
```

 I'll get a kernel that I know works, but the default .config will build a bloated kernel and module set. 

In my latest build I took a working configuration file from one install and saved it for my next install. I copied it to /usr/src and named it Rics.config , then I build with the command; 

```
genkernel --kerneldir=/usr/src/linux-2.6.31-zen7 --kernel-config=/usr/src/Rics.config all
```

 Genkernel built and installed to the same specs as my previous build.  :Smile:   (Now that I'm confident, I'll try that again with one of pappys kernel seeds and --menuconfig added. If it fails, I'll know its my configurations.) 

Then I edited /boot/grub/grub.conf to show the new kernel.

Video driver needed rebuilding (of course), but nv180.60 was incompatable with kernel 2.6.31, so I unmasked 'nvidia-drivers ~amd64', then emerged nvidia-drivers 190.42.

I know genkernel is a crutch and builds too many modules, but I can always boot from its builds. I'll refine it with a pappy kernel seed later.

----------

## nero37

zen-sources are now in the portage tree, so just unmask the version you want in packages.keywords and

```
emerge --sync

emerge zen-sources
```

more info on installing here

and if your having any problems with it, ask over thread here

----------

## nero37

Forgot to mention, BFS scheduler is already included in zen-sources and is the default scheduler, though their version of CFS scheduler has some nice patches to improve desktop performance.

----------

## pappy_mcfae

You can run your machine off as many different kernel versions as you wish. I have several different versions of kernel source spread over four different systems. While I use zen sources only, I also have gentoo-sources and vanilla-sources installed as well.

If you want an easy way to get a nice, trim kernel, you can use one of my kernel seeds. The latest versions of zen are .30 and .31. You can use the vanilla-sources .30 or .31 seed, and the make oldconfig command to get a basic zen setup. Then just add your devices and file systems, and you're on your way.

Blessed be!

Pappy

----------

## Ric95

 *Quote:*   

> If you want an easy way to get a nice, trim kernel, you can use one of my kernel seeds. The latest versions of zen are .30 and .31. You can use the vanilla-sources .30 or .31 seed, and the make oldconfig command to get a basic zen setup. Then just add your devices and file systems, and you're on your way.
> 
> 

 

That sounds good. But I didn't see a kernel for zen sources ; http://www.kernel-seeds.org/seeds/64_bit/ so I downloaded the latest gentoo 64 seed. I've also installed zen-sources, but your documentation doesn't say where to put the configuration seed (?)

----------

## pappy_mcfae

The instructions are in the post. Use a vanilla-source seed. Place it in the zen source directory. Use the make oldconfig command to change the seed from 2.6.30 (or whatnot) to 2.6.30-zen*. Then use make menuconfig, make xconfig, or your favorite kernel configuration applet, and configure for your machine's devices.

Blessed be!

Pappy

----------

## Ric95

I tried the kernel seed, no luck yet, so I'm using my old crutch "genkernel". ( Now using the --kerneldir option. Next I'll add the --kernel-config option with the seed).

I've succesfully build a kernel with "genkernel --kerneldir=/usr/src/linux-2.6.31-zen4 --menuconfig all", and it boots, but I can't rebuild the video driver. 

```

>>> Source configured.

>>> Compiling source in /var/tmp/portage/x11-drivers/nvidia-drivers-180.60/work/NVIDIA-Linux-x86_64-180.60-pkg2 ...

 [32;01m*[0m Preparing nvidia module

make -j2 HOSTCC=x86_64-pc-linux-gnu-gcc CROSS_COMPILE=x86_64-pc-linux-gnu- LDFLAGS= IGNORE_CC_MISMATCH=yes V=1 SYSSRC=/usr/src/linux SYSOUT=/lib/modules/2.6.31-zen4/build HOST_CC=x86_64-pc-linux-gnu-gcc clean module 

NVIDIA: calling KBUILD...

make CC=cc KBUILD_OUTPUT=/lib/modules/2.6.31-zen4/build KBUILD_VERBOSE=1 -C /usr/src/linux M=/var/tmp/portage/x11-drivers/nvidia-drivers-180.60/work/NVIDIA-Linux-x86_64-180.60-pkg2/usr/src/nv modules

make[2]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.

make -C /lib/modules/2.6.31-zen4/build \

   KBUILD_SRC=/usr/src/linux-2.6.31-zen4 \

   KBUILD_EXTMOD="/var/tmp/portage/x11-drivers/nvidia-drivers-180.60/work/NVIDIA-Linux-x86_64-180.60-pkg2/usr/src/nv" -f /usr/src/linux-2.6.31-zen4/Makefile \

   modules

test -e include/linux/autoconf.h -a -e include/config/auto.conf || (      \

   echo;                        \

   echo "  ERROR: Kernel configuration is invalid.";      \

   echo "         include/linux/autoconf.h or include/config/auto.conf are missing.";   \

   echo "         Run 'make oldconfig && make prepare' on kernel src to fix it.";   \

   echo;                        \

   /bin/false)
```

 would running 'make oldconfig && make prepare' allow me to emerge nvidia-drivers, or would that mess up my kernel ?

----------

## pappy_mcfae

Does the package finish installing? If so, then ignore that stuff, as it's an error message that comes up during run time. If not, then retry the emerge, and capture any errors that occur. By errors, I mean compilation errors that prevent the finishing of the compilation. 

Blessed be!

Pappy

----------

## Veldrin

There is a patch around to fix this issue.... Sorry I cannot find it. (In short, nvidia-driver-180.60 is incompatible with linux-2.6.31 due to some ABI/API changes)

As alternative you can install nvidia-drivers-190.42, or 185.18.36. (both in portage, but ~arch keyworded)

just my .02$

V.

----------

## Ric95

 *Quote:*   

> Does the package finish installing? If so, then ignore that stuff, as it's an error message that comes up during run time. If not, then retry the emerge, and capture any errors that occur. By errors, I mean compilation errors that prevent the finishing of the compilation.
> 
> 

 

Sorry I didn't get more specific. That code I posted was the compile failure. And it was shortly after it said "ERROR: Kernel configuration is invalid.", so I thought it was from using alternate sources.

 But Veldrin was right about 2.6.31 not working with nv 180.6. I unmasked and emerged nvidia-drivers 190.x ( and libvdpau) and it works  :Smile: 

Thanks guys.

Now I need to learn a bit more about my hardware and use the kernel seeds properly. 

I don't see much  of my hardware list that coresponds to the .config list. 

```
PCI ID   Works?   Vendor   Device   Driver   Kernel

10025950      ATI Technologies Inc   RS480 Host Bridge      

10025a34      ATI Technologies Inc   RS480 PCI-X Root Port      

10024379   Yes   ATI Technologies Inc   IXP SB400 Serial ATA Controller   sata_sil   v2.6.25-

10024374      ATI Technologies Inc   IXP SB400 USB Host Controller      

10024375      ATI Technologies Inc   IXP SB400 USB Host Controller      

10024373      ATI Technologies Inc   IXP SB400 USB2 Host Controller      

10024372   Yes   ATI Technologies Inc   IXP SB400 SMBus Controller   i2c-piix4   v2.6.25-

10024376   Yes   ATI Technologies Inc   IXP SB400 IDE Controller   atiixp   v2.6.25-

10024377      ATI Technologies Inc   IXP SB400 PCI-ISA Bridge      

10024371      ATI Technologies Inc   IXP SB400 PCI-PCI Bridge      

10024370   Yes   ATI Technologies Inc   IXP SB400 AC'97 Audio Controller   snd-atiixp   v2.6.25-

10221100      Advanced Micro Devices [AMD]   K8 [Athlon64/Opteron] HyperTransport Technology Configuration      

10221101      Advanced Micro Devices [AMD]   K8 [Athlon64/Opteron] Address Map      

10221102      Advanced Micro Devices [AMD]   K8 [Athlon64/Opteron] DRAM Controller      

10221103   Yes   Advanced Micro Devices [AMD]   K8 [Athlon64/Opteron] Miscellaneous Control   k8temp   v2.6.25-

10de01df   Yes   nVidia Corporation   G71 [GeForce 7300 GS]   nv   

11c10620               

10ec8139   Yes   Realtek Semiconductor Co., Ltd.   RTL-8139/8139C/8139C+   8139cp,8139too   v2.6.25-

11063044   Yes   VIA Technologies, Inc.   VT6306 Fire II IEEE 1394 OHCI Link Layer Controller   ohci1394   

processor   : 0

vendor_id   : AuthenticAMD

cpu family   : 15

model      : 47

model name   : AMD Athlon(tm) 64 Processor 3200+

stepping   : 2

cpu MHz      : 1989.452

cache size   : 512 KB

fpu      : yes

fpu_exception   : yes

cpuid level   : 1

wp      : yes

flags      : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt lm 3dnowext 3dnow up rep_good pni lahf_lm

bogomips   : 3978.90

TLB size   : 1024 4K pages

clflush size   : 64

cache_alignment   : 64

address sizes   : 40 bits physical, 48 bits virtual

power management: ts fid vid ttp tm stc

```

If I load (pappyseed).config into genkernel --menuconfig, it seems like I hardly need to add anything. Is that true?

Also, while in menuconfig, I turned off the schedulers. Does that leave BFS installed, or did I turn that off with them?

----------

## pappy_mcfae

Do yourself a favor, and read the how-to page at the seeds site. You don't need genkernel at all. As a matter of fact, using genkernel to set up a pre-configured kernel is like going around the block to get next door.

With the seeds, all you need to worry about is the devices you have, and your file systems. Once again, read the how-to for more information.

Blessed be!

Pappy

----------

## Ric95

Thanks, and with your help I'm sure I'll get it right yet. 

But there are a couple things that, as a noob, would be handy to have on your site. 

For example you have most of the info about how to work with the .config , except what directory to put it in (and if make needs an option to append it). 

And at the end when compiling, perhaps a brief explanation about initramfs, and the command to build that to match the kernel.  

Little things like that will bring your kernel seed within reach of noobs like me.  :Smile: 

----------

## pappy_mcfae

In general, you don't need initrd/initramfs. It is only required if you are wanting the boot splash screen. I don't support initrd/initramfs. 

I am working on some pages that will list all the settings I use, and the reasons why. That's a work in progress. I have been working on it, but I'm not quite ready to publish it. When I am, there will be an announcement. You'd definitely want to check that out when it comes.

Blessed be!

Pappy

----------

