Closed loic-yvonnet closed 4 years ago
Hi @loic-yvonnet,
Thanks for the extremely easy to follow instructions on reproducing the issue.
PS: I am new to the Yocto project and QEMU. It may not be a good idea to run QEMU on top of a Docker container. I am simply trying to see if I can run everything from a container.
Running qemu inside of the container should work. I reproduced the issue you mentioned, and I think the hang you are seeing is because there is no tty. If you instead tried to run runqemu in the shell started from docker run
, I expect it should work.
You could also copy run.sh into workdir and run
docker exec -w /workdir -u pokyuser -it yocto-dev /workdir/run.sh
Unfortunately, I'm unsure if there is a way to use your original command. Because you will likely get the following error if you try using a tty with your original command.
$ sudo docker exec -w /workdir -u pokyuser -it yocto-dev bash < run.sh
the input device is not a TTY
Hi @rewitt1,
Many thanks for your quick answer. I confirm that the following worked for me:
You could also copy run.sh into workdir and run docker exec -w /workdir -u pokyuser -it yocto-dev /workdir/run.sh
Thanks a lot.
In summary, QEMU hangs in the CROPS/Poky Docker container after the login prompt.
The problem may be reproduced from a Ubuntu 18.04 host by following these steps:
In a terminal, type:
In a different terminal, create a file named
compile.sh
:Create a file named
run.sh
:Finally, type:
Actual result:
Expected result:
On the other hand, compiling and running the core-image-minimal from the Ubuntu 18.04 host in QEMU works as expected.
Is there a workaround to run QEMU from a Docker container?
PS: I am new to the Yocto project and QEMU. It may not be a good idea to run QEMU on top of a Docker container. I am simply trying to see if I can run everything from a container.