This repository was archived by the owner on Feb 27, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 11 files changed +168
-0
lines changed Expand file tree Collapse file tree 11 files changed +168
-0
lines changed Original file line number Diff line number Diff line change @@ -343,6 +343,7 @@ BR2_PACKAGE_P7ZIP=y
343343BR2_PACKAGE_PARTCLONE=y
344344BR2_PACKAGE_RECOVERY=y
345345BR2_PACKAGE_RPI_WIFI_FIRMWARE=y
346+ BR2_PACKAGE_CON2FBMAP=y
346347
347348#
348349# Audio and video applications
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ menu "Target packages"
66 source "package/partclone/Config.in"
77 source "package/recovery/Config.in"
88 source "package/rpi-wifi-firmware/Config.in"
9+ source "package/con2fbmap/Config.in"
910
1011menu "Audio and video applications"
1112 source "package/alsa-utils/Config.in"
Original file line number Diff line number Diff line change 1+ config BR2_PACKAGE_CON2FBMAP
2+ bool "con2fbmap"
3+ ### build dependencies
4+ ### runtime dependencies
5+ help
6+ Change tty console to a different framebuffer device /dev/fbX
7+
Original file line number Diff line number Diff line change 1+ # ############################################################
2+ #
3+ # con2fbmap system
4+ #
5+ # ############################################################
6+
7+
8+ CON2FBMAP_VERSION = 1.0
9+ CON2FBMAP_SITE = $(TOPDIR ) /../con2fbmap
10+ CON2FBMAP_SITE_METHOD = local
11+ CON2FBMAP_LICENSE = BSD-3c
12+ CON2FBMAP_LICENSE_FILES = LICENSE.txt
13+ CON2FBMAP_INSTALL_STAGING = NO
14+
15+ define CON2FBMAP_BUILD_CMDS
16+ cd $(@D )
17+ $(MAKE ) -C $(@D ) all
18+ $(TARGET_STRIP ) $(@D ) /con2fbmap
19+ endef
20+
21+ define CON2FBMAP_INSTALL_TARGET_CMDS
22+ $(INSTALL ) -m 0755 $(@D ) /con2fbmap $(TARGET_DIR ) /usr/bin/con2fbmap
23+ endef
24+
25+ $(eval $(generic-package))
Original file line number Diff line number Diff line change @@ -33,6 +33,30 @@ echo 2 >/sys/module/vt/parameters/cur_default
3333# Enable syslog
3434/etc/init.d/S01logging start > /dev/null
3535
36+ present=` tvservice -l | sed -n -e ' s|^Display Number \(.*\),.*$|\1| p' `
37+ for dev in $present ; do
38+ fitted=` tvservice -n -v $dev 2> /dev/null`
39+ if [[ " $fitted " != " " ]]; then
40+ case $dev in
41+ 0) # 7in Touchscreen
42+ export QWS_DISPLAY=" LinuxFb:/dev/fb0"
43+ break ;
44+ ;;
45+ 2) # normal HDMI0
46+ export QWS_DISPLAY=" LinuxFb:/dev/fb0"
47+ break ;
48+ ;;
49+ 7) # Secondary HDMI1
50+ export QWS_DISPLAY=" LinuxFb:/dev/fb1"
51+ /usr/bin/con2fbmap 2 1
52+ /usr/bin/con2fbmap 3 1
53+ break ;
54+ ;;
55+ esac
56+ fi
57+ done
58+
59+
3660if grep -q vncinstall /proc/cmdline; then
3761 # VNC server mode. Mainly useful for making screenshots
3862 export QWS_DISPLAY=" VNC:size=800x600:depth=32:0"
Original file line number Diff line number Diff line change 1+ export PS1=" \u@\h:\w# "
2+
Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ define RECOVERY_INSTALL_TARGET_CMDS
3333 $(INSTALL ) -m 0755 package/recovery/unicode-fonts/NanumBarunGothicBold.ttf $(TARGET_DIR ) /usr/lib/fonts/NanumBarunGothicBold.ttf
3434 $(INSTALL ) -m 0755 package/recovery/data/data $(TARGET_DIR ) /usr/data
3535 $(INSTALL ) -m 0644 $(@D ) /cmdline.txt $(BINARIES_DIR ) /cmdline.txt
36+ $(INSTALL ) -m 0755 package/recovery/profile $(TARGET_DIR ) /root/.profile
37+
3638 mkdir -p $(TARGET_DIR ) /keymaps/
3739 $(INSTALL ) -m 0755 package/recovery/keymaps/* $(TARGET_DIR ) /keymaps/
3840 $(INSTALL ) -m 0644 package/recovery/wpa_supplicant.conf $(TARGET_DIR ) /etc/wpa_supplicant.conf
Original file line number Diff line number Diff line change @@ -5,3 +5,4 @@ fixup_file=fixup_rc.dat
55[pi4]
66start_file=recover4.elf
77fixup_file=fixup4rc.dat
8+ max_framebuffers=2
Original file line number Diff line number Diff line change 1+ CC =$(PWD ) /output/host/usr/bin/arm-buildroot-linux-uclibcgnueabi-gcc
2+
3+ all : con2fbmap
4+ $(MAKE ) $(AM_MAKEFLAGS ) con2fbmap
5+
6+ con2fbmap : con2fbmap.c
7+ $(CC ) -static con2fbmap.c -o con2fbmap
8+
9+
10+
Original file line number Diff line number Diff line change 1+ .TH con2fbmap 1 2006-01-18 2.1 "Linux frame buffer utils"
2+ .SH NAME
3+ con2fbmap \- shows and sets mapping between consoles and framebuffer devices.
4+ .SH SYNOPSIS
5+ .B con2fbmap
6+ .RI console
7+ .RI [ framebuffer ]
8+ .SH DESCRIPTION
9+ .B This documentation is not finished
10+ .PP
11+ .B con2fbmap
12+ is a system utility to show or change the mapping of the consoles to the
13+ frame buffer device. The frame buffer device provides a simple and unique
14+ interface to access different kinds of graphic displays.
15+ .PP
16+ Frame buffer devices are accessed via special device nodes located in the
17+ /dev directory. The naming scheme for these nodes is always
18+ .IR \fB fb < n >,
19+ where
20+ .I n
21+ is the number of the used frame buffer device.
22+ .PP
23+ .SH OPTIONS
24+ The first option must be there, and identify the console on which to work.
25+ If the second option is not set, con2fbmap shows the current mapping of
26+ identified console. If the second argument is given (as a number) con2fbmap
27+ maps the identified console to said framebuffer device.
28+ .TP
29+
You can’t perform that action at this time.
0 commit comments