HIP:PMP:Kernel

From Earlham Cluster Department

(Difference between revisions)
Jump to: navigation, search
Line 4: Line 4:
  ~$ sudo mkdir dev_local (to hold a local copy of the image for building kernel)
  ~$ sudo mkdir dev_local (to hold a local copy of the image for building kernel)
-
=== Downloading Required Files:===
+
=== Downloading Required Files ===
Developer CD/Image, Kernel & patch  
Developer CD/Image, Kernel & patch  
* [[http://www.embeddedarm.com/downloads/Linux/TS-Dev-Cd-v1.0.2.img.bz2 Development Kit Project CD Image]]
* [[http://www.embeddedarm.com/downloads/Linux/TS-Dev-Cd-v1.0.2.img.bz2 Development Kit Project CD Image]]
Line 12: Line 12:
=== Preparing Files ===
=== Preparing Files ===
-
Copy downloaded files  
+
Extract all downloaded files in /p0/hip/archives
-
# Mount developer image and create a local copy.
+
* Mount developer image
-
# Copy kernel and patch to /usr/src to local developer image
+
~$ sudo mount -o loop /p0/hip/archives/ts-dev.img /p0/hip/mnt/
-
  sudo cp linux-2.4.32.tar.bz2 dev_local/usr/src
+
* Create a local copy of the developer image
 +
~$ sudo cp -dpr /p0/hip/mnt/* /p0/hip/dev_local/
 +
* Unmount developer image
 +
~$ sudo umount /p0/hip/mnt/
 +
* Copy and patch kernel
 +
~$ sudo cp -dpr /p0/hip/archives/linux-2.4.23 /p0/hip/dev_local/usr/src/
 +
  ~$ sudo cp /p0/hip/archives/TS-2.5-2.4.23.patch /p0/hip/dev_local/usr/src/
 +
~$ cd /p0/hip/dev_local/usr/src/
 +
~$ sudo patch -p0 < TS-2.5-2.4.23.patch
-
=== chroot, Patch Kernel ===
+
=== Building Kernel ===
# cd to dev_local
# cd to dev_local

Revision as of 15:04, 10 July 2006

Contents

Making Directories

~$ cd /p0/hip/
~$ sudo mkdir archives  (to hold files required to build kernel)
~$ sudo mkdir dev_local (to hold a local copy of the image for building kernel)

Downloading Required Files

Developer CD/Image, Kernel & patch

Move all files to /p0/hip/archives

Preparing Files

Extract all downloaded files in /p0/hip/archives

~$ sudo mount -o loop /p0/hip/archives/ts-dev.img /p0/hip/mnt/
~$ sudo cp -dpr /p0/hip/mnt/* /p0/hip/dev_local/
~$ sudo umount /p0/hip/mnt/
~$ sudo cp -dpr /p0/hip/archives/linux-2.4.23 /p0/hip/dev_local/usr/src/
~$ sudo cp /p0/hip/archives/TS-2.5-2.4.23.patch /p0/hip/dev_local/usr/src/
~$ cd /p0/hip/dev_local/usr/src/
~$ sudo patch -p0 < TS-2.5-2.4.23.patch

Building Kernel

  1. cd to dev_local
  2. chroot
sudo /usr/sbin/chroot .
  1. cd to /usr/src
  2. untar kernel
  3. patch kernel
patch -p0 < TS-2.5-2.4.23.patch

Config and Build Kernel

  1. cd to linux-2.4.23
  2. run menuconfig
make menuconfig
  1. enable everything under General Setup > Power Management Support
  2. exit and save
  3. run make
make dep && make bzImage && make modules 
  1. make a modules directory, /usr/src/modules, and run make modules_install
make modules_install INSTALL_MOD_PATH=/usr/src/modules


External Links

Personal tools
Namespaces
Variants
Actions
websites
wiki
this semester
Toolbox