[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v7 03/28] build: build Kconfig and config rules



>>> On 10.12.15 at 17:48, <cardoe@xxxxxxxxxx> 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.

> --- 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.

> --- /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.

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

> +objtree = $(srctree)

Do both of them really need to use = (instead of the more efficient
":=")?

> +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.

> +# provide the host compiler
> +HOSTCC := gcc
> +HOSTCXX := g++

Didn't you mean to inherit these instead of forcing them here?

> +# 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


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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.