123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- ifeq ($(ARCH),sparc)
- KBUILD_DEFCONFIG := sparc32_defconfig
- else
- KBUILD_DEFCONFIG := sparc64_defconfig
- endif
- ifeq ($(CONFIG_SPARC32),y)
- CHECKFLAGS += -D__sparc__
- LDFLAGS := -m elf32_sparc
- export BITS := 32
- UTS_MACHINE := sparc
- KBUILD_CFLAGS += -m32 -mcpu=v8 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
- KBUILD_CFLAGS += -Wa,-Av8
- KBUILD_AFLAGS += -m32 -Wa,-Av8
- else
- CHECKFLAGS += -D__sparc__ -D__sparc_v9__ -D__arch64__ -m64
- LDFLAGS := -m elf64_sparc
- export BITS := 64
- UTS_MACHINE := sparc64
- KBUILD_CFLAGS += -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow
- KBUILD_CFLAGS += -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare
- KBUILD_CFLAGS += -Wa,--undeclared-regs
- KBUILD_CFLAGS += $(call cc-option,-mtune=ultrasparc3)
- KBUILD_AFLAGS += -m64 -mcpu=ultrasparc -Wa,--undeclared-regs
- ifeq ($(CONFIG_MCOUNT),y)
- KBUILD_CFLAGS += -pg
- endif
- endif
- head-y := arch/sparc/kernel/head_$(BITS).o
- core-y += arch/sparc/
- libs-y += arch/sparc/prom/
- libs-y += arch/sparc/lib/
- drivers-$(CONFIG_PM) += arch/sparc/power/
- drivers-$(CONFIG_OPROFILE) += arch/sparc/oprofile/
- boot := arch/sparc/boot
- all: zImage
- image zImage uImage tftpboot.img vmlinux.aout: vmlinux
- $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
- install:
- $(Q)$(MAKE) $(build)=$(boot) $@
- archclean:
- $(Q)$(MAKE) $(clean)=$(boot)
- KBUILD_IMAGE := $(boot)/zImage
- ifeq ($(ARCH),sparc)
- define archhelp
- echo '* image - kernel image ($(boot)/image)'
- echo '* zImage - stripped kernel image ($(boot)/zImage)'
- echo ' uImage - U-Boot SPARC32 Image (only for LEON)'
- echo ' tftpboot.img - image prepared for tftp'
- endef
- else
- define archhelp
- echo '* vmlinux - standard sparc64 kernel'
- echo '* zImage - stripped and compressed sparc64 kernel ($(boot)/zImage)'
- echo ' vmlinux.aout - a.out kernel for sparc64'
- echo ' tftpboot.img - image prepared for tftp'
- endef
- endif
|