LinuxQuestions.org
Register a domain and help support LQ
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 04-10-2011, 08:48 PM   #1
adamk75
Senior Member
 
Registered: May 2006
Posts: 3,091

Rep: Reputation: 396Reputation: 396Reputation: 396Reputation: 396
Loading radeon KMS from an initrd


I'm trying to get radeon to load early from an initrd, and have created an initrd with radeon, drm, ttm and drm_kms_helper modules, as well as the radeon firmware under /lib/firmware/radeon/.

About 5 seconds into the boot process, the radeon drm is loaded, but the boot hangs for nearly a minute as it tries to load the firmware and then error out. I checked on #radeon, and Dave Airlie says that udev is needed, but I did build the initrd with the -u option, which includes udev. And, after expanding the created initrd, I see the radeon and drm modules, the firmware, and udev.

I know this can work, as I've seen it on Fedora, opensuse, and Ubuntu. And, in fact, Dave said "that stuff just works on most distros".

Does anyone have any pointers on how to get this working?

Adam
 
Old 04-11-2011, 02:17 PM   #2
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
Is your firmware in the kernel?

Code:
#
# Generic Driver Options
#
CONFIG_UEVENT_HELPER_PATH=""
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
# CONFIG_STANDALONE is not set
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
CONFIG_FIRMWARE_IN_KERNEL=y
CONFIG_EXTRA_FIRMWARE="radeon/R600_rlc.bin amd-ucode/microcode_amd.bin"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware"
 
1 members found this post helpful.
Old 04-11-2011, 02:24 PM   #3
adamk75
Senior Member
 
Registered: May 2006
Posts: 3,091

Original Poster
Rep: Reputation: 396Reputation: 396Reputation: 396Reputation: 396
I'm trying this on 2.6.37.6 generic from -current. So this is that section of the config file.

Code:
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
# CONFIG_FIRMWARE_IN_KERNEL is not set
CONFIG_EXTRA_FIRMWARE=""
I have not set CONFIG_EXTRA_FIRMWARE or CONFIG_EXTRA_FIRMWARE_DIR. The point of adding the firmware to the initrd is so that you can load radeon from the same initrd without needing the firmware to be compiled into the kernel.

Adam
 
Old 04-11-2011, 08:33 PM   #4
andrewthomas
Senior Member
 
Registered: May 2010
Location: Chicago Metro
Distribution: Arch, Gentoo, Slackware
Posts: 1,690

Rep: Reputation: 307Reputation: 307Reputation: 307Reputation: 307
I don't see why it won't work for you.

I just made an initrd for the generic-2.6.38.2 kernel using

Code:
mkinitrd -c -k 2.6.38.2 -f ext4 -r /dev/sda14 -m ext4 -u
and my microcode loaded just fine.
 
Old 04-11-2011, 08:40 PM   #5
adamk75
Senior Member
 
Registered: May 2006
Posts: 3,091

Original Poster
Rep: Reputation: 396Reputation: 396Reputation: 396Reputation: 396
Well, according to that, you're not adding the radeon kernel module to the initrd. Which is my goal, here.

Adam
 
Old 04-11-2011, 08:49 PM   #6
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 2,548

Rep: Reputation: 422Reputation: 422Reputation: 422Reputation: 422Reputation: 422
AFAIK, initrd is required to load additional modules required to boot since the generic kernel only support EXT2. That's why in most cases, initrd is used to load EXT3/EXT4/Reiserfs or any other filesystems, not modules which will be loaded automatically by the kernel
 
Old 04-12-2011, 04:28 AM   #7
adamk75
Senior Member
 
Registered: May 2006
Posts: 3,091

Original Poster
Rep: Reputation: 396Reputation: 396Reputation: 396Reputation: 396
Quote:
Originally Posted by willysr View Post
AFAIK, initrd is required to load additional modules required to boot since the generic kernel only support EXT2. That's why in most cases, initrd is used to load EXT3/EXT4/Reiserfs or any other filesystems, not modules which will be loaded automatically by the kernel
And it can be used to load any number of other modules, such as radeon. This is why, for example, Fedora and OpenSUSE, switch to a KMS driven framebuffer within just three or four seconds of booting. I'm just trying to figure out how to accomplish this. I could, of course, just recompile the kernel and add the radeon drm and firmware directly to the kernel, but that's what I'm trying to avoid by using an initrd.

Adam
 
Old 04-12-2011, 12:55 PM   #8
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,913

Rep: Reputation: Disabled
I know this *can* work, Adam, as I did it on one of my systems with an ATI chipset. It was back when we were still heavily testing all of the KMS stuff, and that system is long wiped, but I'll look into doing it again just for you :-)
I know for my T400 (which doesn't require firmware), it's as simple as this in mkinitrd.conf:
Code:
MODULE_LIST="ext4:intel_agp:drm:i915"
 
Old 04-12-2011, 01:14 PM   #9
adamk75
Senior Member
 
Registered: May 2006
Posts: 3,091

Original Poster
Rep: Reputation: 396Reputation: 396Reputation: 396Reputation: 396
Well, don't worry about it too much. I'll just recompile the kernel with the firmware and radeon driver compiled in if it comes down to it :-)

Adam
 
Old 06-05-2011, 11:24 PM   #10
rworkman
Slackware Contributor
 
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,913

Rep: Reputation: Disabled
I messed with this quite a bit, and I don't know what's going wrong, but I can't get it to work either any more... :/
 
Old 08-07-2011, 04:30 AM   #11
rvdboom
Member
 
Registered: Jul 2007
Distribution: Slackware
Posts: 183

Rep: Reputation: 23
How do you add the firmware files to the initrd?
I'm trying to compile a 3.0.1 kernel and put in the radeon driver so I don't have to bother about the module itself, but I'd be interested in having the firmware loaded without building them in the kernel.
 
Old 08-07-2011, 07:31 AM   #12
adamk75
Senior Member
 
Registered: May 2006
Posts: 3,091

Original Poster
Rep: Reputation: 396Reputation: 396Reputation: 396Reputation: 396
Well, that's kind of the point of this thread... I never got it to work and, apparently, neither did rworkman.

Besides, if the radeon DRM driver is compiled into the kernel, the firmware needs to be as well.

Adam
 
Old 08-08-2011, 12:31 AM   #13
rvdboom
Member
 
Registered: Jul 2007
Distribution: Slackware
Posts: 183

Rep: Reputation: 23
Ah, I didn't know that.
OK, thanks, I'll go for inclusion in the kernel then.
 
Old 08-08-2011, 08:26 AM   #14
the3dfxdude
Member
 
Registered: May 2007
Posts: 316

Rep: Reputation: 87
rvdboom, I am able to just modprobe it in rc.local:
### Radeon KMS
modprobe radeon
modprobe fbcon

So if you don't want to recompile, try that.
 
Old 08-16-2011, 03:24 PM   #15
Richa7d
LQ Newbie
 
Registered: Aug 2011
Location: UK
Distribution: Arch
Posts: 2

Rep: Reputation: Disabled
Has anyone managed to get this working? I mean as in a solution to Adam's original post?

I was trying to get kms to load early, with the goal of having a native resolution frambuffer at boot. For now I have settled on compiling it into the kernel as per Andrew's post but never the less I can't seem to let this go .

Quote:
Dave Airlie says that udev is needed, but I did build the initrd with the -u option, which includes udev
I read that udev needs to be available before the module is loaded. ???

So I edited the init script in initrd-tree, moving the udev lines before loading the modules. That seems to have made a difference but not solved the problem. Does this shed any light on things?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Radeon kms works! dolphin77 Slackware 147 01-05-2012 05:32 AM
[SOLVED] 640x480 resolution with radeon and KMS bamdad Linux - Hardware 7 08-25-2010 07:07 PM
[SOLVED] Which user space should I have for radeon KMS? Josh000 Slackware 2 04-22-2010 07:20 PM
[SOLVED] Radeon KMS and console question Josh000 Slackware 29 04-16-2010 02:24 PM
KMS with radeon gives garbled screen with x onlyolli Linux - Software 0 06-29-2009 04:14 PM


All times are GMT -5. The time now is 06:15 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration