WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: G84M grapics card driver kernel/Xorg  (Read 17138 times)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: G84M grapics card driver kernel/Xorg
« Reply #15 on: January 21, 2014, 06:32:44 AM »
compiling the tinycore kernel with a few small changes is really not a big deal - the patched source and config are available at:

http://repo.tinycorelinux.net/5.x/x86/release/src/kernel/

..and you need the compiletc, bash, perl5 and ncurses-dev extensions

Then basically:
Code: [Select]
$ tar xf linux-3.8.13-patched.txz
$ cd linux-3.8.13-patched
$ make mrproper
$ cp /tmp/config-3.8.13-tinycore ./.config
$ make menuconfig
[set nvidia module to "m"]
$ make modules

..and then gzip the nv module and make your own personal extension of it.

Offline TinyFun

  • Newbie
  • *
  • Posts: 33
Re: G84M grapics card driver kernel/Xorg
« Reply #16 on: January 21, 2014, 06:51:19 AM »
Thnx again, downloaded source. Gives a reference while trying to understand what, where, how and why.

Have compiled progs from source a few times, but only as "script-kiddie", blindly following .configure/make/make_install. This time, would like to understand what I'm doing.

Edit:
understand your block of code.
Could you explain what you mean by
Quote
.and then gzip the nv module and make your own personal extension of it.

Where to find nv module ?  Do I have to compile these ?
« Last Edit: January 21, 2014, 07:36:24 AM by TinyFun »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: G84M grapics card driver kernel/Xorg
« Reply #17 on: January 21, 2014, 07:49:30 AM »
The nouveau.ko module will have been compiled somewhere in the source tree - you just have to find it  :)

The gtkfind extension is very useful for this kind of thing or you can use "find" from the cli

Once located, load the advcomp and squashfs-tools-4.x extensions and:
Code: [Select]
$ gzip nouveau.ko
$ advdev -z4 nouveau.ko.gz
$ mkdir -p /tmp/pkg/usr/local/lib/modules/3.8.13-tinycore/kernel/drivers/gpu/drm/nouveau
$ sudo chown -R root:root /tmp/pkg/usr
$ sudo cp nouveau.ko.gz /tmp/pkg/usr/local/lib/modules/3.8.13-tinycore/kernel/drivers/gpu/drm/nouveau
$ cd /tmp
$ sudo mksquashfs pkg/ nouveau-3.8.13-tinycore.tcz
$ sudo chown tc:staff nouveau-3.8.13-tinycore.tcz
« Last Edit: January 21, 2014, 07:59:33 AM by Juanito »

Offline TinyFun

  • Newbie
  • *
  • Posts: 33
Re: G84M grapics card driver kernel/Xorg
« Reply #18 on: January 21, 2014, 02:57:49 PM »
@Juanito,

I am sooo tempted to go script-kiddie with the extensive roadmap that you supplied.

At the moment, got to
Quote
$ make menuconfig
[set nvidia module to "m"]

This i.tensively covered on linux,org as mentioned before. While reading up, found this on linux.org"

Quote
NOTE: Code in the Linux kernel can be put in the kernel itself or made as a module. For instance, users can add Bluetooth drivers as a module (separate from the kernel), add to the kernel itself, or not add at all. When code is added to the kernel itself, the kernel requires more RAM space and boot-up time may take longer. However, the kernel will perform better. If code is added as modules, the code will remain on the hard-drive until the code is needed. Then, the module is loaded to RAM. This will reduce the kernel's RAM usage and decrease boot time. However, the kernel's performance may suffer because the kernel and the modules will be spread throughout the RAM. The other choice is to not add some code. For illustration, a kernel developer may know that a system will never use Bluetooth devices. As a result, the drivers are not added to the kernel. This improves the kernel's performance. However, if users later need Bluetooth devices, they will need to install Bluetooth modules or update the whole kernel.

Conclusion: these are modules that are shown using "lsmod" and loaded with "modprobe".
Questions:
- if making module (and making .tcz from it that loads onboot), will it load automatically or do i need to load it with modprobe

- Is it possible to compile into the kernel (no module) ? would that load automatically without need for "modprobe"

- Would , compile into kernel restrict it's use to just this one machine ?


BTW: Find that documentation on TC is difficult to find, Would it be an idea to put your help to my post domewhere in the documentation (proposed subject) compiling TC kernel).

As for find: grew up with norton on msdos, so tend to use MC->command->find file
« Last Edit: January 21, 2014, 03:11:27 PM by TinyFun »

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: G84M grapics card driver kernel/Xorg
« Reply #19 on: January 21, 2014, 03:02:38 PM »
Is that a typo?

advdev -z4 nouveau.ko.gz

is it not

advdef -z4 nouveau.ko.gz

?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: G84M grapics card driver kernel/Xorg
« Reply #20 on: January 21, 2014, 04:03:46 PM »
Hi coreplayer2
Yes, that's a typo.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: G84M grapics card driver kernel/Xorg
« Reply #21 on: January 21, 2014, 04:18:16 PM »
Questions:
- if making module (and making .tcz from it that loads onboot), will it load automatically or do i need to load it with modprobe
Likely
Quote
- Is it possible to compile into the kernel (no module) ? would that load automatically without need for "modprobe"
Yes, but requires compiling a new kernel
Quote
- Would , compile into kernel restrict it's use to just this one machine ?
No
Quote
BTW: Find that documentation on TC is difficult to find, Would it be an idea to put your help to my post domewhere in the documentation (proposed subject) compiling TC kernel).
Feel free to improve wiki  ;)
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: G84M grapics card driver kernel/Xorg
« Reply #22 on: January 21, 2014, 10:31:34 PM »
At the moment, got to
Quote
$ make menuconfig
[set nvidia module to "m"]
In fact it would have been clearer to say:
Code: [Select]
$ make menuconfig
[load .config]
[set nvidia module to "m"]

Quote
- if making module (and making .tcz from it that loads onboot), will it load automatically or do i need to load it with modprobe
it depends, usually the hardware is detected and the module loads automatically - but not always.

Quote
- Is it possible to compile into the kernel (no module) ? would that load automatically without need for "modprobe"
Yes, it is possible, but then you'd need to remaster tinycore, better to leave it as a module and include it in an extension.

Offline TinyFun

  • Newbie
  • *
  • Posts: 33
Re: G84M grapics card driver kernel/Xorg
« Reply #23 on: January 22, 2014, 03:27:42 AM »
OK, thanks for clarification,
Should have read more closely. By issueing
Quote
$ make modules
You do not compile the entire kernel, but only the modules set in .config

Offline TinyFun

  • Newbie
  • *
  • Posts: 33
Re: G84M grapics card driver kernel/Xorg
« Reply #24 on: January 22, 2014, 10:08:23 AM »
So far, not so good. :'(

Everything seemed to work. Had to search menuconfig a bit, then walked the dog as compiling took a while. Found nouveau.ko and created extension.

Put nouveau-3.8.13-tinycore.tcz in tce/optional, used apps to select it as onboot. Result: got so far as "loading extensions message" then :black screen.

Rebooted from usb, removed the .tcz. Tried to load the extension locally. But again: screen went totally black.

unsquashed extension, replaced nouveau.ko.gz with small txt file and squashed again. On loading this extension, the txt file appeared in the /usr/local/.......drm/nouveau/ dir. So placement seems to be OK.

So, put nouveau.ko.gz in /usr/local/.......drm/nouveau/ dir  manually, "sudo depmod -a" and "modprobe nouveau. Result is again black screen

Any ideas ?

Edit Is this what Curaga was warning me about ?
« Last Edit: January 22, 2014, 10:17:02 AM by TinyFun »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: G84M grapics card driver kernel/Xorg
« Reply #25 on: January 22, 2014, 10:31:27 AM »
Unfortunately, yes :(

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: G84M grapics card driver kernel/Xorg
« Reply #26 on: January 22, 2014, 12:35:51 PM »
..but maybe blackisting a couple of the intel modules mentioned earlier might help?

Offline TinyFun

  • Newbie
  • *
  • Posts: 33
Re: G84M grapics card driver kernel/Xorg
« Reply #27 on: January 22, 2014, 12:52:07 PM »
Leaves the nvidia route

Downloaded and ran NVIDIA-Linux-x86-100.14.09-pkg1.run (after exit to prompt). This left me with:

Quote
ERROR: Unable to find the kernel source tree for the currently running kernel.
       Please make sure you have installed the kernel source files for your
       kernel and that they are properly configured; on Red Hat Linux systems,
       for example, be sure you have the 'kernel-source' or 'kernel-devel' RPM
       installed.  If you know the correct kernel source files are installed,
       you may specify the kernel source path with the '--kernel-source-path'
       command line option.

Read posts http://forum.tinycorelinux.net/index.php?topic=13308.0 and http://forum.tinycorelinux.net/index.php/topic,12965.msg71206.html#msg71206. As recommended, installed linux-3.8.3-api-headers.tcz. Also downloaded scripts create-nvidia-raw and create-nvidia-package.

With headers installed, tried nvidia installer again. Result: exactly the same error.

Script create-nvidia-raw calls nvidia installer and will do a lot of things with the results of the nvidia installer. So if that prog does not complete, neither will the script.

Already have source for tinycore, but I'm using coreplus. Can I simply point nvidia-installer to the dir that contains source files for tinycore ?

Does anyone have experience with this ? I's getting difficult to see the "fun" instead of the "frustrating"

Edit
Thanks Juanito, your post came in while typing this. Will try that first :-[

Edit2
Before blacklisting, booted from cd. Added nouveau-3.8.13-tinycore.tcz to /tmp/tce.optional and tried to load it.
Gave error:
Quote
modprobe: can't load module nouveau (kernel.tclocal/drivers/gpu/drm/nouveau/nouveau.ko.gz) unknown symbol in module or unknown parameter

Well, it is no black screen, but don't know what it means either (corrupted ?)
Like Alice  keeps getting stranger and stranger ...

@Rich,
Thanks, will try that too.
« Last Edit: January 22, 2014, 01:28:43 PM by TinyFun »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11619
Re: G84M grapics card driver kernel/Xorg
« Reply #28 on: January 22, 2014, 01:06:34 PM »
Hi TinyFun
I think you may need the kernel source files for compiling the Nvidia driver. Check out  linux-kernel-sources-env.tcz

Offline TinyFun

  • Newbie
  • *
  • Posts: 33
Re: G84M grapics card driver kernel/Xorg
« Reply #29 on: January 22, 2014, 01:59:27 PM »
With linux-kernel-sources-env.tcz installed, still the same error. as cited above.

Damn ! Why is it such a problem to get a very well known and much used graphics card to functiuon the way it is supposed to ?

Notice I'm getting angry. Time for a break.

Not angry at you guys, appreciate all the help. Just at myself for not knowing, understanding, not being patient enough.

Edit
After install of install linux-kernel-sources-env.tcz, nothing seemed to happen. After unsquashing, found shell script and desktop-file. Ran shell script, which downloaded source files.
Nvidia gives a different error now:
Quote

The kernel header file '/lib/modules/3.8.13-tinycore/build/include/linux/version.h'  does not exist

The  most likely reason for this is that the kernel source files in 'lib/modules/3.8.13-tinycore/build have not been configured

There is at least some movement.  :)
Anyone who knows how I can 'configure' the build files ? does that mean running menuconfig ?

Edit2
'lib/modules/3.8.13-tinycore/build' is a link to /usr/src where source files are installed. Think the error is about header files, but I did put  linux-3.8.3-api-headers.tcz in onboot.
What am I missing ?
« Last Edit: January 22, 2014, 03:39:03 PM by TinyFun »