All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Thomas Leonard <talex5@gmail.com>
Cc: Dave.Scott@eu.citrix.com, anil@recoil.org,
	stefano.stabellini@eu.citrix.com, samuel.thibault@ens-lyon.org,
	xen-devel@lists.xenproject.org
Subject: Re: [PATCH ARM v8 3/4] mini-os: arm: build system
Date: Tue, 21 Oct 2014 12:44:27 +0100	[thread overview]
Message-ID: <1413891867.23337.26.camel@citrix.com> (raw)
In-Reply-To: <1412328051-20015-4-git-send-email-talex5@gmail.com>

On Fri, 2014-10-03 at 10:20 +0100, Thomas Leonard wrote:
> diff --git a/extras/mini-os/Makefile b/extras/mini-os/Makefile
> index 6d6537e..77dc9aa 100644
> --- a/extras/mini-os/Makefile
> +++ b/extras/mini-os/Makefile

WRT the freeze some of the changes here would appear to also affect x86
builds, which means they need more careful consideration. Konrad CCd.

> @@ -51,7 +51,7 @@ flags-$(CONFIG_XENBUS) += -DCONFIG_XENBUS
>  DEF_CFLAGS += $(flags-y)
>  
>  # Symlinks and headers that must be created before building the C files
> -GENERATED_HEADERS := include/list.h $(ARCH_LINKS) include/mini-os include/xen include/$(TARGET_ARCH_FAM)/mini-os
> +GENERATED_HEADERS := include/list.h $(ARCH_LINKS) include/mini-os include/xen include/$(TARGET_ARCH_FAM)/mini-os include/fdt.h include/libfdt.h
>  
>  EXTRA_DEPS += $(GENERATED_HEADERS)
>  
> @@ -75,7 +75,18 @@ EXTRA_OBJS =
>  TARGET := mini-os
>  
>  # Subdirectories common to mini-os
> -SUBDIRS := lib xenbus console
> +SUBDIRS := lib xenbus console libfdt
> +
> +FDT_SRC :=
> +ifeq ($(XEN_TARGET_ARCH),arm32)
> +# Need libgcc.a for division helpers

Is this the __aeabi_* stuff?

Samuel, is this sort of thing OK in mini-os? Usually on the Xen/kernel
side we avoid libgcc.a and instead have our own copies of such helpers.
I don't recall why, I don't think it is licensing (libgcc has an
exception). Possibly just to give some control over what gets included?

> +LDLIBS += `$(CC) -print-libgcc-file-name`
> +
> +# Device tree support
> +FDT_SRC := libfdt/fdt.c libfdt/fdt_ro.c libfdt/fdt_strerror.c
> +
> +src-y += ${FDT_SRC}

We would normally use $(FDT_SRC) (TBH I'm not sure what the difference
is).

> +endif
>  
>  src-$(CONFIG_BLKFRONT) += blkfront.c
>  src-$(CONFIG_TPMFRONT) += tpmfront.c
> @@ -97,10 +108,13 @@ src-y += sched.c
>  src-$(CONFIG_TEST) += test.c
>  
>  src-y += lib/ctype.c
> +ifneq ($(XEN_TARGET_ARCH),arm32)
>  src-y += lib/math.c
> +endif
>  src-y += lib/printf.c
>  src-y += lib/stack_chk_fail.c
>  src-y += lib/string.c
> +src-y += lib/memmove.c
>  src-y += lib/sys.c
>  src-y += lib/xmalloc.c
>  src-$(CONFIG_XENBUS) += lib/xs.c
> @@ -125,6 +139,21 @@ $(ARCH_LINKS):
>  	$(arch_links)
>  endif
>  
> +include/fdt.h:
> +	cp $(XEN_ROOT)/xen/include/xen/libfdt/fdt.h $@
> +
> +include/libfdt.h:
> +	sed 's!xen/libfdt/!!' $(XEN_ROOT)/xen/include/xen/libfdt/libfdt.h > $@

Should both of these not depend on their input?

> +
> +libfdt:
> +	mkdir $@
> +
> +libfdt/libfdt_internal.h: libfdt
> +	cp $(XEN_ROOT)/xen/common/libfdt/libfdt_internal.h $@
> +
> +libfdt/%.c: libfdt libfdt/libfdt_internal.h
> +	cp $(XEN_ROOT)/xen/common/libfdt/$*.c $@

And these too. Would ln -s be better than cp? Or even VPATH tricks?

> @@ -202,6 +235,7 @@ clean:	arch_clean
>  		rm -f $$dir/*.o; \
>  	done
>  	rm -f include/list.h
> +	rm -f ${FDT_SRC} libfdt/libfdt_internal.h

$(FDT_SRC) again.

Ian.

  reply	other threads:[~2014-10-21 11:44 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-03  9:20 [PATCH ARM v8 0/4] mini-os: initial ARM support Thomas Leonard
2014-10-03  9:20 ` [PATCH ARM v8 1/4] mini-os: arm: time Thomas Leonard
2014-10-21 10:50   ` Ian Campbell
2014-10-21 14:07     ` [PATCH incomplete] xen: arm: wallclock support (incomplete, needs work/refactoring) Ian Campbell
2014-10-26  9:51     ` [PATCH ARM v8 1/4] mini-os: arm: time Thomas Leonard
2014-10-27 10:34       ` Ian Campbell
2014-11-13 16:29         ` Thomas Leonard
2014-11-14 10:29           ` Ian Campbell
2014-11-19 20:57             ` Konrad Rzeszutek Wilk
2015-01-08 15:52     ` Ian Campbell
2015-01-08 15:58       ` Thomas Leonard
2015-01-08 16:04         ` Ian Campbell
2014-10-03  9:20 ` [PATCH ARM v8 2/4] mini-os: arm: interrupt controller Thomas Leonard
2014-10-21 11:00   ` Ian Campbell
2014-10-21 14:26     ` Julien Grall
2014-10-21 15:16       ` Ian Campbell
2014-10-21 15:22         ` Julien Grall
2014-10-21 15:35           ` Ian Campbell
2014-10-21 16:03             ` Julien Grall
2014-10-21 18:14               ` Anil Madhavapeddy
2014-10-21 19:18                 ` Ian Campbell
2014-10-21 21:54     ` Samuel Thibault
2014-10-22  9:03       ` Ian Campbell
2014-10-22 13:06         ` Julien Grall
2014-10-22 13:14           ` Samuel Thibault
2014-10-28 15:15           ` Thomas Leonard
2014-10-28 15:25             ` Julien Grall
2014-10-28 15:43               ` Thomas Leonard
2014-10-28 15:51                 ` Julien Grall
2014-11-14 10:22                   ` Thomas Leonard
2014-11-14 11:33                     ` Julien Grall
2014-11-14 11:42                       ` Ian Campbell
2014-11-14 11:48                         ` Julien Grall
2014-11-14 12:01                           ` Ian Campbell
2014-10-03  9:20 ` [PATCH ARM v8 3/4] mini-os: arm: build system Thomas Leonard
2014-10-21 11:44   ` Ian Campbell [this message]
2014-10-21 21:50     ` Samuel Thibault
2014-10-22  9:01       ` Ian Campbell
2014-10-22  9:59         ` Samuel Thibault
2014-10-26  9:46       ` Thomas Leonard
2014-10-26  9:55         ` Samuel Thibault
2014-10-26 10:25           ` Thomas Leonard
2014-11-17 11:42             ` Thomas Leonard
2014-11-17 11:45               ` Ian Campbell
2014-11-17 11:47               ` Andrew Cooper
2014-11-17 11:47               ` Samuel Thibault
2014-10-03  9:20 ` [PATCH ARM v8 4/4] mini-os: arm: show registers, stack and exception vector on fault Thomas Leonard

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=1413891867.23337.26.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=Dave.Scott@eu.citrix.com \
    --cc=anil@recoil.org \
    --cc=samuel.thibault@ens-lyon.org \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=talex5@gmail.com \
    --cc=xen-devel@lists.xenproject.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.