Я построил небольшой linux с помощью Buildroot. Я включил QT для встроенных и поддерживал устройства фреймбуфера, но я не смог запустить из него примеры Qt. Я хочу запустить графический интерфейс без X-сервера.Qt для встроенных: не удается открыть устройство фреймбуфера
При запуске /usr/share/qt/examples/qws/framebuffer/framebuffer -qws
Я получаю следующее сообщение об ошибке:
Error: cannot open framebuffer device: No such file or directory.
Выход ls /dev/fb*
является: выход
/dev/fb0 /dev/fb1 /dev/fb2 /dev/fb3
Трассирования:
execve("./framebuffer", ["./framebuffer", "-qws"], [/* 16 vars */]) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_UNINITIALIZED, -1, 0) = 0xb7701000
open("/lib/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/lib/libstdc++.so.6", O_RDONLY) = -1 ENOENT (No such file or directory)
open("/usr/lib/libstdc++.so.6", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=751308, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_UNINITIALIZED, -1, 0) = 0xb7700000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0004o\4\0004\0\0\0"..., 4096) = 4096
mmap2(NULL, 778240, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7642000
mmap2(0xb7642000, 729051, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb7642000
mmap2(0xb76f4000, 20864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xb2000) = 0xb76f4000
mmap2(0xb76fa000, 22428, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb76fa000
close(3) = 0
munmap(0xb7700000, 4096) = 0
open("/lib/libm.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=45864, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_UNINITIALIZED, -1, 0) = 0xb7700000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0 \33\0\0004\0\0\0"..., 4096) = 4096
mmap2(NULL, 53248, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7635000
mmap2(0xb7635000, 43784, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb7635000
mmap2(0xb7640000, 4100, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0xa000) = 0xb7640000
close(3) = 0
munmap(0xb7700000, 4096) = 0
open("/lib/libgcc_s.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=86600, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_UNINITIALIZED, -1, 0) = 0xb7700000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0t\36\0\0004\0\0\0"..., 4096) = 4096
mmap2(NULL, 90112, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb761f000
mmap2(0xb761f000, 85004, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb761f000
mmap2(0xb7634000, 3536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x14000) = 0xb7634000
close(3) = 0
munmap(0xb7700000, 4096) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=392428, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_UNINITIALIZED, -1, 0) = 0xb7700000
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0\256\0\0004\0\0\0"..., 4096) = 4096
mmap2(NULL, 413696, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb75ba000
mmap2(0xb75ba000, 385628, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xb75ba000
mmap2(0xb7619000, 4868, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED, 3, 0x5e000) = 0xb7619000
mmap2(0xb761b000, 15928, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb761b000
close(3) = 0
munmap(0xb7700000, 4096) = 0
open("/lib/libm.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=45864, ...}) = 0
close(3) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=392428, ...}) = 0
close(3) = 0
stat("/lib/ld-uClibc.so.0", {st_mode=S_IFREG|0755, st_size=25296, ...}) = 0
open("/lib/libgcc_s.so.1", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=86600, ...}) = 0
close(3) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=392428, ...}) = 0
close(3) = 0
open("/lib/libc.so.0", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0755, st_size=392428, ...}) = 0
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_UNINITIALIZED, -1, 0) = 0xb7700000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb77006b0, limit:1048575, seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1, seg_not_present:0, useable:1}) = 0
mprotect(0xb76f4000, 16384, PROT_READ) = 0
mprotect(0xb7640000, 4096, PROT_READ) = 0
mprotect(0xb7619000, 4096, PROT_READ) = 0
mprotect(0xb7708000, 4096, PROT_READ) = 0
ioctl(0, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 opost isig icanon echo ...}) = 0
brk(0) = 0x9093000
brk(0x9094000) = 0x9094000
open("-qws", O_RDWR) = -1 ENOENT (No such file or directory)
write(2, "Error: cannot open framebuffer d"..., 37Error: cannot open framebuffer device) = 37
write(2, ": ", 2:) = 2
write(2, "No such file or directory", 25No such file or directory) = 25
write(2, "\n", 1
) = 1
exit_group(1) = ?
+++ exited with 1 +++
(Не знайте, что это значит)
Если я запускаю пример калькулятора с:
usr/share/qt/examples/widgets/calculator -qws
QLock::QLock: Cannot create semaphore /tmp/qtembedded-0/QtEmbedded-0 'd' (38, Function not implemented)
Cannot get display lock
Aborted
Добавлен вывод в strace – AlexandruC
Это не так ... Я на самом деле запускаю его без пробела, это была ошибка типа здесь. Прости. Если я запускаю пример фреймбуфера без каких-либо параметров, он показывает черный экран, если я пытаюсь запустить пример ./calculator -qws. Я получаю добавленную ошибку (отредактированный asnwer) – AlexandruC