Skip to content

Commit

Permalink
added hooks/fb-video
Browse files Browse the repository at this point in the history
  • Loading branch information
tokiclover committed Feb 18, 2019
1 parent c7186ac commit a359f57
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 6 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ dist_HOOKS = \
bcache \
disable-bcache \
btrfs \
fb-video \
zfs \
mkswap-zfs\
zram
Expand Down
25 changes: 25 additions & 0 deletions hooks/fb-video
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# $Header: mkinitramfs-ll/hooks/bacache Exp $
# $Author: (c) 2011-19 tokiclover <[email protected]> Exp $
# $License: 2-clause/new/simplified BSD Exp $
#

[ -z "$video" ] && get_cmdline_option "video"

video() {
echo $$ >/run/${0##*/}.pid
local _bin name=fbset
$CHECK_ENV && debug -d check_bin fbset

fbset -fb /dev/fb0 -g "$1" "$2" "$1" "$2" "$3"

rm /run/${0##*/}.pid
}

if [ -n "$video" ]; then
debug video $(echo "$video" | sed 's,[x-], ,g')
fi

#
# vim:fenc=utf-8:ft=sh:ci:pi:sts=0:sw=4:ts=4:
#
13 changes: 8 additions & 5 deletions init
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#!/bin/sh
#
# $Header: mkinitramfs-ll/init Exp $
# $Author: (c) 2011-6 tokiclover <[email protected]> Exp $
# $License: 2-clause/new/simplified BSD Exp $
# $Version: 0.22.2 2016/06/06 12:33:03 Exp $
# $Header: mkinitramfs-ll/init Exp $
# $Author: (c) 2011-19 tokiclover <[email protected]> Exp $
# $License: 2-clause/new/simplified BSD Exp $
# $Version: 0.22.2 2019/01/12 12:33:03 Exp $
#
# WARNING: USE AT YOUR OWN RISK! EVERYTHING IS GIVEN “AS IS”, SEE COPYING FILE
#
Expand Down Expand Up @@ -154,7 +154,7 @@ for arg in $CMDLINE; do
case "$arg" in
([Rr][Ee][Ss][Cc][Uu][Ee]*|[Rr][Ss][Hh]*) rescue_shell=1;;
(ro|rw) rootflags="${rootflags:+$rootflags,}$arg";;
([Cbcdefhiklmnrsz]*=*) eval "$arg" ;;
([Cbcdefhiklmnrsvz]*=*) eval "$arg" ;;
esac
done
: ${rootfstype:=$rootfs}
Expand Down Expand Up @@ -219,6 +219,9 @@ exec 0<$CONSOLE 1>$CONSOLE 2>&1
eval_colors
set >/environ

if [ -n "$video" ]; then
debug dohook "$libdir/fb-video"
fi
if [ -n "$splash" ]; then
begin "Starting Splash"
splashd
Expand Down
9 changes: 8 additions & 1 deletion mkinitramfs-ll.5
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
.\" stated in the COPYING file that comes with the source files
.\"
.pc
.TH MKINITRAMFS-LL 1 "2017-07-02" "0.22.1" "File Format Manual"
.TH MKINITRAMFS-LL 5 "2019-02-18" "0.22.12" "File Format Manual"
.SH NAME
init \- an initramfs init script
.SH DESCRIPTION
Expand Down Expand Up @@ -102,6 +102,13 @@ T}
.TE
.SH OVERVIEW
.TP
.RB video=\fI2560x1600-32\fR
.br
This will set the video settings if
.I fb-video
hooks is included in the initramfs.
This can be used to force the correct video settings for buggy firmware.
.TP
.RB root=\fIdevice\fR
.rb
Set root required cmdline argument: \fIdevice\fR should be
Expand Down

0 comments on commit a359f57

Please sign in to comment.