我目前正在 Compulab 的开发板上运行轻量级 Debian 发行版。我每次都必须通过串口登录系统。系统有图形卡,已安装驱动程序并检测到显示器,但系统似乎未配置为通过图形驱动程序输出?我该如何配置 Linux 才能做到这一点?
root@cm-debian:~# dmesg|grep hdmi
mxc_sdc_fb mxc_sdc_fb.1: register mxc display driver hdmi
mxc_hdmi mxc_hdmi: Detected HDMI controller 0x13:0xa:0xa0:0xc1
mxc_hdmi_soc mxc_hdmi_soc.0: MXC HDMI Audio
asoc: mxc-hdmi-soc <-> imx-hdmi-soc-dai.0 mapping ok
#1: imx-hdmi-soc
当插件 hdmi 电缆 dmesg 显示以下输出时
fbcvt: 1920x1080@50: CVT Name - 2.073M9
猫 /etc/inttab
# /etc/inittab: init(8) configuration.
# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $
# The default runlevel.
id:2:initdefault:
# Boot-time system configuration/initialization script.
# This is run first except when booting in emergency (-b) mode.
si::sysinit:/etc/init.d/rcS
# What to do in single-user mode.
~~:S:wait:/sbin/sulogin
# /etc/init.d executes the S and K scripts upon change
# of runlevel.
#
# Runlevel 0 is halt.
# Runlevel 1 is single-user.
# Runlevels 2-5 are multi-user.
# Runlevel 6 is reboot.
l0:0:wait:/etc/init.d/rc 0
l1:1:wait:/etc/init.d/rc 1
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 3
l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
l6:6:wait:/etc/init.d/rc 6
# Normally not reached, but fallthrough in case of emergency.
z6:6:respawn:/sbin/sulogin
# What to do when CTRL-ALT-DEL is pressed.
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
# Action on special keypress (ALT-UpArrow).
#kb::kbrequest:/bin/echo "Keyboard Request--edit /etc/inittab to let this work."
# What to do when the power fails/returns.
pf::powerwait:/etc/init.d/powerfail start
pn::powerfailnow:/etc/init.d/powerfail now
po::powerokwait:/etc/init.d/powerfail stop
# /sbin/getty invocations for the runlevels.
#
# The "id" field MUST be the same as the last
# characters of the device (after "tty").
#
# Format:
# <id>:<runlevels>:<action>:<process>
#
# Note that on most Debian systems tty7 is used by the X Window System,
# so if you want to add more getty's go ahead but skip tty7 if you run X.
#
1:2345:respawn:/sbin/getty 38400 tty1
2:23:respawn:/sbin/getty 38400 tty2
3:23:respawn:/sbin/getty 38400 tty3
4:23:respawn:/sbin/getty 38400 tty4
5:23:respawn:/sbin/getty 38400 tty5
6:23:respawn:/sbin/getty 38400 tty6
# Example how to put a getty on a serial line (for a terminal)
#
#T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
#T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100
T0:23:respawn:/usr/local/bin/getty.sh
# Example how to put a getty on a modem line.
#
#T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3
答案1
您要做的第一件事是确认内核是否确实有可用于显示器的驱动程序。
网上搜索一下linux相关的卡,看看能否找到驱动程序的名称。如果您有可用的内核源代码树,您还可以在那里寻找线索:
find src/ -name Kconfig -print -exec grep 'some phrase' '{}' \;
其中“某些短语”是制造商和/或型号等。这些Kconfig
文件包含手动编译内核时“make menuconfig”使用的信息。
如果您认为您有候选人,请尝试使用 加载它modprobe [name]
。
如果内核是专门为该板编译的,则驱动程序可能会内置到其中 - 但如果是这种情况,您应该不会遇到问题。如果不是,内核需要 initramfs.img 中的驱动程序。如果它不存在,一旦安装了根文件系统,即使它检测到显示器并加载驱动程序(来自/lib/modules
),我认为它也不会对其执行任何操作 - 我有一段时间没有尝试过此操作。届时,您可以查看输出,lsmod
看看您认为应该是驱动程序的模块是否已实际加载。