PDA

View Full Version : Cyt0's Linux on 9750: Part One


cyt0plas
03-11-2006, 08:37 PM
I don't have time to do it all at once, so I'm breaking this up in parts. I will be editing this post to add more as I have it:
Ok, let's get started with gentoo on the 9750. First off, some warnings.

1) This is NOT a complete, step-by-step guide. This is (http://www.gentoo.org/doc/en/handbook/handbook-amd64.xml). This guide is meant to assist someone with some former linux experience in getting a 9750 working fully under Gentoo.

To start out, here's my configuration:
==============================
* 1920x1200 Flatscreen Monitor
* Geforce 7800 GTX
2048MB RAM
1x80GB HDD (* if RAID/PATA is used)
Integrated WIFI
* Integrated Bluetooth
USB Camera
* TV Capture Card
Athlon XP X2 4800+

For the things marked with a *, a difference in configuration will require some changes on your part while following this howto.

Download small LiveCD ( http://bouncer.gentoo.org/?product=gentoo-2006.0-minimal&os=amd64 ), and burn it to a disc. Follow the gentoo handbook until you reach "Configuring the USE variable".

Some hints:
- The physical ethernet controller is eth1.
- For Serial ATA, the hard drive is /dev/sda (and possibly /dev/sdb, if you have 2 drives in a non-raid configuration).
- I recommend the use of a stage3 tarball. We're not trying to be ricers here.
- Make sure whatever mirror you use has amd64 stages. Not all of them do.
- Some mirrors are way slower than others.
- I placed "-march=athlon64" in my CFLAGS
- I used "-j3" in MAKEOPTS

In my case, I have windows XP 64 bit installed on /dev/sda1 (first partition). I have the swap (512mb) installed in /dev/sda2, /boot (32mb) in /dev/sda3, and the rest in /dev/sda4 (a reiserfs partition). You may need to change the drive names used later to suit your configuration.


Use Flags
=========
Use flags make a big difference on how your system is compiled. For this HOWTO, I'm installing a KDE-based system, with support for QT and GTK apps. I'm installing aalib because I like to watch things in "Text Mode" sometimes - you probably don't want it.

My USE flags:
USE="3dnow X a52 aalib acpi alsa arts audiofile bluetooth bzip2 cdparanoia cdr cups curl dga dri dts dv dvb dvd dvdr dvdread fbcon ffmpeg flac gd gif -gnome gtk2 ieee1394 ipv6 kde kdeenablefinal libcaca lirc lm_sensors mad matroska mmx mp3 mpeg ncurses nptl ogg pam pcmcia pic qt ssl sse sse2 svga symlink theora threads tiff truetype v4l vcd vorbis xine xosd xv xvid zlib"

Continue to "Configuring the Kernel".

Configuring The Kernel
======================
We are going to use "gentoo-sources".

Under "make menuconfig", select the following:
Processor type and features --->
Processor family (AMD-Opteron/Athlon64)
Preemption Model (Voluntary Kernel Preemption (Desktop))

Power management options --->
ACPI (Advanced Configuration and Power Interface) Support --->
<*> Video

Bus options (PCI etc.) --->
<*> PCI Express support
PCCARD (PCMCIA/CardBus) support --->
<*> PCCard (PCMCIA/CardBus) support
<*> CardBus yenta-compatible bridge support
<*> Support for PCI Hotplug (EXPERIMENTAL)
<*> ACPI PCI Hotplug driver

Networking --->
<*> Bluetooth subsystem support --->
<*> L2CAP protocol support
<*> SCO links support
<*> RFCOMM protocol support
<*> BNEP protocol support
<*> Protocol filter support
<*> HIDP protocol support
Bluetooth device drivers --->
<*> HCI USB driver
<*> SCO (voice) support
<*> Generic IEEE 802.11 Networking Stack
<*> IEEE 802.11 WEP encryption (802.1x)
<*> IEEE 802.11i CCMP support

Device Drivers --->
Parallel port support --->
<*> Parallel port support
<*> PC-style hardware
Plug and Play support --->
<*> Plug and Play support
<*> Plug and Play ACPI support
Block devices --->
<*> Loopback device support
<*> Cryptoloop Support
<*> Packet writing on CD/DVD media
ATA/ATAPI/MFM/RLL support --->
< > Support for SATA (deprecated; conflicts with libata SATA driver)
<*> PCMCIA IDE support
<*> Include IDE/ATAPI CDROM support
<*> PCI IDE chipset support
<*> AMD and nVidia IDE support
<*> VIA82CXXX chipset support
SCSI device support --->
SCSI low-level drivers --->
<*> Serial ATA (SATA) support
<*> VIA SATA support
IEEE 1394 (FireWire) support --->
<*> IEEE 1394 (FireWire) support
<*> OHCI-1394 support
<*> OHCI-1394 Video support (For FireWire Cameras)
<*> SBP-2 support (Harddisks etc.)
<*> Ethernet over 1394 (FireWire Networking)
<*> OHCI-DV I/O support
<*> Raw IEEE1394 I/O support
Network device support --->
Ethernet (1000 Mbit) --->
<*> Realtek 8169 gigabit ethernet support
<*> Use Rx and Tx Polling (NAPI) (EXPERIMENTAL)
Input device support --->
<*> Miscellaneous devices --->
<*> PC Speaker support
I2C support --->
<*> I2C device interface
Multimedia devices --->
<*> Video For Linux
Video For Linux --->
<*> Philips SAA7134 support
<*> Philips SAA7134 DMA audio support
<*> Empia EM2800/2820/2840 USB video capture support
Sound --->
<*> Sound card support
Advanced Linux Sound Architecture --->
<*> Advanced Linux Sound Architecture
<*> Sequencer support
<*> OSS Mixer API
<*> OSS PCM (digital audio) API
<*> OSS Sequencer API
<*> RTC Timer support
PCI devices --->
<*> SB Audigy LS / Live 24bit
<*> VIA 82C686A/B, 8233/8235 AC97 Controller
USB support --->
<*> USB Mass Storage support
<*> Datafab Compact Flash Reader support (EXPERIMENTAL)
MMC/SD Card support --->
<*> MMC support



End part one. Next up: Wireless/Video card drivers...

bigtrouble77
03-11-2006, 09:28 PM
So far the guide looks great, but I really need to go over it much closer.

One problematic thing...
You have:
- I placed "-march=athlon64" in my CFLAGS

I think it should be: -march=k8 for a 64bit distro. I think what you have above is just to compile using amd optimized 32bit extensions. I could be wrong, but that's what I always though was the case.

You also need to enable SMP in the kernel.

Finally, is there any reason to use OSS sound anymore?

bigtrouble77
03-11-2006, 09:47 PM
Here's from the Gentoo Handbook:

Code Listing 18: Defining the CFLAGS and CXXFLAGS variable
CFLAGS="-march=athlon-xp -pipe -O2" # AMD64 users should use march=k8

What is the difference between athlon64 and k8 in this context or are they essentially the same thing?

cyt0plas
03-11-2006, 10:23 PM
What is the difference between athlon64 and k8 in this context or are they essentially the same thing?
According to the GCC manual, they are the same thing. From what I understand, there may come a point where athlon64-specific optimizations may happen; this would allow GCC to differentiate between the two. At the moment, it makes no difference.

You also need to enable SMP in the kernel.
I'm mainly pointing out what needs to be changed, and that was already set on my machine (clean install - gentoo does a decent job of autodetecting a .config). I'll edit the HOWTO to make this more clear.

Finally, is there any reason to use OSS sound anymore?
Actually, I enabled OSS compatibility in ALSA, not OSS itself. You come across things every now and again (especially binary games) that use OSS. This just lets them keep working under ALSA.

bigtrouble77
03-11-2006, 10:44 PM
Ah, I should have looked closer with the OSS emulation as you obviously just enabled emulation. In the year or so i've been using linux I have yet to find an app that uses OSS.

As far as the smp settings, my multi-processor systems never were automatically set to SMP so I just assumed it would be the case here too. I also assume that 90% of the people that buy one of these machines would be getting an X2 processor.

One thing that would be phenominal, if you can cover it, is to get the tuner card configured for SageTV.

This may be too tedious, but you may want to explain what the USE flags are for. I assume later in the howto you are going to go through the packages that will need these flags. It's just alot of flags and is a bit overwhelming if you don't know why half of them are in there.

cyt0plas
03-11-2006, 11:02 PM
I suppose I could just add the SMP settings to the list, avoiding any problems.

As for the USE flags, those are actually a significantly stripped down version of mine. I'm planning on explaining them; however, I especially don't feel like explaining why bcmath, gmp, apache2, ... are there :)

I've never tried SageTV - was thinking of doing a MythTV walkthrough, but I suppose I could take a stab at it.

I'm about to go on the road (business), so I probably won't be able to get to the next part until Monday.

bigtrouble77
03-12-2006, 12:19 AM
I've never tried SageTV - was thinking of doing a MythTV walkthrough, but I suppose I could take a stab at it.

I meant myth, sorry about that. My brain is fried today for some reason.

As for the USE flags, those are actually a significantly stripped down version of mine. I'm planning on explaining them; however, I especially don't feel like explaining why bcmath, gmp, apache2, ... are there
Yeah, I figured that much. I think for myth you'll need to add a mysql flag.

troymc
03-12-2006, 06:11 AM
Good start! I already have questions. :cool2:

Why did you enable PCI-Hotplug & ACPI PCI Hotplug? What does that enable on this laptop?

Also, have you been able to get those eMPIA drivers to work with the webcam? My system identifies the camera as a 2750, while those only support the 28xx series. I am gathering info to submit on the v4l-wiki (http://www.linuxtv.org/v4lwiki/index.php/USBVideo) to see if we can get it supported. But if you've gotten it to work with those drivers that would be awesome.

Are those Philips drivers for the TV tuner card? Do they work? I didn't get that. I may have to order it. :D

It looks like you specifically disabled I2C support. Why?

The reason the NIC is showing up as eth1 is because you're hotplugging modules right now and the eth1394 module is getting loaded first. As soon as you build the NIC module into the kernel it will get initialized first and be eth0.

BTW, we all seem to be working on the same thing - Gentoo AMD64 on a 9750. If you guys are feeling collaborative, I've started a wiki entry for this over on gentoo-wiki (http://gentoo-wiki.com/HARDWARE_Clevo_D900K). Right now it's sorta tailored towards mine, but I feel no ownership over it, so feel free to change & update as you see fit.


troymc

seablade
03-13-2006, 08:36 PM
Unfortunatly BT OSS is still popular enough to cause problems. Some new software still coming out, especially from manufacturers that use it.

Seablade

1c3d0g
03-23-2006, 08:56 AM
Stupid question of the day: can anybody tell me if the GeForce 7800 GTX Go is supported in Linux - you know, hardware accelerated by the latest nVidia drivers? I tried looking in the readme's, but they don't show that particular GPU being supported... :(

bigtrouble77
03-23-2006, 02:43 PM
Stupid question of the day: can anybody tell me if the GeForce 7800 GTX Go is supported in Linux - you know, hardware accelerated by the latest nVidia drivers? I tried looking in the readme's, but they don't show that particular GPU being supported... :(
It works well for me. CivIV playes extremely well through Cedega too.

1c3d0g
03-23-2006, 06:47 PM
Thanks man. :thumbup: I'm a big UT2k4 (and soon Quake 4 too, when I receive it) player, and it'd be disappointing if nVidia's GPU wasn't supported. This is great news! :headbang:

troymc
03-24-2006, 05:48 AM
Stupid question of the day: can anybody tell me if the GeForce 7800 GTX Go is supported in Linux - you know, hardware accelerated by the latest nVidia drivers? I tried looking in the readme's, but they don't show that particular GPU being supported... :(


I can also confirm that they work very well. :thumbup:


Here's a snippet of linux detecting it:


(II) NVIDIA X Driver 1.0-8178 Wed Dec 14 17:00:52 PST 2005
(II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
(II) Primary Device is: PCI 02:00:0
(--) Chipset NVIDIA GPU found

...

(II) NVIDIA(0): NVIDIA GPU detected as: GeForce Go 7800 GTX
(--) NVIDIA(0): VideoBIOS: 05.70.02.25.11
(--) NVIDIA(0): Interlaced video modes are supported on this GPU
(II) NVIDIA(0): Detected PCI Express Link width: 16X
(--) NVIDIA(0): VideoRAM: 262144 kBytes



troymc