VBOX hardware profile

Programming, for all ages and all languages.
Post Reply
guferr
Posts: 22
Joined: Sat Aug 20, 2011 1:57 pm

VBOX hardware profile

Post by guferr »

hi, i have a ELF executable that runs on had hat linux that has been made to an specific hardware, and all that i know about this hardware is that the processor is an i686 and uses mmx, and nothing else. when i try to execute this software in other hardware its give me the message "Segmentation fault". I need to know if there's anyway to change the processor and the chipset that the VBOX emulates so i can run this software.
Thanks.
Yargh
Member
Member
Posts: 56
Joined: Sat Jun 12, 2010 9:04 pm
Location: Somewhere else.

Re: VBOX hardware profile

Post by Yargh »

"had hat" Linux? Also, VirtualBox only emulates 1 chipset, and if I remember correctly it only emulates 1 or 2 types of CPU's.
Wait... What?
guferr
Posts: 22
Joined: Sat Aug 20, 2011 1:57 pm

Re: VBOX hardware profile

Post by guferr »

Sorry i was very, VERY rushed, i didn't had time to remember the name of the linux, now i realized that the name was "red hat".
Is there any other emulator that can do what i need?
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: VBOX hardware profile

Post by Combuster »

Virtual machines don't normally emulate a CPU, they display your host's CPU as the VM's CPU. Qemu/Virtualbox may run as recompilers, in which case they do emulate processor features to the extent necessary but leave traces (my kernel registers a spoofed CPU).

Nevertheless, if the reason simply was MMX, it should run on any P2 or later out there (and the worst kind of stupidities on that area should be covered if the host shows itself as an Intel processor).

So if it deals with some old version of Red Hat and specific hardware, it's more likely to be tied to a specific kernel, its drivers and the matching hardware. Unfortunately VM's provide very limited hardware support - usually providing only the kind of hardware that is most used in real life as well.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
guferr
Posts: 22
Joined: Sat Aug 20, 2011 1:57 pm

Re: VBOX hardware profile

Post by guferr »

I'm using the original kernel in wich it came, and it's running perfectly on the original hardware, but in other hardware it's giving me the "Segmentation fault" message.
I tried to run the executable in other linux, and the message is ever the same, and i think the message has been generated by something external to the executable itself, because i decompiled it, and i didn't find the word "Segmentation" on it's data references, so i think the linux kernel may be doing it.
User avatar
Brynet-Inc
Member
Member
Posts: 2426
Joined: Tue Oct 17, 2006 9:29 pm
Libera.chat IRC: brynet
Location: Canada
Contact:

Re: VBOX hardware profile

Post by Brynet-Inc »

guferr wrote: ... because i decompiled it, and i didn't find the word "Segmentation" on it's data references, so i think the linux kernel may be doing it.
What the.. I don't even..

PEBKAC.
Image
Twitter: @canadianbryan. Award by smcerm, I stole it. Original was larger.
guferr
Posts: 22
Joined: Sat Aug 20, 2011 1:57 pm

Re: VBOX hardware profile

Post by guferr »

Any messages generated by an program must be inside it, unless that this message have been generated by something that it calls or includes, such as drivers or libraries.
If this message wasn't generated by something external, then the message is encrypted inside the program, but i don't see reason to it to be encrypted.
Yargh
Member
Member
Posts: 56
Joined: Sat Jun 12, 2010 9:04 pm
Location: Somewhere else.

Re: VBOX hardware profile

Post by Yargh »

"Segmentation fault" is generated by the OS's exception handler. Not the program.
Wait... What?
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: VBOX hardware profile

Post by Combuster »

Actually,

Code: Select all

combuster@daphnis ~/dev $ cat /usr/lib64/libc.a | grep "Segmentation fault"
Binary file (standard input) matches
I do hope you know what libc is?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: VBOX hardware profile

Post by Combuster »

I already asked it to be tossed out of OS development. And in this case, Brynet-Inc already supplied the answer.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
guferr
Posts: 22
Joined: Sat Aug 20, 2011 1:57 pm

Re: VBOX hardware profile

Post by guferr »

I found a way to fix the error. The error was related to something with the vga shared memory, because i put an offboard video card (what disables the shared memory) and the problem stopped.
Thanks anyway.
Obs.: This was related with OS development because i need one hardware emulator to test my OS's drivers.
Post Reply