Build additional kernel modules
From NAS-Central Buffalo - The Linkstation Wiki
(Difference between revisions)
Mindbender (Talk | contribs) |
|||
| (11 intermediate revisions not shown) | |||
| Line 1: | Line 1: | ||
| + | {{Template:Articles}} | ||
| + | ''<font color=red><small> | ||
| + | This article based on work done by Frontalot at Linkstationwiki.org | ||
| + | </small></font>''<br> | ||
This article assumes you already have installed the necessary [[Projects/CrossToolchains|cross-toolchain(s)]]. Please see [[Articles/GeneralCrossToolchain]] for instructions on how to install and use a cross-toolchain. | This article assumes you already have installed the necessary [[Projects/CrossToolchains|cross-toolchain(s)]]. Please see [[Articles/GeneralCrossToolchain]] for instructions on how to install and use a cross-toolchain. | ||
| - | |||
| - | # Download and unpack the appropriate GPL source code. It may be obtained from the [ | + | {{Postit| Don't Forget | You must use the same version of GCC as the kernel was originally built with, aka the "stock" cross-toolchain}} |
| + | |||
| + | # Download and unpack the appropriate GPL source code. It may be obtained from the [http://downloads.nas-central.org downloads area]. Find out which box you have and go into the box`s folder. There you find it in the GPL folder. In our example, we will be building kernel modules for the powerpc-hdhlan LinkStation: | ||
#: <font color=red>'''unzip gpl_powerpc-hdhlan.zip'''</font> | #: <font color=red>'''unzip gpl_powerpc-hdhlan.zip'''</font> | ||
# Unpack the kernel source code: | # Unpack the kernel source code: | ||
#: <font color=red>'''tar -pzxvf linux-2.4.17_mvl21-sandpoint.tar.gz'''</font> | #: <font color=red>'''tar -pzxvf linux-2.4.17_mvl21-sandpoint.tar.gz'''</font> | ||
| - | # Download and apply any available | + | # Download and apply any available patches. You find them in the "patches"-subfolder. The 2.4.17_mvl21-sandpoint kernel needs 2 patches: |
#: <font color=red>'''patch -p1 < netfilter.patch'''</font> | #: <font color=red>'''patch -p1 < netfilter.patch'''</font> | ||
#: <font color=red>'''patch -p1 < usbvideo.patch'''</font> | #: <font color=red>'''patch -p1 < usbvideo.patch'''</font> | ||
| - | # Download a working kernel .config from | + | # Download a working kernel .config from the downloadsection (normaly they can be found at DevelopmentTools/CrossToolchains/Config/) and place it in the kernel source directory. Make sure to rename the kernel .config file to .config: |
#: <font color=red>'''mv powerpc-hdhlan.config .config'''</font> | #: <font color=red>'''mv powerpc-hdhlan.config .config'''</font> | ||
# Open up <code>.hhl_cross_compile</code> in a text editor. Replace the existing text with the name of the cross-toolchain - <code>powerpc-hdhlan-linux-</code> in our example. The trailing dash is required.<br><br> | # Open up <code>.hhl_cross_compile</code> in a text editor. Replace the existing text with the name of the cross-toolchain - <code>powerpc-hdhlan-linux-</code> in our example. The trailing dash is required.<br><br> | ||
| Line 23: | Line 28: | ||
[[Category:Kernel]] | [[Category:Kernel]] | ||
| + | [[Category:Howto]] | ||
Latest revision as of 22:34, 11 September 2007
This article based on work done by Frontalot at Linkstationwiki.org
This article assumes you already have installed the necessary cross-toolchain(s). Please see Articles/GeneralCrossToolchain for instructions on how to install and use a cross-toolchain.
| Don't Forget |
| You must use the same version of GCC as the kernel was originally built with, aka the "stock" cross-toolchain |
- Download and unpack the appropriate GPL source code. It may be obtained from the downloads area. Find out which box you have and go into the box`s folder. There you find it in the GPL folder. In our example, we will be building kernel modules for the powerpc-hdhlan LinkStation:
- unzip gpl_powerpc-hdhlan.zip
- Unpack the kernel source code:
- tar -pzxvf linux-2.4.17_mvl21-sandpoint.tar.gz
- Download and apply any available patches. You find them in the "patches"-subfolder. The 2.4.17_mvl21-sandpoint kernel needs 2 patches:
- patch -p1 < netfilter.patch
- patch -p1 < usbvideo.patch
- Download a working kernel .config from the downloadsection (normaly they can be found at DevelopmentTools/CrossToolchains/Config/) and place it in the kernel source directory. Make sure to rename the kernel .config file to .config:
- mv powerpc-hdhlan.config .config
- Open up
.hhl_cross_compilein a text editor. Replace the existing text with the name of the cross-toolchain -powerpc-hdhlan-linux-in our example. The trailing dash is required.
- Then start the configuration menu:
- make menuconfig
- Double-check the kernel settings then save and exit. Now you can build the kernel modules:
- make dep; make modules
- If all goes well, install the kernel modules:
- make modules_install

