[Splashy-devel] Bug#459457: Bug#459457: splashy: should not start if requirements aren't satistfied
Luca Capello
luca at pca.it
Mon Jan 7 01:03:13 UTC 2008
Hi Tim,
thank you for your fast reply and excuse me about my wrong statement in
my previous mail, read below ;-)
On Sun, 06 Jan 2008 23:08:18 +0100, Tim Dijkstra wrote:
> On Sun, 06 Jan 2008 18:56:19 +0100
> Luca Capello <luca at pca.it> wrote:
>
>> - when no vga= or video= command line is provided, AFAIK even if fbcon
>> and vesafb are inserted (on Debian kernel they're compiled in by
>> default), /proc/fb is present, but with zero size. Thus, when
>> checking for /proc/fb to create /dev nodes we should check for its
>> size (test -s). However, according to [6] and [7], if no vga= or
>> video= parameter is specified, fb is not initialised ([2] and [4]).
>
> I'm using a system without vesafb, but with the ati vesa driver, which
> name I'm to lazy to look up now:) But anyway, I don't need a vga=
> parameter on /proc/cmdline.
I've a ThinkPad T42p with an ATI card (radeonfb), but ATM its LCD is
broken, so I cannot test (since I don't have any other external monitor
at home).
> IIRC I wrote the initramfs scripts to test for some specific contents
> in /dev/fb, not just its size.
If I'm right, the initramfs script does the following.
1) check if /sbin/splashy is executable: this is required
2) check if /proc/cmdline contains 'splash' (exits if not) or 'single'
(exits if present): I'd prefer this tests as `splashy enable`
3) insert fbcon and vesafb: at least on Debian stock kernels, these two
modules are compiled in the kernel by default, so this step would be
unnecessary, but splashy must support even non-stock and non-Debian
kernels...
4) create the necessary device nodes WRT to /proc/fb: if that file
exists, one node per each entry, otherwise only the first node. Here
the problem: if /proc/fb exists but it's empty, no device node is
created. This situation happens for example with the intelfb module
without specifying any video mode at boot:
=====
intelfb: Framebuffer driver for Intel(R) 830M/845G/852GM/855GM/865G/915G/915GM/945G/945GM chipsets
intelfb: Version 0.9.4
intelfb: 00:02.0: Intel(R) 945GM, aperture size 256MB, stolen memory 7932kB
intelfb: Non-CRT device is enabled ( LVDS port ). Disabling mode switching.
intelfb: Video mode must be programmed at boot time.
=====
Thus we should check if /proc/fb esists and it's not empty. FWIW, I
found that the same erroneous check is present in the frambeffuer
initramfs script [1].
5) create the necessary device nodes for the consoles: required
6) grep for VESA|VGA in /proc/fb: this was the check I erroneously
stated it hadn't never worked for me, but I was wrong (since we're
talking about initramfs here and indeed it works). I'd prefer this
test to be performed inside splashy (which seems to be the case since
0.3.9), thus checking for /proc/fb *and* /dev/fb0
Now, as a prophane, I see some improvements here:
- point 2) and 6) should be managed inside splashy (giving verbose
output if requested, so we can reuse it with the LSB functions)
- while point 3), 4) and 5) could be completely managed by the
framebuffer initramfs script (and they seem to be fully copied from
there), as I already stated it seems necessary for non-stock and
non-Debian kernels
> Well, I'm not really overseeing the situation, but I think mandating
> vga= is not the proper way to go.
I fully agree, but for the general case (vesafb) vga= is required by
- the linux vesafb documentation
* linux/Documentation/fb/vesafb.txt:
How to use it?
==============
Switching modes is done using the vga=... boot parameter. Read
Documentation/svga.txt for details.
You should compile in both vgacon (for text mode) and vesafb (for
graphics mode). Which of them takes over the console depends on
whenever the specified mode is text or graphics.
* linux/Documentation/svga.txt:
1. Intro
~~~~~~~~
This small document describes the "Video Mode Selection" feature
which allows the use of various special video modes supported by the
video BIOS. Due to usage of the BIOS, the selection is limited to
boot time (before the kernel decompression starts) and works only on
80X86 machines.
** Short intro for the impatient: Just use vga=ask for the first
** time, enter `scan' on the video mode prompt, pick the mode
** you want to use, remember its mode ID (the four-digit
** hexadecimal number) and then set the vga parameter to this
** number (converted to decimal first).
* linux/Documentation/fb/fbcon.txt (this is a specific Debian case
because both fbcon and vesafb are statically compiled):
B. Loading
Possible scenarios:
1. Driver and fbcon are compiled statically
Usually, fbcon will automatically take over your
console. The notable exception is vesafb. It needs to be
explicitly activated with the vga= boot option parameter.
- the splashy documentation itself, splashy/README [2]:
* Installation (Quick)
====================
1. Install Splashy as you normally would (see INSTALL)
2. Add "splash vga=791 quiet" to the append= line on your bootloader
configuration
* Installation (Detailed)
=======================
1. Install Splashy as you normally would (see INSTALL)
2. Edit your bootloader's configuration file to set up the
framebuffer mode:
[...]
If you use a different framebuffer driver, then you would need to tell the
kernel, through the kernel's parameters, to use that other
driver. For example, to use the radeonfb framebuffer driver:
* Grub: #kopt: quiet video=radeonfb:1024x768-32 at 100
* Lilo: append="quiet video=radeonfb:1024x768-32 at 100"
For intel i810 internal cards the lilo line would look like:
append="video=i810fb:vram:2,xres:1024,yres:768,bpp:8,hsync1:30, \
hsync2:55,vsync1:50,vsync2:85,accel,mtrr"
The patch I provided was a proof-of-concept: it works, now and without
anything special. Since my C skills are poor, I haven't even tried to
implement it in splashy, but the best solution will be there.
Thx, bye,
Gismo / Luca
Footnotes:
[1] /usr/share/initramfs-tools/scripts/init-top/framebuffer
[2] http://git.debian.org/?p=splashy/splashy.git;a=blob_plain;f=README;hb=HEAD
More information about the Splashy-devel
mailing list