My contribution

Here you can provide suggestions on how to improve the product, website, etc.
Post Reply
Googie
Posts: 28
Joined: 11. Jun 2007, 20:08
Contact:

My contribution

Post by Googie »

Hi,

I was unable to post this message on Mailing List, I don't know why it rejected me. I used to post messages on the list before (at January/February). Anyway...

As some of you have seen yesterday on IRC, I tried to install Guest Additions
on old Slackware 8, where we got:
Kernel 2.4.18
GCC 2.95.3
XFree86 4.2.0

I've finally successed! Except the video driver, but let leave it for now.
Here's are step necessary to go through installation proccess:

1. Unpack additions by:
sh VBoxLinuxAdditions.sh --target /tmp/addons

2. First goes vboxadd module, so go to its directory.

3. In file irqt/types.h insert a following code in line 90:
typedef int _Bool;

I don't know why it causes errors, sorry. I know only solution.

4. Edit Makefile (still vboxadd module), find declaration of CFLAGS for 2.4
kernels and append following flag:
-O2

This is the fix for GCC 2.95.x and its assembler. I found this hack on google.
Don't ask my why optimisation fixes errors :)

5. In file GenericRequest.c:
Move 'VMMDevRequestHeader *pReq ...' declaration to top of VbglGRAlloc
function.

Module won't compile with declaration in the middle of function.
Again - don't ask me why :)
However (!) I heard from a friend, that old C "pseudo-standards" _suggested_
to declare variables at the function begining, not in the middle. It's
nothing sure, but maybe GCC coders at 2.95.x times liked this "standards"? :)

6. After compilation successed (try to call make to check it), there are
unresolved module symbols, so:
In file vboxmod.c:
Replace 'likely' with 'RT_LIKELY'.

In file r0drv/linux/alloc-r0drv-linux.c:
Comment out all 'MY_CHANGE_PAGE_ATTR' calls.

7. Ok, that's all for vboxadd module. Let's get to the vboxvfs module,
then repeat all paragraphs from 3 to 5 for this module as well.

8. Additionaly we need to banish another unresolved symbols - 'BUG_ON'.
I haven't investigate what do they do, but removing all references to this
macro fixed problem (there are many references in various files, so 'grep'
files or something like that) and additions still seems to work stable.

9. Now we can go to top directory (/tmp/addons) and call ./install.sh to
install additions.

About the video driver problems - X server seems to be too old for vbox. I get
error about ABI version difference (X ABI is 5 and vbox driver is 6), so I
guess there is nothing I can do to fix it, except upgrading X server :(

Now, another problem.
I noticed that there are missing daemon() and killproc() functions
in /etc/rc.d/rc.vbox-timesync, so script causes errors. There is also no
Slackware distribution detection, so I wrote some by myself (just like I did
for installer last time). Here's patch for both problems:

Code: Select all

--- vboxadd-timesync.sh 2007-06-06 00:03:29.000000000 +0200
+++ /etc/rc.d/rc.vboxadd-timesync       2007-06-27 20:49:54.000000000 +0200
@@ -36,6 +36,9 @@
 elif [ -f /etc/gentoo-release ]; then
     system=gentoo
     PIDFILE="/var/run/vboxadd-timesync"
+elif [ -f /etc/slackware-version ]; then
+    system=slackware
+    PIDFILE="/var/run/vboxadd-timesync"
 else
     system=other
     if [ -d /var/run -a -w /var/run ]; then
@@ -114,7 +117,39 @@
     fi
 fi

+if [ "$system" = "slackware" ]; then
+
+    daemon() {
+       exec $@ &
+    }
+
+    killproc() {
+       kill `pidof $@`
+    }
+
+    fail_msg() {
+        echo " ...fail!"
+    }
+
+    succ_msg() {
+        echo " ...done."
+    }
+
+    begin() {
+        echo -n "$1"
+    }
+fi
+
 if [ "$system" = "other" ]; then
+
+    daemon() {
+       exec $@ &
+    }
+
+    killproc() {
+       kill `pidof $@`
+    }
+
     fail_msg() {
         echo " ...fail!"
     }
Feel free to use it (on MIT licence, or whatever licence you like).
michael
Oracle Corporation
Posts: 682
Joined: 10. May 2007, 09:46
Contact:

Post by michael »

Thanks for the information.

Michael
Post Reply