![Linux(Buildroot内置)启动后运行不正确 X11](https://linux22.com/image/204329/Linux%EF%BC%88Buildroot%E5%86%85%E7%BD%AE%EF%BC%89%E5%90%AF%E5%8A%A8%E5%90%8E%E8%BF%90%E8%A1%8C%E4%B8%8D%E6%AD%A3%E7%A1%AE%20X11.png)
构建了一个Linux镜像建根2022.02。加载到真实硬件上后,没有鼠标光标显示。鼠标本身正在工作(亮起),但单击鼠标后没有发生任何可见操作。键盘无法工作(罗技键盘 K120)。一切都通过 USB 2.0 连接。屏幕是黑色的。我在黑屏前看到的最后一件事是 X-server 的启动。按关闭按钮,屏幕将被终端取代,计算机将关闭。我不明白我在配置中错过了什么。我看不到日志,因为键盘无法切换到另一个会话。
我附上了配置以及我关闭电脑时拍摄到的照片。
更新:设法设置 SSH 并通过网络连接来查看日志。结论如下:
[ 134.584]
X.Org X Server 1.21.1.2
X Protocol Version 11, Revision 0
[ 134.584] Current Operating System: Linux buildroot 4.19.204 #1 SMP Tue Apr 5 15:54:34 MSK 2022 x86_64
[ 134.584] Kernel command line: BOOT_IMAGE=/boot/bzImage root=/dev/sda1 rootwait console=tty1
[ 134.584]
[ 134.584] Current version of pixman: 0.40.0
[ 134.584] Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
[ 134.584] Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[ 134.584] (==) Log file: "/var/log/Xorg.0.0.log", Time: Tue Apr 5 13:11:22 2022
[ 134.586] (==) Using system config directory "/usr/share/X11/xorg.conf.d"
[ 134.612] (==) No Layout section. Using the first Screen section.
[ 134.612] (==) No screen section available. Using defaults.
[ 134.612] (**) |-->Screen "Default Screen Section" (0)
[ 134.612] (**) | |-->Monitor "<default monitor>"
[ 134.613] (==) No monitor specified for screen "Default Screen Section".
Using a default monitor configuration.
[ 134.613] (==) Automatically adding devices
[ 134.613] (==) Automatically enabling devices
[ 134.613] (==) Automatically adding GPU devices
[ 134.613] (==) Automatically binding GPU devices
[ 134.613] (==) Max clients allowed: 256, resource mask: 0x1fffff
[ 134.635] (WW) The directory "/usr/share/fonts/X11//TTF/" does not exist.
[ 134.635] Entry deleted from font path.
[ 134.635] (WW) The directory "/usr/share/fonts/X11//OTF/" does not exist.
[ 134.635] Entry deleted from font path.
[ 134.635] (WW) The directory "/usr/share/fonts/X11//Type1/" does not exist.
[ 134.635] Entry deleted from font path.
[ 134.635] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/X11//100dpi/".
[ 134.635] Entry deleted from font path.
[ 134.635] (Run 'mkfontdir' on "/usr/share/fonts/X11//100dpi/").
[ 134.636] (WW) `fonts.dir' not found (or not valid) in "/usr/share/fonts/X11//75dpi/".
[ 134.636] Entry deleted from font path.
[ 134.636] (Run 'mkfontdir' on "/usr/share/fonts/X11//75dpi/").
[ 134.636] (==) FontPath set to:
/usr/share/fonts/X11//misc/
[ 134.636] (==) ModulePath set to "/usr/lib/xorg/modules"
[ 134.636] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 134.636] (II) Loader magic: 0x55cffd178020
[ 134.636] (II) Module ABI versions:
[ 134.636] X.Org ANSI C Emulation: 0.4
[ 134.636] X.Org Video Driver: 25.2
[ 134.636] X.Org XInput driver : 24.4
[ 134.636] X.Org Server Extension : 10.0
[ 134.637] (II) xfree86: Adding drm device (/dev/dri/card0)
[ 134.637] (II) Platform probe for /sys/devices/pci0000:00/0000:00:01.0/drm/card0
[ 134.641] (--) PCI:*(0@0:1:0) 1002:9851:1565:170a rev 64, Mem @ 0xd0000000/268435456, 0xe0000000/8388608, 0xfea00000/262144, I/O @ 0x0000f000/256, BIOS @ 0x????????/131072
[ 134.641] (II) Open ACPI successful (/var/run/acpid.socket)
[ 134.641] (==) Matched ati as autoconfigured driver 0
[ 134.641] (==) Matched modesetting as autoconfigured driver 1
[ 134.641] (==) Matched fbdev as autoconfigured driver 2
[ 134.641] (==) Matched vesa as autoconfigured driver 3
[ 134.641] (==) Assigned the driver to the xf86ConfigLayout
[ 134.641] (II) LoadModule: "ati"
[ 134.644] (WW) Warning, couldn't open module ati
[ 134.644] (EE) Failed to load module "ati" (module does not exist, 0)
[ 134.644] (II) LoadModule: "modesetting"
[ 134.644] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 134.662] (II) Module modesetting: vendor="X.Org Foundation"
[ 134.662] compiled for 1.21.1.2, module version = 1.21.1
[ 134.662] Module class: X.Org Video Driver
[ 134.662] ABI class: X.Org Video Driver, version 25.2
[ 134.662] (II) LoadModule: "fbdev"
[ 134.662] (II) Loading /usr/lib/xorg/modules/drivers/fbdev_drv.so
[ 134.668] (EE) Failed to load /usr/lib/xorg/modules/drivers/fbdev_drv.so: (null)
[ 134.668] (EE) Failed to load module "fbdev" (loader failed, 0)
[ 134.668] (II) LoadModule: "vesa"
[ 134.668] (II) Loading /usr/lib/xorg/modules/drivers/vesa_drv.so
[ 134.675] (EE) Failed to load /usr/lib/xorg/modules/drivers/vesa_drv.so: (null)
[ 134.675] (EE) Failed to load module "vesa" (loader failed, 0)
[ 134.675] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[ 134.675] (++) using VT number 1
[ 134.675] (WW) xf86OpenConsole: setpgid failed: Operation not permitted
[ 134.676] (II) modeset(0): using drv /dev/dri/card0
[ 134.676] (II) modeset(0): Creating default Display subsection in Screen section
"Default Screen Section" for depth/fbbpp 24/32
[ 134.676] (==) modeset(0): Depth 24, (==) framebuffer bpp 32
[ 134.676] (==) modeset(0): RGB weight 888
[ 134.676] (==) modeset(0): Default visual is TrueColor
[ 134.676] (II) modeset(0): No glamor support in the X Server
.............
更新:视频驱动程序包含在构建中。配置文件附在上面。
#
# xf86-video-amdgpu needs egl/opengl support from mesa3d
#
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_ARK is not set
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_AST is not set
BR2_PACKAGE_XDRIVER_XF86_VIDEO_ATI=y
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_CIRRUS is not set
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_DUMMY is not set
BR2_PACKAGE_XDRIVER_XF86_VIDEO_FBDEV=y
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_FBTURBO is not set
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_GLINT is not set
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_I128 is not set
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_INTEL is not set
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_MACH64 is not set
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_MGA is not set
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_NEOMAGIC is not set
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_NOUVEAU is not set
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_NV is not set
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_OPENCHROME is not set
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_QXL is not set
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_R128 is not set
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_SAVAGE is not set
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_SILICONMOTION is not set
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_SIS is not set
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_TDFX is not set
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_TGA is not set
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_TRIDENT is not set
BR2_PACKAGE_XDRIVER_XF86_VIDEO_VESA=y
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_VMWARE is not set
# BR2_PACKAGE_XDRIVER_XF86_VIDEO_VOODOO is not set