night-sources
1.
Introduction
What, yet another kernel package?
Yes, another kernel package. Does the world need more unofficial kernel
packages? Who knows. I created this one as an easy way to distribute a couple of
high-demand patches.
Okay, what's different about this one?
It's pretty lightweight. It provides a vanilla Linux kernel (straight from
kernel.org) along with a couple of patches by Gentoo developer spock: uvesafb and fbsplash. It's also got
some patches I wrote that allow you to optionally select a Gentoo logo at boot,
rather than Tux the Linux penguin. Yes, really, that's the extent of the
patches.
Some folks like running the kernel source straight from kernel.org, but also like to have something
to spice up the boot process. This kernel delivers that in the form of the
fbsplash patch, and provides some additional features for video BIOS
stuff (uvesafb). This may mean that you can do more adjustment of your
framebuffer resolution, refresh rate, etc. Could be really nice for us poor
AMD64 users that have been hitherto stuck with plain ol' vesafb on a
widescreen panel. Reports vary as to whether or not you'll have extra
resolutions available; keep in mind it's not a magic bullet for all your display
troubles.
While uvesafb can run on non-x86 systems, like AMD64, there's probably no
point in running this kernel source on anything but those two arches. Unless
you're just in it for the stock kernel and fbsplash patch, without a bunch of
distro-specific patches (or hacks). The ebuild I provide is only keyworded for
amd64 and 86.
In order for uvesafb to work, you'll also need to compile and install the
v86d package, a userspace helper that runs x86 code in an emulated
environment. More on that later.
But what about so-and-so's sources?
Who knows? Word of uvesafb is getting around. I'm sure there are other
custom kernel packages that provide it; I don't pay attention to 'em. The one I
created works nicely for me. Another reason I put it together is that I figure
it might be very useful for non-Gentoo distributions; I know that there are
several out there that use fbsplash (Arch comes to mind), and recently I
saw that at least one Gentoo user has uvesafb running on Debian. If
you're using something besides Gentoo, feel free to try out the kernel. Could be
a winning combination.
Gentoo users might notice that genpatches aren't included. Though that's
a small patchset, in the interests of simplifying things even more, I just got
rid of all of 'em. Additionally, only genpatches-base would apply
cleanly; genpatches-extra contains vesafb-tng, which
uvesafb replaces. Rather than worry about reverting patches, I just
tossed 'em all out. Maybe -base will make it in one of these days, but
for now, the vanilla Linux kernel provides a level playing field for all
distros.
Why here? Why not on some overlay collection site?
Because I want to keep it here, that's why. It's much better for development to keep it with the rest of my stuff.
Final warnings
Important:
uvesafb and its accompanying helper v86d will only run on x86 and
x86-64. Don't try 'em on any other arch.
|
This kernel is completely unsupported by Gentoo developers, kernel upstream,
etc. It's a convenience package only. That being said, I run it and it works
just fine on my systems. Also, it's hard for much to go wrong with it, seeing as
it's a vanilla kernel, with only two small patches.
uvesafb and v86d are both early, in-development software. Their
author, spock, has put quite a bit of work into them, and even at this early
stage, they work well enough. But they may not be perfect; you may or may not
receive any additional benefits from using this over vesafb or
vesafb-tng.
Stop by the Unsupported
Software forum of the Gentoo
Forums to see how and where others are using uvesafb. Maybe you'll
even find an answer as to how to get it to do something interesting on your
system.
Warning:
Whatever you do, don't complain to the Gentoo developers or the Linux kernel
developers or even spock if something breaks or doesn't work the way you wanted
to. If it shows up on Bugzilla, it will be instantly killed. Remember, this is
unsupported. That being said, if there's a technical issue that pops up with the
night-sources ebuild, Manifest, etc., email me and I'll take a look.
|
2.
Gimme!
For Gentoo users
First, download the latest
version of night-sources. Untar it and drop it into
/usr/local/portage/sys-kernel, or wherever you keep your
PORTDIR_OVERLAY. It's marked ~arch, so you'll need to keyword it in
/etc/portage/package.keywords before installing.
Code Listing 2.1: Installing night-sources |
# echo "sys-kernel/night-sources" >> /etc/portage/package.keywords
# emerge night-sources
|
Next, make sure that the kernel symlink points to the right kernel. Make sure to
emerge app-admin/eselect if you don't already have it.
Code Listing 2.2: Updating the symlink |
# eselect kernel list
Available kernel symlink targets:
[1] linux-2.6.18-gentoo-r4
[2] linux-2.6.21-gentoo-r4
[3] linux-2.6.22.1-night-r2
# eselect kernel set 3
|
Next, configure the kernel. The next several steps come from the instructions
available at the uvesafb homepage.
Code Listing 2.3: Running menuconfig |
# cd /usr/src/linux & & make menuconfig
|
In the Device Drivers section, be sure to select the following:
Code Listing 2.4: Configuring the kernel, round 1 |
Device Drivers --->
<*> Connector - unified userspace <-> kernelspace linker
. . .
Graphics support --->
<*> Userspace VESA VGA graphics support
|
Build the kernel with make. Next, you'll need to emerge klibc,
even if it's already installed.
Note:
You shouldn't need to reinstall klibc for subsequent kernel recompiles or
installing new kernel versions (such as moving from .22 to .23), as the kernel
interface for klibc doesn't change much, if at all.
|
Now install v86d:
Code Listing 2.5: Installing v86d |
# echo "sys-apps/v86d" >> /etc/portage/package.keywords
# emerge v86d
|
Now you get to reconfigure your kernel! uvesafb needs some kind of
initramfs to work correctly, so you'll need to specify where it is. On Gentoo,
once v86d is emerged, it usually ends up being placed in
/usr/share/v86d/initramfs. Be sure to double-check where the
sources were unpacked. Got it? Now feed its location to the kernel.
Code Listing 2.6: Configuring the kernel, round 2 |
General setup --->
[*] Initial RAM filesystem and RAM disk (initramfs/initrd) support
(/usr/share/v86d/initramfs) Initramfs source file(s)
|
If you want, you can also choose to use the Gentoo logo I provide. Nothing like
a nice bit of bootup branding. Enable the following options:
Code Listing 2.7: Enabling the custom boot logo |
Device Drivers --->
Graphics support --->
[*] Bootup logo --->
[*] Gentoo Linux 224-color logo
|
Now you can rebuild the kernel and install it. The following one-liner will
compile the kernel, install modules, and finally install the kernel itself to
/boot. No manual copying necessary. It will also rebuild any
additional external kernel modules (nvidia, madwifi, etc.) for your new kernel,
assuming you've installed the module-rebuild package. It's quite a
timesaver.
Code Listing 2.8: Installing the kernel |
# make && make modules_install && make install && module-rebuild rebuild
|
Finally, add a line to /boot/grub/grub.conf for your new kernel.
(lilo users: you're on your own!) Here's an example:
Code Listing 2.9: Sample grub.conf |
title=Gentoo Linux 2.6.22.1-night-r2
root(hd0,0)
kernel /vmlinuz root=/dev/md3 video=uvesafb:1024x768-32,mtrr:3
|
That make install command added the symlink vmlinuz, which
points to your current kernel, in this case night-sources, so you won't
need to update the listings to point to freshly compiled and installed kernels.
Handy! You should keep your existing grub.conf entries for your
working kernel images, just so you have a backup ready.
Reboot and have fun!
For everyone else
If you're not running Gentoo, you're on your own for patching & installing
the kernel and configuring grub. The latest night-sources patchset
can be found here.
3.
Resources
Here are a few more links to help get you started with your new toys.
-
The uvesafb
homepage. Background information, instructions, downloads, and more. It's
the upstream home of uvesafb and v86d.
-
The gensplash homepage. This
is where you can find sources and instructions
for getting some good out of that fbsplash patch.
-
This
thread continues to follow the action around using uvesafb and
v86d. spock sheds some light on the subject in this
post.
The contents of this document, unless otherwise expressly stated, are licensed under the CC-BY-SA-2.5 license. The Gentoo Name and Logo Usage Guidelines apply.
|