SN makefile stuff
Quoted 5 lines · Sam Ravnborg
On Wed, Mar 05, 2003 at 04:12:49PM -0800, Jesse Barnes wrote:
Hi Jesse.
Quoted 1 line
From a
Makefileperspective it looks like you have made a really good job.A few comments - see below.
Thanks for looking at this, I hadn't yet dug out your last mail about what I should be doing, so I wasn't sure if I remembered everything.
Quoted 4 lines
Usually I use the rule to convert to full path in arch/$(ARCH)/Makefile
The following is preferred assuming you generate file named fakeprom.
Review
Quoted 1 line
(quoted diff) +1
-0+ $(Q)$(MAKE) $(build)=$(fakeprom) $(fakeprom)/$@
Oh, ok.
Quoted 7 lines
arch/ia64/sn/fakeprom/Makefile
Quoted 6 lines
diff -Naru linux-2.5.60-ia64-sn/arch/ia64/sn/fakeprom/Makefile work-sn2/arch/ia64/sn/fakeprom/Makefile
arch/ia64/sn/fakeprom/Makefile +1
-1-obj-y=fpromasm.o main.o fw-emu.o fpmem.o klgraph_init.o +targets-$(CONFIG_IA64_SGI_SN) := fakepromCannot (from the patch) see the purpose of this assignment.
I didn't know about EXTRA_TARGETS, but I think this allowed it to build when I called 'make fakeprom'.
Quoted 5 lines
Quoted 5 lines
arch/ia64/sn/fakeprom/Makefile +2
-2-fprom: $(OBJ) - $(LD) -static -Tfprom.lds -o fprom $(OBJ) $(LIB) +OBJS := $(obj)/fpromasm.o $(obj)/main.o $(obj)/fw-emu.o $(obj)/fpmem.o \ + $(obj)/klgraph_init.o
Quoted 7 lines
arch/ia64/sn/fakeprom/Makefile
Quoted 6 lines
-.S.o:
arch/ia64/sn/fakeprom/Makefile +2
-3- $(CC) -D__ASSEMBLY__ $(AFLAGS) $(AFLAGS_KERNEL) -c -o $*.o $< -.c.o: - $(CC) $(CFLAGS) $(CFLAGS_KERNEL) -c -o $*.o $< +fakeprom: $(obj)/fakeprom $(obj)/vmlinux.sym + cp $(obj)/fakeprom $(obj)/fprom$(obj)/fprom is a target here.
I should probably just generate fprom directly instead of copying it, otherwise I should use $(src)/fprom?
Quoted 7 lines
arch/ia64/sn/fakeprom/Makefile
Quoted 3 lines
arch/ia64/sn/fakeprom/Makefile +3
-0+ +$(obj)/fakeprom: $(src)/fprom.lds $(OBJS) arch/ia64/lib/lib.a + $(call if_changed,ld)You must add FORCE as prerequisite, otherwise it will not work as expected. All targets used must be listed in:
EXTRA_TARGETSEXTRA_TARGETS:= fprom fakeprom vmlinux.sym
Could that explain why the files in arch/ia64/sn/fakeprom get rebuilt everytime?
I'll fix this stuff up and post a diff against David's next patch (or bk tree, hint hint :).
Thanks,
Jesse
Quoted 6 lines · Jesse Barnes
Quoted 3 lines
Review
Quoted 2 lines
(quoted diff) +2
-0+fakeprom: $(obj)/fakeprom $(obj)/vmlinux.sym + cp $(obj)/fakeprom $(obj)/fprom$(obj)/fprom is a target here.
I should probably just generate fprom directly instead of copying it, otherwise I should use $(src)/fprom?
Generating fakeprom is the preferred method.
Otherwise the above rule should look like this:
$(obj)/fakeprom: $(obj)/fprom $(obj)/vmlinux.sym
cp $< $@
Quoted 4 lines
Quoted 1 line
EXTRA_TARGETS:= fprom fakeprom vmlinux.symCould that explain why the files in
arch/ia64/sn/fakepromget rebuilt everytime?
Missing the EXTRA_TARGETS may explain that.
That is used by kbuild to read the .fprom.cmd file - and to check if the commandline changed. If it fails to read .fprom.cmd it obviously think the commandline changed.
Sam
Does this look a little better? Still can't figure out why fprom always rebuilds all files though...
Thanks,
Jesse
arch/ia64/Makefile +7 -5
@@ -50,17 +50,15 @@ core-$(CONFIG_IA64_GENERIC) += arch/ia64/dig/ arch/ia64/hp/common/ arch/ia64/hp/zx1/ \ arch/ia64/hp/sim/ core-$(CONFIG_IA64_HP_ZX1) += arch/ia64/dig/ -core-$(CONFIG_IA64_SGI_SN) += arch/ia64/sn/kernel/ \ - arch/ia64/sn/io/ \ - arch/ia64/sn/io/sn2/ \ - arch/ia64/sn/io/sn2/pcibr/ \ - arch/ia64/sn/kernel/sn2/ +core-$(CONFIG_IA64_SGI_SN) += arch/ia64/sn/ + drivers-$(CONFIG_PCI) += arch/ia64/pci/ drivers-$(CONFIG_IA64_HP_SIM) += arch/ia64/hp/sim/ drivers-$(CONFIG_IA64_HP_ZX1) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ boot := arch/ia64/boot tools := arch/ia64/tools +fprom := arch/ia64/sn/fakeprom .PHONY: boot compressed include/asm-ia64/offsets.h
@@ -85,10 +83,14 @@ boot: lib/lib.a vmlinux $(Q)$(MAKE) $(build)=$(boot) $@ +fprom: + $(Q)$(MAKE) $(build)=$(fprom) $(fprom)/$@ + include/asm-ia64/offsets.h: include/asm include/linux/version.h include/config/MARKER $(Q)$(MAKE) $(build)=$(tools) $@ define archhelp echo ' compressed - Build compressed kernel image' echo ' boot - Build vmlinux and bootloader for Ski simulator' + echo ' fprom - Build fake PROM for Medusa simulator' endef
arch/ia64/sn/Makefile +14 -0
@@ -0,0 +1,14 @@ +# arch/ia64/sn/Makefile +# +# This file is subject to the terms and conditions of the GNU General Public +# License. See the file "COPYING" in the main directory of this archive +# for more details. +# +# Copyright (C) 2003 Silicon Graphics, Inc. All Rights Reserved. +# +# Makefile for the sn ia64 subplatform +# + +EXTRA_CFLAGS := -DLITTLE_ENDIAN + +obj-y += kernel/ # io/
arch/ia64/sn/io/Makefile +6 -2
@@ -1,3 +1,4 @@ +# arch/ia64/sn/io/Makefile # # This file is subject to the terms and conditions of the GNU General Public # License. See the file "COPYING" in the main directory of this archive
@@ -5,7 +6,8 @@ # # Copyright (C) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. # -# Makefile for the sn kernel routines. +# Makefile for the sn io routines. +# EXTRA_CFLAGS := -DLITTLE_ENDIAN
@@ -19,4 +21,6 @@ alenlist.o pci.o pci_dma.o ate_utils.o \ ifconfig_net.o io.o ioconfig_bus.o -obj-$(CONFIG_PCIBA) += pciba.o +obj-$(CONFIG_IA64_SGI_SN2) += sn2/ + +obj-$(CONFIG_PCIBA) += pciba.o
arch/ia64/sn/io/sn2/Makefile +4 -3
@@ -1,3 +1,4 @@ +# arch/ia64/sn/io/sn2/Makefile # # This file is subject to the terms and conditions of the GNU General Public # License. See the file "COPYING" in the main directory of this archive
@@ -6,14 +7,14 @@ # Copyright (C) 2002-2003 Silicon Graphics, Inc. All Rights Reserved. # # Makefile for the sn2 specific io routines. +# -EXTRA_CFLAGS := -DLITTLE_ENDIAN +EXTRA_CFLAGS := -DLITTLE_ENDIAN -obj-y += bte_error.o geo_op.o klconflib.o klgraph.o l1.o \ +obj-y += pcibr/ bte_error.o geo_op.o klconflib.o klgraph.o l1.o \ l1_command.o ml_iograph.o ml_SN_init.o ml_SN_intr.o module.o \ pci_bus_cvlink.o pciio.o pic.o sgi_io_init.o shub.o shuberror.o \ shub_intr.o shubio.o xbow.o xtalk.o obj-$(CONFIG_KDB) += kdba_io.o - obj-$(CONFIG_SHUB_1_0_SPECIFIC) += efi-rtc.o
arch/ia64/sn/io/sn2/l1_command.c +2 -2
@@ -154,7 +154,7 @@return ret; } - +#ifdef CONFIG_PCI /* * iobrick_module_get_nasid() returns a module_id which has the brick * type encoded in bits 15-12, but this is not the true brick type...
@@ -185,7 +185,7 @@ return -1; /* unknown brick */ } - +#endif int iobrick_module_get_nasid (nasid_t nasid) {int io_moduleid;
arch/ia64/sn/io/sn2/pcibr/Makefile +2 -0
@@ -1,3 +1,4 @@ +# arch/ia64/sn/io/sn2/pcibr/Makefile # # This file is subject to the terms and conditions of the GNU General Public # License. See the file "COPYING" in the main directory of this archive
@@ -6,6 +7,7 @@ # Copyright (C) 2002-2003 Silicon Graphics, Inc. All Rights Reserved. # # Makefile for the sn2 specific pci bridge routines. +# EXTRA_CFLAGS := -DLITTLE_ENDIAN
arch/ia64/sn/kernel/Makefile +8 -36
54 lines not on this page · raw message
arch/ia64/sn/kernel/setup.c +4 -3
@@ -237,7 +237,7 @@ "%x.%02x\n", SN_SAL_MIN_MAJOR, SN_SAL_MIN_MINOR);panic ("PROM version too old\n" ); } - +#ifdef CONFIG_PCI #ifdef CONFIG_IA64_SGI_SN2 { extern void io_sh_swapper(int, int);
@@ -253,7 +253,7 @@ (void )get_master_baseio_nasid (); }#endif - +#endif /* CONFIG_PCI */ status =ia64_sal_freq_base (SAL_FREQ_BASE_REALTIME_CLOCK , &ticks_per_sec, &drift);if (status !=0 || ticks_per_sec <100000 ) {printk (KERN_WARNING "unable to determine platform RTC clock frequency, guessing.\n" );
@@ -349,7 +349,7 @@for (cnode=0 ; cnode < numnodes; cnode++)memcpy (nodepdaindr[cnode]->pernode_pdaindr, nodepdaindr,sizeof (nodepdaindr)); - +#ifdef CONFIG_PCI /* * Set up IO related platform-dependent nodepda fields. * The following routine actually sets up the hubinfo struct
@@ -359,6 +359,7 @@init_platform_nodepda (nodepdaindr[cnode], cnode); bte_init_node (nodepdaindr[cnode], cnode); } +#endif }/**
arch/ia64/sn/kernel/sn2/Makefile +7 -31
@@ -1,38 +1,14 @@ -# # arch/ia64/sn/kernel/sn2/Makefile # +# This file is subject to the terms and conditions of the GNU General Public +# License. See the file "COPYING" in the main directory of this archive +# for more details. +# # Copyright (C) 1999,2001-2002 Silicon Graphics, Inc. All rights reserved. # -# This program is free software; you can redistribute it and/or modify it -# under the terms of version 2 of the GNU General Public License -# as published by the Free Software Foundation. -# -# This program is distributed in the hope that it would be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# -# Further, this software is distributed without any warranty that it is -# free of the rightful claim of any third person regarding infringement -# or the like. Any license provided herein, whether implied or -# otherwise, applies only to this software file. Patent licenses, if -# any, provided herein do not apply to combinations of this program with -# other software, or any other product whatsoever. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. -# -# Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, -# Mountain View, CA 94043, or: -# -# http://www.sgi.com -# -# For further information regarding this notice, see: -# -# http://oss.sgi.com/projects/GenInfo/NoticeExplan +# sn2 specific kernel files # -EXTRA_CFLAGS := -DLITTLE_ENDIAN +EXTRA_CFLAGS := -DLITTLE_ENDIAN -obj-y += cache.o iomv.o ptc_deadlock.o sn2_smp.o \ - sn_proc_fs.o +obj-y += cache.o iomv.o ptc_deadlock.o sn2_smp.o sn_proc_fs.o
arch/ia64/sn/tools/make_textsym +0 -171
171 lines not on this page · raw message
Quoted 2 lines · Jesse Barnes
Does this look a little better? Still can't figure out why fprom always rebuilds all files though...
What is included in the patch looks fine.
But you did not include arch/ia64/sn/fakeprom/Makefile this time??
To catch the reason why fprom rebuilds all (not all, but some I guess) files follow these steps.
1) What file is the first being rebuild
- When one file is being rebuild obviously all files dependent on this one will be rebuild.
2) take a good look in the corresponding makefile
- Is the target included in EXTRA_TARGETS without $(obj)/ prefix?
- Is FORCE one of the prerequisites to the target?
- Thats needed if you use $(call if_changed,{gzip,ld,objcopy}
3) Did you use a space in the $(call if_changed, ld)
^
$(call if_changed,ld) <= correct
$(call if_changed, ld) <= wrong
4) ... Lots of other reasons. Send me the makefile in question off-line if you want an extra pair of eyes on it.
One unrelated question.
Would it be possible to use the mach- scheme as used for i386 for sn? As it is done today it looks like a new architecture hidden below arch/ia64/*.
Sam
Quoted 6 lines · Sam Ravnborg
Quoted 2 lines · Jesse Barnes
Does this look a little better? Still can't figure out why fprom always rebuilds all files though...
What is included in the patch looks fine.
But you did not includearch/ia64/sn/fakeprom/Makefilethis time??
Oops, my dontdiff file was a little to aggressive.
Quoted 2 lines
2) take a good look in the corresponding makefile
- Is the target included inEXTRA_TARGETSwithout $(obj)/ prefix?
Looks like this was the problem. I think this is the final patch.
Quoted 4 lines
One unrelated question.
Would it be possible to use the mach- scheme as used for i386 for sn? As it is done today it looks like a new architecture hidden belowarch/ia64/*.
I've been thinking the same thing, but haven't looked enough at the x86 mach scheme to know if it's worth it. Either way, it's a 2.7 thing probably.
Thanks a lot for your help,
Jesse
arch/ia64/Makefile +7 -5
@@ -50,17 +50,15 @@ core-$(CONFIG_IA64_GENERIC) += arch/ia64/dig/ arch/ia64/hp/common/ arch/ia64/hp/zx1/ \ arch/ia64/hp/sim/ core-$(CONFIG_IA64_HP_ZX1) += arch/ia64/dig/ -core-$(CONFIG_IA64_SGI_SN) += arch/ia64/sn/kernel/ \ - arch/ia64/sn/io/ \ - arch/ia64/sn/io/sn2/ \ - arch/ia64/sn/io/sn2/pcibr/ \ - arch/ia64/sn/kernel/sn2/ +core-$(CONFIG_IA64_SGI_SN) += arch/ia64/sn/ + drivers-$(CONFIG_PCI) += arch/ia64/pci/ drivers-$(CONFIG_IA64_HP_SIM) += arch/ia64/hp/sim/ drivers-$(CONFIG_IA64_HP_ZX1) += arch/ia64/hp/common/ arch/ia64/hp/zx1/ boot := arch/ia64/boot tools := arch/ia64/tools +fprom := arch/ia64/sn/fakeprom .PHONY: boot compressed include/asm-ia64/offsets.h
@@ -85,10 +83,14 @@ boot: lib/lib.a vmlinux $(Q)$(MAKE) $(build)=$(boot) $@ +fprom: + $(Q)$(MAKE) $(build)=$(fprom) $(fprom)/$@ + include/asm-ia64/offsets.h: include/asm include/linux/version.h include/config/MARKER $(Q)$(MAKE) $(build)=$(tools) $@ define archhelp echo ' compressed - Build compressed kernel image' echo ' boot - Build vmlinux and bootloader for Ski simulator' + echo ' fprom - Build fake PROM for Medusa simulator' endef
arch/ia64/sn/Makefile +14 -0
@@ -0,0 +1,14 @@ +# arch/ia64/sn/Makefile +# +# This file is subject to the terms and conditions of the GNU General Public +# License. See the file "COPYING" in the main directory of this archive +# for more details. +# +# Copyright (C) 2003 Silicon Graphics, Inc. All Rights Reserved. +# +# Makefile for the sn ia64 subplatform +# + +EXTRA_CFLAGS := -DLITTLE_ENDIAN + +obj-y += kernel/ # io/
arch/ia64/sn/fakeprom/Makefile +15 -10
@@ -1,20 +1,25 @@ +# arch/ia64/sn/fakeprom/Makefile # # This file is subject to the terms and conditions of the GNU General Public # License. See the file "COPYING" in the main directory of this archive # for more details. # -# Copyright (c) 2000-2001 Silicon Graphics, Inc. All rights reserved. +# Copyright (c) 2000-2003 Silicon Graphics, Inc. All rights reserved. # +# Medusa fake PROM support +# + +EXTRA_TARGETS := fpromasm.o main.o fw-emu.o fpmem.o klgraph_init.o \ + fprom vmlinux.sym -obj-y=fpromasm.o main.o fw-emu.o fpmem.o klgraph_init.o +OBJS := $(obj)/fpromasm.o $(obj)/main.o $(obj)/fw-emu.o $(obj)/fpmem.o \ + $(obj)/klgraph_init.o -fprom: $(OBJ) - $(LD) -static -Tfprom.lds -o fprom $(OBJ) $(LIB) +LDFLAGS_fprom = -static -T -.S.o: - $(CC) -D__ASSEMBLY__ $(AFLAGS) $(AFLAGS_KERNEL) -c -o $*.o $< -.c.o: - $(CC) $(CFLAGS) $(CFLAGS_KERNEL) -c -o $*.o $< +$(obj)/fprom: $(src)/fprom.lds $(OBJS) arch/ia64/lib/lib.a FORCE + $(call if_changed,ld) -clean: - rm -f *.o fprom +$(obj)/vmlinux.sym: $(src)/make_textsym System.map + $(src)/make_textsym vmlinux > vmlinux.sym + $(call cmd,cptotop)
arch/ia64/sn/fakeprom/README +32 -0
@@ -1,3 +1,35 @@ +/* + * Copyright (c) 2002-2003 Silicon Graphics, Inc. All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of version 2 of the GNU General Public License + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it would be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * Further, this software is distributed without any warranty that it is + * free of the rightful claim of any third person regarding infringement + * or the like. Any license provided herein, whether implied or + * otherwise, applies only to this software file. Patent licenses, if + * any, provided herein do not apply to combinations of this program with + * other software, or any other product whatsoever. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. + * + * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, + * Mountain View, CA 94043, or: + * + * http://www.sgi.com + * + * For further information regarding this notice, see: + * + * http://oss.sgi.com/projects/GenInfo/NoticeExplan + */ + This directory contains the files required to build the fake PROM image that is currently being used to boot IA64 kernels running under the SGI Medusa kernel.
arch/ia64/sn/fakeprom/fpmem.c +21 -9
@@ -4,7 +4,7 @@* License. See the file "COPYING" in the main directory of this archive * for more details. * -* Copyright (C) 2000-2002 Silicon Graphics, Inc. All rights reserved. +* Copyright (C) 2000-2003 Silicon Graphics, Inc. All rights reserved. */
@@ -168,13 +168,13 @@#endif void -build_mem_desc (efi_memory_desc_t *md,int type,long paddr,long numbytes) +build_mem_desc (efi_memory_desc_t *md,int type,long paddr,long numbytes,long attr) { md->type = type; md->phys_addr = paddr; md->virt_addr =0 ; md->num_pages = numbytes >>12 ; - md->attribute =EFI_MEMORY_WB ; + md->attribute = attr; }int
@@ -236,28 +236,40 @@*/ if (bank =0 ) {if (cnode =0 ) { + hole =2 *1024 *1024 ; +build_mem_desc (md,EFI_PAL_CODE , paddr, hole,EFI_MEMORY_WB |EFI_MEMORY_WB ); + numbytes -= hole; + paddr += hole; + count++ ; + md += mdsize; hole =1 *1024 *1024 ; -build_mem_desc (md,EFI_PAL_CODE , paddr, hole); +build_mem_desc (md,EFI_CONVENTIONAL_MEMORY , paddr, hole,EFI_MEMORY_UC ); numbytes -= hole; paddr += hole; count++ ; md += mdsize; - hole =3 *1024 *1024 ; -build_mem_desc (md,EFI_RUNTIME_SERVICES_DATA , paddr, hole); + hole =1 *1024 *1024 ; +build_mem_desc (md,EFI_RUNTIME_SERVICES_DATA , paddr, hole,EFI_MEMORY_WB |EFI_MEMORY_WB ); numbytes -= hole; paddr += hole; count++ ; md += mdsize; }else { - hole =PROMRESERVED_SIZE ; -build_mem_desc (md,EFI_RUNTIME_SERVICES_DATA , paddr, hole); + hole =2 *1024 *1024 ; +build_mem_desc (md,EFI_RUNTIME_SERVICES_DATA , paddr, hole,EFI_MEMORY_WB |EFI_MEMORY_WB ); + numbytes -= hole; + paddr += hole; + count++ ; + md += mdsize; + hole =2 *1024 *1024 ; +build_mem_desc (md,EFI_RUNTIME_SERVICES_DATA , paddr, hole,EFI_MEMORY_UC ); numbytes -= hole; paddr += hole; count++ ; md += mdsize; } } -build_mem_desc (md,EFI_CONVENTIONAL_MEMORY , paddr, numbytes); +build_mem_desc (md,EFI_CONVENTIONAL_MEMORY , paddr, numbytes,EFI_MEMORY_WB |EFI_MEMORY_WB ); md += mdsize ; count++ ;
arch/ia64/sn/fakeprom/fprom.lds +31 -0
@@ -1,3 +1,34 @@ +/* + * Copyright (c) 2002-2003 Silicon Graphics, Inc. All Rights Reserved. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of version 2 of the GNU General Public License + * as published by the Free Software Foundation. + * + * This program is distributed in the hope that it would be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * + * Further, this software is distributed without any warranty that it is + * free of the rightful claim of any third person regarding infringement + * or the like. Any license provided herein, whether implied or + * otherwise, applies only to this software file. Patent licenses, if + * any, provided herein do not apply to combinations of this program with + * other software, or any other product whatsoever. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. + * + * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, + * Mountain View, CA 94043, or: + * + * http://www.sgi.com + * + * For further information regarding this notice, see: + * + * http://oss.sgi.com/projects/GenInfo/NoticeExplan + */ OUTPUT_FORMAT("elf64-ia64-little") OUTPUT_ARCH(ia64)
arch/ia64/sn/fakeprom/make_textsym +171 -0
171 lines not on this page · raw message
arch/ia64/sn/io/Makefile +6 -2
@@ -1,3 +1,4 @@ +# arch/ia64/sn/io/Makefile # # This file is subject to the terms and conditions of the GNU General Public # License. See the file "COPYING" in the main directory of this archive
@@ -5,7 +6,8 @@ # # Copyright (C) 2000-2002 Silicon Graphics, Inc. All Rights Reserved. # -# Makefile for the sn kernel routines. +# Makefile for the sn io routines. +# EXTRA_CFLAGS := -DLITTLE_ENDIAN
@@ -19,4 +21,6 @@ alenlist.o pci.o pci_dma.o ate_utils.o \ ifconfig_net.o io.o ioconfig_bus.o -obj-$(CONFIG_PCIBA) += pciba.o +obj-$(CONFIG_IA64_SGI_SN2) += sn2/ + +obj-$(CONFIG_PCIBA) += pciba.o
arch/ia64/sn/io/sn2/Makefile +4 -3
@@ -1,3 +1,4 @@ +# arch/ia64/sn/io/sn2/Makefile # # This file is subject to the terms and conditions of the GNU General Public # License. See the file "COPYING" in the main directory of this archive
@@ -6,14 +7,14 @@ # Copyright (C) 2002-2003 Silicon Graphics, Inc. All Rights Reserved. # # Makefile for the sn2 specific io routines. +# -EXTRA_CFLAGS := -DLITTLE_ENDIAN +EXTRA_CFLAGS := -DLITTLE_ENDIAN -obj-y += bte_error.o geo_op.o klconflib.o klgraph.o l1.o \ +obj-y += pcibr/ bte_error.o geo_op.o klconflib.o klgraph.o l1.o \ l1_command.o ml_iograph.o ml_SN_init.o ml_SN_intr.o module.o \ pci_bus_cvlink.o pciio.o pic.o sgi_io_init.o shub.o shuberror.o \ shub_intr.o shubio.o xbow.o xtalk.o obj-$(CONFIG_KDB) += kdba_io.o - obj-$(CONFIG_SHUB_1_0_SPECIFIC) += efi-rtc.o
arch/ia64/sn/io/sn2/l1_command.c +2 -2
@@ -154,7 +154,7 @@return ret; } - +#ifdef CONFIG_PCI /* * iobrick_module_get_nasid() returns a module_id which has the brick * type encoded in bits 15-12, but this is not the true brick type...
@@ -185,7 +185,7 @@ return -1; /* unknown brick */ } - +#endif int iobrick_module_get_nasid (nasid_t nasid) {int io_moduleid;
arch/ia64/sn/io/sn2/pcibr/Makefile +2 -0
@@ -1,3 +1,4 @@ +# arch/ia64/sn/io/sn2/pcibr/Makefile # # This file is subject to the terms and conditions of the GNU General Public # License. See the file "COPYING" in the main directory of this archive
@@ -6,6 +7,7 @@ # Copyright (C) 2002-2003 Silicon Graphics, Inc. All Rights Reserved. # # Makefile for the sn2 specific pci bridge routines. +# EXTRA_CFLAGS := -DLITTLE_ENDIAN
arch/ia64/sn/kernel/Makefile +8 -36
54 lines not on this page · raw message
arch/ia64/sn/kernel/setup.c +4 -3
@@ -237,7 +237,7 @@ "%x.%02x\n", SN_SAL_MIN_MAJOR, SN_SAL_MIN_MINOR);panic ("PROM version too old\n" ); } - +#ifdef CONFIG_PCI #ifdef CONFIG_IA64_SGI_SN2 { extern void io_sh_swapper(int, int);
@@ -253,7 +253,7 @@ (void )get_master_baseio_nasid (); }#endif - +#endif /* CONFIG_PCI */ status =ia64_sal_freq_base (SAL_FREQ_BASE_REALTIME_CLOCK , &ticks_per_sec, &drift);if (status !=0 || ticks_per_sec <100000 ) {printk (KERN_WARNING "unable to determine platform RTC clock frequency, guessing.\n" );
@@ -349,7 +349,7 @@for (cnode=0 ; cnode < numnodes; cnode++)memcpy (nodepdaindr[cnode]->pernode_pdaindr, nodepdaindr,sizeof (nodepdaindr)); - +#ifdef CONFIG_PCI /* * Set up IO related platform-dependent nodepda fields. * The following routine actually sets up the hubinfo struct
@@ -359,6 +359,7 @@init_platform_nodepda (nodepdaindr[cnode], cnode); bte_init_node (nodepdaindr[cnode], cnode); } +#endif }/**
arch/ia64/sn/kernel/sn2/Makefile +7 -31
@@ -1,38 +1,14 @@ -# # arch/ia64/sn/kernel/sn2/Makefile # +# This file is subject to the terms and conditions of the GNU General Public +# License. See the file "COPYING" in the main directory of this archive +# for more details. +# # Copyright (C) 1999,2001-2002 Silicon Graphics, Inc. All rights reserved. # -# This program is free software; you can redistribute it and/or modify it -# under the terms of version 2 of the GNU General Public License -# as published by the Free Software Foundation. -# -# This program is distributed in the hope that it would be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# -# Further, this software is distributed without any warranty that it is -# free of the rightful claim of any third person regarding infringement -# or the like. Any license provided herein, whether implied or -# otherwise, applies only to this software file. Patent licenses, if -# any, provided herein do not apply to combinations of this program with -# other software, or any other product whatsoever. -# -# You should have received a copy of the GNU General Public -# License along with this program; if not, write the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. -# -# Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, -# Mountain View, CA 94043, or: -# -# http://www.sgi.com -# -# For further information regarding this notice, see: -# -# http://oss.sgi.com/projects/GenInfo/NoticeExplan +# sn2 specific kernel files # -EXTRA_CFLAGS := -DLITTLE_ENDIAN +EXTRA_CFLAGS := -DLITTLE_ENDIAN -obj-y += cache.o iomv.o ptc_deadlock.o sn2_smp.o \ - sn_proc_fs.o +obj-y += cache.o iomv.o ptc_deadlock.o sn2_smp.o sn_proc_fs.o
arch/ia64/sn/tools/make_textsym +0 -171
171 lines not on this page · raw message
Quoted 4 lines · Jesse Barnes
Quoted 2 lines
2) take a good look in the corresponding makefile
- Is the target included inEXTRA_TARGETSwithout $(obj)/ prefix?Looks like this was the problem. I think this is the final patch.
Great - and the patch (the parts I understands) look fine.
Sam