How to run Bash on QEMU ARM

Norman Feske norman.feske at ...1...
Wed Feb 29 12:50:17 CET 2012


Hello,

> It seems that Bash in the latest release and Noux are only for x86, but I want to run them on QEMU ARM(pbxa9).
> So, I modified ports/mk/noux.mk, ports/run/noux.run and ports/run/noux_bash.run as below.
>      ports/mk/noux.mk
>           commented out #43: #REQUIRES += x86 
>      ports/run/noux.run, noux_bash.run
>          commented out first four lines which inquire if the target system is x86_32.

it's pretty cool that you are venturesome enough to remove those
precautions. The reason Noux is limited to x86_32 so far is plain and
simply that I wanted to keep the problem space at a reasonable level. If
you want to explore running Noux on ARM, that's great. But you are
walking into unknown territory here. .-)

BTW, please note that there is further x86-specific stuff slumbering in
the 'noux.mk' file.

> Then, I've managed to run Bash, but wasn't able to execute any bash command successfully. 
> I can see my keyboard inputs on the bash console, but the enter key doesn't work. It just shows an error, "unsupported ioctl (request=0x802c7415 "

I don't know the reason from the top of my head and would need to debug
the problem as well: Finding out what Bash is trying to do, and why it
fails. Maybe, demystifying the ioctl opcode 0x802c7415 will help you to
pinpoint the problem?

> Could you tell me what's wrong? Also, where to put my own program to execute through the bash?

At the current stage, we simply supply a tar archive to the Noux
environment, which is then used as file system. The 'noux_bash.run'
script includes the commands for generating the tar archive right after
the build stage (look for the "exec tar ..." commands). To customize the
file system visible to Noux, simply add your stuff to the tar archive by
customizing the run script.

However, please consider the intended use of Noux: It is not meant to
spawn normal Genode programs. Noux processes are limited to the
classical command-line based Unix userland. That is by intention.

> Plus, what's required to run bash_vim on QEMU ARM?

The funny thing is: I just gave the 'noux_vim.run' script a try on
'foc_pbxa9' (removing the check for x86_32 at the begin of the run
script) and it works! That's quite unexpected. .-)

I'm afraid that putting VIM into the noux_bash.run script doesn't make
too much sense at the moment. Currently, the Unix environment variables
are not inherited by processes created via fork/execve. So the TERM
variable is not supplied to VIM. But the correct TERM value is essential
for running ncurses-based programs such as VIM. Proper passing of the
Unix environment and current working directory are the actually the next
todo items for Noux.

Cheers
Norman

-- 
Dr.-Ing. Norman Feske
Genode Labs

http://www.genode-labs.com · http://genode.org

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth




More information about the users mailing list