Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) # SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) # sparc/Makefile
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) # Makefile for the architecture dependent flags and dependencies on the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) # Sparc and sparc64.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) # Copyright (C) 1994,1996,1998 David S. Miller (davem@caip.rutgers.edu)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) # Copyright (C) 1998 Jakub Jelinek (jj@ultra.linux.cz)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) # We are not yet configured - so test on arch
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) ifeq ($(ARCH),sparc64)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13)         KBUILD_DEFCONFIG := sparc64_defconfig
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15)         KBUILD_DEFCONFIG := sparc32_defconfig
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) ifeq ($(CONFIG_SPARC32),y)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) #####
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) # sparc32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) CHECKFLAGS     += -D__sparc__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) KBUILD_LDFLAGS := -m elf32_sparc
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) export BITS    := 32
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) UTS_MACHINE    := sparc
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) # We are adding -Wa,-Av8 to KBUILD_CFLAGS to deal with a specs bug in some
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) # versions of gcc.  Some gcc versions won't pass -Av8 to binutils when you
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) # give -mcpu=v8.  This silently worked with older bintutils versions but
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) # does not any more.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) KBUILD_CFLAGS  += -m32 -mcpu=v8 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) KBUILD_CFLAGS  += -Wa,-Av8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) KBUILD_AFLAGS  += -m32 -Wa,-Av8
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) #####
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) # sparc64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) #
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) CHECKFLAGS    += -D__sparc__ -D__sparc_v9__ -D__arch64__
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) KBUILD_LDFLAGS := -m elf64_sparc
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) export BITS   := 64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) UTS_MACHINE   := sparc64
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) KBUILD_CFLAGS += -m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) KBUILD_CFLAGS += -ffixed-g4 -ffixed-g5 -fcall-used-g7 -Wno-sign-compare
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) KBUILD_CFLAGS += -Wa,--undeclared-regs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) KBUILD_CFLAGS += $(call cc-option,-mtune=ultrasparc3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) KBUILD_AFLAGS += -m64 -mcpu=ultrasparc -Wa,--undeclared-regs
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) ifeq ($(CONFIG_MCOUNT),y)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54)   KBUILD_CFLAGS += -pg
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) head-y                 := arch/sparc/kernel/head_$(BITS).o
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) # See arch/sparc/Kbuild for the core part of the kernel
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) core-y                 += arch/sparc/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) libs-y                 += arch/sparc/prom/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) libs-y                 += arch/sparc/lib/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) drivers-$(CONFIG_PM) += arch/sparc/power/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) drivers-$(CONFIG_OPROFILE)	+= arch/sparc/oprofile/
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) boot := arch/sparc/boot
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) # Default target
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) all: zImage
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) image zImage uImage tftpboot.img vmlinux.aout: vmlinux
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) 	$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) install:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 	$(Q)$(MAKE) $(build)=$(boot) $@
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) archclean:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) 	$(Q)$(MAKE) $(clean)=$(boot)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) archheaders:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) 	$(Q)$(MAKE) $(build)=arch/sparc/kernel/syscalls all
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) PHONY += vdso_install
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) vdso_install:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) 	$(Q)$(MAKE) $(build)=arch/sparc/vdso $@
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) # This is the image used for packaging
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) KBUILD_IMAGE := $(boot)/zImage
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) # Don't use tabs in echo arguments.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) ifeq ($(ARCH),sparc)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) define archhelp
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97)   echo  '* image        - kernel image ($(boot)/image)'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98)   echo  '* zImage       - stripped kernel image ($(boot)/zImage)'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99)   echo  '  uImage       - U-Boot SPARC32 Image (only for LEON)'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100)   echo  '  tftpboot.img - image prepared for tftp'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) endef
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) define archhelp
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104)   echo  '* vmlinux      - standard sparc64 kernel'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105)   echo  '* zImage       - stripped and compressed sparc64 kernel ($(boot)/zImage)'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106)   echo  '  vmlinux.aout - a.out kernel for sparc64'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107)   echo  '  tftpboot.img - image prepared for tftp'
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) endef
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) endif