# [SOLVED]bootsplash, KMS and radeon

## montik

In order to setup a bootsplash from the earliest point possible of the boot phase, I am trying to load radeon driver, that is normally working, with initramfs, so that kms is enabled earlier. I don't know if this is possible and if it will give some advantage, but I tried...

Following this article http://en.gentoo-wiki.com/wiki/Initramfs I created an initramfs loading radeon and the modules it depends on:

```
MODULES="i2c-core.ko i2c-algo-bit.ko cfbfillrect.ko drm_kms_helper.ko hwmon.ko ttm.ko cfbcopyarea.ko cfbimgblt.ko agpgart.ko drm.ko ttm.ko drm_kms_helper.ko radeon.ko"
```

The initramfs is loaded, but when the radeon module gets loaded, immediately the screen becomes black and a hard reboot is needed.

To try to solve this situation I included in the initramfs, under /lib/firmware, some radeon firmware that are on my system, apparently without differences. My video card is:

```
01:00.0 VGA compatible controller: ATI Technologies Inc M56P [Radeon Mobility X1600]
```

I tried with kernel 2.6.35 and 2.6.37 with no luck. I will now try to generate initramfs with genkernel, maybe that helps...Last edited by montik on Fri Sep 16, 2011 10:48 am; edited 1 time in total

----------

## mikegpitt

My wife's laptop also has a radeon card, and I went through this process just a month or so ago.  I also tried to embed the firmware in the initramfs created by genkernel, and although it included the necessary packages, I wasn't able to get it working properly.  I abandoned that idea, and decided instead to build the needed firmware directly into the kernel, and it worked great.

I'm not in front of her machine at the moment, so I'm doing this from memory...  but essentially you want to compile the radeon driver into your kernel (a.k.a. don't make it a module),  and set the CONFIG_EXTRA_FIRMWARE to include the radeon ucode modules needed for your system.

The exact firmware packages might not be very apparent, so what I did was just boot the system with the compiled in driver.  It will hang for a bit while it's looking for the firmware files it wants.  After maybe 30sec - 1min it will continue booting as normal, and eventually you will get a splash when the filesystem is mounted.

When it's done booting, look at your dmesg output, and it should say the firmware that it was trying to find but couldn't load.  Add this to your CONFIG_EXTRA_FIRMWARE var, recompile your kernel, boot, and repeat if necessary.

There were a handful of files that I needed to include for my wife's laptop (I can't remember which ones off hand).

Some more info is here (scroll down for the CONFIG_EXTRA_FIRMWARE stuff):

http://www.x.org/wiki/radeonBuildHowTo

----------

## montik

Hey it worked!! Thank You!!!  :Smile: 

I quickly tried your solution and it's working!! I didn't get if you compiled also the radeon driver into the kernel or if you let it as a module in initramfs. I compiled everything inside the kernel. I then enabled:

```
                                                                                       

 Symbol: FIRMWARE_IN_KERNEL [=y]     

  │ Type  : boolean                                 

  │ Prompt: Include in-kernel firmware blobs in kernel binary    

  │   Defined at drivers/base/Kconfig:80

  │   Depends on: FW_LOADER [=y]      

  │   Location:                                     

  │     -> Device Drivers                      

  │       -> Generic Driver Options        

  │         -> Userspace firmware loading support (FW_LOADER [=y])                  

```

After enabling this it is possible to specify which firmware you want to include. For me it was R520_cp.bin (to find out I renamed the radeon directory and looked at dmesg complaints  :Smile: ). Anyway after recompiling it worked like a charm without any initramfs. Tomorrow I'll try the bootsplash setup! Thanks again!

----------

## b0nafide

 *mikegpitt wrote:*   

> My wife's laptop also has a radeon card, and I went through this process just a month or so ago.  I also tried to embed the firmware in the initramfs created by genkernel, and although it included the necessary packages, I wasn't able to get it working properly.  I abandoned that idea, and decided instead to build the needed firmware directly into the kernel, and it worked great.

 

Thank you! I gave up a while ago trying to get KMS to work with my radeon. Because a netbook of mine with an intel chipset wasn't having any problems with KMS, I figured it was something that was still being worked on as far as the radeon driver was concerned and I left it alone. Today I emerged x11-drivers/radeon-ucode, made the required changes to the kernel and it's awesome. Thanks again, super helpful.   :Very Happy: 

----------

## mikegpitt

Happy to help everyone!   :Smile:    Just to clarify my above post, yes I did compile the radeon driver directly into the kernel, to ensure it was loaded immediately.

----------

## b0nafide

Also just to clarify, I had radeon in the kernel already but modesetting was being done in userspace until I compiled the microcode into the kernel.

Edit: I was so happy I did an "rc-update del consolefont boot" so I could look at the logo a little longer  :Smile: 

----------

