Difference between revisions of "Build a new kernel (and kernel modules) for the LinkStation"
m |
m |
||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{Template:Articles}} | ||
''<font color=red><small> | ''<font color=red><small> | ||
This article Based on work by frontalot, and timtimred. | This article Based on work by frontalot, and timtimred. | ||
Line 4: | Line 5: | ||
at Linkstationwiki.org | at Linkstationwiki.org | ||
</small></font>''<br> | </small></font>''<br> | ||
− | |||
{{Postit|PowerPC Only | This method only works for the powerpc-hdhlan and powerpc-hdhglan LinkStations}} | {{Postit|PowerPC Only | This method only works for the powerpc-hdhlan and powerpc-hdhglan LinkStations}} | ||
− | |||
− | |||
== Abstract == | == Abstract == | ||
− | |||
− | |||
This article is for people that want to build a new kernel for the LinkStation. We will use the powerpc-hdhglan LinkStation for our example. | This article is for people that want to build a new kernel for the LinkStation. We will use the powerpc-hdhglan LinkStation for our example. | ||
− | |||
− | |||
== Prerequisites == | == Prerequisites == | ||
− | + | This article assumes that you have installed [[Projects/OpenLink]] or [[Projects/FreeLink]] and the appropriate development tools. You also will need the kernel source code, a working kernel .config, and any applicable patches. You may download them from [[http://downloads.nas-central.org here]]. | |
− | + | ||
− | This article assumes that you have installed [[Projects/OpenLink]] or [[Projects/FreeLink]] and the appropriate development tools. You also will need the kernel source code, a working kernel .config, and any applicable patches. You may download them from [[http://downloads. | + | |
Cross-Toolchain | You can build the kernel and kernel modules much, much faster by using a [[Projects/CrossToolchains|cross-toolchain]].:) | Cross-Toolchain | You can build the kernel and kernel modules much, much faster by using a [[Projects/CrossToolchains|cross-toolchain]].:) | ||
− | |||
− | |||
== Method == | == Method == | ||
− | |||
− | |||
* Extract the kernel source code somewhere sensible. Mine lives in /mnt/ somewhere with an alias to it from /usr/src/linux to keep it off the tiny system partition: | * Extract the kernel source code somewhere sensible. Mine lives in /mnt/ somewhere with an alias to it from /usr/src/linux to keep it off the tiny system partition: | ||
tar -xvzf linux-sources-2.4.20-lsw-ppc-hg1.tgz | tar -xvzf linux-sources-2.4.20-lsw-ppc-hg1.tgz | ||
Line 56: | Line 44: | ||
== References == | == References == | ||
− | |||
− | |||
Jochang included some useful information in his [[http://jan.csie.ntu.edu.tw/~jo/kuro/loader/README loader how-to]]. Also | Jochang included some useful information in his [[http://jan.csie.ntu.edu.tw/~jo/kuro/loader/README loader how-to]]. Also | ||
Trevor Powdrell from the Kuro forums wrote a [[http://webpages.charter.net/trevorpowdrell/kuroboxhg.patch patch]] that allows the powerpc-hdhglan kernel to compile under GCC 3.3/3.4. | Trevor Powdrell from the Kuro forums wrote a [[http://webpages.charter.net/trevorpowdrell/kuroboxhg.patch patch]] that allows the powerpc-hdhglan kernel to compile under GCC 3.3/3.4. |
Latest revision as of 02:03, 11 September 2007
This article Based on work by frontalot, and timtimred.
Originally by timtimred.
at Linkstationwiki.org
PowerPC Only |
![]() |
This method only works for the powerpc-hdhlan and powerpc-hdhglan LinkStations |
Contents
Abstract
This article is for people that want to build a new kernel for the LinkStation. We will use the powerpc-hdhglan LinkStation for our example.
Prerequisites
This article assumes that you have installed Projects/OpenLink or Projects/FreeLink and the appropriate development tools. You also will need the kernel source code, a working kernel .config, and any applicable patches. You may download them from [here].
Cross-Toolchain | You can build the kernel and kernel modules much, much faster by using a cross-toolchain.:)
Method
- Extract the kernel source code somewhere sensible. Mine lives in /mnt/ somewhere with an alias to it from /usr/src/linux to keep it off the tiny system partition:
tar -xvzf linux-sources-2.4.20-lsw-ppc-hg1.tgz mkdir /usr/src ln -s /path/to/kernel/directory /usr/src/linux cd /usr/src/linux
- Copy the kernel .config to the kernel source directory then run:
make menuconfig
- You can add/remove features to/from the kernel. Note that the supplied kernel .config will build properly so any errors when compiling are most likely due to your modifications.
- Compile the kernel. Make sure you have something else to amuse you because this takes a while:
make oldconfig make dep make objcopy -O binary vmlinux
- Compile the kernel modules. This step may take some time depending on the modules you selected:
make modules make modules_install
- Now copy the kernel modules to the correct place:
cp -r release_modules/lib/modules/2.4.20_mvl31-linkstationwiki-hg1/ /lib/modules/
- Load your new kernel using the kernel loader how-to. Then build the kernel module dependencies:
depmod -a
- You should now have a working kernel replacement and be able to load some shiny new kernel modules!
References
Jochang included some useful information in his [loader how-to]. Also Trevor Powdrell from the Kuro forums wrote a [patch] that allows the powerpc-hdhglan kernel to compile under GCC 3.3/3.4.