Results 1 to 9 of 9

Thread: Re: How to: Compile a new Kernel & Install Xorg 7.2

  1. #1
    Just burned his ISO
    Join Date
    Jul 2007
    Posts
    19

    Default Re: How to: Compile a new Kernel & Install Xorg 7.2

    Hi all,

    In this thread are some instruction for newbies to just do it. (well it won't let me post url's yet... so here is the last part of the url here: showthread.php?t=7348

    I did not go for the whole sha-bang and mess with X. I did just the steps to get a new kernel in place. My reasons were the scrollwheel. I have those M$ Bluetooth kb and mouse. I needed to add the bluez patch to make it work.
    It does. My new kernel has almost all of the M$ keyboard buttons firing in xev, the music play, stop, vol+/vol-/mute, etc... even some of the special buttons like Mail Web/Home are firing events now. And of course my wheel works now too! I can't believe how many years I lived without one of these things.

    Now the bad news... when I startx I come to a new message...
    Code:
    Sound server informational message:
    Error while initializing the sound driver:device: 
    default can't be opened for playback (No such device)
    The sound server will continue, 
    using the null output device.
    I did not change the .config before compiling.
    Here is my question 1.
    1. Am I supposed to add sound for my particular card in make menuconfig?

    lspci -v | grep audio reports:

    00:08.0 Multimedia audio controller: Creative Labs SB Live! EMU10k1 (rev 07)
    00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50)

    So the kernel sees the hardware.
    I didn't really have to setup anything when I did the hd install.
    So I go and look in /dev/ for any sound files dsp etc... nothing there.
    It's a udev kernel, right? In /dev/.udev/ I find 2 dirs, ./failed/ and ./db/
    Okay, maybe I should find a "gotcha" in the failed directory so I go in there and look. Looks like udev has a big list of failed devices with timestamps around when I did the make. But a Google of "/dev/.udev/failed" leads nowhere.

    Ok, now this looks serious... back to square one. I did notice at the top of the /usr/src are some other things like alsa and aufs and squashfs.

    Here is what I think is my next question.
    2. Am I supposed to rebuild those too?

    Here is what I did in the rebuild from /usr/src/linux
    Code:
    bt linux # patch -E -p1 < ../patch-2.6.20-mh1
    patching file drivers/bluetooth/bcm203x.c
    patching file drivers/bluetooth/bfusb.c
    patching file drivers/bluetooth/bt3c_cs.c
    patching file Makefile
    Hunk #1 FAILED at 1.
    1 out of 1 hunk FAILED -- saving rejects to file Makefile.rej
    /* 
    This was just expecting a blank EXTRAVERSION = line so 
    the patch could add "-mh1" to it, so I felt I could ignore 
    this error and keep using the makefile already present 
    */
    patching file net/bluetooth/hci_core.c
    patching file net/bluetooth/hidp/core.c
    patching file net/bluetooth/hidp/hidp.h
    patching file net/bluetooth/hidp/Kconfig
    patching file net/bluetooth/hidp/sock.c
    
    
    make oldconfig
    make dep
    make clean
    make bzImage
    make
    make modules
    make modules_dep
    Ends with this:
    if [ -r System.map -a -x /sbin/depmod ]; then /sbin/depmod -ae -F System.map 2.6.20-BT-PwnSauce-NOSMP; fi

    Here I wound up with a
    /usr/src/linux/arch/i386/boot/bzImage 3,209,192 bytes
    and a /usr/src/linux/System.map 1,099,733 bytes.

    Okay, so I copy those to /boot/longAssNamesToShowWhatTheyAre and symlink System.map to the real System.map file.

    But wait, there is a file there named just "map". It is alot smaller, and I look inside and it looks nothing like the system.map file so I just leave that there.
    It's 204,288 bytes long.

    Adjust my grub menu.lst on another drive so I don't have to mess with lilo,
    and boot up.

    Great my mouse works, but now my sound doesn't. Even when I boot using the old kernel, I get the same error. Bummer.

  2. #2
    Just burned his ISO
    Join Date
    Jul 2007
    Posts
    19

    Default

    In trying to answer my own questions...
    It seems that the sound drivers aren't there. In /lib/modules/2.6.20-BT-PwnSauce-NOSMP/kernel/sound is just one file...
    soundcore.ko

    The cd has alot of them. So it would seem like I am supposed to pick my sound card in make menuconfig too?

  3. #3
    Junior Member
    Join Date
    Feb 2007
    Posts
    74

    Default

    I did not change the .config before compiling.
    Here is my question 1.
    1. Am I supposed to add sound for my particular card in make menuconfig?
    You didn't copy the .config from your current older kernel?

    For your sound issue:
    Take a look into ALSA (http://www.alsa-project.org/) I'm pretty sure that the 2.6 kernel automatically compiles it but perhaps it isn't on yours.

    I also added it to my previous guide if you need to configure and install it: http://forums.remote-exploit.org/showthread.php?t=7348

  4. #4
    Just burned his ISO
    Join Date
    Jul 2007
    Posts
    19

    Default

    Yes, I used the config already there. I checked make mrproper out before using it, and saw it would delete that .config... so i made a long named backup in /boot.

    I am going to try again with hand picked sound card drivers... but will that negate alsa drivers? My whole /usr/src/alsa tree seems to have been untouched in any builds. I see in /usr/src/alsa/alsa-driver-1.0.14rc2/pci some drivers that look useful like emu10k1 and ac97 but they are not rebuilt during any simple step kernel rebuilds.

    But hey, my mouse works! Your article gave me the guts to go ahead and try.
    Thanks.

    I see in your article now it is a step to be done afterward. Okay, I will try that before trying another kernel rebuild with handpicked drivers, and soundcore.ko

  5. #5
    Just burned his ISO
    Join Date
    Jul 2007
    Posts
    19

    Default

    Yeeeeeeeeeeees! Ok, the alsa needs to be remade and reinstalled. This was all done on a hard disk install of BT2. The source is there, in /usr/src/alsa in 4 separate subdirs.
    bt alsa # ls -a
    alsa-driver-1.0.14rc2/
    alsa-oss-1.0.12/
    alsa-lib-1.0.14rc2/
    alsa-utils-1.0.14rc2/

    You might want to reflect that in the kernel howto.
    I did 4 separate:
    ./configure --prefix=/usr && make & make install
    which was successful.

    Since I used the .config that was already there from BT2, I am glad you added alsa to the howto. I have one other question though I will find out the answer shortly, in make menuconfig alsa was not enable... even as a Module.
    I wondered about that, if BT2 has it disabled in the .config... is it needed?

    Now that I have actually done this, and enabled agpgart and my nvidia drivers I can now experiment with assigning functions to the keyboard and mouse.

    Then maybe a BT2 bluetooth keyboard mouse phone howto. I have all mine working, and it's now easier than using this crap in windows. Windows always forgets their own hardware... and the bluetooth stack M$ provides is so handicapped. It cannot stream audio to the bluetooth sunglasses i have except in headset (crappy audio).

    Mutts, if you read this... could you consider adding the bluez patch in a bugfix edition.

    When I add:
    hidd --server to /etc/rc.d/rc.local after all the other bluetooth stuff I outlined in my bluetooth post... I only need to pair the M$ Bluetooth keyboard and mouse once. The server line keeps the mouse from dying after 12 minutes of inactivity. It also seems to keep them working after several reboots without me having to scan with "hidd scan".

    I will now fix the BT2 on my laptops. The bluez patch (and bluez 3.12) were all I needed to fix the bluetooth stack.

    Big note:
    I did not get the latest bluez patch for later kernels, but the patch for the kernel version used in BT2. There is a later patch, but since I am not ready to build a new kernel from scratch, I chose to keep things simple. You get the earlier patch by changing the url in the browser to the correct kernel version, at bluez's patch page. They offer only one link for the latest patch, but if you click that link it will load into the browser, then just change the url
    to patch-2.6.20-mh1.gz to get the patch I used.

  6. #6
    Just burned his ISO
    Join Date
    Jul 2007
    Posts
    19

    Default

    One thing I notice now... you know the cool screen layout BT2 has for the kernel messages in bootup... before one gets to the login screen even, where all the messages are placed on in a smaller window. I see that is now gone. I am in nvidia mode now, with drivers for my card compiled in... and the bootup fonts are all different too... at a much higher resolution I suspect. Do you or anyone know how I can put that back?

  7. #7
    Just burned his ISO
    Join Date
    Jul 2007
    Posts
    19

    Default

    Well it was a combo of the agpgart and nvidia drivers. recompiled and the boot screen is back. Unless I can find something that won't run in vesa mode, I don't know if using agpgart and drivers is worth it.

    Sure would like to know what needs to be done to have both, drivers for my card and the slick bootsplash.

  8. #8
    Junior Member
    Join Date
    Feb 2007
    Posts
    74

    Default

    Sounds like this has been a great learning experience for you, I'm making note of the details you discovered that seemed to have inadvertently escaped my guide and I will be adding them later.

  9. #9
    Just burned his ISO
    Join Date
    Jul 2007
    Posts
    19

    Default

    Well after much more than I thought when I started out on this... including trashing my bt2 install when messing with dbus, I got more qwestions than answers. The fact that the kernel is missing the sound drivers after a:

    make clean
    make bzImage
    make
    make modules
    make modules_install

    leads me to wonder what else breaks. I have gone through enough for a bt2 newbie for now... But I sure could have used a dbus package to reinstall after I trashed mine. There seemed to be something hardcoded in dbus that wanted to use /usr/local/var(or lib, I forget now) instead of /usr/var/run/dbus.

    I think a real how to rebuild a kernel for this distro is in order. Why does the sound card not work any more after? Which step produced that effect and was it needed? Well I braved those waters, and now I know a little more... I'd do it all again to.

    I have a few questions...
    What is the proper way to rc-update something in BT2, once it has been added to rc.d?

    If I want the rc.messagebus file to run... at startup, do I have to add it to rc.M and rc.6 by hand? I did that eventually... kinda reminded me of the config.sys days of old.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •