LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-17-2014, 10:28 PM   #1
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Build a driver from src and the details


Hi:

I'd like to build from src but not sure where to start.
I have read all these articles but it's still not clear where I should download src from and what modules to download.

I don't want to build a module against the installed kernel but I did read the article to get understanding.

http://www.tldp.org/LDP/tlk/sources/sources.html
http://www.cyberciti.biz/tips/build-...urce-tree.html
http://www.opensourceforu.com/2010/1...-linux-driver/
http://www.linuxjournal.com/content/...l-build-system
http://www.thegeekstuff.com/2013/07/...kernel-module/

I have experience with compiling software using gcc and c++ but I haven't tried it with Slackware. I learned how to compile using Fedora. Is Slackware any different?

Which sites are safe to download src code?
How would I know if the src has been compromised or otherwise altered?

How would I know what modules to download?

Suggestions & prefered strategies that are practiced are welcomed:-

Thanks in Advance-
 
Old 09-18-2014, 06:56 AM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Can you be more specific? Your questions are worded in such general terms, that the answer that they can receive will be to vague to be useful in my opinion.

Can you give hindsight of what driver, or at least what kind of driver you want to compile from source?

This notwithstanding, let's try to answer.

Quote:
Originally Posted by Ztcoracat View Post
I have experience with compiling software using gcc and c++ but I haven't tried it with Slackware. I learned how to compile using Fedora. Is Slackware any different?
I don't see a reason for Slackware being very different in that respect. Generally speaking Slackware includes a rather complete tool chain, provided you made a full installation. You almost certainly will need at the very least the a, ap, d, k and l series of packages, often x as well.

Quote:
Which sites are safe to download src code?
Generally those who are used by the developers themselves to store the source code, rather that those who store source code they didn't write.
Quote:
How would I know if the src has been compromised or otherwise altered?
It depends how you get it: through a revision control system like git, svn or mercurial for instance, or as a tarball.

In the latter case the integrity of the tarball should be verified comparing the checksum of the downloaded file with the one provided by the website.

Quote:
How would I know what modules to download?
If you mean dependencies needed for compilation or at run time, that's often stated somewhere (in a website or in one of the provided files) by the developers. You'll have to check, then case occurring to find if Slacwkare ships these dependencies else where to find them elsewhere. There are cases where you get no indication. Then you can just try to build the software and find what's missing step by step.

If you speak of a driver, you'll generally need the source code for the kernel you want to run with it.

Quote:
Suggestions & prefered strategies that are practiced are welcomed:-
Suggestion : state clearly what you want to do (which software you want to compile) and why (e.g. because there is neither a trusted package nor a trusted SlackBuild available).

Preferred strategy: hard to imagine (at least by me) not knowing your goal or aim.

Last edited by Didier Spaier; 09-18-2014 at 07:07 AM.
 
Old 09-18-2014, 02:31 PM   #3
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484

Original Poster
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by Didier Spaier View Post
Can you be more specific? Your questions are worded in such general terms, that the answer that they can receive will be to vague to be useful in my opinion.

Can you give hindsight of what driver, or at least what kind of driver you want to compile from source?

This notwithstanding, let's try to answer.

I don't see a reason for Slackware being very different in that respect. Generally speaking Slackware includes a rather complete tool chain, provided you made a full installation. You almost certainly will need at the very least the a, ap, d, k and l series of packages, often x as well.

Generally those who are used by the developers themselves to store the source code, rather that those who store source code they didn't write.
It depends how you get it: through a revision control system like git, svn or mercurial for instance, or as a tarball.

In the latter case the integrity of the tarball should be verified comparing the checksum of the downloaded file with the one provided by the website.

If you mean dependencies needed for compilation or at run time, that's often stated somewhere (in a website or in one of the provided files) by the developers. You'll have to check, then case occurring to find if Slacwkare ships these dependencies else where to find them elsewhere. There are cases where you get no indication. Then you can just try to build the software and find what's missing step by step.

If you speak of a driver, you'll generally need the source code for the kernel you want to run with it.

Suggestion : state clearly what you want to do (which software you want to compile) and why (e.g. because there is neither a trusted package nor a trusted SlackBuild available).

Preferred strategy: hard to imagine (at least by me) not knowing your goal or aim.
Thank you for the reply.

The kind of driver that I want to build is for an old HP desktop (2000 or older) with a old Nvidia Corp MCP61 video card. The kernels I tried are those that come with Linux Mint 17 and Linux Mint Debian.

I'm not sure if the video card is on it's way out or not but I'm trying to install Linux on a friends old desktop.
I tried the Nvidia-304 driver but not joy. I gave thought that building a driver from src might solve the graphics
issue. (distorted images, colors and text across the screen)
 
Old 09-18-2014, 03:21 PM   #4
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Quote:
Originally Posted by Ztcoracat View Post
The kind of driver that I want to build is for an old HP desktop (2000 or older) with a old Nvidia Corp MCP61 video card. The kernels I tried are those that come with Linux Mint 17 and Linux Mint Debian.

I'm not sure if the video card is on it's way out or not but I'm trying to install Linux on a friends old desktop.
I tried the Nvidia-304 driver but not joy. I gave thought that building a driver from src might solve the graphics
issue. (distorted images, colors and text across the screen)
I don't see the point of building a kernel from source, not knowing which driver would be appropriate. Furthermore, if one is suitable it's probably already available in a binary form or easily built using an installer or (in case of NVIDIA) a SlackBuilds available @ http://slackbuilds.org.

Anyhow we first need to know the exact model of the video card and the kernel driver in use and the kernel modules already available for it. To gather this information please provide the output of following command, typed as root:
Code:
lspci -knn | grep -A3 VGA
The answer should tell us which drivers are worth trying, as NVIDIA as well as the Nouveau developers clearly state which models are supported by each driver.

As a fallback it's always possible to try the generic vesa driver, an old nv driver or if even that fails the fbdev driver, but we will consider that only if need be, after you'll have posted the requested information.

Last edited by Didier Spaier; 09-18-2014 at 03:29 PM.
 
Old 09-18-2014, 03:43 PM   #5
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484

Original Poster
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by Didier Spaier View Post
I don't see the point of building a kernel from source, not knowing which driver would be appropriate. Furthermore, if one is suitable it's probably already available in a binary form or easily built using an installer or (in case of NVIDIA) a SlackBuilds available @ http://slackbuilds.org.

Anyhow we first need to know the exact model of the video card and the kernel driver in use and the kernel modules already available for it. To gather this information please provide the output of following command, typed as root:
Code:
lspci -knn | grep -A3 VGA
The answer should tell us which drivers are worth trying, as NVIDIA as well as the Nouveau developers clearly state which models are supported by each driver.

As a fallback it's always possible to try the generic vesa driver, an old nv driver or if even that fails the fbdev driver, but we will consider that only if need be, after you'll have posted the requested information.
I'd be happy to run that cmd for you but as soon as the Live Linux CD/DVD loads and I move the mouse to anywhere on the DE the machine freezes, the DE graphics becomes distorted and scattered all across the screen.

I don't know how I could run that cmd to get you that output you need since the machine is giving me that kind of performance issue. That machine is across town and I won't be able to try again until the owner is home. (next week)

Last edited by Ztcoracat; 09-18-2014 at 03:47 PM.
 
Old 09-18-2014, 03:52 PM   #6
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484

Original Poster
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
The last time I ran the Linux CD/DVD I wrote some information about the machine down.
This is what I have for now-
Code:
Graphics VGA Controller nvidiac61 GeForce 6150SE
Nvidia Corporation MCP61 IDE
Motherboard Advanced Micro Devices AMD K8 Athlon 64
Audio nvidia MCP61
Hewett-Packard Company Device 2a6c
RAM DDR2
L2 cache 512 K
Until next week there isn't much more information I can provide at this time.
 
Old 09-18-2014, 04:01 PM   #7
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
Quote:
Originally Posted by Ztcoracat View Post
I'd be happy to run that cmd for you but as soon as the Live Linux CD/DVD loads and I move the mouse to anywhere on the DE the machine freezes, the DE graphics becomes distorted and scattered all across the screen.

I don't know how I could run that cmd to get you that output you need since the machine is giving me that kind of performance issue. That machine is across town and I won't be able to try again until the owner is home. (next week)
From your answer I assume that the live media you use starts in graphical mode (under X). You can gather this information instead in launching a Slackware installer. You don't have to actually perform the installation: as soon as (as suggested by the installer) you'll have logged in as root you can launch that command. To avoid having to write the result on a paper, just plug in an USB key, then do this: (I assume the device name of the USB key will be /dev/sdb1, check with "lsblk" and adapt accordingly):
Code:
mkdir key
mount /dev/sdb1 /key
lspci -knn | grep -A3 VGA > /key/lspci.txt
umount /key
then post the content of lspci.txt.

Last edited by Didier Spaier; 09-18-2014 at 05:32 PM. Reason: typo corrected
 
Old 09-18-2014, 04:44 PM   #8
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484

Original Poster
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Quote:
Originally Posted by Didier Spaier View Post
From your answer I assume that the live media you use starts in graphical mode (under X). You can gather this information instead in launching a Slackware installer. You don't have to actually perform the installation: as soon as (as suggested by the installer) you'll have logged in as root you can launch that command. To avoid having to writing the result on a paper, just plug in an USB key, then do this: (I assume the device name of the USB key will be /dev/sdb1, check with "lsblk" and adapt accordingly):
Code:
mkdir key
mount /dev/sdb1 /key
lspci -knn | grep -A3 VGA > /key/lspci.txt
umount /key
then post the content of lspci.txt.

Yes the media starts in graphical mode-
I'll try your instructions instead of writing all that down but the last time I checked that machine didn't see
my usb memory.

The owner didn't control the use of her machine and there was a virus with Windows 7. I think it was oovoo causing the problem or the live chat that folks had sent her see thinks. The machine was moving very slow.
Multiple people use her machine and she doesn't monitor what is downloaded.

I recovered Windows but I'm not sure if the usb port is working now.
(Reset back to the factory image)

I'll post the output as soon as I get across town next week.
Thanks!
 
Old 11-18-2014, 12:21 PM   #9
Ztcoracat
LQ Guru
 
Registered: Dec 2011
Distribution: Slackware, MX 18
Posts: 9,484

Original Poster
Blog Entries: 15

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
Sorry it's been so long.

My friend had 2 deaths in the family.

She lost interest in putting Linux on her computer.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FreeBSD 6.2, no /usr/src/tools and /usr/src/usr.bin, failed to build world. Mr_Shameless *BSD 4 05-16-2008 08:43 AM
postfix .src.rpm fails to build mardanian Fedora 1 03-02-2007 06:21 AM
anaconda build from src rpm fails LampMan Fedora 3 03-28-2005 02:55 AM
how do I compile or build a src.rpm driver? Falafel Linux - Software 1 11-19-2003 06:40 AM
How to build src.rpm on RH9 xprometeus Linux - Distributions 3 07-20-2003 08:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 09:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration