View previous topic :: View next topic |
Author |
Message |
LordManta n00b
Joined: 23 Aug 2006 Posts: 18 Location: Paris
|
Posted: Wed Apr 15, 2009 10:59 pm Post subject: Is mol still usable on recent kernels ? |
|
|
I have tried to emerge once again mol on the recent 2.6.29-r1 kernel on my gentoo and got the following error:
Code: |
+ Entering molelf
Compiling performance.o
Compiling selftest.o
Compiling vsprintf.o
Linking libxselftest.a
Compiling keyremap.o
Linking libxkeyremap.a
Compiling init.o
../../obj-ppc/build/src/molelf/libxkeyremap.a(keyremap.o): In function `print_menu_':
keyremap.c:(.text+0xeac): undefined reference to `__sprintf_chk'
make[2]: *** [../../obj-ppc/build/src/molelf/keyremap] Error 1
make[1]: *** [sub-molelf-all] Error 2
make: *** [sub-src-all] Error 2
|
and can't found any help on that
I really need mol for day to day work and it seems dev has been stopped for long now.
I recently have seen that debian seems to have a maconlinux working on the latest kernel. Do I have to switch back to debian to get mol ?
Hope you could help me to have it up and running. |
|
Back to top |
|
|
JoseJX Retired Dev
Joined: 28 Apr 2002 Posts: 2774
|
Posted: Thu Apr 16, 2009 12:47 am Post subject: |
|
|
You can get it running with the current SVN version from sourceforge and patches to the kernel. I stopped working on it for a while because I haven't had time and a kernel developer broke the kernel module and refused to revert the patch that did so. Debian, with their binary distro, has a bit easier time of keeping it working simply because they only provide a binary kernel.
As a hint, you will need to make sure that your kernel is using the SLAB allocator (the SLUB allocator breaks MOL) and this kernel patch:
http://dev.gentoo.org/~josejx/mol-mm.patch
Sometime when I have more time, I need to finish the kernel merge work that I started last year, although a better option would be to integrate MOL with KVM or similar. _________________ Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml |
|
Back to top |
|
|
LordManta n00b
Joined: 23 Aug 2006 Posts: 18 Location: Paris
|
Posted: Thu Apr 16, 2009 9:35 am Post subject: mol on kernel 2.6.29 |
|
|
Thanks a lot for your answer, I 'm trying to get it working from the SVN repo.
I probably have to get a fresh archive as I have patched by hand the changes in recent kernel (aka arch/ppc to arch/powerpc) and it doesn't solve my problem. I will try your patch and check the SLAB/SLUB stuff in my kernel config. Thanks again for your help. I will try to post here informations about my progress.
Thanks again. |
|
Back to top |
|
|
LordManta n00b
Joined: 23 Aug 2006 Posts: 18 Location: Paris
|
Posted: Thu Apr 16, 2009 4:34 pm Post subject: First success with mol on top of kernel 2.6.29 |
|
|
Ok, as I said I will post on this thread elements that have worked.
I have applied the very simple patch proposed by JoseJX on my 2.6.29-gentoo-r1 kernel and have verified that the SLAB allocator was used (it was the case). Then I have downloaded the svn repo and tried to compile the trunk branch. I have also applied the patch proposed to change arch/ppc in arch/powerpc :
http://sourceforge.net/mailarchive/forum.php?thread_name=49661CD4.2030103%40sokrates.homelinux.net&forum_name=mac-on-linux-devel
I have tried to compile the trunk branch and failed :
Code: | Linking libmain.a
ar: lib.a: No such file or directory
make[2]: *** [../../obj-ppc/build/src/main/libmain.a] Error 9
make[1]: *** [sub-main-all] Error 2
make: *** [sub-src-all] Error 2
|
Last edited by LordManta on Tue Apr 21, 2009 3:24 pm; edited 1 time in total |
|
Back to top |
|
|
Syntaxis Guru
Joined: 28 Apr 2002 Posts: 511 Location: London, UK
|
Posted: Fri Apr 17, 2009 11:09 am Post subject: Re: Is mol still usable on recent kernels ? |
|
|
LordManta wrote: | I recently have seen that debian seems to have a maconlinux working on the latest kernel. Do I have to switch back to debian to get mol ? |
One doesn't need to be running Debian to use a Debian kernel image... _________________ The Debian User Forums - help them grow! |
|
Back to top |
|
|
LordManta n00b
Joined: 23 Aug 2006 Posts: 18 Location: Paris
|
Posted: Fri Apr 17, 2009 4:14 pm Post subject: Re: Is mol still usable on recent kernels ? |
|
|
Syntaxis wrote: | LordManta wrote: | I recently have seen that debian seems to have a maconlinux working on the latest kernel. Do I have to switch back to debian to get mol ? |
One doesn't need to be running Debian to use a Debian kernel image... |
I agree but I prefer to keep control of what's in the kernel
Ok I made some progress, it appears that I can startmol as a standard unix user using a real OSX partition to boot rather than a disk image as I was used to...
Here what seems to work for me :
I have decided to apply a kind of emerge-time patch during the emerge of last version of mol in portage version 0.72 (the last available when I wrote this) :
I start with a classic emerge mol then I suspend it using Ctrl-Z just after sources have been expended :
Code: | localhost ~ # emerge mol
Calculating dependencies... done!
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) app-emulation/mol-0.9.72
* mol-0.9.72.tar.bz2 RMD160 SHA1 SHA256 size ;-) ... [ ok ]
* checking ebuild checksums ;-) ... [ ok ]
* checking auxfile checksums ;-) ... [ ok ]
* checking miscfile checksums ;-) ... [ ok ]
* Determining the location of the kernel source code
* Found kernel source directory:
* /usr/src/linux
* Found kernel object directory:
* /lib/modules/2.6.29-gentoo-r1/build
* Found sources for kernel version:
* 2.6.29-gentoo-r1
>>> Unpacking source...
>>> Unpacking mol-0.9.72.tar.bz2 to /var/tmp/portage/app-emulation/mol-0.9.72/work
>>> Source unpacked in /var/tmp/portage/app-emulation/mol-0.9.72/work
^Z
[1]+ Stopped emerge mol
|
Then I apply some change to the sources by running the following script :
Code: | #!/bin/sh
cp mac-on-linux/trunk/src/molelf/vsprintf.c /var/tmp/portage/app-emulation/mol-0.9.72/work/mol-0.9.72/src/molelf/
cp mac-on-linux/trunk/src/kmod/Linux/Makefile /var/tmp/portage/app-emulation/mol-0.9.72/work/mol-0.9.72/src/kmod/Linux/
cp mac-on-linux/trunk/src/kmod/Linux/Makefile.26 /var/tmp/portage/app-emulation/mol-0.9.72/work/mol-0.9.72/src/kmod/Linux/
cp mac-on-linux/trunk/src/kmod/Linux/dev.c /var/tmp/portage/app-emulation/mol-0.9.72/work/mol-0.9.72/src/kmod/Linux/
cp mac-on-linux/trunk/src/kmod/Linux/hostirq.c /var/tmp/portage/app-emulation/mol-0.9.72/work/mol-0.9.72/src/kmod/Linux/
cp mac-on-linux/trunk/src/shared/mol-ioctl.h /var/tmp/portage/app-emulation/mol-0.9.72/work/mol-0.9.72/src/shared/
#EOF
|
This script replaces some files of the emerge working dir with files from the svn archive (rev 157, which is the last when I wrote this) of mol.
I use some of the files in the svn trunk branch (after patching the trunk branch to address the arch/ppc becoming arch/powerpc problem).
I have also modified in the trunk branch the src/shared/mol-ioctl.h to enforce the load of ioctl.h as we are in linux (which was not loaded before I don't know why...), commenting the ifdef declaration :
Code: | //#ifdef __linux__
#include <linux/ioctl.h>
//#endif /* __linux__ */ |
Then I resume emerge using fg.
So I got it compile and install despite of numerous warnings.
Now mol seems to work but I can't use anymore my configuration using an image disk on which MacOSX 10.4.11 was installed. I use a real partition instead.
Also this seems ugly but give me some success ...
The use of a disk image was leading to bus errors most of the time... |
|
Back to top |
|
|
randalf n00b
Joined: 02 Jan 2006 Posts: 61 Location: Dresden
|
Posted: Fri Jun 05, 2009 11:13 pm Post subject: |
|
|
Thank you for posting this LordManta.
I followed your Instructions but in the end i had to creat a symbolic link in /usr/src/linux-2.6.29-gentoo-r5/arch/ppc -> powerpc (emerge stopped with an error about not finding the Makefile in that directory).
Modifying src/shared/mol-ioctl.h was not neccesary for me with mol-0.9.27.1.
Now mol works with the latest Kernel.
Thanks again. |
|
Back to top |
|
|
Progman3K l33t
Joined: 03 Jan 2004 Posts: 771
|
Posted: Mon Sep 14, 2009 12:41 am Post subject: |
|
|
randalf wrote: | Thank you for posting this LordManta.
I followed your Instructions but in the end i had to creat a symbolic link in /usr/src/linux-2.6.29-gentoo-r5/arch/ppc -> powerpc (emerge stopped with an error about not finding the Makefile in that directory).
Modifying src/shared/mol-ioctl.h was not neccesary for me with mol-0.9.27.1.
Now mol works with the latest Kernel.
Thanks again. |
I think I am having the same problem with 2.6.31... Quote: | + Entering accel
Compiling mol.o
Compiling molaccel.o
Linking libaccel.a
Linking libbootx.a
Compiling .dummy.o
* Preparing mol module
make HOSTCC=powerpc-unknown-linux-gnu-gcc CROSS_COMPILE=powerpc-unknown-linux-gnu- LDFLAGS= TOUT=/var/tmp/portage/app-emulation/mol-0.9.72.1/temp/.tmp_gas_check KERNEL_SOURCE=/usr/src/linux LV=26 MP=ko KUNAME=2.6.31-gentoo all
Makefile:527: /usr/src/linux-2.6.31-gentoo/arch/ppc/Makefile: No such file or directory
make[1]: *** No rule to make target `/usr/src/linux-2.6.31-gentoo/arch/ppc/Makefile'. Stop.
nm: '../../../obj-ppc/build/src/kmod/Linux/..//mol.ko': No such file
nm: '../../../obj-ppc/build/src/kmod/Linux/..//mol.ko': No such file
checker.pl failed
rm: cannot remove `../../../obj-ppc/build/src/kmod/Linux/..//mol.ko': No such file or directory |
Exactly what did you symlink to get it to work? |
|
Back to top |
|
|
randalf n00b
Joined: 02 Jan 2006 Posts: 61 Location: Dresden
|
Posted: Mon Sep 14, 2009 1:34 pm Post subject: |
|
|
as i explained - ppc is the symlink to powerpc in /usr/src/linux-2.6.29-gentoo-r5/arch/. Code: | sudo cd /usr/src/linux/arch
sudo ln -s ppc powerpc | enjoy compiling mol . |
|
Back to top |
|
|
Progman3K l33t
Joined: 03 Jan 2004 Posts: 771
|
Posted: Tue Sep 15, 2009 2:32 am Post subject: |
|
|
randalf wrote: | as i explained - ppc is the symlink to powerpc in /usr/src/linux-2.6.29-gentoo-r5/arch/. Code: | sudo cd /usr/src/linux/arch
sudo ln -s ppc powerpc | enjoy compiling mol . |
When I do that, it creates a folder called ppc inside the powerpc folder... |
|
Back to top |
|
|
randalf n00b
Joined: 02 Jan 2006 Posts: 61 Location: Dresden
|
Posted: Tue Sep 15, 2009 10:36 am Post subject: |
|
|
Sorry, the second command should be.
Code: | sudo ln -s powerpc ppc |
The link (ppc) has to be in the same /usr/src/linux/arch directory. |
|
Back to top |
|
|
Progman3K l33t
Joined: 03 Jan 2004 Posts: 771
|
Posted: Tue Sep 15, 2009 10:44 am Post subject: |
|
|
OK, now it gets a bit further, but it still errors out: Quote: | * Preparing mol module
make HOSTCC=powerpc-unknown-linux-gnu-gcc CROSS_COMPILE=powerpc-unknown-linux-gnu- LDFLAGS= TOUT=/var/tmp/portage/app-emulation/mol-0.9.72.1/temp/.tmp_gas_check KERNEL_SOURCE=/usr/src/linux LV=26 MP=ko KUNAME=2.6.31-gentoo all
LD /var/tmp/portage/app-emulation/mol-0.9.72.1/work/mol-0.9.72.1/obj-ppc/build/src/kmod/built-in.o
CC [M] /var/tmp/portage/app-emulation/mol-0.9.72.1/work/mol-0.9.72.1/obj-ppc/build/src/kmod/_kuname.o
CC [M] /var/tmp/portage/app-emulation/mol-0.9.72.1/work/mol-0.9.72.1/obj-ppc/build/src/kmod/_fault.o
In file included from /var/tmp/portage/app-emulation/mol-0.9.72.1/work/mol-0.9.72.1/obj-ppc/build/src/kmod/kernel_vars.h:22,
from /var/tmp/portage/app-emulation/mol-0.9.72.1/work/mol-0.9.72.1/obj-ppc/build/src/kmod/_fault.c:19:
/var/tmp/portage/app-emulation/mol-0.9.72.1/work/mol-0.9.72.1/obj-ppc/build/src/kmod/mac_registers.h:114:1: warning: "BIT" redefined
In file included from include/linux/kernel.h:15,
from /var/tmp/portage/app-emulation/mol-0.9.72.1/work/mol-0.9.72.1/obj-ppc/build/src/kmod/archinclude.h:44,
from /var/tmp/portage/app-emulation/mol-0.9.72.1/work/mol-0.9.72.1/obj-ppc/build/src/kmod/_fault.c:17:
include/linux/bitops.h:6:1: warning: this is the location of the previous definition
CC [M] /var/tmp/portage/app-emulation/mol-0.9.72.1/work/mol-0.9.72.1/obj-ppc/build/src/kmod/_dev.o
In file included from /var/tmp/portage/app-emulation/mol-0.9.72.1/work/mol-0.9.72.1/obj-ppc/build/src/kmod/kernel_vars.h:22,
from /var/tmp/portage/app-emulation/mol-0.9.72.1/work/mol-0.9.72.1/obj-ppc/build/src/kmod/_dev.c:28:
/var/tmp/portage/app-emulation/mol-0.9.72.1/work/mol-0.9.72.1/obj-ppc/build/src/kmod/mac_registers.h:114:1: warning: "BIT" redefined
In file included from include/linux/kernel.h:15,
from /var/tmp/portage/app-emulation/mol-0.9.72.1/work/mol-0.9.72.1/obj-ppc/build/src/kmod/archinclude.h:44,
from /var/tmp/portage/app-emulation/mol-0.9.72.1/work/mol-0.9.72.1/obj-ppc/build/src/kmod/_dev.c:17:
include/linux/bitops.h:6:1: warning: this is the location of the previous definition
/var/tmp/portage/app-emulation/mol-0.9.72.1/work/mol-0.9.72.1/obj-ppc/build/src/kmod/_dev.c: In function 'find_physical_rom':
/var/tmp/portage/app-emulation/mol-0.9.72.1/work/mol-0.9.72.1/obj-ppc/build/src/kmod/_dev.c:88: error: implicit declaration of function 'get_property'
make[2]: *** [/var/tmp/portage/app-emulation/mol-0.9.72.1/work/mol-0.9.72.1/obj-ppc/build/src/kmod/_dev.o] Error 1
make[1]: *** [_module_/var/tmp/portage/app-emulation/mol-0.9.72.1/work/mol-0.9.72.1/obj-ppc/build/src/kmod] Error 2
nm: '../../../obj-ppc/build/src/kmod/Linux/..//mol.ko': No such file
nm: '../../../obj-ppc/build/src/kmod/Linux/..//mol.ko': No such file
checker.pl failed
rm: cannot remove `../../../obj-ppc/build/src/kmod/Linux/..//mol.ko': No such file or directory
make: *** [all-local] Error 1 |
|
|
Back to top |
|
|
randalf n00b
Joined: 02 Jan 2006 Posts: 61 Location: Dresden
|
Posted: Tue Sep 15, 2009 10:41 pm Post subject: |
|
|
You have not applied LordMantas "emerge-time-patch" as he mentioned above.
Note, you have to modify the script acording to your mol-version 0.9.72.1.
Your script should look like this Code: | > #!/bin/sh
>
> cp mac-on-linux/trunk/src/molelf/vsprintf.c /var/tmp/portage/app-emulation/mol-0.9.72.1/work/mol-0.9.72.1/src/molelf/
> cp mac-on-linux/trunk/src/kmod/Linux/Makefile /var/tmp/portage/app-emulation/mol-0.9.72.1/work/mol-0.9.72.1/src/kmod/Linux/
> cp mac-on-linux/trunk/src/kmod/Linux/Makefile.26 /var/tmp/portage/app-emulation/mol-0.9.72.1/work/mol-0.9.72.1/src/kmod/Linux/
> cp mac-on-linux/trunk/src/kmod/Linux/dev.c /var/tmp/portage/app-emulation/mol-0.9.72.1/work/mol-0.9.72.1/src/kmod/Linux/
> cp mac-on-linux/trunk/src/kmod/Linux/hostirq.c /var/tmp/portage/app-emulation/mol-0.9.72.1/work/mol-0.9.72.1/src/kmod/Linux/
> cp mac-on-linux/trunk/src/shared/mol-ioctl.h /var/tmp/portage/app-emulation/mol-0.9.72.1/work/mol-0.9.72.1/src/shared/
>
> #EOF
|
Put the script at the same place with your SVN mac-on-linux directory which you hopefully downloaded before.
Run the script exactly as discribed above and it should compile fine.
good luck. |
|
Back to top |
|
|
bmaass n00b
Joined: 15 Mar 2008 Posts: 25
|
Posted: Thu Sep 17, 2009 12:18 pm Post subject: |
|
|
Will this work on ppc64? |
|
Back to top |
|
|
randalf n00b
Joined: 02 Jan 2006 Posts: 61 Location: Dresden
|
Posted: Thu Sep 17, 2009 1:08 pm Post subject: |
|
|
AFAIK mol runs on ppc32 only. |
|
Back to top |
|
|
ddc Guru
Joined: 29 Aug 2006 Posts: 525
|
Posted: Sun Sep 20, 2009 10:40 am Post subject: |
|
|
the real question is: is MOL still of any interest ? |
|
Back to top |
|
|
bmaass n00b
Joined: 15 Mar 2008 Posts: 25
|
Posted: Sun Sep 20, 2009 3:12 pm Post subject: |
|
|
Absolutely it is. Or is there any other way of virtualization on PowerPC Linux? |
|
Back to top |
|
|
markpmlim n00b
Joined: 10 Jan 2008 Posts: 13
|
Posted: Fri Oct 02, 2009 4:22 am Post subject: Could be compiled but crashed on startup |
|
|
Thanks for posting the info required to get mol to compile.
I applied all those patches as suggested to mol-0.9.7.2.1 (the package in gentoo's repository) using the techniques applied by LordManta & Randalf. There were no problems compiling mol other than warnings.
mol was compiled under the linux kernel 2.6.29-r5
However, when mol is run with a "startmol", it crashes with the message:
Quote: | _create_session() failed due to an unspecified error |
Did I miss out anything? |
|
Back to top |
|
|
randalf n00b
Joined: 02 Jan 2006 Posts: 61 Location: Dresden
|
Posted: Mon Oct 05, 2009 8:31 pm Post subject: Re: Could be compiled but crashed on startup |
|
|
markpmlim wrote: | Did I miss out anything? |
Perhaps the right command?
Try if you wish to start OSX. |
|
Back to top |
|
|
markpmlim n00b
Joined: 10 Jan 2008 Posts: 13
|
Posted: Tue Oct 06, 2009 4:24 am Post subject: Still couldn't startup |
|
|
I issued the command
The same error message was displayed.
I wondered if the patching(s) were correctly done. |
|
Back to top |
|
|
|