All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 07/21] sandbox: Use 'extras' to specify 'head' files
Date: Fri, 23 Nov 2018 21:29:30 -0700	[thread overview]
Message-ID: <20181124042944.239106-8-sjg@chromium.org> (raw)
In-Reply-To: <20181124042944.239106-1-sjg@chromium.org>

At present sandbox has a start.o in the 'start' target but also includes
it in the normal target list. This is not how this is normally handled. It
is needed because sandbox does not include the u-boot-init variable in its
link rule.

Update the rule and move start.o from the normal target list to the
'extras' list.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/sandbox/Makefile     | 4 ++--
 arch/sandbox/config.mk    | 3 ++-
 arch/sandbox/cpu/Makefile | 5 +++--
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/arch/sandbox/Makefile b/arch/sandbox/Makefile
index 261079441cf..f6cf859f249 100644
--- a/arch/sandbox/Makefile
+++ b/arch/sandbox/Makefile
@@ -1,6 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0+
 
-head-y := arch/sandbox/cpu/start.o
-
+head-y := arch/sandbox/cpu/start.o arch/sandbox/cpu/os.o
+head-$(CONFIG_SANDBOX_SDL) += arch/sandbox/cpu/sdl.o
 libs-y += arch/sandbox/cpu/
 libs-y += arch/sandbox/lib/
diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk
index 95f9e3ff63f..7226b7be428 100644
--- a/arch/sandbox/config.mk
+++ b/arch/sandbox/config.mk
@@ -17,11 +17,12 @@ PLATFORM_CPPFLAGS += $(shell sdl-config --cflags)
 endif
 endif
 
-cmd_u-boot__ = $(CC) -o $@ -Wl,-T u-boot.lds \
+cmd_u-boot__ = $(CC) -o $@ -Wl,-T u-boot.lds $(u-boot-init) \
 	-Wl,--start-group $(u-boot-main) -Wl,--end-group \
 	$(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map
 
 cmd_u-boot-spl = (cd $(obj) && $(CC) -o $(SPL_BIN) -Wl,-T u-boot-spl.lds \
+	$(patsubst $(obj)/%,%,$(u-boot-spl-init)) \
 	-Wl,--start-group $(patsubst $(obj)/%,%,$(u-boot-spl-main)) \
 	$(patsubst $(obj)/%,%,$(u-boot-spl-platdata)) -Wl,--end-group \
 	$(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot-spl.map -Wl,--gc-sections)
diff --git a/arch/sandbox/cpu/Makefile b/arch/sandbox/cpu/Makefile
index 8fe681844d9..bac96447d51 100644
--- a/arch/sandbox/cpu/Makefile
+++ b/arch/sandbox/cpu/Makefile
@@ -5,10 +5,11 @@
 # (C) Copyright 2000-2003
 # Wolfgang Denk, DENX Software Engineering, wd at denx.de.
 
-obj-y	:= cpu.o os.o start.o state.o
+obj-y	:= cpu.o state.o
+extra-y	:= start.o os.o
+extra-$(CONFIG_SANDBOX_SDL)	+= sdl.o
 obj-$(CONFIG_SPL_BUILD)	+= spl.o
 obj-$(CONFIG_ETH_SANDBOX_RAW)	+= eth-raw-os.o
-obj-$(CONFIG_SANDBOX_SDL)	+= sdl.o
 
 # os.c is build in the system environment, so needs standard includes
 # CFLAGS_REMOVE_os.o cannot be used to drop header include path
-- 
2.20.0.rc0.387.gc7a69e6b6c-goog

  parent reply	other threads:[~2018-11-24  4:29 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-24  4:29 [U-Boot] [PATCH 00/21] Various patches for verified boot support Simon Glass
2018-11-24  4:29 ` [U-Boot] [PATCH 01/21] sandbox: Fix up the debug message for the image filename Simon Glass
2018-11-24  4:29 ` [U-Boot] [PATCH 02/21] sandbox: Check the filename in jump_to_image_no_args() Simon Glass
2018-11-24  4:29 ` [U-Boot] [PATCH 03/21] sandbox: physmem: Use mapping to support sandbox Simon Glass
2018-11-24  4:29 ` [U-Boot] [PATCH 04/21] sandbox: net: Correct name copy in eth_raw_bus_post_bind() Simon Glass
2018-11-24  4:29 ` [U-Boot] [PATCH 05/21] sandbox: sysreset: Update to support power-on reset Simon Glass
2018-11-24  4:29 ` [U-Boot] [PATCH 06/21] sandbox: Zero the ram buffer on startup Simon Glass
2018-11-24  4:29 ` Simon Glass [this message]
2018-11-24  4:29 ` [U-Boot] [PATCH 08/21] sandbox: Allow running from valgrind Simon Glass
2018-11-24 21:31   ` Alexander Graf
2018-11-26  9:30     ` Christian Borntraeger
2018-11-24  4:29 ` [U-Boot] [PATCH 09/21] tpm: Remove use of build-time TPM versions Simon Glass
2018-11-24  4:29 ` [U-Boot] [PATCH 10/21] tpm: Export tpm_clear_and_reenable() Simon Glass
2018-11-24  4:29 ` [U-Boot] [PATCH 11/21] tpm: Add non-volatile index attributes needed for v2 Simon Glass
2018-11-24  4:29 ` [U-Boot] [PATCH 12/21] tpm: Fix a logging warning in unpack_byte_string() Simon Glass
2018-11-24  4:29 ` [U-Boot] [PATCH 13/21] cros: Correct a printf() string and comment Simon Glass
2018-11-24  4:29 ` [U-Boot] [PATCH 14/21] cros_ec: Adjust to use v1 vboot context only Simon Glass
2018-11-24  4:29 ` [U-Boot] [PATCH 15/21] input: i8042: Use remove() instead of exported functions Simon Glass
2018-11-24  4:29 ` [U-Boot] [PATCH 16/21] video: backlight: Fix log message in enable_sequence() Simon Glass
2018-11-24 10:24   ` Anatolij Gustschin
2018-12-05 23:10   ` sjg at google.com
2018-11-24  4:29 ` [U-Boot] [PATCH 17/21] time: Update mdelay() to delay in one large chunk Simon Glass
2018-11-24  4:29 ` [U-Boot] [PATCH 18/21] log: Check printf() arguments Simon Glass
2018-11-24  4:29 ` [U-Boot] [PATCH 19/21] Add UINT32_MAX and UINT64_MAX Simon Glass
2018-11-24  4:29 ` [U-Boot] [PATCH 20/21] Add inttypes.h Simon Glass
2018-12-06  5:50   ` Masahiro Yamada
2018-12-10 21:05     ` Simon Glass
2018-11-24  4:29 ` [U-Boot] [PATCH 21/21] RFC: Makefile: Build U-Boot as a library Simon Glass
2018-12-05 23:10 ` [U-Boot] [PATCH 19/21] Add UINT32_MAX and UINT64_MAX sjg at google.com
2018-12-05 23:10 ` [U-Boot] [PATCH 20/21] Add inttypes.h sjg at google.com
2018-12-05 23:10 ` [U-Boot] [PATCH 17/21] time: Update mdelay() to delay in one large chunk sjg at google.com
2018-12-05 23:10 ` [U-Boot] [PATCH 15/21] input: i8042: Use remove() instead of exported functions sjg at google.com
2018-12-05 23:10 ` [U-Boot] [PATCH 14/21] cros_ec: Adjust to use v1 vboot context only sjg at google.com
2018-12-05 23:10 ` [U-Boot] [PATCH 13/21] cros: Correct a printf() string and comment sjg at google.com
2018-12-05 23:10 ` [U-Boot] [PATCH 12/21] tpm: Fix a logging warning in unpack_byte_string() sjg at google.com
2018-12-05 23:10 ` [U-Boot] [PATCH 11/21] tpm: Add non-volatile index attributes needed for v2 sjg at google.com
2018-12-05 23:10 ` [U-Boot] [PATCH 09/21] tpm: Remove use of build-time TPM versions sjg at google.com
2018-12-05 23:10 ` [U-Boot] [PATCH 10/21] tpm: Export tpm_clear_and_reenable() sjg at google.com
2018-12-05 23:10 ` [U-Boot] [PATCH 07/21] sandbox: Use 'extras' to specify 'head' files sjg at google.com
2018-12-05 23:10 ` [U-Boot] [PATCH 05/21] sandbox: sysreset: Update to support power-on reset sjg at google.com
2018-12-05 23:10 ` [U-Boot] [PATCH 06/21] sandbox: Zero the ram buffer on startup sjg at google.com
2018-12-05 23:10 ` [U-Boot] [PATCH 04/21] sandbox: net: Correct name copy in eth_raw_bus_post_bind() sjg at google.com
2018-12-05 23:11 ` [U-Boot] [PATCH 03/21] sandbox: physmem: Use mapping to support sandbox sjg at google.com
2018-12-05 23:11 ` [U-Boot] [PATCH 02/21] sandbox: Check the filename in jump_to_image_no_args() sjg at google.com
2018-12-05 23:11 ` [U-Boot] [PATCH 01/21] sandbox: Fix up the debug message for the image filename sjg at google.com
2018-12-28 20:47 ` [U-Boot] [PATCH 18/21] log: Check printf() arguments sjg at google.com

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=20181124042944.239106-8-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.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 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.