help: failed to use qemu
Joel Sherrill
joel.sherrill at OARcorp.com
Wed Feb 11 14:50:44 UTC 2009
Daron Chabot wrote:
> I've had some limited success with the Etherboot/TFTP approach to
> launching RTEMS networking apps with Qemu. Specifically, Till's
> GeSys-2.4 (using TFTP FS). However, I'm getting ne2000 error messages
> (see Qemu output below).
>
I've never seen this with my tests on qemu ne2000. My
network configuration file for qemu is in the network-demos
CVS modules as "networkconfig-qemu.h".
PowerMan... I put some notes a few sample executables
in ftp under /pub/rtems/people/joel/qemu. I think the
console is left directed to VGA on these since -serial stdio
does not work on MS-Windows.
I am trying to have a configuration to do a demo with
at a university next Monday.
> Command line:
> ---------------------------------------------
> qemu -no-reboot -m 128 -boot n -tftp ./o-optimize -bootp /rtems.exe -
> serial stdio
> -net nic,macaddr=00:ab:cd:ef:12:34 -net user,hostname=foo.bar
>
> RTEMS network config:
> ---------------------------------------------
> static char ethernet_address[6] = { 0x00, 0xab, 0xcd, 0xef, 0x12,
> 0x34 };
> static struct rtems_bsdnet_ifconfig netdriver_config[1] = {{
> NIC_NAME, /* name */
> NIC_ATTACH, /* attach function */
> 0, /* link to next interface */
> FIXED_IP_ADDR,
> FIXED_NETMASK,
> ethernet_address,
> irno:9,
> port:0xc100
> }};
>
> struct rtems_bsdnet_config rtems_bsdnet_config = {
> &netdriver_config[0], /* Network interface */
> #ifdef NIC_NAME
> RTEMS_DO_BOOTP,/* Use BOOTP to get network configuration */
> #else
> 0, /* Use BOOTP to get network
> configuration */
> #endif
> NETWORK_TASK_PRIORITY, /* Network task priority */
> #if defined(MEMORY_CUSTOM)
> MEMORY_CUSTOM,
> #elif defined(MEMORY_SCARCE)
> 100*1024, /* MBUF space */
> 200*1024, /* MBUF cluster space */
> #elif defined(MEMORY_HUGE)
> 2*1024*1024, /* MBUF space */
> 5*1024*1024, /* MBUF cluster space */
> #else
> 180*1024, /* MBUF space */
> 350*1024, /* MBUF cluster space */
> #endif
> };
>
> Qemu stdout:
> -------------------------------------------------------------------
>
> djc at TooLBox--> qemu -no-reboot -m 128 -boot n -tftp ./o-optimize -
> bootp /rtems.exe -serial stdio -net nic,macaddr=00:ab:cd:ef:12:34 -
> net user,hostname=foo.bar2009-02-11 08:13:12.358 i386-softmmu[27925] KO
> Welcome to RTEMS GeSys
> This system $Name: GeSys_2_4 $ was built on 20090210CST22:02:10
> $Id: init.c,v 1.43 2008/03/22 20:36:13 guest Exp $
> Installing TIOCGWINSZ line discipline: ok.
> To skip initialization, press a key now...
> network device 'ne1' <00:AB:CD:EF:12:34> initialized on port 0xC100,
> irq 9
> bootpc_init: using network interface 'ne1'
> bootpc hw address is 0:ab:cd:ef:12:34
> My ip address is 10 .0 .2 .15
> Ignoring BOOTP/DHCP option code 53
> Domain Name Server is 10 .0 .2 .3
> Ignoring BOOTP/DHCP option code 51
> Hostname is foo.bar
> Boot file is /rtems.exe
> Subnet mask is 255 .255 .255 .0
> Server ip address is 10 .0 .2 .2
> Gateway ip address is 10 .0 .2 .2
> Log server ip address is 10 .0 .2 .2
> Trying symfile 'BUILTIN', system script 'st.sys'
> Type 'cexpsh.help()' for help (no quotes)
> 'st.sys':
> ne2000: device timeout
> ne2000: device timeout
> ne2000: device timeout
> ne2000: device timeout
> ne2000: device timeout
> opening script file: I/O error
> Type 'cexpsh.help()' for help (no quotes)
> Cexp>cexpMod
> cexpModIterate() cexpModuleInitOnce()
> cexpModuleDumpGdbSectionInfo() cexpModuleLoad()
> cexpModuleFindByName() cexpModuleName()
> cexpModuleFree() cexpModuleUnload()
> cexpModuleInfo()
> Cexp>cexpModuleInfo()
> Module 'SYSTEM-BUILTIN' (0x008bcb94):
> Text starts at: 0xdeadbeef
> 0x00000000 (0)
> Cexp>
>
>
> Need a little help here...
>
>
> -- dc
>
> On 10-Feb-09, at 12:43 PM, Joel Sherrill wrote:
>
>
>> I am happy to report that the if_fxp (Intel i8255x driver)
>> works with QEMU with any of the following NIC models
>> specified:
>>
>> i82551
>> i82557b
>> i82559er
>>
>> That is in addition to the ne2k_isa we historically used.
>> That leaves pcnet, ne2k_pci, pcnet, and rtl8139 as the
>> remaining NICs simulated for i386 qemu that we
>> don't support.
>>
>> --joel
>>
>> Joel Sherrill wrote:
>>
>>> Daron Chabot wrote:
>>>
>>>
>>>> Joel Sherrill wrote:
>>>>
>>>>
>>>>> Daron Chabot wrote:
>>>>>
>>>>>
>>>>>> On 10-Feb-09, at 7:02 AM, PowerMan wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>> I do it as the follow steps:
>>>>>>> 1. download QEMU from http://bellard.org/qemu/qemu-0.9.1-
>>>>>>> i386.tar.gz
>>>>>>> 2. install it
>>>>>>> tar xfz qemu-0.9.1-i386.tar.gz -C /
>>>>>>> 3. download rtems floppy image from ftp server :
>>>>>>> ftp://ftp.rtems.com/pub/rtems/qemu/i386-pc/rtems-boot.img
>>>>>>> 4. download ftp://ftp.rtems.com/pub/rtems/qemu/i386-pc/rtems-
>>>>>>> grub.cfg
>>>>>>> and copy it to my root directory /
>>>>>>> 5. mkdir /capture
>>>>>>> cp hello.exe /capture/capture.exe
>>>>>>> 6. run qemu
>>>>>>> qemu -fda rtems-boot.img -boot a -hda /dev/sda
>>>>>>>
>>>>>>> but the capture.exe (which is actually helloworld I build
>>>>>>> with rtems-4.7.3) does not run as I excepted.
>>>>>>> This capture.exe could run on my host by modifying /boot/grub/
>>>>>>> menu.lst
>>>>>>> I type the following commands in grub:
>>>>>>> grub> set root=(hd0,0)
>>>>>>> grub> set kernel=/capture/capture.exe
>>>>>>> grub> boot
>>>>>>>
>>>>>>> then grub told me:
>>>>>>> error: no loaded kernel
>>>>>>>
>>>>>>> I type the following commands in grub:
>>>>>>> grub> set root=(hd0,0)
>>>>>>> grub> multiboot /capture/capture.exe
>>>>>>>
>>>>>>> then grub told me:
>>>>>>> error: Couldn't open file
>>>>>>>
>>>>>>> Could somebody help me?
>>>>>>>
>>>>>>> My host is openSUSE 11.1, my disk information is:
>>>>>>> /dev/sda1 3091312 516528 2417752 18% /
>>>>>>> udev 252876 5428 247448 3% /dev
>>>>>>> /dev/sda8 3605268 153972 3268160 5% /home
>>>>>>> /dev/sda7 1130540 221192 851920 21% /tmp
>>>>>>> /dev/sda9 6412052 3541120 2545216 59% /usr
>>>>>>> /dev/sda6 1130540 193556 879556 19% /var
>>>>>>>
>>>>>>> I type the following commands in grub:
>>>>>>> grub> ls
>>>>>>>
>>>>>>> then grub told me:
>>>>>>> (fd0) (hd0) (hd0,0) (hd0,4) (hd0,5) (hd0,6) (hd0,7) (hd0,8)
>>>>>>>
>>>>>>> they didn't match my host disk partition number
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>> Grub is not a requirement for using Qemu, and may actually
>>>>>> complicate the matter.
>>>>>>
>>>>>> I've had success with variations on the following command:
>>>>>>
>>>>>> qemu -no-reboot -m 128 -boot n -tftp /path/to/exe/parent/
>>>>>> directory - bootp /yourRtemsApp.exe -serial stdio
>>>>>>
>>>>>>
>>>>> I can make this work for hello and ticker but not for networked
>>>>> applications. Do you have a way to run networked applications
>>>>> this way?
>>>>>
>>>>>
>>>> Nope. Sorry. I haven't found the magic qemu-cmdline/network-
>>>> config combo yet. It has been awhile since I was playing around
>>>> with Qemu and networked RTEMS apps, but I recall that one of the
>>>> problems for me was that mac os x has no concept of tun/tap
>>>> interfaces (at least not natively; there is a third-party driver,
>>>> but I had no luck with it).
>>>>
>>>> I'll revisit things tonight and see if I figure anything out.
>>>>
>>>>
>>>>
>>> I can run networked applications just not after using tftp/bootp.
>>> I have to boot them from a floppy.
>>>
>>> I am curious if the Intel FXP driver works on qemu. :)
>>>
>>>
>>>>> I am trying to have some demos for a GSoC/RTEMS presentation
>>>>> on Monday at University of Tennessee at Chattanooga and was
>>>>> actually trying this out today. :)
>>>>>
>>>>> --joel
>>>>>
>>>>>
>>>
>>>
>> --
>> Joel Sherrill, Ph.D. Director of Research & Development
>> joel.sherrill at OARcorp.com On-Line Applications Research
>> Ask me about RTEMS: a free RTOS Huntsville AL 35805
>> Support Available (256) 722-9985
>>
>>
>>
>
>
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill at OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
More information about the users
mailing list