Oops. Good catch! Don't know how I picked that up. So I downloaded 2.6.9 and tried again. This is on a Sun Oracle Enterprise M3000 with 2.75 GHz. quad core SPARC64 VII running Solaris 10U11, Opencsw toolchain and gcc 7.3.0.
./.config-sparc failed with that "C compiler doesn't work" error so I just ran
The only match I have on this machine for packet.h is:
/opt/SUNWrtvc/examples/rtvc_video_conference/packet.h
so I fed that to eth_socket.cc. I don't know if that's the right file but we continued on. Then,
Now I'm stuck. I have no linux/types.h anywhere. A net search for this file came up empty. Is this something that can be fixed with config options? Or am I doing something else wrong now?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If network card means that it gives my emulated machine access to the Internet, then yes, that would be extremely useful. So I removed the --enable-ne2000 line and ran ./configure again.
Then I had to make a few changes:
gui/x.cc needed a full path for: #include </usr/X11/include/X11/extensions/Xrandr.h>
despite my having that library in LD_LIBRARY_PATH. I finally gave up and added: /usr/openwin/lib/libX11.so.4 \
after line 182 in Makefile (where it's doing "gcc bochs").
# pwd/export/home/denber/bochs-2.6.9/images/fdos-10meg# ls -ltotal20243-rw-r-----11000tomcat1074Aug42013bochsrc.txt-rw-r-----11000tomcat10321920Aug42013fdosmini.img-rw-r-----1rootroot0Aug415:15fdosmini.img.lock-rw-r--r--11000tomcat642Apr22005README
and .bochsrc contains ata0-master: type=disk, mode=flat, path="/export/home/denber/bochs-2.6.9/images/fdos-10meg/fdosmini.img"
So I tried debian, figuring maybe the first img file was defective:
Please choose one: [6]
00000000000i[ ] installing x module as the Bochs GUI
00000000000i[ ] using log file bochsout.txt
Bus Error - core dumped
#
bochsout.txt attached (it's pretty long). It's odd - this time it didn't complain about the img file not being found, it just croaked. (Edit: But if I restart bochs again, this time I do get the "file not found" error).
So at least I'm now getting the bochs window appearing, but I must still be doing something wrong.
Bochs 2.6.9 creates a file with extension ".lock" to avoid opening the same image twice in read/write mode. If Bochs crashes it might be necessary to manually remove these file that Bochs usually removes on normal exit. In SVN I have added the command line option '-unlock' to simplify this.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
But unfortunatelly it is hard to debug over e-mail and try to understand what is going on removte host through partial gdb messages ... This regular CPU emulation flow, new instruction is fetched and decoded and segfault is occured during attemp to fetch next byte of the opcode. Should never happen of course and I never saw such failures. Unfortunatelly no line numbers available and no more debug information so I can't help that much.
Is SPARC big endian host ? We actually never did testing of Bochs on big endian machines.
Can suggest only to try 2.6.8 official release sources. This code (new decoder) was not present yet in 2.6.8 and you may get lucky and not fail.
Not sure how can I help better. You probably will have to find a way to debug the case further locally and send more information, if you can.
Stanislav
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can suggest only to try 2.6.8 official release sources.
Unfortunately, 2.6.8 dumps core too. The gui window opens, and then:
...
Please choose one: [6]
00000000000i[ ] installing x module as the Bochs GUI
00000000000i[ ] using log file bochsout.txt
Bus Error - core dumped
#
At least it didn't complain about compiling with ne2000 configured in. I should add that the gui window comes up empty. In the 2.6 version I first tried, the window included a menu bar up top. So it's dying before that gets drawn.
Not sure how can I help better.
You are more than welcome to an account on my machine if you'd like. I doubt I'll be able to figure this out on my own.
Last edit: Michele Denber 2018-08-06
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi, I cactually have an idea which can screen out a lot of issues.
In latest SVN I have option to compile decoder stand-alone, without Bochs. When you can use it as stand-alone decoder/disassembler. I wrote simple opcode bytes generator in perl which generates all possible opcodes in Intel x86 opcode space (except VEX and EVEX yet). You can compile and run it on your big endian host and also on some Intel host and compare the output.
This would tell immediatelly if decoder has a problem on BE hosts.
I'll send you a test program tomorrow morning.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm having a very similar issue porting 2.6.8 to Irix 6.5 (yes, people still use it. There is an active hobbyist community). It compiles fine, but dumps core after the window opens. I'm not sure how to go about finding out why. The only difference is I had to compile it with SDL as Xsgi doesn't have Xrandr. Ideas?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I installed bochs on a Solaris 10 Sparc machine using .conf.sparc. I also put
ata0-master: type=disk, mode=flat, path="/export/home/denber/bochs-2.6/freedos-img/a.img"
in .boschrc. Then:
boschsout.txt is:
What could this be about?
This is 6-years old binary of Bochs. Would you like to try latest one first ?
Oops. Good catch! Don't know how I picked that up. So I downloaded 2.6.9 and tried again. This is on a Sun Oracle Enterprise M3000 with 2.75 GHz. quad core SPARC64 VII running Solaris 10U11, Opencsw toolchain and gcc 7.3.0.
./.config-sparc failed with that "C compiler doesn't work" error so I just ran
That completed successfully as did gmake. But when I did gmake install I got:
The only match I have on this machine for packet.h is:
/opt/SUNWrtvc/examples/rtvc_video_conference/packet.h
so I fed that to eth_socket.cc. I don't know if that's the right file but we continued on. Then,
I have that here:
/usr/include/sys/ethernet.h
so I fed that to eth_socket.cc. Then,
Now I'm stuck. I have no linux/types.h anywhere. A net search for this file came up empty. Is this something that can be fixed with config options? Or am I doing something else wrong now?
Do you really need the network card ?
Does it compile without --enable-ne2000 ?
If network card means that it gives my emulated machine access to the Internet, then yes, that would be extremely useful. So I removed the --enable-ne2000 line and ran ./configure again.
Then I had to make a few changes:
gui/x.cc needed a full path for:
#include </usr/X11/include/X11/extensions/Xrandr.h>Then I was getting linker problems with:
despite my having that library in LD_LIBRARY_PATH. I finally gave up and added: /usr/openwin/lib/libX11.so.4 \
after line 182 in Makefile (where it's doing "gcc bochs").
Then gmake finished. I ran
./bochs
and got a pop-up PANIC with:
But
and .bochsrc contains
ata0-master: type=disk, mode=flat, path="/export/home/denber/bochs-2.6.9/images/fdos-10meg/fdosmini.img"So I tried debian, figuring maybe the first img file was defective:
ata0-master: type=disk, mode=flat, path="/export/home/denber/bochs-2.6.9/images/debian-3.0r0/debian-3.0r0.img"bochsout.txt attached (it's pretty long). It's odd - this time it didn't complain about the img file not being found, it just croaked. (Edit: But if I restart bochs again, this time I do get the "file not found" error).
So at least I'm now getting the bochs window appearing, but I must still be doing something wrong.
Oh, and I figured out why I got 2.6 the first time. If you first visit
https://sourceforge.net/projects/bochs/files/Disk%20Images/FreeDos/
it says that 2.6 is the "Latest Version".
Last edit: Michele Denber 2018-08-04
Bochs 2.6.9 creates a file with extension ".lock" to avoid opening the same image twice in read/write mode. If Bochs crashes it might be necessary to manually remove these file that Bochs usually removes on normal exit. In SVN I have added the command line option '-unlock' to simplify this.
Thanks but that didn't fix it. I removed the lock file and ran ./bochs again. The gui window appeared and after about five seconds it crashed.
The "can't open file" message only pops up if the lock file exists. Otherwise, it just dumps core.
If it matters, in .bochsrc I have
Well figuring that "core dumped" isn't a particularly illuminating error message, I recompiled with gdb.
Does this help any?
Last edit: Michele Denber 2018-08-05
This is mine :)
But unfortunatelly it is hard to debug over e-mail and try to understand what is going on removte host through partial gdb messages ... This regular CPU emulation flow, new instruction is fetched and decoded and segfault is occured during attemp to fetch next byte of the opcode. Should never happen of course and I never saw such failures. Unfortunatelly no line numbers available and no more debug information so I can't help that much.
Is SPARC big endian host ? We actually never did testing of Bochs on big endian machines.
Can suggest only to try 2.6.8 official release sources. This code (new decoder) was not present yet in 2.6.8 and you may get lucky and not fail.
Not sure how can I help better. You probably will have to find a way to debug the case further locally and send more information, if you can.
Stanislav
Yes.
Unfortunately, 2.6.8 dumps core too. The gui window opens, and then:
At least it didn't complain about compiling with ne2000 configured in. I should add that the gui window comes up empty. In the 2.6 version I first tried, the window included a menu bar up top. So it's dying before that gets drawn.
You are more than welcome to an account on my machine if you'd like. I doubt I'll be able to figure this out on my own.
Last edit: Michele Denber 2018-08-06
Hi, I cactually have an idea which can screen out a lot of issues.
In latest SVN I have option to compile decoder stand-alone, without Bochs. When you can use it as stand-alone decoder/disassembler. I wrote simple opcode bytes generator in perl which generates all possible opcodes in Intel x86 opcode space (except VEX and EVEX yet). You can compile and run it on your big endian host and also on some Intel host and compare the output.
This would tell immediatelly if decoder has a problem on BE hosts.
I'll send you a test program tomorrow morning.
Don't judge that code, it was written in 5 minutes :)
But it does the job - it produces all possible valid x86 opcodes into single text file.
Now see version of bx_disasm_new which is disasming all the testset producing by previous script:
Place into testset.h output of previous script.
I'm having a very similar issue porting 2.6.8 to Irix 6.5 (yes, people still use it. There is an active hobbyist community). It compiles fine, but dumps core after the window opens. I'm not sure how to go about finding out why. The only difference is I had to compile it with SDL as Xsgi doesn't have Xrandr. Ideas?