ykernel-proto-mono
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Ykernel-proto-mono] hacking the linux kernel - step 1


From: ishwarjoshi
Subject: [Ykernel-proto-mono] hacking the linux kernel - step 1
Date: Mon, 05 Aug 2002 04:09:04 +0000

what i did
----------

1. install redhat 7.0 on a desktop
   (do a complete install with the kernel source and
    the entire development tools)

2. download the DLX Linux distribution from 
   http://www.wu-wien.ac.at/usr/h93/h9301726/dlx.html

3. become root and extract the tarball into a directory

4. go to /usr/src/linux and do make menuconfig
   (take out most of the stuff from the kernel config.
    you can use my config file that i have attached
    to see what i have done)

5. Now create basic kernel by doing make zImage
   File zImage will be in /usr/src/linux/arch/i386/boot

6. Copy this zImage file to the kernel subdirectory of 
   DLX. Switch to the DLX directory.

7. Change the size of the ramdisk (open MakeImage and 
   change RD_SIZE=4800)

8. Put empty floppy in drive and say './MakeImage' 
   and './WriteDisk'

9. Boot with this floppy and ensure that you get bash 
   prompt (login as root)

Checkpoint 1: Basic stuff is ready
(you could copy the zImage now as zImage.1 as a backup)

Once the bootdisk is made, then do this:

10. Make a backup of the entire /usr/src/linux directory

11. Now go to /usr/src/linux

12. Open init/main.c and change function start_kernel() 
    to put
       printk("Hello World!\n");
      (I put this after line 1450 that said smp_init())

13. And change function init() in same file to put
       printk("Hello World 2!\n");
       (I put this just before line 1645 that said 
         if(execute_command))

14. Now make zImage

15. Then follow same procedure to copy this zImage
    and then create the DLX bootdisk as above

16. Reboot and you should see our new two lines in the 
    bootup process :-D

Checkpoint 2: We are able to change the kernel and see 
the changes
(you could copy the zImage now as zImage.2 as a backup)

-done-



reply via email to

[Prev in Thread] Current Thread [Next in Thread]