책보고 따라하고 있는데
qemu-system-arm -M realview-pb-a8 -kernel navilos.axf -S -gdb tcp:1234,ipv4 이 명령어 치고
gdb
target remote:1234
이렇게 하면 연결이 되야하는데 타임아웃이 걸리네요
아마 첫줄 qemu-system-arm -M realview-pb-a8 -kernel navilos.axf -S -gdb tcp:1234,ipv4 부터 책이랑 좀 다르게 출력되는거 같은데
xcb_connection_has_error() returned true
shared memfd open() failed: Function not implemented
이런 에러가 나오는데 혹시 어떻게 해결하는지 아시나여 영어로 쳐봐도 뭘 모르겠네요;;;
navilos.axf 는 잘 있고 우분투 18.04 버전 쓰고 있습니다.
에러전문
xcb_connection_has_error() returned true
shared memfd open() failed: Function not implemented
pulseaudio: pa_context_connect() failed
pulseaudio: Reason: Connection refused
pulseaudio: Failed to initialize PA contextaudio: Could not init `pa' audio driver
xcb_connection_has_error() returned true
shared memfd open() failed: Function not implemented
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
ALSA lib confmisc.c:767:(parse_card) cannot find card '0'
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
ALSA lib confmisc.c:1246:(snd_func_refer) error evaluating name
ALSA lib conf.c:4528:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5007:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2495:(snd_pcm_open_noupdate) Unknown PCM default
alsa: Could not initialize DAC
alsa: Failed to open `default':
alsa: Reason: No such file or directory
audio: Failed to create voice `lm4549.out'
Could not initialize SDL(No available video device) - exiting
근데 pulseaudio~~ 에러는 나오는게 정상이라고 책에 쓰여있어요
책에선
pulseaudio: set_sink_input_volume() failed
pulseaudio: Reason: Invalid argument
pulseaudio: set_sink_mute() failed
pulseaudio: Reason: Invalid argument
에러 나오는건 정상이니까 이후에 있는게 생략인건지 없는건지 모르겠지만 저 에러는 걱정하지 말라고 하는데 저랑 에러부터가 다르네요;;
무슨 책
임베디드 OS개발 프로젝트-arm 기반 펌웨어/RTOS의 원리와 구조
-gdb tcp::1234아님?
그거하도xcb 커넥션은 또 뜨네여 ㅠ
libxcb가 없거나 버전 안 맞는 거 아님?
shared memfd open() failed 다음에 뭐라고 나옴? 에러 전문을 들고오셈
전문 첨부했어요. 책에서 에러나오는건 정상이라고 하는데 에러가 책이랑 다르게 나오네요
x window 실행시켰나요?
책에서는 그냥 터미널로 하던데여
위에 보면 xcb_connection 에러 난다고 하잖아요. 그게 무슨 의미냐면요... xcb_connect () 에러 난다는거 같거든요? 그 함수는 XOpenDisplay()에 대응하는 함수에요
X 서버와 접속할 때 쓰는거죠. 모든 X 어플이 실행될 때, XOpenDisplay 함수 또는 xcb_connect() 함수를 실행합니다. 그러니까.. X 서버(xorg) 를 실행하지 않는 상태에서 X 어플을 실행시키면 100% 에러가 납니다.
wsl 에서 하니까 X 가 없으니 에러가 뻐벅 떨어지지요. 에러 나는 것은 당연하네요
sound mount 문제네.... 이미지 자체의 문제일 수도 있음
아 해결 방법있네. ~/.config/pulse/cookie 파일을 /root/.config/pulse/cookie 여기로 복사하고 /root/.config/pulse/client.conf 파일에서 default-server = unix:/run/user/$ID/pulse/native 추가하셈
wsl에서 하는중인데 /root/ 아래에 아무것도 없는데 이게 맞나요 원래?
ㅇㅇ root 아래에 아무것도 없는 경우들 있음. 근데 wsl에서 안하는걸 추천함. wsl은 가상환경이고 wsl 자체가 하드웨어 엑세스 가능한 영역이 많지 않음. alsa, pulseaudio 말고도 나중에 문제 많이 터질 수 있음
친절한 설명 감사합니다 :)
wsl 위에서 qemu를 돌린다고? 난 비추...
아니 애초에 wsl은 가상화 지원 안하지 않나 도커도 안돌아가는걸로 아는데
가상화 문제는 이슈거리가 별로 안될거임. 도커는 로우 엑세스 못해서 그렇고. qemu로 저스펙 임베디드 돌리면 어차피 CPU 연산이라 큰 문제는 없을건데 고성능 임베디드 에뮬레이션은 로우 엑세스 (지금처럼 ALSA나 Graphic) 필요해서 지원 아마 안될거임.
사실 gui도 xming 같은 ssh X11 forwarding 하면 되긴 하는데 이 시스템 자체가 로우엑세스를 필요로 하면 지금처럼 문제 터짐. 즉 우회가 불가능하면 높은 확률로 문제가 계속 터질거임.