From: Sascha Hauer <s.hauer@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH] kernel: Replace PTXCONF_KERNEL_ARCH_STRING with GENERIC_KERNEL_ARCH
Date: Wed, 20 Nov 2019 10:57:16 +0100 [thread overview]
Message-ID: <20191120095716.20068-1-s.hauer@pengutronix.de> (raw)
PTXCONF_KERNEL_ARCH_STRING is used for cases when for a given ptxdist
architecture multiple kernel architectures exist. This only happens on
more than 10 year old Kernels, it's time to remove this compatibility
cruft. We can now use GENERIC_KERNEL_ARCH which has the same purpose and
is used in other places already, but doesn't handle the multiple kernel
architecture case.
PTXCONF_KERNEL_ARCH_STRING was useful on PowerPC where the kernel
architectures "ppc" and "powerpc" existed and on x86 where we had "i386"
and "x86_64". These are stories from the old days, since v2.6.24 we only
have "x86" for all x86 machines and since v2.6.27 we only have "powerpc"
for all powerpc machines.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
platforms/dtc.in | 2 +-
platforms/kernel.in | 62 --------------------------------------
rules/kernel.make | 8 ++---
rules/other/Namespace.make | 1 -
4 files changed, 5 insertions(+), 68 deletions(-)
diff --git a/platforms/dtc.in b/platforms/dtc.in
index 0f248e278..038dff5c8 100644
--- a/platforms/dtc.in
+++ b/platforms/dtc.in
@@ -20,7 +20,7 @@ config DTC_INSTALL_OFTREE
config DTC_OFTREE_DTS_PATH
string "path to source dts file"
- default "${PTXDIST_PLATFORMCONFIG_SUBDIR}/dts:${KERNEL_DIR}/arch/${PTXCONF_KERNEL_ARCH_STRING}/boot/dts"
+ default "${PTXDIST_PLATFORMCONFIG_SUBDIR}/dts:${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts"
help
Define path to the dts source file. Multiple directories can be
specified separated by ':'.
diff --git a/platforms/kernel.in b/platforms/kernel.in
index 220433c93..a57bb4d96 100644
--- a/platforms/kernel.in
+++ b/platforms/kernel.in
@@ -51,68 +51,6 @@ config KERNEL_MD5
prompt "kernel source md5sum"
string
-choice
- prompt "kernel architecture "
- depends on ARCH_PPC || ARCH_X86
- default KERNEL_ARCH_POWERPC if ARCH_PPC
- default KERNEL_ARCH_X86 if ARCH_X86
- help
- For x86 and PowerPC there are different possibilities to set the kernel
- architecture:
-
- - The old variant for PowerPC is ppc, the newer one is powerpc.
- - The old variant for x86 is i386 for 32 bit and x86_64 for 64 bit,
- kernels later than 2.6.24 use x86.
-
- config KERNEL_ARCH_PPC
- bool
- depends on ARCH_PPC
- prompt "ppc "
-
- config KERNEL_ARCH_POWERPC
- bool
- depends on ARCH_PPC
- prompt "powerpc"
-
- config KERNEL_ARCH_X86
- bool
- depends on ARCH_X86
- prompt "x86 "
-
- config KERNEL_ARCH_I386
- bool
- depends on ARCH_X86
- prompt "i386 "
-
- config KERNEL_ARCH_X86_64
- bool
- depends on ARCH_X86
- prompt "x86_64 "
-
-endchoice
-
-config KERNEL_ARCH_STRING
- string
- default "arm" if ARCH_ARM
- default "arm64" if ARCH_ARM64
- default "armnommu" if ARCH_ARM && !HAS_MMU
- default "alpha" if ARCH_ALPHA
- default "avr32" if ARCH_AVR32
- default "blackfin" if ARCH_BLACKFIN
- default "m68k" if ARCH_M68K
- default "sparc" if ARCH_SPARC
- default "mips" if ARCH_MIPS
- default "cris" if ARCH_CRIS
- default "parisc" if ARCH_PARISC
- default "sh" if ARCH_SH
-
- default "ppc" if KERNEL_ARCH_PPC
- default "powerpc" if KERNEL_ARCH_POWERPC
- default "x86" if KERNEL_ARCH_X86
- default "i386" if KERNEL_ARCH_I386
- default "x86_64" if KERNEL_ARCH_X86_64
- default "riscv" if ARCH_RISCV
-
choice
prompt "Image Type "
default KERNEL_IMAGE_BZ
diff --git a/rules/kernel.make b/rules/kernel.make
index 46bd87fea..11407455a 100644
--- a/rules/kernel.make
+++ b/rules/kernel.make
@@ -48,7 +48,7 @@ $(STATEDIR)/kernel-header.% $(STATEDIR)/host-kernel-header.%: KERNEL_MAKEVARS=
KERNEL_MAKE_OPT := \
V=$(PTXDIST_VERBOSE) \
O=$(KERNEL_BUILD_DIR) \
- ARCH=$(PTXCONF_KERNEL_ARCH_STRING) \
+ ARCH=$(GENERIC_KERNEL_ARCH) \
CROSS_COMPILE=$(KERNEL_CROSS_COMPILE) \
INSTALL_MOD_PATH=$(KERNEL_PKGDIR) \
PTX_KERNEL_DIR=$(KERNEL_DIR) \
@@ -73,13 +73,13 @@ KERNEL_CONF_OPT := \
KERNEL_IMAGE := $(call remove_quotes, $(PTXCONF_KERNEL_IMAGE))
# these are sane default
-KERNEL_IMAGE_PATH_y := $(KERNEL_BUILD_DIR)/arch/$(PTXCONF_KERNEL_ARCH_STRING)/boot/$(KERNEL_IMAGE)
+KERNEL_IMAGE_PATH_y := $(KERNEL_BUILD_DIR)/arch/$(GENERIC_KERNEL_ARCH)/boot/$(KERNEL_IMAGE)
# vmlinux and vmlinuz are special
KERNEL_IMAGE_PATH_$(PTXCONF_KERNEL_IMAGE_VMLINUX) := $(KERNEL_BUILD_DIR)/vmlinux
KERNEL_IMAGE_PATH_$(PTXCONF_KERNEL_IMAGE_VMLINUZ) := $(KERNEL_BUILD_DIR)/vmlinuz
# avr32 is also special
-KERNEL_IMAGE_PATH_$(PTXCONF_ARCH_AVR32) := $(KERNEL_BUILD_DIR)/arch/$(PTXCONF_KERNEL_ARCH_STRING)/boot/images/$(KERNEL_IMAGE)
+KERNEL_IMAGE_PATH_$(PTXCONF_ARCH_AVR32) := $(KERNEL_BUILD_DIR)/arch/$(GENERIC_KERNEL_ARCH)/boot/images/$(KERNEL_IMAGE)
ifdef PTXCONF_KERNEL
@@ -113,7 +113,7 @@ ifdef KERNEL_INITRAMFS_SOURCE_y
endif
ifdef PTXCONF_KERNEL_IMAGE_SIMPLE
cp $(PTXCONF_KERNEL_IMAGE_SIMPLE_DTS) \
- $(KERNEL_DIR)/arch/$(PTXCONF_KERNEL_ARCH_STRING)/boot/dts/$(PTXCONF_KERNEL_IMAGE_SIMPLE_TARGET).dts
+ $(KERNEL_DIR)/arch/$(GENERIC_KERNEL_ARCH)/boot/dts/$(PTXCONF_KERNEL_IMAGE_SIMPLE_TARGET).dts
endif
@$(call world/prepare, KERNEL)
diff --git a/rules/other/Namespace.make b/rules/other/Namespace.make
index 9b2187582..c612aaf30 100644
--- a/rules/other/Namespace.make
+++ b/rules/other/Namespace.make
@@ -23,7 +23,6 @@ HOSTCC := gcc
HOSTCXX := g++
PTXCONF_ARCH_STRING := $(call remove_quotes, $(PTXCONF_ARCH_STRING))
-PTXCONF_KERNEL_ARCH_STRING := $(call remove_quotes, $(PTXCONF_KERNEL_ARCH_STRING))
PTXCONF_BAREBOX_ARCH_STRING := $(call remove_quotes, $(PTXCONF_BAREBOX_ARCH_STRING))
PTXCONF_TARGET_EXTRA_CFLAGS := $(call remove_quotes, $(PTXCONF_TARGET_EXTRA_CFLAGS))
--
2.24.0
_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
reply other threads:[~2019-11-20 9:57 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191120095716.20068-1-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox