[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-discuss] qemu-system-arm error when emulatting firmware

From: Peter Maydell
Subject: Re: [Qemu-discuss] qemu-system-arm error when emulatting firmware
Date: Wed, 1 Nov 2017 16:07:24 +0000

On 1 November 2017 at 13:34, poxyran <address@hidden> wrote:
> Hi all!,
> I'm trying to emulate a firmware from a DLink IP camera using
> qemu-system-arm but I'm facing some troubles.
> I'm using the following command line:
> address@hidden:~/QEMU/armel$ sudo qemu-system-arm -M versatilepb -kernel
> vmlinuz-2.6.32-5-versatile -initrd
> /home/fastix/dcs-942l/binary_blob.bin.swap_unpacked/initramfs.cpio -hda
> debian_squeeze_armel_standard.qcow2 -serial stdio -append
> "root=/dev/sda1 console=ttyAMA0 console=ttyS0 init=/bin/ash" -net nic
> -net tap
> Even though I get some errors related to devices that are not present,
> the firmware seems to boot OK but at the end, I got the following error:

I'm a bit surprised it worked at all, really :-)

> starting pid 11724, tty '': '/bin/sh < /dev/ttyS0 2>&1 > /dev/ttyS0'
> /bin/sh: can't open /dev/ttyS0: no such file[: bad number

This is because for the versatile platform the serial ports
are named ttyAMA0, ttyAMA1, not ttyS0 (and have different
device major/minor numbers). Does just dropping 'console=ttyS0'
from your command line fix this?

Otherwise if you need to run some script inside the guest
that assumes ttyS0 you may be able to work around it by
hacking around with the /dev/ files (assuming they're not
autocreated by udev or similar).

You'll find that anything in the guest filesystem that
expects to know what the actual hardware is (eg that
talks to the camera) won't work, of course.

-- PMM

reply via email to

[Prev in Thread] Current Thread [Next in Thread]