1 # SPDX-License-Identifier: GPL-2.0-only !! 1 # 2 OBJCOPYFLAGS :=-O binary !! 2 # m68k/Makefile 3 GZFLAGS :=-9 !! 3 # >> 4 # This file is included by the global makefile so that you can add your own >> 5 # architecture-specific flags and dependencies. Remember to do have actions >> 6 # for "archclean" and "archdep" for cleaning up and making dependencies for >> 7 # this architecture >> 8 # >> 9 # This file is subject to the terms and conditions of the GNU General Public >> 10 # License. See the file "COPYING" in the main directory of this archive >> 11 # for more details. >> 12 # >> 13 # Copyright (C) 1994 by Hamish Macdonald >> 14 # 4 15 5 ifdef CONFIG_CPU_HAS_FPU !! 16 # test for cross compiling 6 FPUEXT = f !! 17 COMPILE_ARCH = $(shell uname -m) 7 endif << 8 18 9 ifdef CONFIG_CPU_HAS_VDSP !! 19 # override top level makefile 10 VDSPEXT = v !! 20 AS += -m68020 >> 21 LDFLAGS := -m m68kelf >> 22 ifneq ($(COMPILE_ARCH),$(ARCH)) >> 23 # prefix for cross-compiling binaries >> 24 CROSS_COMPILE = m68k-linux- 11 endif 25 endif 12 26 13 ifdef CONFIG_CPU_HAS_TEE !! 27 ifdef CONFIG_SUN3 14 TEEEXT = t !! 28 LDFLAGS_vmlinux = -N 15 endif 29 endif 16 30 17 ifdef CONFIG_CPU_CK610 !! 31 # without -fno-strength-reduce the 53c7xx.c driver fails ;-( 18 CPUTYPE = ck610 !! 32 CFLAGS += -pipe -fno-strength-reduce -ffixed-a2 19 CSKYABI = abiv1 << 20 endif << 21 33 22 ifdef CONFIG_CPU_CK810 !! 34 # enable processor switch if compiled only for a single cpu 23 CPUTYPE = ck810 !! 35 ifndef CONFIG_M68020 24 CSKYABI = abiv2 !! 36 ifndef CONFIG_M68030 25 endif << 26 37 27 ifdef CONFIG_CPU_CK807 !! 38 ifndef CONFIG_M68060 28 CPUTYPE = ck807 !! 39 CFLAGS := $(CFLAGS) -m68040 29 CSKYABI = abiv2 << 30 endif 40 endif 31 41 32 ifdef CONFIG_CPU_CK860 !! 42 ifndef CONFIG_M68040 33 CPUTYPE = ck860 !! 43 CFLAGS := $(CFLAGS) -m68060 34 CSKYABI = abiv2 << 35 endif 44 endif 36 45 37 ifneq ($(CSKYABI),) << 38 MCPU_STR = $(CPUTYPE)$(FPUEXT)$(VDSPEXT)$(TEEE << 39 KBUILD_CFLAGS += -mcpu=$(CPUTYPE) -Wa,-mcpu=$( << 40 KBUILD_CFLAGS += -DCSKYCPU_DEF_NAME=\"$(MCPU_S << 41 KBUILD_CFLAGS += -msoft-float -mdiv << 42 KBUILD_CFLAGS += -fno-tree-vectorize << 43 endif 46 endif 44 << 45 KBUILD_CFLAGS += -pipe << 46 ifeq ($(CSKYABI),abiv2) << 47 KBUILD_CFLAGS += -mno-stack-size << 48 endif 47 endif 49 48 50 ifdef CONFIG_FRAME_POINTER !! 49 ifdef CONFIG_KGDB 51 KBUILD_CFLAGS += -mbacktrace !! 50 # If configured for kgdb support, include debugging infos and keep the >> 51 # frame pointer >> 52 CFLAGS := $(subst -fomit-frame-pointer,,$(CFLAGS)) -g 52 endif 53 endif 53 54 54 abidirs := $(patsubst %,arch/csky/%/,$(CSKYABI !! 55 ifndef CONFIG_SUN3 55 KBUILD_CFLAGS += $(patsubst %,-I$(srctree)/%in !! 56 head-y := arch/m68k/kernel/head.o >> 57 else >> 58 head-y := arch/m68k/kernel/sun3-head.o >> 59 endif 56 60 57 KBUILD_CPPFLAGS += -mlittle-endian !! 61 core-y += arch/m68k/kernel/ arch/m68k/mm/ 58 LDFLAGS += -EL !! 62 libs-y += arch/m68k/lib/ 59 63 60 KBUILD_AFLAGS += $(KBUILD_CFLAGS) !! 64 core-$(CONFIG_Q40) += arch/m68k/q40/ >> 65 core-$(CONFIG_AMIGA) += arch/m68k/amiga/ >> 66 core-$(CONFIG_ATARI) += arch/m68k/atari/ >> 67 core-$(CONFIG_MAC) += arch/m68k/mac/ >> 68 core-$(CONFIG_HP300) += arch/m68k/hp300/ >> 69 core-$(CONFIG_APOLLO) += arch/m68k/apollo/ >> 70 core-$(CONFIG_MVME147) += arch/m68k/mvme147/ >> 71 core-$(CONFIG_MVME16x) += arch/m68k/mvme16x/ >> 72 core-$(CONFIG_BVME6000) += arch/m68k/bvme6000/ >> 73 core-$(CONFIG_SUN3X) += arch/m68k/sun3x/ arch/m68k/sun3/ >> 74 core-$(CONFIG_SUN3) += arch/m68k/sun3/ arch/m68k/sun3/prom/ >> 75 core-$(CONFIG_M68040) += arch/m68k/fpsp040/ >> 76 core-$(CONFIG_M68060) += arch/m68k/ifpsp060/ >> 77 core-$(CONFIG_M68KFPU_EMU) += arch/m68k/math-emu/ 61 78 62 core-y += arch/csky/$(CSKYABI)/ !! 79 all: zImage 63 80 64 libs-y += arch/csky/lib/ \ !! 81 lilo: vmlinux 65 $(shell $(CC) $(KBUILD_CFLAGS) $(KCFLA !! 82 if [ -f $(INSTALL_PATH)/vmlinux ]; then mv -f $(INSTALL_PATH)/vmlinux $(INSTALL_PATH)/vmlinux.old; fi >> 83 if [ -f $(INSTALL_PATH)/System.map ]; then mv -f $(INSTALL_PATH)/System.map $(INSTALL_PATH)/System.old; fi >> 84 cat vmlinux > $(INSTALL_PATH)/vmlinux >> 85 cp System.map $(INSTALL_PATH)/System.map >> 86 if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi 66 87 67 boot := arch/csky/boot !! 88 zImage compressed: vmlinux.gz 68 89 69 all: zImage !! 90 vmlinux.gz: vmlinux 70 91 71 zImage Image uImage: vmlinux !! 92 ifndef CONFIG_KGDB 72 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$ !! 93 cp vmlinux vmlinux.tmp >> 94 $(STRIP) vmlinux.tmp >> 95 gzip -9c vmlinux.tmp >vmlinux.gz >> 96 rm vmlinux.tmp >> 97 else >> 98 gzip -9c vmlinux >vmlinux.gz >> 99 endif >> 100 >> 101 bzImage: vmlinux.bz2 >> 102 >> 103 vmlinux.bz2: vmlinux >> 104 >> 105 ifndef CONFIG_KGDB >> 106 cp vmlinux vmlinux.tmp >> 107 $(STRIP) vmlinux.tmp >> 108 bzip2 -1c vmlinux.tmp >vmlinux.bz2 >> 109 rm vmlinux.tmp >> 110 else >> 111 bzip2 -1c vmlinux >vmlinux.bz2 >> 112 endif 73 113 74 define archhelp !! 114 archclean: 75 echo '* zImage - Compressed kernel im !! 115 rm -f vmlinux.gz vmlinux.bz2 76 echo ' Image - Uncompressed kernel !! 116 rm -f arch/m68k/kernel/m68k_defs.h arch/m68k/kernel/m68k_defs.d 77 echo ' uImage - U-Boot wrapped zImag << 78 endef <<
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.