PXES HOWTO: Customizing kernel and modules

by Diego Torres Milano < diego@in3.com.ar >
Copyright © 2001-2003. All rights reserved.
This software is free software under the GNU General Public License.

Authors

Diego Torres Milano <diego@in3.com.ar>

Contributions

Rene Bartsch <rene at barschnet dot de>
Completed and updated.

Customizing kernel and modules


Adding a new kernel

If you want to add a new kernel to PXES' available kernel just create a symbolic link "linux" to the new kernel-sources in <pxesdir>/stock/

Building the kernel

Start from the default kernel configuration included in the distribution in </stock/arch/i586/kernel> and change it using one of the standard kernel configuration methods:


To make the kernel:

	Change into <pxesdir>/stock/linux directory

        # make mrproper
        # make clean
        * edit EXTRAVERSION in Makefile
        * copy a .config into kernel sources
	if you are going to use a SQUASHED image, don't
	forget to add squashfs support adding corresponding patch
	# make xconfig/menuconfig/oldconfig (start/save at least or "make dep" will fail)
        # make dep
        # make bzImage
        # cp <pxesdir>/stock/linux/arch/[ARCH]/boot/bzImage 
		<pxesdir>/stock/arch/[ARCH]/kernel/vmlinuz-[KERNELNAME].[ARCH] ([ARCH] is i586, ...)
	# cp <pxesdir>/stock/linux/.config                  
		<pxesdir>/stock/arch/[ARCH]/kernel/kernel-[KERNELNAME]-[ARCH].config
       
Modules:

	# make modules

To copy modules into PXES-tree:

        # make INSTALL_MOD_PATH=<pxesdir>/stock/arch/[ARCH]/modules modules_install

Create a new bootloader-entry for the kernel in /tftpboot/pxes/pxelinux.cfg/default like

	label 1
	kernel vmlinuz-[KERNELNAME].[ARCH]
	append ramdisk_size=24567 vga=771 console=null initrd=pxes-0.5.1.initrd root=/dev/ram

    Check your ramdisk_size being set to a sufficient value.



$Id: customizing_kernel_and_modules.html,v 1.2 2003/07/04 16:56:43 diego Exp $