Hi all. Following is an update of various ia64 specific makefiles. Patch is on top of linus-latest, with the 2.5.50 ia64 patch posted here applied. Summary of changes: o Simplified arch/ia64/Makefile - During this process the boot: target were removed o Moved final generation of vmlinux.gz to boot/Makefile - This allowed me to use some of the kbuild infrastructure - Final file "vmlinux.gz" is now saved in arch/ia64/boot in line with other architectures. o s/$(ARCH)/ia64 - since we know that this is the architecture we use o Small clean up all over, e.g. removed inclusion of Rules.make Also made some nicer indenting, but no functional changes. I can build a kernel with this, but has not done furhter testing. Sample run: [sam@mars lia64]$ make KBUILD_VERBOSE=0 make[1]: Nothing to be done for `include/asm-ia64/offsets.h'. Starting the build. KBUILD_BUILTIN=1 KBUILD_MODULES=1 Generating include/linux/compile.h (unchanged) Generating build number Generating include/linux/compile.h (updated) CC init/version.o LD init/built-in.o LD vmlinux OBJCOPY arch/ia64/boot/vmlinux.bin GZIP arch/ia64/boot/vmlinux.gz Kernel: arch/ia64/boot/vmlinux.gz is ready TODO's: - Update offset generation to use the kbuild infrastructure. arm, sparc is good examples here. Anyone looking into this already? - Add archhelp, so "make help" will list possible choices - Take a look into arch/ia64/sn/* - It looks a bit strange??? Feedback is welcome. Sam Makefile | 77 ++++++++++++++++++++++------------------------------- boot/Makefile | 25 +++++++++-------- dig/Makefile | 2 - hp/common/Makefile | 2 - hp/sim/Makefile | 2 - hp/zx1/Makefile | 2 - ia32/Makefile | 6 +--- kernel/Makefile | 9 +++--- mm/Makefile | 12 ++------ pci/Makefile | 5 ++- 10 files changed, 60 insertions(+), 82 deletions(-) ===== arch/ia64/Makefile 1.27 vs edited ===== --- 1.27/arch/ia64/Makefile Fri Oct 25 06:35:08 2002 +++ edited/arch/ia64/Makefile Fri Dec 6 22:16:00 2002 @@ -13,12 +13,12 @@ export AWK -OBJCOPYFLAGS := --strip-all -LDFLAGS_vmlinux := -static -AFLAGS_KERNEL := -mconstant-gp -EXTRA = +OBJCOPYFLAGS := --strip-all +LDFLAGS_vmlinux := -static +AFLAGS_KERNEL := -mconstant-gp +EXTRA := -CFLAGS := $(CFLAGS) -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f10-f15,f32-f127 \ +cflags-y := -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f10-f15,f32-f127 \ -falign-functions=32 # -ffunction-sections CFLAGS_KERNEL := -mconstant-gp @@ -29,52 +29,41 @@ CFLAGS += -frename-registers --param max-inline-insns=5000 endif -ifeq ($(CONFIG_ITANIUM_BSTEP_SPECIFIC),y) - CFLAGS += -mb-step -endif - -HEAD := arch/$(ARCH)/kernel/head.o arch/$(ARCH)/kernel/init_task.o - -libs-y += arch/$(ARCH)/lib/ -core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ -core-$(CONFIG_IA32_SUPPORT) += arch/$(ARCH)/ia32/ -core-$(CONFIG_IA64_DIG) += arch/$(ARCH)/dig/ -core-$(CONFIG_IA64_GENERIC) += arch/$(ARCH)/dig/ arch/$(ARCH)/hp/common/ arch/$(ARCH)/hp/zx1/ \ - arch/$(ARCH)/hp/sim/ -core-$(CONFIG_IA64_HP_ZX1) += arch/$(ARCH)/dig/ -core-$(CONFIG_IA64_SGI_SN) += arch/$(ARCH)/sn/kernel arch/$(ARCH)/sn/io \ - arch/$(ARCH)/sn/fakeprom -drivers-$(CONFIG_PCI) += arch/$(ARCH)/pci/ -drivers-$(CONFIG_IA64_HP_SIM) += arch/$(ARCH)/hp/sim/ -drivers-$(CONFIG_IA64_HP_ZX1) += arch/$(ARCH)/hp/common/ arch/$(ARCH)/hp/zx1/ - -ifdef CONFIG_IA64_SGI_SN - CFLAGS += -DBRINGUP - SUBDIRS += arch/$(ARCH)/sn/fakeprom -endif +cflags-$(CONFIG_ITANIUM_BSTEP_SPECIFIC) += -mb-step +cflags-$(CONFIG_IA64_SGI_SN) += -DBRINGUP -makeboot = $(call descend,arch/ia64/boot,$(1)) -maketool = $(call descend,arch/ia64/tools,$(1)) +HEAD := arch/ia64/kernel/head.o arch/ia64/kernel/init_task.o -.PHONY: compressed archclean archmrproper $(TOPDIR)/include/asm-ia64/offsets.h +libs-y += arch/ia64/lib/ +core-y += arch/ia64/kernel/ arch/ia64/mm/ +core-$(CONFIG_IA32_SUPPORT) += arch/ia64/ia32/ +core-$(CONFIG_IA64_DIG) += arch/ia64/dig/ +core-$(CONFIG_IA64_GENERIC) += arch/ia64/dig/ arch/ia64/hp/common/ +core-$(CONFIG_IA64_GENERIC) += 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/fakeprom/ +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/ + +makeboot =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/ia64/boot $(1) +maketool =$(Q)$(MAKE) -f scripts/Makefile.build obj=arch/ia64/tools $(1) -all: compressed boot +.PHONY: compressed archclean archmrproper include/asm-ia64/offsets.h -boot: vmlinux - +@$(call makeboot,all) +all compressed: arch/ia64/boot/vmlinux.gz -compressed: vmlinux - $(OBJCOPY) $(OBJCOPYFLAGS) vmlinux vmlinux-tmp - gzip vmlinux-tmp - mv vmlinux-tmp.gz vmlinux.gz +arch/ia64/boot/vmlinux.gz: vmlinux + $(call makeboot,arch/ia64/boot/vmlinux.gz) +archmrproper: archclean: - $(MAKE) -rR -f scripts/Makefile.clean obj=arch/$(ARCH)/boot + $(Q)$(MAKE) -f scripts/Makefile.clean obj=arch/ia64/boot -archmrproper: -prepare: $(TOPDIR)/include/asm-ia64/offsets.h +prepare: include/asm-ia64/offsets.h -$(TOPDIR)/include/asm-ia64/offsets.h: include/asm include/linux/version.h \ - include/config/MARKER - +@$(call maketool,$@) +include/asm-ia64/offsets.h: include/asm include/linux/version.h \ + include/config/MARKER + $(call maketool,$@) ===== arch/ia64/boot/Makefile 1.6 vs edited ===== --- 1.6/arch/ia64/boot/Makefile Mon Oct 28 03:20:05 2002 +++ edited/arch/ia64/boot/Makefile Fri Dec 6 22:16:01 2002 @@ -8,20 +8,23 @@ # Copyright (C) 1998 by David Mosberger-Tang <davidm@hpl.hp.com> # -LINKFLAGS = -static -T $(src)/bootloader.lds +EXTRA_TARGETS := vmlinux.bin vmlinux.gz -OBJS = $(obj)/bootloader.o +$(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE + $(call if_changed,gzip) + @echo ' Kernel: $@ is ready' -targets-$(CONFIG_IA64_HP_SIM) += bootloader -targets-$(CONFIG_IA64_GENERIC) += bootloader +$(obj)/vmlinux.bin: vmlinux FORCE + $(call if_changed,objcopy) -CFLAGS := $(CFLAGS) $(CFLAGS_KERNEL) -all: $(targets-y) +targets-$(CONFIG_IA64_HP_SIM) += bootloader +targets-$(CONFIG_IA64_GENERIC) += bootloader -bootloader: $(OBJS) - $(LD) $(LINKFLAGS) $(OBJS) $(TOPDIR)/lib/lib.a $(TOPDIR)/arch/$(ARCH)/lib/lib.a \ - -o bootloader +EXTRA_TARGETS += $(sort $(targets-y)) -clean: - rm -f $(TARGETS) +LDFLAGS_bootloader = -static -T + +bootloader: $(src)/bootloader.lds $(obj)/bootloader.o \ + lib/lib.a arch/ia64/lib/lib.a FORCE + $(call if_changed,ld) ===== arch/ia64/dig/Makefile 1.5 vs edited ===== --- 1.5/arch/ia64/dig/Makefile Mon Sep 23 01:34:27 2002 +++ edited/arch/ia64/dig/Makefile Fri Dec 6 22:16:01 2002 @@ -7,5 +7,3 @@ obj-y := setup.o obj-$(CONFIG_IA64_GENERIC) += machvec.o - -include $(TOPDIR)/Rules.make ===== arch/ia64/hp/common/Makefile 1.4 vs edited ===== --- 1.4/arch/ia64/hp/common/Makefile Sat Sep 21 10:25:52 2002 +++ edited/arch/ia64/hp/common/Makefile Fri Dec 6 22:16:02 2002 @@ -8,5 +8,3 @@ export-objs := sba_iommu.o obj-y := sba_iommu.o - -include $(TOPDIR)/Rules.make ===== arch/ia64/hp/sim/Makefile 1.4 vs edited ===== --- 1.4/arch/ia64/hp/sim/Makefile Mon Sep 23 01:34:28 2002 +++ edited/arch/ia64/hp/sim/Makefile Fri Dec 6 22:16:03 2002 @@ -13,5 +13,3 @@ obj-$(CONFIG_HP_SIMETH) += simeth.o obj-$(CONFIG_HP_SIMSERIAL) += simserial.o obj-$(CONFIG_HP_SIMSCSI) += simscsi.o - -include $(TOPDIR)/Rules.make ===== arch/ia64/hp/zx1/Makefile 1.4 vs edited ===== --- 1.4/arch/ia64/hp/zx1/Makefile Sat Sep 21 10:25:52 2002 +++ edited/arch/ia64/hp/zx1/Makefile Fri Dec 6 22:16:04 2002 @@ -7,5 +7,3 @@ obj-y := hpzx1_misc.o obj-$(CONFIG_IA64_GENERIC) += hpzx1_machvec.o - -include $(TOPDIR)/Rules.make ===== arch/ia64/ia32/Makefile 1.7 vs edited ===== --- 1.7/arch/ia64/ia32/Makefile Mon Sep 23 01:34:28 2002 +++ edited/arch/ia64/ia32/Makefile Fri Dec 6 22:16:04 2002 @@ -2,7 +2,5 @@ # Makefile for the ia32 kernel emulation subsystem. # -obj-y := ia32_entry.o sys_ia32.o ia32_ioctl.o ia32_signal.o ia32_support.o ia32_traps.o \ - binfmt_elf32.o ia32_ldt.o - -include $(TOPDIR)/Rules.make +obj-y := ia32_entry.o sys_ia32.o ia32_ioctl.o ia32_signal.o \ + ia32_support.o ia32_traps.o binfmt_elf32.o ia32_ldt.o ===== arch/ia64/kernel/Makefile 1.10 vs edited ===== --- 1.10/arch/ia64/kernel/Makefile Sat Sep 21 10:25:52 2002 +++ edited/arch/ia64/kernel/Makefile Fri Dec 6 22:16:05 2002 @@ -6,14 +6,15 @@ export-objs := ia64_ksyms.o -obj-y := acpi.o entry.o gate.o efi.o efi_stub.o ia64_ksyms.o irq.o irq_ia64.o irq_lsapic.o ivt.o \ - machvec.o pal.o process.o perfmon.o ptrace.o sal.o semaphore.o setup.o \ +obj-y := acpi.o entry.o gate.o efi.o efi_stub.o ia64_ksyms.o \ + irq.o irq_ia64.o irq_lsapic.o ivt.o \ + machvec.o pal.o process.o perfmon.o ptrace.o sal.o \ + semaphore.o setup.o \ signal.o sys_ia64.o traps.o time.o unaligned.o unwind.o + obj-$(CONFIG_IOSAPIC) += iosapic.o obj-$(CONFIG_IA64_PALINFO) += palinfo.o obj-$(CONFIG_EFI_VARS) += efivars.o obj-$(CONFIG_SMP) += smp.o smpboot.o obj-$(CONFIG_IA64_MCA) += mca.o mca_asm.o obj-$(CONFIG_IA64_BRL_EMU) += brl_emu.o - -include $(TOPDIR)/Rules.make ===== arch/ia64/mm/Makefile 1.5 vs edited ===== --- 1.5/arch/ia64/mm/Makefile Tue Oct 22 15:48:03 2002 +++ edited/arch/ia64/mm/Makefile Fri Dec 6 22:16:05 2002 @@ -1,15 +1,9 @@ # # Makefile for the ia64-specific parts of the memory manager. # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# -# Note 2! The CFLAGS definition is now in the main makefile... -obj-y := init.o fault.o tlb.o extable.o +obj-y := init.o fault.o tlb.o extable.o + obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o -obj-$(CONFIG_NUMA) += numa.o +obj-$(CONFIG_NUMA) += numa.o obj-$(CONFIG_DISCONTIGMEM) += discontig.o - -include $(TOPDIR)/Rules.make ===== arch/ia64/pci/Makefile 1.1 vs edited ===== --- 1.1/arch/ia64/pci/Makefile Sat Sep 21 10:25:52 2002 +++ edited/arch/ia64/pci/Makefile Fri Dec 6 22:16:06 2002 @@ -1,3 +1,4 @@ +# +# Makefile for the ia64-specific parts of the pci bus +# obj-y := pci.o - -include $(TOPDIR)/Rules.makeReceived on Fri Dec 06 14:41:50 2002
This archive was generated by hypermail 2.1.8 : 2005-08-02 09:20:11 EST