[Development] / fastos / ZeptoOS / BGL / docs / chapters / kernel.html Repository:
ViewVC logotype

Diff of /fastos/ZeptoOS/BGL/docs/chapters/kernel.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.6, Tue Sep 6 19:10:02 2005 UTC revision 1.7, Tue Sep 6 19:22:25 2005 UTC
# Line 1  Line 1 
1  <h1><a name=kernel>Kernel</a></h1>  <h1><a name=kernel>Kernel</a></h1>
2    
3    <p>
4  The ZeptoOS Linux kernel for BlueGene/L I/O nodes is based on the  The ZeptoOS Linux kernel for BlueGene/L I/O nodes is based on the
5  original 2.4.19 Linux supplied by IBM under the GPL.  The original  original 2.4.19 Linux supplied by IBM under the GPL.  The original
6  Linux distributed by IBM was jumble of kernel files, some deleted,  Linux distributed by IBM was jumble of kernel files, some deleted,
7  some added, and some modified.  To better manage those changes, they  some added, and some modified.  To better manage those changes, they
8  have been separated into three patch sets plus an additional set added  have been separated into three patch sets plus an additional set added
9  by the ZeptoOS Team.  The resulting kernel files are:  by the ZeptoOS Team.  The resulting kernel files are:
10    <p>
11  <ul>  <ul>
12  <li> <b>patch-2.4.19-bgl-addition</b>: Files IBM added to the stock 2.4.19 kernel  <li> <b>patch-2.4.19-bgl-addition</b>: Files IBM added to the stock 2.4.19 kernel
13  <li> <b>patch-2.4.19-bgl-deletion</b>: Files IBM deleted from the stock 2.4.19 kernel  <li> <b>patch-2.4.19-bgl-deletion</b>: Files IBM deleted from the stock 2.4.19 kernel
# Line 15  Line 15 
15  <li> <b>patch-2.4.19-bgl-zepto-v1.1</b>: Additional patches the ZeptoOS Team have applied to the 2.4.19 kernel  <li> <b>patch-2.4.19-bgl-zepto-v1.1</b>: Additional patches the ZeptoOS Team have applied to the 2.4.19 kernel
16  <li> <b>linux-2.4.19.tar.bz2</b>: Original stock 2.4.19 kernel  <li> <b>linux-2.4.19.tar.bz2</b>: Original stock 2.4.19 kernel
17  </ul>  </ul>
18    <p>
19    
20    
21  <h2>The summary of features IBM added or modified in kernel</h2>  <h2>The summary of features IBM added or modified in kernel</h2>
22    <p>
23  The kernel tarball that IBM distributed had 11MB(in diff size)  The kernel tarball that IBM distributed had 11MB(in diff size)
24  different from vanilla linux kernel.  Patches not only contains BG/L  different from vanilla linux kernel.  Patches not only contains BG/L
25  specific modifications but also it contains other PowerPC  specific modifications but also it contains other PowerPC
26  modifications. Some of PowerPC modifications are not used for BG/L  modifications. Some of PowerPC modifications are not used for BG/L
27  IONODE kernel.  Actually, we couldn't distinguish which IBM  IONODE kernel. Actually we couldn't distinguish which IBM modification
28  modification or non-IBM modification correctly.  or non-IBM modification correctly but you could use CONFIG_BGL linux
29    kernel config in source code to distinguish BG/L PPC modifications
30    from non-BG/L PPC modifications.
31  <!-- Features: * Summary of features IBM added or modified in kernel *  <p>
32  Summary of features ZeptoOS added to the kernel * How to use the  
33  special Zepto Features: logging, kparams, etc  Other than IBM, the ZeptoOS team has also modifies ION Linux kernel.
34    Those modification are all in patch-2.4.19-bgl-zepto-v1.1.  Here is
35    the summary of patch-2.4.19-bgl-zepto-v1.1.
36    
37  Build:  <p>
    * How to unpack and rebuild the kernel from scratch  
    * How to build kernel modules for ZeptoOS, where they can be placed for loading  
    * Important kernel build #define parameters  
 -->  
   
 patch-2.4.19-bgl-zepto-v1.1 contains the following updates or fixes.  
38    
39  <ul>  <ul>
40  <li> /proc/zepto/mobx to send msg to the BG/L system using mbox facility  <li> /proc/zepto/mobx to send msg to the BG/L system using mbox facility
# Line 50  Line 47 
47  <li> misc fixes such as fix on compilation error on original IBM distribution  <li> misc fixes such as fix on compilation error on original IBM distribution
48  </ul>  </ul>
49    
50    <p>
51    
52  <h2>How to rebuild the ION linux kernel and modify it</h2>  <h2>How to rebuild the ION linux kernel and modify it</h2>
53    
54    <p>
55    
56  Although the ZeptoOS distribution contains the pre-compiled ION linux  Although the ZeptoOS distribution contains the pre-compiled ION linux
57  kernel image, you may need to re-compile the linux kernel for your  kernel image, you may need to re-compile the linux kernel for your
58  purpose such as change kernel config or adding some extra codes.  purpose such as change kernel config or adding some extra codes.
59    <p>
60  Re-building the ION kernel image is straightforward. Go to the ION  Re-building the ION kernel image is straightforward. Go to the ION
61  kernel directory and type `make all`.  kernel directory and type `make all`.
62    <p>
63    
64    <pre>
65  $ cd ZeptoOS/BGL/ionode-linux-2.4.19  $ cd ZeptoOS/BGL/ionode-linux-2.4.19
66  $ make all  $ make all
67    </pre>
68    
69    <p>
70  You will get zImage.elf which is the ION kernel image in your current  You will get zImage.elf which is the ION kernel image in your current
71  working directory. Re-building process will usually take several  working directory. Re-building process will usually take several
72  minites ( approx. 4 minutes on JS20 BG/L front-end in ANL ).  minites ( approx. 4 minutes on JS20 BG/L front-end in ANL ).
73    
74    
75    <p>
76    
77  Re-building is simple enough but there are two things you have to know  Re-building is simple enough but there are two things you have to know
78  a couple of things.  But don't be afraid. it's just Linux kernel,  a couple of things.  But don't be afraid. it's just Linux kernel,
79  which means you can simply apply your knowlegde.  which means you can simply apply your knowlegde.
80    <p>
81  First of all, there are two Makefile files we consider here.  To avoid  First of all, there are two Makefile files we consider here.  To avoid
82  confusion, we use the wrapper Makefile and the linux kernel Makefile.  confusion, we use the wrapper Makefile and the linux kernel Makefile.
83    <p>
84    
85  <ul>  <ul>
86  <li>the wrapper Makefile : ZeptoOS/BGL/ionode-linux-2.4.19/Makefile  <li>the wrapper Makefile : ZeptoOS/BGL/ionode-linux-2.4.19/Makefile
87  <li>the linux kernel Makefile : ZeptoOS/BGL/ionode-linux-2.4.19/linux-2.4.19/Makefile (*1)  <li>the linux kernel Makefile : ZeptoOS/BGL/ionode-linux-2.4.19/linux-2.4.19/Makefile (*)
88  </ul>  </ul>
89    
90    <p>
91  Note: The linux kernel Makefile doesn't exist initially. The wrapper  Note: The linux kernel Makefile doesn't exist initially. The wrapper
92  Makefile extracts a linux-2.4.19 tree.  Makefile extracts a linux-2.4.19 tree.
93    <p>
94    
95  The next thing is that the vanilla Linux kernel(PPC) never run on BG/L  The next thing is that the vanilla Linux kernel(PPC) never run on BG/L
96  because bootstrap code is different and BG/L specific capabilities  because bootstrap code is different and BG/L specific capabilities
# Line 94  Line 99 
99  is nothing special. You could apply BG/L patches to the stock 2.4.19  is nothing special. You could apply BG/L patches to the stock 2.4.19
100  linux kernel by hand.  linux kernel by hand.
101    
102    <p>
103    
104  The last thing is that ION kernel compilation uses our compiler tool  The last thing is that ION kernel compilation uses our compiler tool
105  chain by default, which is included in the ZeptoOS distribution. Using  chain by default, which is included in the ZeptoOS distribution. Using
# Line 101  Line 107 
107  difficulties on compilation. Makefile in the ionode-linux directory  difficulties on compilation. Makefile in the ionode-linux directory
108  does the followings about the compiler tool chain.  does the followings about the compiler tool chain.
109    
110    <p>
111    
112  <ol>  <ol>
113  <li>automatically prepare the compiler toolchain if it doesn't exist  <li>automatically prepare the compiler toolchain if it doesn't exist
114  <li>provide the compiler path and the cross compiler prefix.  <li>provide the compiler path and the cross compiler prefix.
115  <li>pass them(path,flags,etc) to the next level Makefile which is a  <li>pass them(path,flags,etc) to the next level Makefile which is a
116  regular Linux kernal makefile  regular Linux kernal makefile
117  </ol>  </ol>
118    <p>
119    
120  If you are familiar with the compiler tool chain, you can directly use  If you are familiar with the compiler tool chain, you can directly use
121  Makefile in the linux kernel.  Here is information about our tool  Makefile in the linux kernel.  Here is information about our tool
122  chain.  chain.
123    <p>
124    
125  <ol>  <ol>
126  <li>PATH : ${IONODE_LINUX_DIR}/../toolchain/powerpc-440-linux-gnu/bin  <li>PATH : ${IONODE_LINUX_DIR}/../toolchain/powerpc-440-linux-gnu/bin
127  <li>CROSS_COMPILE : powerpc-440-linux-gnu-  <li>CROSS_COMPILE : powerpc-440-linux-gnu-
128  </ol>  </ol>
129    <p>
130  Here is an concrete example.  Here is an concrete example.
131    <p>
132  <pre>  <pre>
133  $ pwd  $ pwd
134  /home/joe/ZeptoOS/BGL/ionode-linux-2.4.19  /home/joe/ZeptoOS/BGL/ionode-linux-2.4.19
# Line 126  Line 136 
136  $ PATH=$PATH:../../toolchain/powerpc-440-linux-gnu/bin make CROSS_COMPILE=powerpc-440-linux-gnu-  zImage  $ PATH=$PATH:../../toolchain/powerpc-440-linux-gnu/bin make CROSS_COMPILE=powerpc-440-linux-gnu-  zImage
137  </pre>  </pre>
138    
139    <p>
140  <h3>Add your code to the ION tree</h3>  <h3>Add your code to the ION tree</h3>
141    <p>
142  Before start writing code to the ION tree, you need to prepare the  Before start writing code to the ION tree, you need to prepare the
143  working tree. The ".config" target does prepare the tree.  Now ready  working tree. The ".config" target does prepare the tree.  Now ready
144  to modify files in the Linux kernl dir. The "kernel" target does  to modify files in the Linux kernl dir. The "kernel" target does
145  (re-)compile the kernel image.  (re-)compile the kernel image.
146    
147    <p>
148  <pre>  <pre>
149  $ pwd  $ pwd
150  /home/joe/ZeptoOS/BGL/ionode-linux-2.4.19  /home/joe/ZeptoOS/BGL/ionode-linux-2.4.19
# Line 144  Line 155 
155  $ make kernel  $ make kernel
156  </pre>  </pre>
157    
158    <p>
159  You also need to change the kernel configuration as well as the code  You also need to change the kernel configuration as well as the code
160  modification. It's basically same as regular Linux kernel but  modification. It's basically same as regular Linux kernel but
161  linux-2.4.19/linux.config is default configuration we are using.  The  linux-2.4.19/linux.config is default configuration we are using.  The
162  wrapper Makefile copies linux.config to .config before start  wrapper Makefile copies linux.config to .config before start
163  compilation. So if you edit Linux configuration, please copy .config  compilation. So if you edit Linux configuration, please copy .config
164  back to linux.config for the next build.  back to linux.config for the next build.
165    <p>
166    
167    
168    

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

No CVS admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.1