HaikuArchives / VMwareAddons

VMwareAdd-ons is a set of tools to enhance interaction with Haiku running in VMware
MIT License
7 stars 11 forks source link

video driver doesn't get loaded on x86_64 #13

Closed diversys closed 2 years ago

diversys commented 6 years ago

Probably linking flags are wrong.

grep vmware /var/log/syslog

KERN: Could not load kernel add-on "/boot/system/add-ons/kernel/drivers/dev/graphics/vmware": Bad data

thdankert commented 5 years ago

I've looked a bit deeper into this. When compiling on x86_64, the vmware driver always links to _KERNEL_, which in turn requires linkhack.so to be available to the runtime_loader.

On my system (freshly installed R1/Beta1) the library is only available in source form, and from the comments in the Jamfile it is only used to trick the linker into thinking that the kernel was build with GCC 2.95. (It uses a custom .comment section for that). However the _KERNEL_ does not contain any .comment section, and the runtime_loader will not load it on x86_64.

runtime_loader: /boot/system/develop/lib/_KERNEL_: Could not find .comment section
runtime_loader: /boot/system/develop/lib/_KERNEL_: Failed to get gcc version.
runtime_loader: Cannot open file /var/lib/buildbot/workers/haiku/haiku-repository-x86_64/generated/objects/haiku/x86_64/release/system/kernel/linkhack.so: No such file or directory
korli commented 5 years ago

@thdankert makes little sense, the runtime_loader doesn't load kernel drivers.

thdankert commented 5 years ago

@thdankert makes little sense, the runtime_loader doesn't load kernel drivers.

My bad, then I did not understand driver loading correctly (I used https://www.haiku-os.org/legacy-docs/writing-video-card-drivers/03-kernel-driver/ as a reference). How are dynamically linked drivers handled then? At some point the kernel would have to resolve the dependencies.

korli commented 5 years ago

I don't think dynamically linked drivers are supported (there are module dependencies though).

volo-droid commented 2 years ago

@diversys I believe this issue is obsolete now

diversys commented 2 years ago

Indeed!