Difference between revisions of "HIP:PMP:Kernel"
Jump to navigation
Jump to search
(→chroot) |
|||
(9 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | === | + | === 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 | ||
+ | * [http://www.embeddedarm.com/downloads/Linux/TS-Dev-Cd-v1.0.2.img.bz2 Development Kit Project CD Image] | ||
+ | * [http://www.kernel.org/pub/linux/kernel/v2.4/linux-2.4.23.tar.bz2 2.4.23 Kernel] | ||
+ | * [http://www.embeddedarm.com/downloads/Linux/KernelStuff/TS-2.5-2.4.23.patch TS-2.5-2.4.23.patch] | ||
+ | Move all files to /p0/hip/archives | ||
− | + | === Preparing Files === | |
− | + | Extract all downloaded files in /p0/hip/archives | |
− | sudo cp | + | * Mount developer image |
+ | ~$ sudo mount -o loop /p0/hip/archives/ts-dev.img /p0/hip/mnt/ | ||
+ | * 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 | ||
+ | If kernel is being patched correctly, you should see something like this... | ||
+ | patching file linux-2.4.23/.config | ||
+ | patching file linux-2.4.23/Documentation/Configure.help | ||
+ | patching file linux-2.4.23/Makefile | ||
+ | .... | ||
+ | patching file linux-2.4.23/include/linux/blk.h | ||
+ | patching file linux-2.4.23/include/linux/major.h | ||
+ | patching file linux-2.4.23/include/linux/ts_sbc.h | ||
− | === | + | === Building Kernel === |
+ | First make a directory where modules will be copied into | ||
+ | ~$ cd /p0/hip/dev_local/usr/src/ | ||
+ | ~$ sudo mkdir modules | ||
+ | Then cd into /p0/hip/dev_local/usr/src/linux-2.4.23/ | ||
+ | * configuring kernel | ||
+ | ~$ sudo make menuconfig | ||
+ | NB: most of the default settings for the TS-5600 would have been set by the patch, so configure the kernel the way you want and save it. | ||
+ | * make dependencies | ||
+ | ~$ sudo make dep | ||
+ | * clean directories - remove files from previous builds | ||
+ | ~$ sudo make clean | ||
+ | * make bzImage | ||
+ | ~$ sudo make bzImage | ||
+ | * make modules | ||
+ | ~$ sudo make modules | ||
+ | * install modules | ||
+ | ~$ sudo make modules_install INSTALL_MOD_PATH=/p0/hip/dev_local/usr/src/modules/ | ||
− | + | === Copying Built kernel and modules === | |
− | + | First load modules and mount the sdcard by following the same steps listed in [http://wiki/index.php/HIP:PMP:Backup_PMP Backup PMP] | |
− | + | Then prepare the sdacard and copy the new kernel | |
− | + | * copying bzImage | |
− | + | ~$ cd /p0/hip/mnt/sda1/ | |
− | + | ~$ sudo rm bzImage | |
− | + | ~$ sudo cp /p0/hip/dev_local/usr/src/linux-2.4.23/arch/i386/boot/bzImage . | |
+ | * copying modules | ||
+ | ~$ cd /p0/hip/mnt/sda2/ | ||
+ | ~$ sudo cp -dpr /p0/hip/dev_local/usr/src/modules/lib/modules/* sda2/lib/modules/ | ||
+ | Finally unmount the sdcardand unload the modules as listed in [http://wiki/index.php/HIP:PMP:Backup_PMP Backup PMP] | ||
+ | |||
=== External Links === | === External Links === | ||
* [http://www.embeddedarm.com/linux/html_docs/Kernel_buld_HowTo.html Kernel build procedure using the TS-Linux patch] | * [http://www.embeddedarm.com/linux/html_docs/Kernel_buld_HowTo.html Kernel build procedure using the TS-Linux patch] | ||
+ | * [http://www.tldp.org/HOWTO/Battery-Powered/powermgm.html Power Management] |
Latest revision as of 10:56, 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
- Mount developer image
~$ sudo mount -o loop /p0/hip/archives/ts-dev.img /p0/hip/mnt/
- 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
If kernel is being patched correctly, you should see something like this...
patching file linux-2.4.23/.config patching file linux-2.4.23/Documentation/Configure.help patching file linux-2.4.23/Makefile .... patching file linux-2.4.23/include/linux/blk.h patching file linux-2.4.23/include/linux/major.h patching file linux-2.4.23/include/linux/ts_sbc.h
Building Kernel
First make a directory where modules will be copied into
~$ cd /p0/hip/dev_local/usr/src/ ~$ sudo mkdir modules
Then cd into /p0/hip/dev_local/usr/src/linux-2.4.23/
- configuring kernel
~$ sudo make menuconfig
NB: most of the default settings for the TS-5600 would have been set by the patch, so configure the kernel the way you want and save it.
- make dependencies
~$ sudo make dep
- clean directories - remove files from previous builds
~$ sudo make clean
- make bzImage
~$ sudo make bzImage
- make modules
~$ sudo make modules
- install modules
~$ sudo make modules_install INSTALL_MOD_PATH=/p0/hip/dev_local/usr/src/modules/
Copying Built kernel and modules
First load modules and mount the sdcard by following the same steps listed in Backup PMP Then prepare the sdacard and copy the new kernel
- copying bzImage
~$ cd /p0/hip/mnt/sda1/ ~$ sudo rm bzImage ~$ sudo cp /p0/hip/dev_local/usr/src/linux-2.4.23/arch/i386/boot/bzImage .
- copying modules
~$ cd /p0/hip/mnt/sda2/ ~$ sudo cp -dpr /p0/hip/dev_local/usr/src/modules/lib/modules/* sda2/lib/modules/
Finally unmount the sdcardand unload the modules as listed in Backup PMP