Rebuild Linux Kernel with Over 1GB Memory


Linux kernel can sometimes cause performance problems such as slow or no booting, hanging up during boot or slow performance during normal operation. The performance issue can affect both Single Board Computers (SBC) or desktop computers and workstations which have greater than 1GB memory installed.




If the steps outlined in article i024825 do not work then use the following 30 step process to rebuild the kernel and potentially fix the issue.


This is a permanent fix for systems with 1GB RAM or greater (i.e. The 5565 board fails to map when calling RFM2gOpen() or the computer boots slowly or hangs during booting ).


The kernel needs to be rebuilt to fix a problem that limits the amount of virtual resources the kernel is allowed to have.


Step by Step Instructions

  1. Housekeeping

    1. cd /usr/src/linux-2.4

    2. vi Makefile

    3. Change the text following "EXTRAVERSION =" to something you will recognize at boot time (ie BIGRAM)

    4. Save the file.

  2. Edit kernel source:

    5. cd /usr/src/linux-2.4/include/asm-i386

    6. vi page.h

    7. Look for __VMALLOC_RESERVE

    8.  edit this line and replace 128 with 256

    9.  save the file

  3. Configure the kernel:

    10. cd /usr/src/linux-2.4

    11. make mrproper

    12. run either of these:

         make xconfig (if you have X windows running)

         make menuconfig (From a command line)

    13. select "Processor type and features"

    14. Make sure High "Memory Support" is enabled

    15. Within there select "4GB"

    16. save and exit.

  4. Build the kernel

    17.  make dep

    18.  make clean

    19.  make bzImage

    20.  make modules

    21.  make modules_install

    22.  make install

  5. Check installation:

    23.  cd /boot

    24.  ls

    25.  you should see:



        where XXXX is kernel version you customized in step 3 above. 

    26.  cd grub

    27.  vi grub.conf

    28.  make sure you see on option for the kernel version you customized in step 3 above.

    29.  close the file

  6. Try it out:

    30. reboot and select the kernel image you just built.