projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PARISC] pdc_console: fix bizarre panic on boot
[firefly-linux-kernel-4.4.55.git]
/
arch
/
parisc
/
Makefile
diff --git
a/arch/parisc/Makefile
b/arch/parisc/Makefile
index 3b339b1cce137d9dd5322e07c1e3d2b5678d3149..e574de4efb36c2e588ad93d8ab6c5637551bdff1 100644
(file)
--- a/
arch/parisc/Makefile
+++ b/
arch/parisc/Makefile
@@
-19,18
+19,24
@@
NM = sh $(srctree)/arch/parisc/nm
CHECKFLAGS += -D__hppa__=1
NM = sh $(srctree)/arch/parisc/nm
CHECKFLAGS += -D__hppa__=1
+MACHINE := $(shell uname -m)
+ifeq ($(MACHINE),parisc*)
+NATIVE := 1
+endif
+
ifdef CONFIG_64BIT
ifdef CONFIG_64BIT
-CROSS_COMPILE := hppa64-linux-
UTS_MACHINE := parisc64
CHECKFLAGS += -D__LP64__=1 -m64
UTS_MACHINE := parisc64
CHECKFLAGS += -D__LP64__=1 -m64
-else
-MACHINE := $(subst 64,,$(shell uname -m))
-ifneq ($(MACHINE),parisc)
-CROSS_COMPILE := hppa-linux-
-endif
+WIDTH := 64
+CROSS_COMPILE := hppa64-linux-gnu-
+else # 32-bit
+WIDTH :=
endif
endif
-FINAL_LD=$(CROSS_COMPILE)ld --warn-common --warn-section-align
+# attempt to help out folks who are cross-compiling
+ifeq ($(NATIVE),1)
+CROSS_COMPILE := hppa$(WIDTH)-linux-
+endif
OBJCOPY_FLAGS =-O binary -R .note -R .comment -S
OBJCOPY_FLAGS =-O binary -R .note -R .comment -S
@@
-43,7
+49,7
@@
cflags-y += -mno-space-regs -mfast-indirect-calls
# Currently we save and restore fpregs on all kernel entry/interruption paths.
# If that gets optimized, we might need to disable the use of fpregs in the
# kernel.
# Currently we save and restore fpregs on all kernel entry/interruption paths.
# If that gets optimized, we might need to disable the use of fpregs in the
# kernel.
-
#cflags-y
+= -mdisable-fpregs
+
cflags-y
+= -mdisable-fpregs
# Without this, "ld -r" results in .text sections that are too big
# (> 0x40000) for branches to reach stubs.
# Without this, "ld -r" results in .text sections that are too big
# (> 0x40000) for branches to reach stubs.
@@
-58,7
+64,7
@@
cflags-$(CONFIG_PA8X00) += -march=2.0 -mschedule=8000
head-y := arch/parisc/kernel/head.o
head-y := arch/parisc/kernel/head.o
-
CFLAGS
+= $(cflags-y)
+
KBUILD_CFLAGS
+= $(cflags-y)
kernel-y := mm/ kernel/ math-emu/ kernel/init_task.o
kernel-$(CONFIG_HPUX) += hpux/
kernel-y := mm/ kernel/ math-emu/ kernel/init_task.o
kernel-$(CONFIG_HPUX) += hpux/
@@
-72,27
+78,27
@@
PALO := $(shell if which palo; then : ; \
elif [ -x /sbin/palo ]; then echo /sbin/palo; \
fi)
elif [ -x /sbin/palo ]; then echo /sbin/palo; \
fi)
+PALOCONF := $(shell if [ -f $(src)/palo.conf ]; then echo $(src)/palo.conf; \
+ else echo $(obj)/palo.conf; \
+ fi)
+
palo: vmlinux
palo: vmlinux
- @if
[ -x $PALO ]
; then \
+ @if
test ! -x "$(PALO)"
; then \
echo 'ERROR: Please install palo first (apt-get install palo)';\
echo 'or build it from source and install it somewhere in your $$PATH';\
false; \
fi
echo 'ERROR: Please install palo first (apt-get install palo)';\
echo 'or build it from source and install it somewhere in your $$PATH';\
false; \
fi
- @if
[ ! -f ./palo.conf ]
; then \
- cp
arch/parisc/defpalo.conf
palo.conf; \
- echo 'A generic palo config file (
.
/palo.conf) has been created for you.'; \
+ @if
test ! -f "$(PALOCONF)"
; then \
+ cp
$(src)/arch/parisc/defpalo.conf $(obj)/
palo.conf; \
+ echo 'A generic palo config file (
$(obj)
/palo.conf) has been created for you.'; \
echo 'You should check it and re-run "make palo".'; \
echo 'WARNING: the "lifimage" file is now placed in this directory by default!'; \
false; \
fi
echo 'You should check it and re-run "make palo".'; \
echo 'WARNING: the "lifimage" file is now placed in this directory by default!'; \
false; \
fi
- $(PALO) -f ./palo.conf
-
-oldpalo: vmlinux
- export TOPDIR=`pwd`; \
- unset STRIP LDFLAGS CPP CPPFLAGS AFLAGS CFLAGS CC LD; cd ../palo && make lifimage
+ $(PALO) -f $(PALOCONF)
-# Shorthands for known targets not supported by parisc, use
palo
as default
-Image zImage bzImage:
palo
+# Shorthands for known targets not supported by parisc, use
vmlinux
as default
+Image zImage bzImage:
vmlinux
kernel_install: vmlinux
sh $(src)/arch/parisc/install.sh \
kernel_install: vmlinux
sh $(src)/arch/parisc/install.sh \
@@
-111,3
+117,12
@@
define archhelp
@echo ' (distribution) /sbin/installkernel or'
@echo ' copy to $$(INSTALL_PATH)'
endef
@echo ' (distribution) /sbin/installkernel or'
@echo ' copy to $$(INSTALL_PATH)'
endef
+
+# we require gcc 3.3 or above to compile the kernel
+archprepare: checkbin
+checkbin:
+ @if test "$(call cc-version)" -lt "0303"; then \
+ echo -n "Sorry, GCC v3.3 or above is required to build " ; \
+ echo "the kernel." ; \
+ false ; \
+ fi