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