32 Commits

Author SHA1 Message Date
Alper Nebi Yasak
d11ba241dc Handle simple-framebuffer drivers built as modules
Recent Debian kernels have the simplefb driver built-in on a few
architectures, except in cloud flavours. It handles 'simple-framebuffer'
devices registered from elsewhere: possibly in a device-tree fragment,
or from another driver like framebuffer_coreboot, or via SYSFB_SIMPLEFB.
The more modern alternative to it is simpledrm which also handles
the same 'simple-framebuffer' devices.

We haven't switched to simpledrm, but if we do it's possible we will
want it to be a module, since it depends on the drm subsystem and would
require that to be built-in otherwise. Regardless of what we choose for
Debian kernels, it's still possible for custom-built kernels to have
either/both of simplefb and simpledrm as modules instead of built-in.

Include these modules in initramfs unconditionally when MODULES=dep.
For MODULES=most, add the two drivers to the framebuffer modules list.

When MODULES=dep and these drives are (probed) modules, our check for
platform framebuffers always finds a "module" directory in the driver's
sysfs directory and incorrectly skips handling graphics modules, ignore
the false positive.

Unfortunately, these drivers sometimes do not get probed automatically.
One such case is efifb with SYSFB_SIMPLEFB=y, which is quite important.
Add a init-top script that tries to probe simpledrm, with a fallback to
simplefb. Explicitly try to probe these modules for break=top as well.

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
2025-04-21 09:05:08 +03:00
Ben Love
02dc65f9db Fully-qualify modprobe calls to avoid busybox
If the busybox-static package is installed, the modprobe implementation
used will be the one from busybox, which behaves slightly differently.
Specifically, the busybox implementation does not support `install`
commands from modprobe.d conf files:

https://git.busybox.net/busybox/tree/modutils/modprobe.c?h=1_31_stable#n279

Since mkinitramfs already ensures that /sbin/modprobe is copied into
/sbin for the initrd, it is safe to fully-qualify the modprobe call and
never invoke the busybox version.
2022-02-05 19:32:53 -05:00
Ben Hutchings
79f49b96ba {hooks,scripts}/keymap: Use setupcon --setup-dir
setupcon gained a --setup-dir option to support initramfs builders,
documented since console-setup 1.111.  Use this to simplify our
own scripts.

Related-to: #620041
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2019-02-04 03:16:37 +01:00
Benjamin Drung
2bab73b939 Disable shellcheck for desired behaviour
Sometimes globbing and word splitting is wanted. Therefore explicitly
disable the check for these line.

Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.com>
2018-12-18 13:37:07 +01:00
Benjamin Drung
f277309e0b Fix (nearly) all issues found by shellcheck
shellcheck found more issues than SC1074. Address most of these issues.
You can check the shell code by running:

```
shellcheck -e SC1090,SC1091 -s dash hook-functions $(find * -type f
\( -executable ! -name rules -o -regex '.*\.\(post\|pre\).*'
-o -regex "^\(docs\|scripts\)/.*" ! -name '*.md' \))
```

Signed-off-by: Benjamin Drung <benjamin.drung@cloud.ionos.com>
2018-12-18 13:30:15 +01:00
maximilian attems
7ea605d62c Use ata_generic driver on all_generic_ide bootarg
[ merge from 0.92bubuntu1 ]
Reported-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: maximilian attems <maks@debian.org>
2010-04-04 02:16:39 +02:00
maximilian attems
1bf31aaa5b blacklist earlier at init-top stage
as udev will start earlier, care to blacklist before it loads.

Signed-off-by: maximilian attems <maks@debian.org>
2010-02-22 23:37:29 +01:00
maximilian attems
db24ed6ec7 nuke framebuffer boot script
fb should be loaded after initramfs by init to have a beautiful
userland. allows faster boot not to try parsing crazy things
with only posix sh at our hands.

this will need a README.DEBIAN section as noone is now currently
loading fbcon.

Signed-off-by: maximilian attems <maks@debian.org>
2009-07-29 15:48:15 +02:00
Aaron M. Ucko
4a4dda7aff scripts/init-top/framebuffer: i915 needs intel-agp too
The i915 DRM module doubles as a framebuffer of sorts, at least in kernel
mode-setting setups; like its cousins intelfb and i810fb, it effectively
requires intel-agp despite not actually using any of its symbols.  As
such, could you please arrange for scripts/init-top/framebuffer to give
it the same treatment, per the following patch?:

(closes: #533258)

Signed-off-by: maximilian attems <maks@debian.org>
2009-06-16 18:57:23 +02:00
maximilian attems
f3049298fe init-top/framebuffer: syntax fix.
fix wrong merge of e184c8c2a9ad4520cf0cf4536301c6ae6206e911
scripts/init-top/framebuffer: 84: Syntax error: ")" unexpected (expecting ";;")
2009-04-02 01:54:46 +02:00
Maik Zumstrull
e184c8c2a9 init-top/framebuffer: Load intel-agp for intelfb
After further experimentation, I discovered additional problems that my
first patch did not address, namely that

1) Some FB drivers need the AGP subsystem up and running before they
   are loaded and
2) intelfb needs intel-agp.ko, but does not have a dependency on it.

intelfb does not actually *work* on my testsystem after this (it
crashes), but unlike with plain initramfs-tools, it loads (and prints
something useful if loaded with the probeonly option). I'll try to find
out why it fails to work tomorrow; it's probably an unrelated issue.

[ make the patch applyable, probably whitespace damaged, fix comments,
  no need to pass -q to modprobe that is set globaly -maks ]

(closes: #416063, #455876)

Signed-off-by: maximilian attems <maks@debian.org>
2009-03-31 16:00:05 +02:00
Ben Collins
7e3f1f2ef6 init-top/framebuffer: ignore blacklist for forced vga= usage.
DO NOT USE -Qb for framebuffer.

Blank ttys when using vesafb (vga=xxx) LP: #129910

[ s/-Q/-q/ for modprobe options -maks ]
2009-03-20 22:48:05 +01:00
maximilian attems
b11f308d10 all_generic_ide: Also parse boolean bootoption
d-i uses to pass it with the value 1

Reported-by: Frans Pop <fjp@debian.org>
2008-12-18 00:45:28 +01:00
maximilian attems
7e82cbb4ff Revert "framebuffer: Let udev create fb devices."
udev isn't started at this point and therefore can't create framebuffer
devices. This causes usplash not to run on PS3.

set sane permissions will making the char files.

This reverts commit 0aec8b0c22b7622841c4ab7a3b492b4d2657456f.
2008-12-15 11:31:15 +01:00
Michal Pokrywka
87461ea463 framebuffer: Add support for uvesafb
Uvesafb framebuffer driver needs v86d userspace program
but when fb driver is modprobed at init-top stage of initrd,
/dev/zero and /dev/mem are missing because udev have not
been run yet.
2008-12-15 11:11:22 +01:00
maximilian attems
6244406a9c release 0.92d 2008-07-05 02:46:04 +02:00
maximilian attems
72a013043b add boot script loading ide-generic on all_generic_ide cmdline
thanks to Frans Pop <elendil@planet.nl> for report,
idea stolen from Ubuntu, adapted their boot script
same boot param.

closes: #485786

Signed-off-by: maximilian attems <maks@debian.org>
2008-07-05 02:06:02 +02:00
maximilian attems
d377e38823 framebuffer: Leave tty devices for udev too.
udev creates tty devices too, in the case of not using udev,
we need to ship more anyway, so no need to worry about that right now.
2008-03-25 14:47:17 +01:00
maximilian attems
0aec8b0c22 framebuffer: Let udev create fb devices.
nuke fb device mknod creation as udev creates the fb device nodes.
suggested by waldi. positive test on qemu with usplash.

let's see if we get a bad interaction with usplash and vga=XXX boots.
2008-03-25 14:40:45 +01:00
Michael Prokop
fd0b67f392 scripts/init-top/framebuffer: fix variable name
s/fbnum/fbno/
2007-09-05 22:22:20 +02:00
maximilian attems
971f6f7780 init-top/framebuffer: Check that fb minor is below 32.
you can only have up to 32 fb devices going from fb0 to fb31.
2007-09-01 10:56:59 +02:00
maximilian attems
7e0470e3fe nice usplash experience
tested both on my laptop as on qemu
ubuntu merge
2007-04-16 22:07:01 +02:00
David Härdeman
1541218fe1 Add support for loading keymaps. (closes: 337663) 2007-04-12 21:56:32 +02:00
maximilian attems
c4343742b3 first prerelease 0.86 + merge 0.85f
* kick mdrun script
* update control for lenny + ubuntu
* add _all_ ide, block and drivers
* use MODPROBE_OPTIONS and kill any modprobed arg
* small doc + whitespace fixes
2007-04-02 13:29:25 +02:00
maximilian attems
d21a00a234 - revert busybox hardlinking it's utitilites
- add drivers/ata
- rework the framebuffer boot script
- small docs changes
2006-12-21 10:18:28 +01:00
maximilian attems
78fe68bcad - allow to disable backup
- new bzr location
- functional copy_dir_modules()
- modprobe a bunch of ppc windfarm modules in thermal
- provide output on error
2006-12-02 18:51:54 +01:00
maximilian attems
efa60794a8 - enhance mbr_check()
- fix /boot ro check
- create fb devices unconditionaly
2006-11-02 09:30:03 +01:00
maximilian attems
dc67493c8b - improve run_bootloader (elilo, zipl)
- fix preinst sed command
- bunch of minor fixes
2006-10-18 13:16:03 +02:00
maximilian attems
849c7c5f29 - add backup handling to initramfs-tools
- allow conservative settings for skipping updated initramfs.
- debug output to screen
- parse mbr for lilo
+ small fixes
2006-10-13 08:52:12 +02:00
maximilian attems
5d46a04527 - take care of partial mdadm/lvm Sarge upgrades
this compat stuff can go once Etch is released
- framebuffer stuff for usplash
- don't leave modules file behind - thanks piuparts!
2006-07-29 14:49:39 +02:00
Jeff Bailey
8d50358249 Update with new dependancy based init system, call the right script directories, always use busybox now, sigh. 2005-06-13 01:40:55 +00:00
Jeff Bailey
ac222142f8 Add hookscripts 2005-06-09 17:23:35 +00:00