mirror of
https://github.com/yann64/haikuports.git
synced 2026-04-22 03:30:05 +02:00
VirtualBox Guest Addtions: fix build on x86_64
* kernel rejects vbox drivers with "Bad data" message, help needed. * icons are missing from userland apps
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
From c4b6e70754a3318ca4708fd2efc862b257231a64 Mon Sep 17 00:00:00 2001
|
||||
From 1123a48d5af3c496133d14498f94b0937857ee21 Mon Sep 17 00:00:00 2001
|
||||
From: Segey Reznikov <diver@gelios.net>
|
||||
Date: Wed, 18 Jan 2017 00:26:11 +0000
|
||||
Subject: Haiku fixes
|
||||
|
||||
|
||||
diff --git a/Config.kmk b/Config.kmk
|
||||
index 8637671..7c25b92 100644
|
||||
index 8637671..9f61407 100644
|
||||
--- a/Config.kmk
|
||||
+++ b/Config.kmk
|
||||
@@ -2746,8 +2746,8 @@ if $(KBUILD_TARGET) == "linux" \
|
||||
@@ -25,7 +25,7 @@ index 8637671..7c25b92 100644
|
||||
#TODO: sort this out
|
||||
-TEMPLATE_VBOXR0DRV_LDFLAGS = -shared -no-undefined -dc -dy -lroot -rpath-link /boot/system/develop/lib/x86 --no-add-needed /boot/system/develop/lib/_KERNEL_ --no-add-needed /boot/system/develop/lib/haiku_version_glue.o
|
||||
-TEMPLATE_VBOXR0DRV_CFLAGS = -fno-PIC \
|
||||
+TEMPLATE_VBOXR0DRV_LDFLAGS = -shared -no-undefined -dc -dy -lstdc++ -lsupc++ -lroot -rpath-link /system/develop/lib --no-add-needed /system/develop/lib/_KERNEL_ --no-add-needed /system/develop/lib/haiku_version_glue.o
|
||||
+TEMPLATE_VBOXR0DRV_LDFLAGS = -shared -no-undefined -dc -dy -lstdc++ -lsupc++ -lroot -rpath-link /system/develop/lib /system/develop/lib/_KERNEL_ /system/develop/lib/haiku_version_glue.o
|
||||
+TEMPLATE_VBOXR0DRV_CFLAGS = -fPIC \
|
||||
$(VBOX_GCC_WARN) -Wstrict-prototypes $(VBOX_GCC_Wno-pointer-sign) -Wno-sign-compare \
|
||||
$(VBOX_GCC_fno-stack-protector) $(VBOX_GCC_R0_OPT) $(VBOX_GCC_R0_FP) -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration
|
||||
@@ -167,6 +167,19 @@ index 7ba42a4..8722647 100644
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR0LibSharedFolders.c b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR0LibSharedFolders.c
|
||||
index 26fcb2b..873b2a8 100644
|
||||
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR0LibSharedFolders.c
|
||||
+++ b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR0LibSharedFolders.c
|
||||
@@ -75,7 +75,7 @@ DECLVBGL(int) VbglR0SfConnect(PVBGLSFCLIENT pClient)
|
||||
RT_ZERO(data);
|
||||
data.result = VINF_SUCCESS;
|
||||
data.Loc.type = VMMDevHGCMLoc_LocalHost_Existing;
|
||||
-#if defined(RT_OS_LINUX)
|
||||
+#if defined(RT_OS_LINUX) || defined(RT_OS_HAIKU)
|
||||
strcpy(data.Loc.u.host.achName, "VBoxSharedFolders");
|
||||
#else
|
||||
RTStrCopy(data.Loc.u.host.achName, sizeof(data.Loc.u.host.achName), "VBoxSharedFolders");
|
||||
diff --git a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp b/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp
|
||||
index 9510688..12ceb20 100644
|
||||
--- a/src/VBox/Additions/common/VBoxGuestLib/VBoxGuestR3Lib.cpp
|
||||
@@ -194,10 +207,19 @@ index 07c9e61..6badd17 100644
|
||||
int16 active_readers;
|
||||
// Only > 0 while a writer is waiting: number
|
||||
diff --git a/src/VBox/Additions/haiku/SharedFolders/vnode_cache.cpp b/src/VBox/Additions/haiku/SharedFolders/vnode_cache.cpp
|
||||
index 92bee8f..fc1ebc2 100644
|
||||
index 92bee8f..30fbc98 100644
|
||||
--- a/src/VBox/Additions/haiku/SharedFolders/vnode_cache.cpp
|
||||
+++ b/src/VBox/Additions/haiku/SharedFolders/vnode_cache.cpp
|
||||
@@ -77,7 +77,7 @@ static ino_t g_nextVnid = 1;
|
||||
@@ -46,6 +46,8 @@
|
||||
#include "vboxsf.h"
|
||||
#include "OpenHashTable.h"
|
||||
|
||||
+void* __dso_handle = NULL;
|
||||
+
|
||||
struct HashTableDefinition
|
||||
{
|
||||
typedef uint32 KeyType;
|
||||
@@ -77,7 +79,7 @@ static ino_t g_nextVnid = 1;
|
||||
mutex g_vnodeCacheLock;
|
||||
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ CHECKSUM_SHA256="8267bb026717c6e55237eb798210767d9c703cfcdf01224d9bc26f7dac9f228
|
||||
SOURCE_DIR="VirtualBox-$portVersion"
|
||||
PATCHES="virtualbox_guest_additions-$portVersion.patchset"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 ?x86 !x86_64"
|
||||
ARCHITECTURES="!x86_gcc2 ?x86 x86_64"
|
||||
|
||||
PROVIDES="
|
||||
virtualbox_guest_additions$secondaryArchSuffix = $portVersion
|
||||
@@ -56,7 +56,6 @@ BUILD()
|
||||
{
|
||||
export USER=user
|
||||
export KBUILD_PATH=/system/package-links/kbuild-0.1.9998svn~git-1/.self/data
|
||||
# ./configure --build-headless --disable-python --disable-java --nofatal
|
||||
./configure --only-additions
|
||||
source env.sh
|
||||
kmk VBOX_ONLY_ADDITIONS=1 VBOX_WITH_ADDITION_DRIVERS=1 BUILD_TYPE=strict all
|
||||
@@ -64,7 +63,8 @@ BUILD()
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd out/haiku.x86/strict/bin/additions
|
||||
source env.sh
|
||||
cd out/haiku.$BUILD_PLATFORM_ARCH/strict/bin/additions
|
||||
mkdir -p $addOnsDir/kernel/{generic,drivers/bin,drivers/dev/misc}
|
||||
|
||||
cp vboxguest $addOnsDir/kernel/generic
|
||||
@@ -85,9 +85,9 @@ INSTALL()
|
||||
|
||||
mkdir -p $binDir
|
||||
|
||||
xres -o file.tmp VBoxControl ; strip -S VBoxControl ; xres -o VBoxControl file.tmp
|
||||
xres -o file.tmp VBoxService ; strip -S VBoxService ; xres -o VBoxService file.tmp
|
||||
xres -o file.tmp VBoxTray ; strip -S VBoxTray ; xres -o VBoxTray file.tmp
|
||||
# xres -o file.tmp VBoxControl ; strip -S VBoxControl ; xres -o VBoxControl file.tmp
|
||||
# xres -o file.tmp VBoxService ; strip -S VBoxService ; xres -o VBoxService file.tmp
|
||||
# xres -o file.tmp VBoxTray ; strip -S VBoxTray ; xres -o VBoxTray file.tmp
|
||||
|
||||
cp VBoxControl VBoxService VBoxTray $binDir
|
||||
|
||||
|
||||
Reference in New Issue
Block a user