ia64/xen-unstable

view xen/arch/ia64/tools/mkbuildtree @ 4691:065f8708a9e2

bitkeeper revision 1.1327.1.9 (42714a2f9RKgJOZHHOz9jvIICLyXxQ)

More code cleanup
author djm@kirby.fc.hp.com
date Thu Apr 28 20:40:15 2005 +0000 (2005-04-28)
parents 0dc81495c135
children 632f2e07883a
line source
1 #!/bin/sh
2 #
3 # run in xen-X.X/xen directory after unpacking linux in same directory
5 XEN=$PWD
6 LINUX=$XEN/../../linux-2.6.11
7 LINUXPATCH=$XEN/arch/ia64/patch/linux-2.6.11
8 XENPATCH=$XEN/arch/ia64/patch/xen-2.0.1
10 cp_patch ()
11 {
12 #diff -u $LINUX/$1 $XEN/$2 > $LINUXPATCH/$3
13 cp $LINUX/$1 $XEN/$2
14 patch <$LINUXPATCH/$3 $XEN/$2
15 }
17 xen_patch ()
18 {
19 #patch <$XENPATCH/$2 $XEN/$1
20 echo 'skipping patch of' $XEN/$1
21 }
23 softlink ()
24 {
25 ln -s $LINUX/$1 $XEN/$2
26 }
28 null ()
29 {
30 touch $XEN/$1
31 }
34 # ensure linux directory is set up
35 if [ ! -d $LINUX ]; then
36 echo "ERROR: $LINUX directory doesn't exist"
37 exit
38 fi
40 # setup
42 #mkdir arch/ia64
43 #mkdir arch/ia64/lib
44 #mkdir include/asm-ia64
45 mkdir include/asm-generic
46 mkdir include/asm-ia64/linux
47 mkdir include/asm-ia64/linux/byteorder
48 # use "gcc -Iinclude/asm-ia64" to find these linux includes
49 ln -s $XEN/include/xen $XEN/include/linux
50 ln -s $XEN/include/asm-ia64/linux $XEN/include/asm-ia64/xen
52 # prepare for building asm-offsets (circular dependency)
53 echo '#define IA64_TASK_SIZE 0' > include/asm-ia64/asm-offsets.h
54 sleep 2
55 touch arch/ia64/asm-offsets.c
57 # patches to xen/common files
58 #xen_patch common/domain.c domain.c
59 #xen_patch common/dom_mem_ops.c dom_mem_ops.c
60 #xen_patch common/grant_table.c grant_table.c
61 #xen_patch common/kernel.c kernel.c
62 #xen_patch common/dom0_ops.c dom0_ops.c
63 #xen_patch common/memory.c memory.c
64 #xen_patch common/keyhandler.c keyhandler.c
65 #xen_patch common/softirq.c softirq.c
66 #xen_patch common/string.c string.c
67 #xen_patch common/elf.c elf.c
68 #xen_patch common/schedule.c schedule.c
69 #xen_patch drivers/char/serial.c serial.c
70 #xen_patch drivers/char/console.c console.c
71 #xen_patch include/public/xen.h xen.h
72 #xen_patch include/xen/grant_table.h grant_table.h
73 #xen_patch include/xen/init.h init.h
74 #xen_patch include/xen/irq.h irq.h
75 #xen_patch include/xen/list.h list.h
76 #xen_patch include/xen/sched.h sched.h
77 #xen_patch include/xen/slab.h slab.h
78 #xen_patch include/xen/time.h time.h
81 # arch/ia64 files
83 cp_patch arch/ia64/kernel/efi.c arch/ia64/efi.c efi.c
84 cp_patch arch/ia64/kernel/entry.S arch/ia64/entry.S entry.S
85 cp_patch arch/ia64/kernel/head.S arch/ia64/head.S head.S
86 #cp_patch arch/ia64/kernel/init_task.c arch/ia64/init_task.c init_task.c
87 cp_patch arch/ia64/kernel/irq_ia64.c arch/ia64/irq_ia64.c irq_ia64.c
88 cp_patch arch/ia64/kernel/ivt.S arch/ia64/ivt.S ivt.S
89 #cp_patch arch/ia64/kernel/minstate.h arch/ia64/minstate.h minstate.h
90 cp_patch arch/ia64/kernel/setup.c arch/ia64/setup.c setup.c
91 cp_patch arch/ia64/kernel/time.c arch/ia64/time.c time.c
92 cp_patch arch/ia64/kernel/unaligned.c arch/ia64/unaligned.c unaligned.c
93 cp_patch arch/ia64/kernel/vmlinux.lds.S arch/ia64/xen.lds.S lds.S
95 #cp_patch mm/bootmem.c arch/ia64/mm_bootmem.c mm_bootmem.c
96 #cp_patch mm/page_alloc.c arch/ia64/page_alloc.c page_alloc.c
97 #cp_patch mm/slab.c arch/ia64/slab.c slab.c
99 # following renamed to avoid conflict
100 #cp_patch kernel/extable.c arch/ia64/linuxextable.c linuxextable.c
101 softlink kernel/extable.c arch/ia64/linuxextable.c
103 cp_patch arch/ia64/mm/contig.c arch/ia64/mm_contig.c mm_contig.c
104 cp_patch arch/ia64/mm/tlb.c arch/ia64/tlb.c tlb.c
106 #cp_patch arch/ia64/hp/sim/hpsim_irq.c arch/ia64/hpsim_irq.c hpsim_irq.c
108 softlink arch/ia64/kernel/efi_stub.S arch/ia64/efi_stub.S
109 softlink arch/ia64/kernel/entry.h arch/ia64/entry.h
110 softlink arch/ia64/kernel/ia64_ksyms.c arch/ia64/ia64_ksyms.c
111 softlink arch/ia64/kernel/irq_lsapic.c arch/ia64/irq_lsapic.c
112 softlink arch/ia64/kernel/machvec.c arch/ia64/machvec.c
113 softlink arch/ia64/mm/extable.c arch/ia64/extable.c
114 #softlink arch/ia64/kernel/pal.S arch/ia64/pal.S
115 cp_patch arch/ia64/kernel/pal.S arch/ia64/pal.S pal.S
116 softlink arch/ia64/kernel/patch.c arch/ia64/patch.c
117 softlink arch/ia64/kernel/sal.c arch/ia64/sal.c
118 softlink arch/ia64/kernel/minstate.h arch/ia64/minstate.h
120 softlink arch/ia64/lib/bitop.c arch/ia64/lib/bitop.c
121 softlink arch/ia64/lib/carta_random.S arch/ia64/lib/carta_random.S
122 softlink arch/ia64/lib/checksum.c arch/ia64/lib/checksum.c
123 softlink arch/ia64/lib/clear_page.S arch/ia64/lib/clear_page.S
124 softlink arch/ia64/lib/clear_user.S arch/ia64/lib/clear_user.S
125 softlink arch/ia64/lib/copy_page_mck.S arch/ia64/lib/copy_page_mck.S
126 softlink arch/ia64/lib/copy_page.S arch/ia64/lib/copy_page.S
127 softlink arch/ia64/lib/copy_user.S arch/ia64/lib/copy_user.S
128 softlink arch/ia64/lib/csum_partial_copy.c arch/ia64/lib/csum_partial_copy.c
129 softlink arch/ia64/lib/dec_and_lock.c arch/ia64/lib/dec_and_lock.c
130 softlink arch/ia64/lib/do_csum.S arch/ia64/lib/do_csum.S
131 softlink arch/ia64/lib/flush.S arch/ia64/lib/flush.S
132 softlink arch/ia64/lib/idiv32.S arch/ia64/lib/idiv32.S
133 softlink arch/ia64/lib/idiv64.S arch/ia64/lib/idiv64.S
134 softlink arch/ia64/lib/io.c arch/ia64/lib/io.c
135 softlink arch/ia64/lib/ip_fast_csum.S arch/ia64/lib/ip_fast_csum.S
136 softlink arch/ia64/lib/memcpy_mck.S arch/ia64/lib/memcpy_mck.S
137 softlink arch/ia64/lib/memcpy.S arch/ia64/lib/memcpy.S
138 softlink arch/ia64/lib/memset.S arch/ia64/lib/memset.S
139 softlink arch/ia64/lib/strlen.S arch/ia64/lib/strlen.S
140 softlink arch/ia64/lib/strlen_user.S arch/ia64/lib/strlen_user.S
141 softlink arch/ia64/lib/strncpy_from_user.S arch/ia64/lib/strncpy_from_user.S
142 softlink arch/ia64/lib/strnlen_user.S arch/ia64/lib/strnlen_user.S
143 #softlink arch/ia64/lib/swiotlb.c arch/ia64/lib/swiotlb.c
144 cp_patch arch/ia64/lib/swiotlb.c arch/ia64/lib/swiotlb.c swiotlb.c
145 softlink arch/ia64/lib/xor.S arch/ia64/lib/xor.S
147 softlink lib/cmdline.c arch/ia64/cmdline.c
149 softlink arch/ia64/hp/sim/hpsim.S arch/ia64/hpsim.S
151 # xen/include/asm-generic files
153 softlink include/asm-generic/bug.h include/asm-generic/bug.h bug.h
154 softlink include/asm-generic/div64.h include/asm-generic/div64.h div64.h
155 softlink include/asm-generic/errno.h include/asm-generic/errno.h
156 softlink include/asm-generic/errno-base.h include/asm-generic/errno-base.h
157 softlink include/asm-generic/ide_iops.h include/asm-generic/ide_iops.h ide_iops.h
158 softlink include/asm-generic/iomap.h include/asm-generic/iomap.h iomap.h
159 softlink include/asm-generic/pci-dma-compat.h include/asm-generic/pci-dma-compat.h pci-dma-compat.h
160 softlink include/asm-generic/pci.h include/asm-generic/pci.h pci.h
161 softlink include/asm-generic/pgtable.h include/asm-generic/pgtable.h pgtable.h
162 softlink include/asm-generic/pgtable-nopud.h include/asm-generic/pgtable-nopud.h pgtable-nopud.h
163 softlink include/asm-generic/sections.h include/asm-generic/sections.h sections.h
164 softlink include/asm-generic/topology.h include/asm-generic/topology.h topology.h
165 softlink include/asm-generic/vmlinux.lds.h include/asm-generic/vmlinux.lds.h vmlinux.lds.h
168 # xen/include/asm-ia64 files
170 cp_patch arch/ia64/hp/sim/hpsim_ssc.h include/asm-ia64/hpsim_ssc.h hpsim_ssc.h
172 #cp_patch include/asm-ia64/current.h include/asm-ia64/current.h current.h
173 softlink include/asm-ia64/current.h include/asm-ia64/current.h
174 #cp_patch include/asm-ia64/gcc_intrin.h include/asm-ia64/gcc_intrin.h gcc_intrin.h
175 softlink include/asm-ia64/gcc_intrin.h include/asm-ia64/gcc_intrin.h
176 cp_patch include/asm-ia64/hardirq.h include/asm-ia64/hardirq.h hardirq.h
177 #cp_patch include/asm-ia64/hw_irq.h include/asm-ia64/hw_irq.h hw_irq.h
178 softlink include/asm-ia64/hw_irq.h include/asm-ia64/hw_irq.h
179 #cp_patch include/asm-ia64/ide.h include/asm-ia64/ide.h ide.h
180 cp_patch include/asm-ia64/io.h include/asm-ia64/io.h io.h
181 #cp_patch include/asm-ia64/irq.h include/asm-ia64/irq.h irq.h
182 softlink include/asm-ia64/irq.h include/asm-ia64/irq.h
183 cp_patch include/asm-ia64/kregs.h include/asm-ia64/kregs.h kregs.h
184 cp_patch include/asm-ia64/page.h include/asm-ia64/page.h page.h
185 cp_patch include/asm-ia64/processor.h include/asm-ia64/processor.h processor.h
186 #cp_patch include/asm-ia64/sal.h include/asm-ia64/sal.h sal.h
187 softlink include/asm-ia64/sal.h include/asm-ia64/sal.h
188 cp_patch include/asm-ia64/system.h include/asm-ia64/system.h system.h
189 cp_patch include/asm-ia64/types.h include/asm-ia64/types.h types.h
191 null include/asm-ia64/desc.h
192 #null include/asm-ia64/domain_page.h
193 #null include/asm-ia64/flushtlb.h
194 null include/asm-ia64/io_apic.h
195 null include/asm-ia64/pdb.h
196 null include/asm-ia64/module.h
198 softlink include/asm-ia64/acpi.h include/asm-ia64/acpi.h
199 softlink include/asm-ia64/asmmacro.h include/asm-ia64/asmmacro.h
200 softlink include/asm-ia64/atomic.h include/asm-ia64/atomic.h
201 softlink include/asm-ia64/bitops.h include/asm-ia64/bitops.h
202 softlink include/asm-ia64/break.h include/asm-ia64/break.h
203 softlink include/asm-ia64/bug.h include/asm-ia64/bug.h
204 softlink include/asm-ia64/byteorder.h include/asm-ia64/byteorder.h
205 softlink include/asm-ia64/cacheflush.h include/asm-ia64/cacheflush.h
206 softlink include/asm-ia64/cache.h include/asm-ia64/cache.h
207 softlink include/asm-ia64/checksum.h include/asm-ia64/checksum.h
208 softlink include/asm-ia64/delay.h include/asm-ia64/delay.h
209 softlink include/asm-ia64/div64.h include/asm-ia64/div64.h
210 softlink include/asm-ia64/dma.h include/asm-ia64/dma.h
211 softlink include/asm-ia64/dma-mapping.h include/asm-ia64/dma-mapping.h
212 softlink include/asm-ia64/errno.h include/asm-ia64/errno.h
213 softlink include/asm-ia64/fpu.h include/asm-ia64/fpu.h
214 softlink include/asm-ia64/hdreg.h include/asm-ia64/hdreg.h
215 softlink include/asm-ia64/ia32.h include/asm-ia64/ia32.h
216 softlink include/asm-ia64/ia64regs.h include/asm-ia64/ia64regs.h
217 softlink include/asm-ia64/intrinsics.h include/asm-ia64/intrinsics.h
218 softlink include/asm-ia64/ioctl.h include/asm-ia64/ioctl.h
219 softlink include/asm-ia64/linkage.h include/asm-ia64/linkage.h
220 softlink include/asm-ia64/machvec.h include/asm-ia64/machvec.h
221 softlink include/asm-ia64/machvec_hpsim.h include/asm-ia64/machvec_hpsim.h
222 #softlink include/asm-ia64/mca_asm.h include/asm-ia64/mca_asm.h
223 cp_patch include/asm-ia64/mca_asm.h include/asm-ia64/mca_asm.h mca_asm.h
224 softlink include/asm-ia64/mca.h include/asm-ia64/mca.h
225 softlink include/asm-ia64/meminit.h include/asm-ia64/meminit.h
226 softlink include/asm-ia64/mman.h include/asm-ia64/mman.h
227 softlink include/asm-ia64/numa.h include/asm-ia64/numa.h
228 softlink include/asm-ia64/pal.h include/asm-ia64/pal.h
229 softlink include/asm-ia64/param.h include/asm-ia64/param.h
230 softlink include/asm-ia64/patch.h include/asm-ia64/patch.h
231 softlink include/asm-ia64/pci.h include/asm-ia64/pci.h
232 softlink include/asm-ia64/percpu.h include/asm-ia64/percpu.h
233 #softlink include/asm-ia64/pgalloc.h include/asm-ia64/pgalloc.h
234 cp_patch include/asm-ia64/pgalloc.h include/asm-ia64/pgalloc.h pgalloc.h
235 softlink include/asm-ia64/pgtable.h include/asm-ia64/pgtable.h
236 softlink include/asm-ia64/ptrace.h include/asm-ia64/ptrace.h
237 softlink include/asm-ia64/ptrace_offsets.h include/asm-ia64/ptrace_offsets.h
238 softlink include/asm-ia64/rse.h include/asm-ia64/rse.h
239 softlink include/asm-ia64/rwsem.h include/asm-ia64/rwsem.h
240 softlink include/asm-ia64/scatterlist.h include/asm-ia64/scatterlist.h
241 softlink include/asm-ia64/sections.h include/asm-ia64/sections.h
242 softlink include/asm-ia64/semaphore.h include/asm-ia64/semaphore.h
243 softlink include/asm-ia64/setup.h include/asm-ia64/setup.h
244 softlink include/asm-ia64/sigcontext.h include/asm-ia64/sigcontext.h
245 softlink include/asm-ia64/signal.h include/asm-ia64/signal.h
246 softlink include/asm-ia64/smp.h include/asm-ia64/smp.h
247 softlink include/asm-ia64/spinlock.h include/asm-ia64/spinlock.h
248 softlink include/asm-ia64/string.h include/asm-ia64/string.h
249 softlink include/asm-ia64/thread_info.h include/asm-ia64/thread_info.h
250 softlink include/asm-ia64/timex.h include/asm-ia64/timex.h
251 softlink include/asm-ia64/topology.h include/asm-ia64/topology.h
252 softlink include/asm-ia64/uaccess.h include/asm-ia64/uaccess.h
253 softlink include/asm-ia64/unaligned.h include/asm-ia64/unaligned.h
254 softlink include/asm-ia64/unistd.h include/asm-ia64/unistd.h
255 softlink include/asm-ia64/unwind.h include/asm-ia64/unwind.h
256 softlink include/asm-ia64/ustack.h include/asm-ia64/ustack.h
258 #rename this one because xen/include/asm/serial.h already exists
259 #there is only one use of it that must be patched -- arch/ia64/setup.c
260 #softlink include/asm-ia64/serial.h include/asm-ia64/asmserial.h
262 # xen/include/asm-ia64/linux/*.h (== linux/include/linux/*.h)
264 cp_patch include/linux/bootmem.h include/asm-ia64/linux/bootmem.h bootmem.h
265 cp_patch include/linux/cpumask.h include/asm-ia64/linux/cpumask.h cpumask.h
266 #cp_patch include/linux/dma-mapping.h include/asm-ia64/linux/dma-mapping.h dma-mapping.h
267 softlink include/linux/dma-mapping.h include/asm-ia64/linux/dma-mapping.h
268 #cp_patch include/linux/efi.h include/asm-ia64/linux/efi.h efi.h
269 softlink include/linux/efi.h include/asm-ia64/linux/efi.h
270 #cp_patch include/linux/hardirq.h include/asm-ia64/linux/hardirq.h linuxhardirq.h
271 softlink include/linux/hardirq.h include/asm-ia64/linux/linuxhardirq.h
272 #cp_patch include/linux/init_task.h include/asm-ia64/linux/init_task.h init_task.h
273 cp_patch include/linux/interrupt.h include/asm-ia64/linux/interrupt.h interrupt.h
274 #cp_patch include/linux/mmzone.h include/asm-ia64/linux/mmzone.h mmzone.h
275 softlink include/linux/mmzone.h include/asm-ia64/linux/mmzone.h
277 #cp_patch include/linux/wait.h include/asm-ia64/linux/wait.h wait.h
278 softlink include/linux/wait.h include/asm-ia64/linux/wait.h
280 #cp_patch include/linux/slab.h include/asm-ia64/slab.h slab.h
282 # following renamed to avoid conflict
283 #cp_patch include/linux/time.h include/xen/linuxtime.h linuxtime.h
284 softlink include/linux/time.h include/asm-ia64/linux/linuxtime.h
286 softlink include/linux/bcd.h include/asm-ia64/linux/bcd.h
287 softlink include/linux/bitmap.h include/asm-ia64/linux/bitmap.h
288 softlink include/linux/bitops.h include/asm-ia64/linux/bitops.h
289 softlink include/linux/err.h include/asm-ia64/linux/err.h
290 softlink include/linux/gfp.h include/asm-ia64/linux/gfp.h
291 softlink include/linux/initrd.h include/asm-ia64/linux/initrd.h
292 softlink include/linux/kmalloc_sizes.h include/asm-ia64/linux/kmalloc_sizes.h
293 softlink include/linux/linkage.h include/asm-ia64/linux/linkage.h
294 softlink include/linux/numa.h include/asm-ia64/linux/numa.h
295 softlink include/linux/page-flags.h include/asm-ia64/linux/page-flags.h
296 softlink include/linux/percpu.h include/asm-ia64/linux/percpu.h
297 softlink include/linux/preempt.h include/asm-ia64/linux/preempt.h
298 softlink include/linux/rbtree.h include/asm-ia64/linux/rbtree.h
299 softlink include/linux/rwsem.h include/asm-ia64/linux/rwsem.h
300 softlink include/linux/seq_file.h include/asm-ia64/linux/seq_file.h
301 softlink include/linux/serial_core.h include/asm-ia64/linux/serial_core.h
302 softlink include/linux/stddef.h include/asm-ia64/linux/stddef.h
303 softlink include/linux/thread_info.h include/asm-ia64/linux/thread_info.h
304 softlink include/linux/threads.h include/asm-ia64/linux/threads.h
305 softlink include/linux/timex.h include/asm-ia64/linux/timex.h
306 softlink include/linux/topology.h include/asm-ia64/linux/topology.h
307 softlink include/linux/tty.h include/asm-ia64/linux/tty.h
308 softlink include/linux/seqlock.h include/asm-ia64/linux/seqlock.h
310 null include/asm-ia64/linux/file.h
311 null include/asm-ia64/linux/module.h
312 null include/asm-ia64/linux/swap.h
313 null include/asm-ia64/linux/device.h
314 null include/asm-ia64/linux/proc_fs.h
315 null include/asm-ia64/linux/rtc.h
316 null include/asm-ia64/linux/profile.h
317 null include/asm-ia64/linux/seqlock.h
319 softlink include/linux/byteorder/generic.h include/asm-ia64/linux/byteorder/generic.h
320 softlink include/linux/byteorder/little_endian.h include/asm-ia64/linux/byteorder/little_endian.h
321 softlink include/linux/byteorder/swab.h include/asm-ia64/linux/byteorder/swab.h