搭建NEPL test network —— 内核编译

What is NEMO & NEPL?

  • NEMO - Network Mobility
  • NEPL - NEMO Platform for Linux

OS - Debian GNU/Linux 3.1

Ref:

下载所需的软件包:

# cd /usr/src/
# wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.15.tar.bz2
# wget http://www.mobile-ipv6.org/software/download/nemo-0.2-linux-2.6.15.patch.gz
# wget http://www.mobile-ipv6.org/software/download/nemo-0.2.tar.gz

安装编译内核需要的工具:

# apt-get install kernel-package ncurses-dev fakeroot wget bzip2
# apt-get install module-init-tools initrd-tools procps
# apt-get install autoconf automake1.8 byacc flex libssl-dev indent

解压缩:

# tar jxf linux-2.6.15.tar.bz2
# gunzip nemo-0.2-linux-2.6.15.patch.gz
# tar zxf nemo-0.2.tar.gz

打上Mobile IPv6的patch:

# mv nemo-0.2-linux-2.6.15.patch linux-2.6.15/
# cd linux-2.6.15/
# patch -p1 < nemo-0.2-linux-2.6.15.patch

配置内核参数,加上Mobile IPv6支持:

# make menuconfig

在下列选项前打*号,都在Networking->Networking options下面

  • PF_KEY sockets
    • PF_KEY migration interface (EXPERIMENTAL)
  • The IPv6 protocol
    • IPv6: Privacy Extensions (RFC 3041) support
    • IPv6: AH transformation
    • IPv6: ESP transformation
    • IPv6: IPComp transformation
    • IPv6: IPv6-in-IPv6 tunnel
    • IPv6: advanced router (EXPERIMENTAL)
      • IPv6: policy routing
      • IPv6: source address based routing
    • IPv6: Mobility (EXPERIMENTAL)
      • IPv6: Moblity Debug Message

用NEPL包里带的chkconf_kernel.sh脚本检查内核配置:

# /usr/src/nemo-0.2/chkconf_kernel.sh /usr/src/linux-2.6.15/

Checking kernel configuration...
Using /usr/src/linux-2.6.15/.config
All kernel options are as they should.

如果看不到任何warning,就可以编译内核了。

# make bzImage
# make modules
# make modules_install
# mkinitrd -o /boot/initrd-2.6.15.img 2.6.15

安装新内核:

# cp arch/i386/boot/bzImage /boot/bzImage-2.6.15
# cp System.map /boot/System.map-2.6.15
# ln -s /boot/System.map-2.6.15 /boot/System.map

配置LILO:
image=/boot/bzImage-2.6.15 label=NEPL read-only initrd=/boot/initrd-2.6.15.img

使lilo生效

# lilo -v -v -v

用新的内核boot后,编译nemo:

# uname -a
Linux nepl-demo 2.6.15 #1 Tue Mar 14 15:14:49 CST 2006 i686 GNU/Linux # cd /usr/src/nemo-0.2/
# CPPFLAGS='-isystem /usr/src/linux-2.6.15/include/' ./configure --enable-vt
# make
#make install

可以制作一个内核的deb安装包:

# cd /usr/src/linux-2.6.15
# make-kpkg clean
# fakeroot make-kpkg --revision=nemo.0.2 kernel_image

制作好文件可以在/usr/src下找到 kernel-image-2.6.15_nemo.0.2_i386.deb

HP-UX下无法启动WebLogic 报错OutOfMemoryError

HP-UX下启动WebLogic 8.1 SP4时,报错:

Throwable: java.lang.OutOfMemoryErro: unable to create new native thread

WebLogic 8.1 SP4 的 Supported Configurations文档里已经在Known Issues一节说明了这个问题。需要调整HP-UX的几个内核参数:

  • max_thread_proc -> 1024
  • maxfiles -> 256
  • maxusers -> 256
  • nkthread -> 3635
  • nproc -> 2068
  • ncallout -> 2084

Ref: http://e-docs.bea.com/.../hpux11_risc/81sp4.html#80105