特殊:Badtitle/NS100:MOLModulesHowto:修订间差异
小无编辑摘要 |
小无编辑摘要 |
||
第107行: | 第107行: | ||
bash:/usr/src$ export KEMAIL="[email protected]" | bash:/usr/src$ export KEMAIL="[email protected]" | ||
bash:/usr/src$ export KMAINT="Your Name" | bash:/usr/src$ export KMAINT="Your Name" | ||
bash:/usr/src$ export KDREV="ubuntu0" | |||
</nowiki></pre> | </nowiki></pre> | ||
https://help.ubuntu.com/community/ | https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconNote.png | ||
<!> '''Note''' | <!> '''Note''' | ||
第132行: | 第132行: | ||
Now you can install the modules that you built. They provide the virtual package <code><nowiki>mol-modules</nowiki></code> on which the ''mol'' package depends. | Now you can install the modules that you built. They provide the virtual package <code><nowiki>mol-modules</nowiki></code> on which the ''mol'' package depends. | ||
<pre><nowiki> | <pre><nowiki> | ||
bash:~$ sudo dpkg -i /usr/src/mol-modules-2.6.12-9-powerpc_0.9.70+ubuntu0_powerpc.deb | |||
</nowiki></pre> | </nowiki></pre> | ||
https://help.ubuntu.com/community/IconsPage?action=AttachFile&do=get&target=IconNote.png | |||
<!> '''Note''' | <!> '''Note''' |
2007年5月14日 (一) 00:48的版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/MOLModulesHowto }} |
点击翻译: |
English {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/af | • {{#if: php5|Afrikaans| [[::MOLModulesHowto/af|Afrikaans]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/ar | • {{#if: php5|العربية| [[::MOLModulesHowto/ar|العربية]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/az | • {{#if: php5|azərbaycanca| [[::MOLModulesHowto/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/bcc | • {{#if: php5|جهلسری بلوچی| [[::MOLModulesHowto/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/bg | • {{#if: php5|български| [[::MOLModulesHowto/bg|български]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/br | • {{#if: php5|brezhoneg| [[::MOLModulesHowto/br|brezhoneg]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/ca | • {{#if: php5|català| [[::MOLModulesHowto/ca|català]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/cs | • {{#if: php5|čeština| [[::MOLModulesHowto/cs|čeština]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/de | • {{#if: php5|Deutsch| [[::MOLModulesHowto/de|Deutsch]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/el | • {{#if: php5|Ελληνικά| [[::MOLModulesHowto/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/es | • {{#if: php5|español| [[::MOLModulesHowto/es|español]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/fa | • {{#if: php5|فارسی| [[::MOLModulesHowto/fa|فارسی]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/fi | • {{#if: php5|suomi| [[::MOLModulesHowto/fi|suomi]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/fr | • {{#if: php5|français| [[::MOLModulesHowto/fr|français]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/gu | • {{#if: php5|ગુજરાતી| [[::MOLModulesHowto/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/he | • {{#if: php5|עברית| [[::MOLModulesHowto/he|עברית]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/hu | • {{#if: php5|magyar| [[::MOLModulesHowto/hu|magyar]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/id | • {{#if: php5|Bahasa Indonesia| [[::MOLModulesHowto/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/it | • {{#if: php5|italiano| [[::MOLModulesHowto/it|italiano]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/ja | • {{#if: php5|日本語| [[::MOLModulesHowto/ja|日本語]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/ko | • {{#if: php5|한국어| [[::MOLModulesHowto/ko|한국어]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/ksh | • {{#if: php5|Ripoarisch| [[::MOLModulesHowto/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/mr | • {{#if: php5|मराठी| [[::MOLModulesHowto/mr|मराठी]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/ms | • {{#if: php5|Bahasa Melayu| [[::MOLModulesHowto/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/nl | • {{#if: php5|Nederlands| [[::MOLModulesHowto/nl|Nederlands]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/no | • {{#if: php5|norsk| [[::MOLModulesHowto/no|norsk]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/oc | • {{#if: php5|occitan| [[::MOLModulesHowto/oc|occitan]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/pl | • {{#if: php5|polski| [[::MOLModulesHowto/pl|polski]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/pt | • {{#if: php5|português| [[::MOLModulesHowto/pt|português]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/ro | • {{#if: php5|română| [[::MOLModulesHowto/ro|română]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/ru | • {{#if: php5|русский| [[::MOLModulesHowto/ru|русский]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/si | • {{#if: php5|සිංහල| [[::MOLModulesHowto/si|සිංහල]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/sq | • {{#if: php5|shqip| [[::MOLModulesHowto/sq|shqip]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/sr | • {{#if: php5|српски / srpski| [[::MOLModulesHowto/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/sv | • {{#if: php5|svenska| [[::MOLModulesHowto/sv|svenska]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/th | • {{#if: php5|ไทย| [[::MOLModulesHowto/th|ไทย]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/tr | • {{#if: php5|Türkçe| [[::MOLModulesHowto/tr|Türkçe]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/vi | • {{#if: php5|Tiếng Việt| [[::MOLModulesHowto/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/yue | • {{#if: php5|粵語| [[::MOLModulesHowto/yue|粵語]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/zh | • {{#if: php5|中文| [[::MOLModulesHowto/zh|中文]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/zh-hans | • {{#if: php5|中文(简体)| [[::MOLModulesHowto/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: php5 | php5 | {{#if: | :}}MOLModulesHowto}}/zh-hant | • {{#if: php5|中文(繁體)| [[::MOLModulesHowto/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:php5|:MOLModulesHowto|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :MOLModulesHowto/zh | | {{#ifexist: MOLModulesHowto/zh | | {{#ifeq: {{#titleparts:MOLModulesHowto|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:MOLModulesHowto|1|-1|}} | zh | | }}
Introduction
If you are running a versions of Ubuntu release previous to 6.06 DapperDrake, then you need to build the MOL module for your kernel before installing Mac On Linux. This is not longer necessary in DapperDrake as the module are included in the kernel.
Preparing your system
You will need to enable the universe and multiverse, see AddingRepositoriesHowto for details.
The following packages are required for building the MOL Modules.
mol-modules-source build-essential linux-headers-$(uname -r)
You can install them with the command
bash:~$ sudo apt-get install mol-modules-source build-essential linux-headers-$(uname -r)
If you are running Breezy you will also need gcc-3.4
bash:~$ sudo apt-get install gcc-3.4
To set gcc-3.4 as the default compiler run
bash:~$ sudo ln -sf /usr/bin/gcc-3.4 /usr/bin/gcc
at the end of the building process you will need to set the default compiler back to gcc-4.0 using the command
bash:~$ sudo ln -sf /usr/bin/gcc-4.0 /usr/bin/gcc
mol-modules-source
This package contains the source for the mol kernel modules.
build-essential
A metapackage that depends on the applications and tools necessary to build Ubuntu packages.
linux-headers
just do
$ uname -r
and it will resolve to your current kernel version insuring that your kernel and headers source version match.
Editing the kernel headers
A bug in the Ubuntu kernel headers maycause the compilation of the Mac-on-Linux to fail.
This seems to be fixed in version 2.6.12.9-powerpc, but in case of problem, this issue is reported in Bugzilla as bug #2728
Only a small change is needed to make sure the modules will compile.
<!> Note
This is a hack. It just bypasses a bug in the kernel headers. You do not have to do this in Hoary. Only the Warty kernel headers have this problem. (The hack may be necessary if you upgraded from Warty to Hoary but kept the old kernel.)
You'll need to edit a file called setup.h within the hierarchy of the linux kernel headers.
bash:~$ gksudo gedit /usr/src/linux-headers-2.6.8.1-4-powerpc/include/asm/setup.h
In this file, you need to comment out the line #include <asm-m68k/setup.h>
so the file will look like this:
#ifdef <u>KERNEL</u> #ifndef _PPC_SETUP_H #define _PPC_SETUP_H #define m68k_num_memory num_memory #define m68k_memory memory /* #include <asm-m68k/setup.h> */ /* We have a bigger command line buffer. */ #undef COMMAND_LINE_SIZE #define COMMAND_LINE_SIZE 512 #endif /* _PPC_SETUP_H */ #endif /* <u>KERNEL</u> */
Now you are ready to start compiling the kernel modules.
Building the mol modules
<!> Note
Before building the package you need to make sure you have debhelper
and m4
packages. If you don't the build will fail. So, to be sure :
bash:~$ sudo apt-get install debhelper m4
The package mol-modules-source
installed a file mol-modules.tar.gz
in the directory /usr/src
. Unpack the file with the commands
bash:~$ cd /usr/src bash:~$ sudo tar xzvf mol-modules.tar.gz
Next, set some environment variables. These are needed for the compilation.
bash:/usr/src$ export KVERS="$(uname -r)" bash:/usr/src$ export KSRC="/usr/src/linux-headers-$(uname -r)" bash:/usr/src$ export KEMAIL="[email protected]" bash:/usr/src$ export KMAINT="Your Name" bash:/usr/src$ export KDREV="ubuntu0"
<!> Note
You should, of course, replace[email protected]
andYour Name
with your actual email address and your name. These are used for the Maintainer field in the debian package you're about to create.
Use the following commands to actually build the modules:
bash:/usr/src$ cd modules/mol bash:/usr/src/modules/mol$ sudo debian/rules build
After compiling the modules, create a debian package of the modules with the command
bash:/usr/src/modules/mol$ sudo debian/rules binary-mol-modules
This will result in a debian package mol-modules-2.6.12-9-powerpc_0.9.70+ubuntu0_powerpc.deb
in the directory /usr/src
Installing the Modules
Now you can install the modules that you built. They provide the virtual package mol-modules
on which the mol package depends.
bash:~$ sudo dpkg -i /usr/src/mol-modules-2.6.12-9-powerpc_0.9.70+ubuntu0_powerpc.deb
<!> Note
The file name will change as modifications are made to the *mol* source, so, make sure that you change the above line to match the file name as it exists on your computer. As of December,1st 2005, the file name is called mol-modules-2.6.12-9-powerpc_0.9.70+ubuntu0_powerpc.deb
.
----
CategoryDocumentation