]> git.pld-linux.org Git - projects/geninitrd.git/blob - mod-uvesafb.sh
no need to mess with magic values, let the "magic" be value
[projects/geninitrd.git] / mod-uvesafb.sh
1 #!/bin/sh
2 UVESAFB_RCSID='$Revision$ $Date::                            $'
3
4 # geninitrd mod: uvesafb
5 USE_V86D=${USE_V86D:-yes}
6
7 # whether v86d should be installed
8 need_uvesafb=no
9
10 # setup geninitrd module
11 # @access       public
12 setup_mod_uvesafb() {
13         v86d=$(find_tool $initrd_dir/v86d /sbin/v86d)
14
15         if [ ! -x "$v86d" ]; then
16                 USE_V86D=no
17         fi
18 }
19
20 # find modules for for fbsplash
21 # @access       public
22 find_modules_uvesafb() {
23         if ! is_yes "$USE_V86D"; then
24                 return
25         fi
26
27         # if we are adding uvesafb, we need v86d as well
28         local m
29         for m in $MODULES; do
30                 if [[ "$m" = *uvesafb* ]]; then
31                         need_uvesafb=yes
32                 fi
33         done
34 }
35
36 # generate initrd fragment
37 # @access       public
38 initrd_gen_uvesafb() {
39         if ! is_yes "$need_uvesafb"; then
40                 return
41         fi
42
43         debug "initrd_gen_uvesafb"
44         mknod $DESTDIR/dev/mem c 1 1
45         mknod $DESTDIR/dev/tty1 c 4 1
46         inst_d /sbin
47         inst_exec $v86d /sbin
48 }
49
50 initrd_gen_stop_uvesafb() {
51         if ! is_yes "$need_uvesafb"; then
52                 return
53         fi
54
55         busybox_applet killall
56         add_linuxrc     <<-'EOF'
57                 killall v86d
58         EOF
59 }
This page took 0.072613 seconds and 3 git commands to generate.