Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Is mol still usable on recent kernels ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
LordManta
n00b
n00b


Joined: 23 Aug 2006
Posts: 18
Location: Paris

PostPosted: Wed Apr 15, 2009 10:59 pm    Post subject: Is mol still usable on recent kernels ? Reply with quote

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
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Thu Apr 16, 2009 12:47 am    Post subject: Reply with quote

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
View user's profile Send private message
LordManta
n00b
n00b


Joined: 23 Aug 2006
Posts: 18
Location: Paris

PostPosted: Thu Apr 16, 2009 9:35 am    Post subject: mol on kernel 2.6.29 Reply with quote

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
View user's profile Send private message
LordManta
n00b
n00b


Joined: 23 Aug 2006
Posts: 18
Location: Paris

PostPosted: Thu Apr 16, 2009 4:34 pm    Post subject: First success with mol on top of kernel 2.6.29 Reply with quote

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
View user's profile Send private message
Syntaxis
Guru
Guru


Joined: 28 Apr 2002
Posts: 511
Location: London, UK

PostPosted: Fri Apr 17, 2009 11:09 am    Post subject: Re: Is mol still usable on recent kernels ? Reply with quote

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
View user's profile Send private message
LordManta
n00b
n00b


Joined: 23 Aug 2006
Posts: 18
Location: Paris

PostPosted: Fri Apr 17, 2009 4:14 pm    Post subject: Re: Is mol still usable on recent kernels ? Reply with quote

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 :wink:

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
View user's profile Send private message
randalf
n00b
n00b


Joined: 02 Jan 2006
Posts: 61
Location: Dresden

PostPosted: Fri Jun 05, 2009 11:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
Progman3K
l33t
l33t


Joined: 03 Jan 2004
Posts: 771

PostPosted: Mon Sep 14, 2009 12:41 am    Post subject: Reply with quote

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
View user's profile Send private message
randalf
n00b
n00b


Joined: 02 Jan 2006
Posts: 61
Location: Dresden

PostPosted: Mon Sep 14, 2009 1:34 pm    Post subject: Reply with quote

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
View user's profile Send private message
Progman3K
l33t
l33t


Joined: 03 Jan 2004
Posts: 771

PostPosted: Tue Sep 15, 2009 2:32 am    Post subject: Reply with quote

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
View user's profile Send private message
randalf
n00b
n00b


Joined: 02 Jan 2006
Posts: 61
Location: Dresden

PostPosted: Tue Sep 15, 2009 10:36 am    Post subject: Reply with quote

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
View user's profile Send private message
Progman3K
l33t
l33t


Joined: 03 Jan 2004
Posts: 771

PostPosted: Tue Sep 15, 2009 10:44 am    Post subject: Reply with quote

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
View user's profile Send private message
randalf
n00b
n00b


Joined: 02 Jan 2006
Posts: 61
Location: Dresden

PostPosted: Tue Sep 15, 2009 10:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
bmaass
n00b
n00b


Joined: 15 Mar 2008
Posts: 25

PostPosted: Thu Sep 17, 2009 12:18 pm    Post subject: Reply with quote

Will this work on ppc64?
Back to top
View user's profile Send private message
randalf
n00b
n00b


Joined: 02 Jan 2006
Posts: 61
Location: Dresden

PostPosted: Thu Sep 17, 2009 1:08 pm    Post subject: Reply with quote

AFAIK mol runs on ppc32 only.
Back to top
View user's profile Send private message
ddc
Guru
Guru


Joined: 29 Aug 2006
Posts: 525

PostPosted: Sun Sep 20, 2009 10:40 am    Post subject: Reply with quote

the real question is: is MOL still of any interest ?
Back to top
View user's profile Send private message
bmaass
n00b
n00b


Joined: 15 Mar 2008
Posts: 25

PostPosted: Sun Sep 20, 2009 3:12 pm    Post subject: Reply with quote

Absolutely it is. Or is there any other way of virtualization on PowerPC Linux?
Back to top
View user's profile Send private message
markpmlim
n00b
n00b


Joined: 10 Jan 2008
Posts: 13

PostPosted: Fri Oct 02, 2009 4:22 am    Post subject: Could be compiled but crashed on startup Reply with quote

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
View user's profile Send private message
randalf
n00b
n00b


Joined: 02 Jan 2006
Posts: 61
Location: Dresden

PostPosted: Mon Oct 05, 2009 8:31 pm    Post subject: Re: Could be compiled but crashed on startup Reply with quote

markpmlim wrote:
Did I miss out anything?

Perhaps the right command?
Try
Code:
startmol -X
if you wish to start OSX.
Back to top
View user's profile Send private message
markpmlim
n00b
n00b


Joined: 10 Jan 2008
Posts: 13

PostPosted: Tue Oct 06, 2009 4:24 am    Post subject: Still couldn't startup Reply with quote

I issued the command

Quote:
startmol --test


The same error message was displayed.

I wondered if the patching(s) were correctly done.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum