[Fwd: Re: Bochs simulator and pc386 BSP]

Erwin Rol erwin at muffin.org
Fri May 19 18:57:30 UTC 2000


here a convo i had with someone about using BOCHs with GDB.

- Erwin


-------- Original Message --------
Subject: Re: Bochs simulator and pc386 BSP
Date: Wed, 19 Apr 2000 23:34:47 +0200
From: Erwin Rol <erwin at muffin.org>
To: Serrae at tsainc.com
References: <OF430D8160.DB313EF1-ON862568C6.0072EB3B at tsainc.com>

Serrae at tsainc.com wrote:
> 
> Erwin,
> 
> I am a wee bit lost.  I am working on sparc-sun-solaris2.6 not Linux; can I
> still use bochs?  Also,

Hmmm i am not a bochs expert but i think it works on any unix.


> 
> 1) set BOCHS_GDB_PORT - Know how to do it
> 2) build yer target - Do you mean the application to test like hello.exe?
yes.

> 3) build a LILO image from yer binary - How do I do this?

I ported (ripped) the linux kernel bootcode to make a lilo image from
a RTEMS executable. should also be on the RTEMS ftp site, under
LILO floppy i think or something simulair. I believe i actual
wrote a README for that :-) 

It will probably work with thr GRUB floppies too, but i found them a
pain 
to build.


> 4) start bochs (with a correct config file) - Know how to do it
> 5) start GDB and connect to the TCP port BOCHS_GDB_PORT - Can find out how
> to do it

target remote 127.0.0.1:<BOCHS_GDB_PORT>

> 
> Thanks.
> 
> Sincerely,
> Efren

Let me know if you get it working, if you do and you have some minutes
to
spare you might even write down what to do to get it working and mail it
to the RTEMS list , or directly to Joel and ask if he
could put it on the FTP site.


> ~~~~~~~~~~~~~~~~~~~~~~~~~
> Efren Serra
> Software Engineer
> Systems Solutions Group
> Transaction Systems Architects, Inc.
> 218 South 108th Avenue
> Omaha, NE 68154
> Phone: 402-697-2267
> FAX: 402-333-9725
> ~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> 
>                     Erwin Rol
>                     <erwin at muffin.or        To:     Serrae at tsainc.com
>                     g>                      cc:
>                     Sent by:                Subject:     Re: Bochs simulator and pc386 BSP
>                     erwin at rawpower.t
>                     -online.de
> 
> 
>                     04/18/00 01:44
>                     PM
> 
> 
> 
> Serrae at tsainc.com wrote:
> >
> > Erwin,
> >
> > I built bochs-2000_0104c.tar.gz with your bochs-iodev.tgz additions.  Now
> > what?
> > I am using a solaris2.6 + SPARC, and built the rtems target i386-elf.  I
> > tried ./bochs
> > from my shell but it failed.  Thanks.
> 
> That happend to me a lot too :-) check the bochs.out (depends on yer
> config file)
> to see why it is bailing out. lots of times it is just because
> it can't find a drive that is in the config file.
> 
> The idea is and it worked (with in the stability limits from BOCHS :-)
> that you create one of the bootable LILO images, and tell BOCHS that
> image
> is a floppydrive and than boot from it.
> 
> Than it will hang until GDB connected to it, with its TCP connection
> if that happens BOCHS continues normal operation with GDB connected.
> 
> the environment variable BOCHS_GDB_PORT should be set to the port number
> that bochs
> should listen (and wait) on for a GDB connection.
> 
> for RTEMS it looks like it is talking to a normal serial port GDB and so
> the GDB
> stub must be compiled in and initialized.
> 
> So if bochs exits without doing a thing some bochs config is wrong
> or the BOCHS_GDB_PORT isn't set, both should be logged in the bohcs log
> file.
> 
> if Bochs hangs in the startup screen it is waiting for GDB to connect.
> check "target remote" on how to connect to a TCP stub or proxy server if
> you aren't familure with gdb.
> 
> so in short:
> 1) set BOCHS_GDB_PORT
> 2) build yer target
> 3) build a LILO image from yer binary
> 4) start bochs (with a correct config file)
> 5) start GDB and connect to the TCP port BOCHS_GDB_PORT
> 6) things should work :-)
> 7) blame me if it doesn't work
> 8) i will not care anyway :-)
> 
> BTW. i made that hack because i didn't have a maching to reboot
> everytime, and
> didn't had my real target yet from our hardware developers. After i got
> the real target i never used it anymore. but it helped me quiete a bit
> to get started.
> 
> Hope this helps,
> 
> Erwin
> 
> >
> > Sincerely,
> > Efren
> > ~~~~~~~~~~~~~~~~~~~~~~~~~
> > Efren Serra
> > Software Engineer
> > Systems Solutions Group
> > Transaction Systems Architects, Inc.
> > 218 South 108th Avenue
> > Omaha, NE 68154
> > Phone: 402-697-2267
> > FAX: 402-333-9725
> > ~~~~~~~~~~~~~~~~~~~~~~~~~



More information about the users mailing list