Difference between revisions of "Using a custom kernel and loader.o"

From NAS-Central Buffalo - The Linkstation Wiki
Jump to: navigation, search
m
m (add #)
Line 4: Line 4:
 
Download the vanilla kernel source, untar it, and move into the source directory.
 
Download the vanilla kernel source, untar it, and move into the source directory.
  
  cd /usr/src
+
  # cd /usr/src
  wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.15.tar.bz2
+
  # wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.15.tar.bz2
  tar xvjf linux-2.6.15.tar.bz2
+
  # tar xvjf linux-2.6.15.tar.bz2
  cd linux-2.6.15
+
  # cd linux-2.6.15
  
 
Download the latest kernel patch and apply it. You may need to adjust the name of the patch.  The patch should support both the standard Kurobox and HG model. Please report any changes needed to the config files, or any bugs you find, on the forums. Remember to include the type of box you are running, along with any supporting information-- the more information the better.  
 
Download the latest kernel patch and apply it. You may need to adjust the name of the patch.  The patch should support both the standard Kurobox and HG model. Please report any changes needed to the config files, or any bugs you find, on the forums. Remember to include the type of box you are running, along with any supporting information-- the more information the better.  
  
  wget http://www.kurobox.com/downloads/kernel/kurobox-patch-2-6-15.tar.bz2
+
  # wget http://www.kurobox.com/downloads/kernel/kurobox-patch-2-6-15.tar.bz2
  tar xvjf kurobox-patch-2-6-15-tar.bz2
+
  # tar xvjf kurobox-patch-2-6-15-tar.bz2
  patch -p1 < kurobox-patch-2-6-15.patch
+
  # patch -p1 < kurobox-patch-2-6-15.patch
  
 
== Configure the Kernel ==
 
== Configure the Kernel ==
Line 20: Line 20:
 
For the standard Kurobox do this:
 
For the standard Kurobox do this:
  
  cp config_kurobox .config
+
  # cp config_kurobox .config
  
 
For the Kurobox HG do this:
 
For the Kurobox HG do this:
  
  cp config_kuroboxhg .config
+
  # cp config_kuroboxhg .config
  
 
If you want to use the standard kernel type this:
 
If you want to use the standard kernel type this:
  
  make oldconfig
+
  # make oldconfig
  
 
If you want to customize your kernel type this:
 
If you want to customize your kernel type this:
  
  make menuconfig
+
  # make menuconfig
  
 
== Compile and Prepare the Kernel ==
 
== Compile and Prepare the Kernel ==
 
Make the kernel and make and install the modules
 
Make the kernel and make and install the modules
  
  make vmlinux modules modules_install
+
  # make vmlinux modules modules_install
  
 
''loader.o'' will need a binary of the new kernel, so we'll convert our new kernel and put it in ''/boot''
 
''loader.o'' will need a binary of the new kernel, so we'll convert our new kernel and put it in ''/boot''
  
  objcopy -O binary vmlinux /boot/vmlinux-2.6.15-kurobox
+
  # objcopy -O binary vmlinux /boot/vmlinux-2.6.15-kurobox
  
 
Change to ''/boot''
 
Change to ''/boot''
  
  cd /boot
+
  # cd /boot
  
If you don't have a copy of ''loader.o'' in /boot you should download a copy from the Gentoo downloads area. I'm not sure if this one works with the HG, but it does work with the standard Kurobox.
+
If you don't have a copy of ''loader.o'' in ''/boot'', you should download a copy from the Kurobox download area. I'm not sure if this one works with the HG, but it does work with the standard Kurobox.
  
  wget http://www.kurobox.com/downloads/kernel/loader.o
+
  # wget http://www.kurobox.com/downloads/kernel/loader.o
  
 
Sync the drive, load the kernel into memory, and jump to the new kernel.
 
Sync the drive, load the kernel into memory, and jump to the new kernel.
  
  sync;insmod loader.o kernel=vmlinux-2.6.15-kurobox
+
  # sync;insmod loader.o kernel=vmlinux-2.6.15-kurobox
  
If your new kernel works you can setup the Kurobox bootloader (more on this later).
+
If your new kernel works, you can set up the Kurobox bootloader (more on this later).
  
 
[[Category:Gentoo]]
 
[[Category:Gentoo]]
 
[[Category:HowTo]]
 
[[Category:HowTo]]

Revision as of 14:48, 27 May 2006

Plenty of other people have already written HOWTO's. You must have udev installed or the 2.6 kernel will not work. Check out The complete Gentoo Linux 2.6 migration guide. Other useful pages are Applying a Kernel Patch and General Kernel Build

Preparing for Install

Download the vanilla kernel source, untar it, and move into the source directory.

# cd /usr/src
# wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.15.tar.bz2
# tar xvjf linux-2.6.15.tar.bz2
# cd linux-2.6.15

Download the latest kernel patch and apply it. You may need to adjust the name of the patch. The patch should support both the standard Kurobox and HG model. Please report any changes needed to the config files, or any bugs you find, on the forums. Remember to include the type of box you are running, along with any supporting information-- the more information the better.

# wget http://www.kurobox.com/downloads/kernel/kurobox-patch-2-6-15.tar.bz2
# tar xvjf kurobox-patch-2-6-15-tar.bz2
# patch -p1 < kurobox-patch-2-6-15.patch

Configure the Kernel

Next we need to configure the kernel. There is a basic configuration with each patch.

For the standard Kurobox do this:

# cp config_kurobox .config

For the Kurobox HG do this:

# cp config_kuroboxhg .config

If you want to use the standard kernel type this:

# make oldconfig

If you want to customize your kernel type this:

# make menuconfig

Compile and Prepare the Kernel

Make the kernel and make and install the modules

# make vmlinux modules modules_install

loader.o will need a binary of the new kernel, so we'll convert our new kernel and put it in /boot

# objcopy -O binary vmlinux /boot/vmlinux-2.6.15-kurobox

Change to /boot

# cd /boot

If you don't have a copy of loader.o in /boot, you should download a copy from the Kurobox download area. I'm not sure if this one works with the HG, but it does work with the standard Kurobox.

# wget http://www.kurobox.com/downloads/kernel/loader.o

Sync the drive, load the kernel into memory, and jump to the new kernel.

# sync;insmod loader.o kernel=vmlinux-2.6.15-kurobox

If your new kernel works, you can set up the Kurobox bootloader (more on this later).