CS433 Linux Kernel Programming Homework

Homework 3 on Kernel compilation and printing

To get familiarzied yourself with start_kernel() and prepare for the remaining homework, you will do some preparatory excercise this time.

Inside start_kernel(), go to the first level of at least five functions of your choosing and print their names along with the contents of the parameters that are passed if any. Start with setup_arch(). For example, for "setup_arch(&command_line);" in start_kernel(), you would insert the following line in source/arch/x86/kernel/setup.c:

     printk(KERN_INFO "my_name (put your name here): setup_arch(): command_line=%s\n",*command_line); 
which would print
     my real name: setup_arch(): first_value_of_command_line
in /var/log/messages. setup_arch() already has the following line but you may still modify it:
0691         printk(KERN_INFO "Command line: %s\n", boot_command_line);
You may encounter kernel panic.

Check the "Links" pages at the class web page for kernel compilation. Some of them are are old. Check the Web for the current and updated guidelines for kernel compilation.