qemu-discuss
[Top][All Lists]
Advanced

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

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


From: poxyran
Subject: Re: [Qemu-discuss] qemu-system-arm error when emulatting firmware
Date: Wed, 1 Nov 2017 15:31:12 -0300
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0


On 11/1/2017 1:07 PM, Peter Maydell wrote:
> 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 :-)
Well, with some errors but booted up :)
>
>> 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?
I just removed the "console=ttys0" and tried again but I got the same
result :(
>
> 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.
I was looking around the firmware files and saw that /etc/inittab has
the following information:

::sysinit:/etc/rc.d/rcS start
::respawn:/bin/sh < /dev/ttyS0 2>&1 > /dev/ttyS0
::restart:/sbin/init

is there any way to workaround this?

> thanks
> -- PMM




reply via email to

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