All of lore.kernel.org
 help / color / mirror / Atom feed
From: Doug Goldstein <cardoe@cardoe.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Andrew Cooper <andrew.cooper3@citrix.com>,
	Keir Fraser <keir@xen.org>,
	Stefano Stabellini <stefano.stabellini@citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH v7 03/28] build: build Kconfig and config rules
Date: Mon, 14 Dec 2015 11:52:31 -0600	[thread overview]
Message-ID: <566F01DF.1030200@cardoe.com> (raw)
In-Reply-To: <566EFDD302000078000BF3F6@prv-mh.provo.novell.com>


[-- Attachment #1.1: Type: text/plain, Size: 4610 bytes --]

On 12/14/15 10:35 AM, Jan Beulich wrote:
>>>> On 10.12.15 at 17:48, <cardoe@cardoe.com> wrote:
>> --- /dev/null
>> +++ b/xen/Kconfig
>> @@ -0,0 +1,24 @@
>> +#
>> +# For a description of the syntax of this configuration file,
>> +# see docs/misc/kconfig-language.txt
>> +#
>> +mainmenu "Xen/$SRCARCH $XEN_FULLVERSION Configuration"
>> +
>> +config SRCARCH
>> +	string
>> +	option env="SRCARCH"
>> +
>> +config ARCH
>> +	string
>> +	option env="ARCH"
>> +
>> +source "arch/$SRCARCH/Kconfig"
>> +
>> +config XEN_FULLVERSION
> 
> I continue to wonder what use the XEN_ prefix here is.

This can be named anything you want. The existing makefiles call the
version "XEN_FULLVERSION" so I'm just keeping it the same. Its just to
have the same version number that the makefiles generate stored in the
.config file for if/when people start posting .config files somewhere.
Honestly at this point I'll paint the bike whatever color is desired.

> 
>> --- a/xen/Makefile
>> +++ b/xen/Makefile
>> @@ -20,6 +20,14 @@ MAKEFLAGS += -rR
>>  
>>  EFI_MOUNTPOINT ?= $(BOOT_DIR)/efi
>>  
>> +# Don't break if the build process wasn't called from the top level
>> +# we need XEN_TARGET_ARCH to generate the proper config
>> +include $(XEN_ROOT)/Config.mk
>> +
>> +# Allow someone to change their config file
>> +KCONFIG_CONFIG ?= .config
>> +export KCONFIG_CONFIG
> 
> For compactness' sake this could be done on one line afaik.

Sure. I copied and pasted this from the Linux kernel where its two
lines. I'll send another squash in.

> 
>> --- /dev/null
>> +++ b/xen/arch/x86/Kconfig
>> @@ -0,0 +1,17 @@
>> +config X86_64
>> +	def_bool y
>> +
>> +config X86
>> +	def_bool y
>> +
>> +config ARCH_DEFCONFIG
>> +	string
>> +	default "arch/x86/configs/x86_64_defconfig"
>> +
>> +menu "Architecture Features"
>> +
>> +endmenu
>> +
>> +source "common/Kconfig"
>> +
>> +source "drivers/Kconfig"
> 
> I'm still missing "config 64BIT" in this file.

You had wanted me to factor that out in earlier series. So now its only
in the arm side which is the only place its used.

> 
>> --- /dev/null
>> +++ b/xen/tools/kconfig/Makefile.kconfig
>> @@ -0,0 +1,76 @@
>> +# xen/tools/kconfig
>> +
>> +# default rule to do nothing
>> +all:
>> +
>> +XEN_ROOT = $(CURDIR)/..

This was meant to go away once the xen/Makefile exported it. Which has
already been merged in.

>> +
>> +# Xen doesn't have a silent build flag
>> +quiet := silent_
>> +Q := @
>> +kecho := :
>> +
>> +# eventually you'll want to do out of tree builds
>> +srctree = $(XEN_ROOT)/xen
> 
> Doesn't this add one /xen too many? Or wait, don't you need
> two more /.. when setting XEN_ROOT above?

See above comment on XEN_ROOT.

> 
>> +objtree = $(srctree)
> 
> Do both of them really need to use = (instead of the more efficient
> ":=")?

Sure. I will send you a squash.

> 
>> +src := tools/kconfig
>> +obj := $(src)
>> +KBUILD_SRC :=
>> +
>> +# handle functions (most of these lifted from different Linux makefiles
>> +dot-target = $(dir $@).$(notdir $@)
>> +depfile = $(subst $(comma),,$(dot-target).d)
>> +basetarget = $(basename $(notdir $@))
>> +cmd = $(cmd_$(1))
>> +if_changed = $(if y, \
>> +	@set -e; \
>> +	$(cmd_$(1)); \
>> +	)
>> +
>> +if_changed_dep = $(if y, \
>> +	@set -e;	\
>> +	$(cmd_$(1)); \
>> +	)
> 
> I'm quite sure to have asked for these strange multi line constructs
> to be collapsed.

Sure. In the squash.

> 
>> +# provide the host compiler
>> +HOSTCC := gcc
>> +HOSTCXX := g++
> 
> Didn't you mean to inherit these instead of forcing them here?

No. I pointed out that the only real way to inherit them is to pull in
top-level Config.mk which is too heavy handed. If we have some agreement
to break up the pieces that truly belong in there then sure.

Honestly I would prefer to do that break up after the fact. I've being
working on this series for 3 months now and a lot of the issues brought
up can happen after the fact because, like this one, it involves fixing
up existing Xen makefiles rather than issues with this series.

> 
>> +# force target
>> +PHONY += FORCE
>> +
>> +FORCE:
>> +
>> +SRCARCH = $(shell echo $(ARCH) | \
>> +	sed -e 's/x86.*/x86/' -e s'/arm\(32\|64\)/arm/g')
>> +export SRCARCH
>> +
>> +# include the original Makefile from Linux
>> +include $(src)/Makefile
>> +# include the Makefile.host from Linux
>> +include $(src)/Makefile.host
> 
> Just one comment for both lines would do.
> 
> Jan
> 

Sure. I'll send you a squash.

-- 
Doug Goldstein


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 959 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  reply	other threads:[~2015-12-14 17:52 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-10 16:48 [PATCH v7 00/28] Kconfig conversion Doug Goldstein
2015-12-10 16:48 ` [PATCH v7 01/28] build: import Kbuild/Kconfig from Linux 4.3 Doug Goldstein
2015-12-10 16:48 ` [PATCH v7 02/28] MAINTAINERS: add myself for kconfig Doug Goldstein
2015-12-10 17:21   ` Jan Beulich
2015-12-10 17:26     ` Doug Goldstein
2015-12-11  7:50       ` Jan Beulich
2015-12-10 16:48 ` [PATCH v7 03/28] build: build Kconfig and config rules Doug Goldstein
2015-12-14 16:35   ` Jan Beulich
2015-12-14 17:52     ` Doug Goldstein [this message]
2015-12-14 17:57       ` [PATCH] squash into 'build: build Kconfig and config rules' Doug Goldstein
2015-12-14 19:25         ` Doug Goldstein
2015-12-14 19:24       ` Doug Goldstein
2015-12-15  7:42       ` [PATCH v7 03/28] build: build Kconfig and config rules Jan Beulich
2015-12-10 16:48 ` [PATCH v7 04/28] build: use generated Kconfig options for Xen Doug Goldstein
2015-12-14 16:37   ` Jan Beulich
2015-12-14 18:00     ` [PATCH] squash into 'build: use generated Kconfig option for Xen' Doug Goldstein
2015-12-10 16:48 ` [PATCH v7 05/28] build: convert HAS_PASSTHROUGH use to Kconfig Doug Goldstein
2015-12-10 16:48 ` [PATCH v7 06/28] build: convert HAS_DEVICE_TREE " Doug Goldstein
2015-12-10 16:48 ` [PATCH v7 07/28] build: convert HAS_PCI " Doug Goldstein
2015-12-14 15:52   ` [PATCH] squash into 'build: convert HAS_PCI use to Kconfig' Doug Goldstein
2015-12-10 16:48 ` [PATCH v7 08/28] build: convert HAS_NS16550 use to Kconfig Doug Goldstein
2015-12-10 16:48 ` [PATCH v7 09/28] build: convert HAS_IOPORTS " Doug Goldstein
2015-12-10 16:48 ` [PATCH v7 10/28] build: convert HAS_ACPI " Doug Goldstein
2015-12-10 16:48 ` [PATCH v7 11/28] build: convert HAS_VIDEO " Doug Goldstein
2015-12-10 16:48 ` [PATCH v7 12/28] build: convert HAS_VGA " Doug Goldstein
2015-12-14 13:23   ` Jan Beulich
2015-12-14 15:57     ` [PATCH] squash into 'build: convert HAS_VGA use to Kconfig' Doug Goldstein
2015-12-10 16:48 ` [PATCH v7 13/28] build: convert HAS_CPUFREQ use to Kconfig Doug Goldstein
2015-12-10 16:48 ` [PATCH v7 14/28] build: convert HAS_GDBSX " Doug Goldstein
2015-12-10 16:48 ` [PATCH v7 15/28] build: convert HAS_PDX " Doug Goldstein
2015-12-10 16:48 ` [PATCH v7 16/28] build: convert HAS_KEXEC / KEXEC " Doug Goldstein
2015-12-10 16:48 ` [PATCH v7 17/28] build: convert HAS_ARM_HDLCD " Doug Goldstein
2015-12-10 16:48 ` [PATCH v7 18/28] build: convert HAS_CADENCE_UART " Doug Goldstein
2015-12-10 16:48 ` [PATCH v7 19/28] build: convert HAS_PL011 " Doug Goldstein
2015-12-10 16:48 ` [PATCH v7 20/28] build: convert HAS_EXYNOS4210 " Doug Goldstein
2015-12-10 16:48 ` [PATCH v7 21/28] build: convert HAS_OMAP " Doug Goldstein
2015-12-10 16:48 ` [PATCH v7 22/28] build: convert HAS_SCIF " Doug Goldstein
2015-12-10 16:48 ` [PATCH v7 23/28] build: convert HAS_EHCI " Doug Goldstein
2015-12-14 13:33   ` Jan Beulich
2015-12-14 16:00     ` [PATCH] squash into 'build: convert HAS_EHCI use to Kconfig' Doug Goldstein
2015-12-10 16:48 ` [PATCH v7 24/28] build: convert HAS_MEM_ACCESS use to Kconfig Doug Goldstein
2015-12-11  8:37   ` Razvan Cojocaru
2015-12-10 16:48 ` [PATCH v7 25/28] build: convert HAS_MEM_PAGING " Doug Goldstein
2015-12-11  8:43   ` Razvan Cojocaru
2015-12-11 10:52   ` Jan Beulich
2015-12-11 12:57     ` Doug Goldstein
2015-12-11 13:23       ` Jan Beulich
2015-12-11 16:15         ` [PATCH] squash into 'build: convert HAS_MEM_ACCESS to use Kconfig' Doug Goldstein
2015-12-14  9:01           ` Jan Beulich
2015-12-14 14:21             ` Doug Goldstein
2015-12-10 16:48 ` [PATCH v7 26/28] build: convert HAS_MEM_SHARING use to Kconfig Doug Goldstein
2015-12-11  8:46   ` Razvan Cojocaru
2015-12-10 16:48 ` [PATCH v7 27/28] build: convert HAS_GICV3 " Doug Goldstein
2015-12-10 16:48 ` [PATCH v7 28/28] build: convert CONFIG_COMPAT " Doug Goldstein
2015-12-10 16:59 ` [PATCH v7 00/28] Kconfig conversion Jan Beulich
2015-12-10 17:14   ` Doug Goldstein
2015-12-14 13:29 ` Jan Beulich

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=566F01DF.1030200@cardoe.com \
    --to=cardoe@cardoe.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=keir@xen.org \
    --cc=stefano.stabellini@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.