The section mismatches are because of an incorrectly configured kernel. Let's start from scratch, one step at a time. There is no need to create a symlink (/usr/src/linux) to your kernel tree. I don't know what your PMIPv6 test-bed project is, I'm hoping it's something being run on the system you're building the kernel with. If your PMIPv6 test-bed project is an embedded system, the following procedure may not necessarily work as you may have to cross-compile the kernel. I'm going to assume that your PMIPv6 test-bed project will be run on the host machine.
You have your kernel tree in /usr/src/linux-source-2.6.32
. Make this your PWD:
Now let's start with a clean tree by removing any previously generated files, including the kernel config and any backup files:
Since you are running the same version of the kernel to be built, you will already have a properly configured kernel configuration file. This file is /boot/config-2.6.32-21-generic
. Let's use this as a base configuration file. Copy it to your kernel source tree:
cp /boot/config-2.6.32-21-generic /usr/src/linux-source-2.6.32/.config
Now that we have a kernel configuration file in the source directory, let's apply the custom configuration item:
Now apply your custom config items:
CONFIG_EXPERIMENTAL=y (GENERAL SETUP -> PROMPT FOR DEV AND OR INCOMPLETE DRIVERS)
CONFIG_SYSVIPC=y (GENERAL SETUP -> SYSTEM V IPC)
CONFIG_NET=y (NETWORKING SUPPORT -> NETWORKING OPTIONS -> TCP/IP NETWORKING)
CONFIG_INET=y (NETWORKING SUPPORT -> NETWORKING OPTIONS -> TCP/IP NETWORKING)
CONFIG_IPV6=y (NETWORKING SUPPORT -> NETWORKING OPTIONS -> TCP/IP NETWORKING)
CONFIG_IPV6_MIP6=y (NETWORKING SUPPORT -> NETWORKING OPTIONS -> IPV6 PROTOCOL)
CONFIG_XFRM_USER=y (NETWORKING SUPPORT -> NETWORKING OPTIONS -> TRANSFORMATION USER CONFIGURATION INTERFACE)
CONFIG_XFRM_SUB_POLICY=y (NETWORKING SUPPORT -> NETWORKING OPTIONS -> TRANSFORMATION SUB POLICY SUPPORT)
CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION=y (NETWORKING SUPPORT -> NETWORKING OPTIONS -> IPV6 PROTOCOL -> IPV6: MIPV6 ROUTE OPTIMISATION MODE)
CONFIG_IPV6_TUNNEL=y (NETWORKING SUPPORT -> NETWORKING OPTIONS -> IPV6 PROTOCOL -> IPV6: IPV6 IN IPV6 TUNNEL)
CONFIG_IP_ADVANCED_ROUTER=y (NETWORKING SUPPORT -> NETWORKING OPTIONS -> IP: ADVANCED ROUTER)
CONFIG_ARPD=y (NETWORKING SUPPORT -> NETWORKING OPTIONS -> IP: ARP DAEMON SUPPORT)
CONFIG_INET6_ESP=y (NETWORKING SUPPORT -> NETWORKING OPTIONS -> IPV6 PROTOCOL -> IPV6 ESP TRANSFORMATION)
CONFIG_NET_KEY=y (NETWORKING SUPPORT -> NETWORKING OPTIONS -> PF_KEY SOCKETS)
CONFIG_NET_KEY_MIGRATE=y (NETWORKING SUPPORT -> NETWORKING OPTIONS -> PF_KEY SOCKETS -> PF_KEY MIGRATE)
Do not turn CONFIG_IPV6_MIP6_DEBUG on
Keep in mind that some configuration item may require you to enable/disable other configuration items. You can check the dependencies in the lower-right pane of the configuration window.
I would also recommend that you set a value for CONFIG_LOCALVERSION
to help differentiate between this and your other 2.6.32 kernel. This is under General Setup > Local Version - append to kernel release:
. For example, you can set this to -PMIPv6. After building the kernel, you kernel version will be 2.6.32-PMIPv6.
Build each target separately so you can correct any errors before going on to the next target.
Build the kernel:
Using the -s
option here causes a silent build. This prevents make from echoing the build commands, which in turn makes it easier to catch any error messages. This is MY personal preference and may not be yours or anyone else.
Once the kernel is built successfully, build the modules:
If the modules are built without any section mismatches, install them together with the kernel:
make modules_install install
This will install the modules under /lib/modules/2.6.32-PMIPv6
and create the /boot/vmlinuz-2.6.32-PMIPv6
together with the /boot/System-map-2.6.32-PMIPv6
If you need to build any drivers for your new kernel, then you will also need to create the headers:
If you install the headers this way, DO NOT clean the kernel tree. You will lose the headers.
An alternative is to install the headers to /usr/src/linux-headers-2.6.32-PMIPv6 by setting INSTALL_HDR_PATH to /usr/src.
Hope this helps a bit.