sossego
Retired from the forums
I'm reposting this seeing that I have successfully built a base.
Notes:
Virtualbox build:
1)libxml2 needed for virtual box build if using linux binary.
2)patch submitted by walt must be applied to dev86
3)bcc must be imported
4)dev86 separate from the above dev/bin86 must be imported
5)bcc must link with dev86 folder maybe even binutil
6) libpng needs to be installed.
7) compat6x needs to be installed.
a: Virtual box build from both sdk and linux source are being built.
b: On linux hosts, virtual box and kqemu conflict with each other. Also, multi-level virtualization cannot be done unless all levels are of the same vm type.
c: Virtual box is a loadable kernel module for linux, there isn't a "kldload vbox" or a "VBox_enable=YES" for FreeBSD.
d: Kqemu can work with Xen on the layer above. Virtual box may conflict. Anyone having any experience with this, let me know.
e: There is talk of porting KVM to FreeBSD.
f: Some people, such as myself, like to use multiple vm types. How can we use more than one VM when two are conflicting?
8) Java needs to be installed. I'm using the diablo environment.
9) Add these lines to the build. "source env.sh && kmk"
g: No one has yet made a comparison between the FreeBSD and Linux builds. This needs to be done.
10) Environment must be set to bash.
Mailing lists quotes:
"Looks like env.sh has a #!/bin/bash as it's first line - you'll need
to either change that to #!/usr/local/bin/bash or symlink
/usr/local/bin/bash->/bin/bash to have the script find the correct
[code/] #bash
(/path/to/vbox-release/folder)# ./configure --disable-xpcom --disable-pulse --disable-kmods --disable-hardening && source env.sh && kmk -k -s -t [/code]
shell. The bash port installs to /usr/local/bin/bash on FreeBSD (and
bash is not in the base system). I recommend the symlink approach -
I've had better luck with that.
" [This needs to be done along with changing to bash]
"
http://www.datahead.org/wiki/index.php/VirtualBox"
[This link needs to be re-activated.]
="I assume this is on freebsd host, because I also encountered it on FreeBSD
7.0.
In the "configure" script, I went and changed the following 2 variable:
From:
INCPNG=""
LIBPNG="-lpng"
To:
INCPNG="/usr/local/include"
LIBPNG="-L/usr/local/lib -lpng"=
[This needs to be added}
"http://www.bsdportal.ru/viewtopic.php?t=18808&sid=c0a8b366efa1d8496aa764be393bc53a"
[A good reference to helping the build.]
The patch- credit goes to walt:
--- ld/x86_aout.h.orig 2003-01-28 17:17:14.000000000 -0500
+++ ld/x86_aout.h 2005-05-07 22:40:05.000000000 -0400
@@ -13,7 +13,9 @@
typedef long Long;
#define __OUT_OK 1
#else
-typedef char Long[4];
+#define __OUT_OK 1
+#include <sys/types.h>
+typedef int32_t Long;
#endif
Howto patch- I'm going full force blind into developing, the patch is necessary:
#cd /tmp (see the mirror image process already?)
#tar -xvzf /path/to/bin86-0.16.17.tar.gz
#cd bin86-0.16.17
#patch -p0 < /path/to/mynewpatch (there's that -p flag at last!)
Edit configure so that TARGET_CPU="amd64" and TARGET_MACHINE="amd64".
Okay this all has to be done in bash. <-- just a reminder.
Su to root. You can use sudo but I don't like it too much.
Create a vboxusers group with /usr/sbin/sysinstall. Don't add anyone to it. Just exit back to the vboxfolder.
Edit /etc/groups to include root and the initial user in the vboxusers group you just created.
I'll post the testcases later after I have ran all of them.
There are no amd64 flags listed for freebsd. Maybe they need to be ported from qemu?
This will get you started.
Edit: I've copied the cpu flags from -m32 for the vboxdrv and added -mtype=MyArchitectureType.
Chmod 0777 both the configure and Config.kmk file.
use kate or gedit or what-have-you to search Config.kmk for "port me to"
Copy the the cpu flags from -m32 and paste them to -m64.
Add your machine type with -mtype=your-cpu-type.
This will build a vboxdrv but how to install it, I don't know.
Notes:
Virtualbox build:
1)libxml2 needed for virtual box build if using linux binary.
2)patch submitted by walt must be applied to dev86
3)bcc must be imported
4)dev86 separate from the above dev/bin86 must be imported
5)bcc must link with dev86 folder maybe even binutil
6) libpng needs to be installed.
7) compat6x needs to be installed.
a: Virtual box build from both sdk and linux source are being built.
b: On linux hosts, virtual box and kqemu conflict with each other. Also, multi-level virtualization cannot be done unless all levels are of the same vm type.
c: Virtual box is a loadable kernel module for linux, there isn't a "kldload vbox" or a "VBox_enable=YES" for FreeBSD.
d: Kqemu can work with Xen on the layer above. Virtual box may conflict. Anyone having any experience with this, let me know.
e: There is talk of porting KVM to FreeBSD.
f: Some people, such as myself, like to use multiple vm types. How can we use more than one VM when two are conflicting?
8) Java needs to be installed. I'm using the diablo environment.
9) Add these lines to the build. "source env.sh && kmk"
g: No one has yet made a comparison between the FreeBSD and Linux builds. This needs to be done.
10) Environment must be set to bash.
Mailing lists quotes:
"Looks like env.sh has a #!/bin/bash as it's first line - you'll need
to either change that to #!/usr/local/bin/bash or symlink
/usr/local/bin/bash->/bin/bash to have the script find the correct
[code/] #bash
(/path/to/vbox-release/folder)# ./configure --disable-xpcom --disable-pulse --disable-kmods --disable-hardening && source env.sh && kmk -k -s -t [/code]
shell. The bash port installs to /usr/local/bin/bash on FreeBSD (and
bash is not in the base system). I recommend the symlink approach -
I've had better luck with that.
" [This needs to be done along with changing to bash]
"
http://www.datahead.org/wiki/index.php/VirtualBox"
[This link needs to be re-activated.]
="I assume this is on freebsd host, because I also encountered it on FreeBSD
7.0.
In the "configure" script, I went and changed the following 2 variable:
From:
INCPNG=""
LIBPNG="-lpng"
To:
INCPNG="/usr/local/include"
LIBPNG="-L/usr/local/lib -lpng"=
[This needs to be added}
"http://www.bsdportal.ru/viewtopic.php?t=18808&sid=c0a8b366efa1d8496aa764be393bc53a"
[A good reference to helping the build.]
The patch- credit goes to walt:
--- ld/x86_aout.h.orig 2003-01-28 17:17:14.000000000 -0500
+++ ld/x86_aout.h 2005-05-07 22:40:05.000000000 -0400
@@ -13,7 +13,9 @@
typedef long Long;
#define __OUT_OK 1
#else
-typedef char Long[4];
+#define __OUT_OK 1
+#include <sys/types.h>
+typedef int32_t Long;
#endif
Howto patch- I'm going full force blind into developing, the patch is necessary:
#cd /tmp (see the mirror image process already?)
#tar -xvzf /path/to/bin86-0.16.17.tar.gz
#cd bin86-0.16.17
#patch -p0 < /path/to/mynewpatch (there's that -p flag at last!)
Edit configure so that TARGET_CPU="amd64" and TARGET_MACHINE="amd64".
Okay this all has to be done in bash. <-- just a reminder.
Su to root. You can use sudo but I don't like it too much.
Code:
#bash
path/to/vbox/folder# ./configure --disable-xpcom --disable-hardening --disable-pulse --disable-kmods && source env.sh && kmk -k -s -t
Create a vboxusers group with /usr/sbin/sysinstall. Don't add anyone to it. Just exit back to the vboxfolder.
Edit /etc/groups to include root and the initial user in the vboxusers group you just created.
I'll post the testcases later after I have ran all of them.
There are no amd64 flags listed for freebsd. Maybe they need to be ported from qemu?
This will get you started.
Edit: I've copied the cpu flags from -m32 for the vboxdrv and added -mtype=MyArchitectureType.
Chmod 0777 both the configure and Config.kmk file.
use kate or gedit or what-have-you to search Config.kmk for "port me to"
Copy the the cpu flags from -m32 and paste them to -m64.
Add your machine type with -mtype=your-cpu-type.
This will build a vboxdrv but how to install it, I don't know.