* [U-Boot] [PATCH 1/2] SPL: Makefile: Build a separate autoconf.mk for SPL
@ 2013-05-07 15:52 Joel A Fernandes
2013-05-07 15:52 ` [U-Boot] [PATCH 2/2] am33xx: Board: Make CPSW section of ethernet initialization depend on CPSW driver Joel A Fernandes
2013-05-17 21:03 ` [U-Boot] [PATCH 1/2] SPL: Makefile: Build a separate autoconf.mk for SPL Tom Rini
0 siblings, 2 replies; 5+ messages in thread
From: Joel A Fernandes @ 2013-05-07 15:52 UTC (permalink / raw)
To: u-boot
SPL defines CONFIG_SPL_BUILD but this does not percolate to the autoconf.mk Makefile.
As a result the build breaks when CONFIG_SPL_BUILD is used in the board-specific include
header file. With this, there is a possibility of having a CONFIG option defined in the
header file but not defined in the Makefile causing all kinds of build failure and problems.
It also messes things for up, for example, when one might want to undefine options to
keep the SPL small and doesn't want to be stuck with the CONFIG options used for U-boot.
Lastly, this also avoids defining special CONFIG_SPL_ variables for cases where some
options are required in U-boot but not in SPL.
We add a spl-autoconf.mk rule that is generated for SPL with the CONFIG_SPL_BUILD flag
and conditionally include it for SPL builds.
Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
---
Makefile | 19 +++++++++++++++++--
config.mk | 6 ++++++
2 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index dbc4b70..6d2bb1c 100644
--- a/Makefile
+++ b/Makefile
@@ -635,6 +635,7 @@ updater:
# Explicitly make _depend in subdirs containing multiple targets to prevent
# parallel sub-makes creating .depend files simultaneously.
depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) \
+ $(obj)include/spl-autoconf.mk \
$(obj)include/autoconf.mk \
$(obj)include/generated/generic-asm-offsets.h \
$(obj)include/generated/asm-offsets.h
@@ -710,12 +711,23 @@ $(obj)include/autoconf.mk: $(obj)include/config.h
sed -n -f tools/scripts/define2mk.sed > $@.tmp && \
mv $@.tmp $@
+# Auto-generate the spl-autoconf.mk file (which is included by all makefiles for SPL)
+$(obj)include/spl-autoconf.mk: $(obj)include/config.h
+ @$(XECHO) Generating $@ ; \
+ set -e ; \
+ : Extract the config macros ; \
+ $(CPP) $(CFLAGS) -DCONFIG_SPL_BUILD -DDO_DEPS_ONLY -dM include/common.h | \
+ sed -n -f tools/scripts/define2mk.sed > $@.tmp && \
+ mv $@.tmp $@
+
$(obj)include/generated/generic-asm-offsets.h: $(obj)include/autoconf.mk.dep \
+ $(obj)include/spl-autoconf.mk \
$(obj)lib/asm-offsets.s
@$(XECHO) Generating $@
tools/scripts/make-asm-offsets $(obj)lib/asm-offsets.s $@
$(obj)lib/asm-offsets.s: $(obj)include/autoconf.mk.dep \
+ $(obj)include/spl-autoconf.mk \
$(src)lib/asm-offsets.c
@mkdir -p $(obj)lib
$(CC) -DDO_DEPS_ONLY \
@@ -723,11 +735,13 @@ $(obj)lib/asm-offsets.s: $(obj)include/autoconf.mk.dep \
-o $@ $(src)lib/asm-offsets.c -c -S
$(obj)include/generated/asm-offsets.h: $(obj)include/autoconf.mk.dep \
+ $(obj)include/spl-autoconf.mk \
$(obj)$(CPUDIR)/$(SOC)/asm-offsets.s
@$(XECHO) Generating $@
tools/scripts/make-asm-offsets $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s $@
-$(obj)$(CPUDIR)/$(SOC)/asm-offsets.s: $(obj)include/autoconf.mk.dep
+$(obj)$(CPUDIR)/$(SOC)/asm-offsets.s: $(obj)include/autoconf.mk.dep \
+ $(obj)include/spl-autoconf.mk
@mkdir -p $(obj)$(CPUDIR)/$(SOC)
if [ -f $(src)$(CPUDIR)/$(SOC)/asm-offsets.c ];then \
$(CC) -DDO_DEPS_ONLY \
@@ -792,7 +806,8 @@ include/license.h: tools/bin2header COPYING
unconfig:
@rm -f $(obj)include/config.h $(obj)include/config.mk \
$(obj)board/*/config.tmp $(obj)board/*/*/config.tmp \
- $(obj)include/autoconf.mk $(obj)include/autoconf.mk.dep
+ $(obj)include/autoconf.mk $(obj)include/autoconf.mk.dep \
+ $(obj)include/spl-autoconf.mk
%_config:: unconfig
@$(MKCONFIG) -A $(@:_config=)
diff --git a/config.mk b/config.mk
index b427a4e..ec276dc 100644
--- a/config.mk
+++ b/config.mk
@@ -161,7 +161,13 @@ CHECK = sparse
#########################################################################
# Load generated board configuration
+ifeq ($(CONFIG_SPL_BUILD),y)
+# Include SPL autoconf
+sinclude $(TOPDIR)/include/spl-autoconf.mk
+else
+# Include normal autoconf
sinclude $(OBJTREE)/include/autoconf.mk
+endif
sinclude $(OBJTREE)/include/config.mk
# Some architecture config.mk files need to know what CPUDIR is set to,
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH 2/2] am33xx: Board: Make CPSW section of ethernet initialization depend on CPSW driver
2013-05-07 15:52 [U-Boot] [PATCH 1/2] SPL: Makefile: Build a separate autoconf.mk for SPL Joel A Fernandes
@ 2013-05-07 15:52 ` Joel A Fernandes
2013-05-17 21:03 ` [U-Boot] [PATCH 1/2] SPL: Makefile: Build a separate autoconf.mk for SPL Tom Rini
1 sibling, 0 replies; 5+ messages in thread
From: Joel A Fernandes @ 2013-05-07 15:52 UTC (permalink / raw)
To: u-boot
Not doing so breaks cases where CPSW is not required such as for USB RNDIS network boot.
Signed-off-by: Joel A Fernandes <joelagnel@ti.com>
---
board/ti/am335x/board.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/board/ti/am335x/board.c b/board/ti/am335x/board.c
index b371376..eeb5e29 100644
--- a/board/ti/am335x/board.c
+++ b/board/ti/am335x/board.c
@@ -496,6 +496,7 @@ int board_eth_init(bd_t *bis)
eth_setenv_enetaddr("ethaddr", mac_addr);
}
+#ifdef CONFIG_DRIVER_TI_CPSW
if (board_is_bone() || board_is_bone_lt() || board_is_idk()) {
writel(MII_MODE_ENABLE, &cdev->miisel);
cpsw_slaves[0].phy_if = cpsw_slaves[1].phy_if =
@@ -511,6 +512,7 @@ int board_eth_init(bd_t *bis)
printf("Error %d registering CPSW switch\n", rv);
else
n += rv;
+#endif
/*
*
--
1.7.4.1
^ permalink raw reply related [flat|nested] 5+ messages in thread* [U-Boot] [PATCH 1/2] SPL: Makefile: Build a separate autoconf.mk for SPL
2013-05-07 15:52 [U-Boot] [PATCH 1/2] SPL: Makefile: Build a separate autoconf.mk for SPL Joel A Fernandes
2013-05-07 15:52 ` [U-Boot] [PATCH 2/2] am33xx: Board: Make CPSW section of ethernet initialization depend on CPSW driver Joel A Fernandes
@ 2013-05-17 21:03 ` Tom Rini
2013-05-18 18:22 ` Joel A Fernandes
1 sibling, 1 reply; 5+ messages in thread
From: Tom Rini @ 2013-05-17 21:03 UTC (permalink / raw)
To: u-boot
On Tue, May 07, 2013 at 10:52:54AM -0500, Joel A Fernandes wrote:
> SPL defines CONFIG_SPL_BUILD but this does not percolate to the
> autoconf.mk Makefile. As a result the build breaks when
> CONFIG_SPL_BUILD is used in the board-specific include header file.
> With this, there is a possibility of having a CONFIG option defined in
> the header file but not defined in the Makefile causing all kinds of
> build failure and problems.
>
> It also messes things for up, for example, when one might want to
> undefine options to keep the SPL small and doesn't want to be stuck
> with the CONFIG options used for U-boot. Lastly, this also avoids
> defining special CONFIG_SPL_ variables for cases where some options
> are required in U-boot but not in SPL.
>
> We add a spl-autoconf.mk rule that is generated for SPL with the
> CONFIG_SPL_BUILD flag and conditionally include it for SPL builds.
This breaks tegra boards such as ventura and a number of others
currently, please fix. Thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130517/c46a473a/attachment.pgp>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH 1/2] SPL: Makefile: Build a separate autoconf.mk for SPL
2013-05-17 21:03 ` [U-Boot] [PATCH 1/2] SPL: Makefile: Build a separate autoconf.mk for SPL Tom Rini
@ 2013-05-18 18:22 ` Joel A Fernandes
2013-05-18 18:25 ` Tom Rini
0 siblings, 1 reply; 5+ messages in thread
From: Joel A Fernandes @ 2013-05-18 18:22 UTC (permalink / raw)
To: u-boot
Hi Tom,
Sorry for the delay as I've been traveling.
On Friday, May 17, 2013, Tom Rini wrote:
> On Tue, May 07, 2013 at 10:52:54AM -0500, Joel A Fernandes wrote:
>
> > SPL defines CONFIG_SPL_BUILD but this does not percolate to the
> > autoconf.mk Makefile. As a result the build breaks when
> > CONFIG_SPL_BUILD is used in the board-specific include header file.
> > With this, there is a possibility of having a CONFIG option defined in
> > the header file but not defined in the Makefile causing all kinds of
> > build failure and problems.
> >
> > It also messes things for up, for example, when one might want to
> > undefine options to keep the SPL small and doesn't want to be stuck
> > with the CONFIG options used for U-boot. Lastly, this also avoids
> > defining special CONFIG_SPL_ variables for cases where some options
> > are required in U-boot but not in SPL.
> >
> > We add a spl-autoconf.mk rule that is generated for SPL with the
> > CONFIG_SPL_BUILD flag and conditionally include it for SPL builds.
>
> This breaks tegra boards such as ventura and a number of others
> currently, please fix. Thanks!
I don't have a tegra. Is this a build or runtime issue? If its build ,
I'll try building some of those targets and let you know. Might be 1 to 2
more days once I get back today.
Regards,
Joel
>
> --
> Tom
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH 1/2] SPL: Makefile: Build a separate autoconf.mk for SPL
2013-05-18 18:22 ` Joel A Fernandes
@ 2013-05-18 18:25 ` Tom Rini
0 siblings, 0 replies; 5+ messages in thread
From: Tom Rini @ 2013-05-18 18:25 UTC (permalink / raw)
To: u-boot
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 05/18/2013 02:22 PM, Joel A Fernandes wrote:
> Hi Tom, Sorry for the delay as I've been traveling.
>
> On Friday, May 17, 2013, Tom Rini wrote:
>
> On Tue, May 07, 2013 at 10:52:54AM -0500, Joel A Fernandes wrote:
>
>> SPL defines CONFIG_SPL_BUILD but this does not percolate to the
>> autoconf.mk <http://autoconf.mk> Makefile. As a result the
>> build
> breaks when
>> CONFIG_SPL_BUILD is used in the board-specific include header
>> file. With this, there is a possibility of having a CONFIG
>> option defined in the header file but not defined in the
>> Makefile causing all kinds of build failure and problems.
>>
>> It also messes things for up, for example, when one might want to
>> undefine options to keep the SPL small and doesn't want to be
>> stuck with the CONFIG options used for U-boot. Lastly, this
>> also avoids defining special CONFIG_SPL_ variables for cases
>> where some options are required in U-boot but not in SPL.
>>
>> We add a spl-autoconf.mk <http://spl-autoconf.mk> rule that is
> generated for SPL with the
>> CONFIG_SPL_BUILD flag and conditionally include it for SPL
>> builds.
>
> This breaks tegra boards such as ventura and a number of others
> currently, please fix. Thanks!
>
>
> I don't have a tegra. Is this a build or runtime issue? If its
> build , I'll try building some of those targets and let you know.
> Might be 1 to 2 more days once I get back today.
It's build time. Once you've fixed one, please make sure that MAKEALL
- -a arm completes without error. Thanks!
- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
iQIcBAEBAgAGBQJRl8emAAoJENk4IS6UOR1WT4YP/Rh7H943DZgZuZW4hJopHCC0
JOB5yzeehgBl0805IIZN+yAhU/goQ8iXDKi+JrulySltcL31JrHArG1Hik9gyR0Q
0R+37OedqeeoJLhBQi3+5W55wdtkV2c50JF1uoqbzbOKaozoasR0gLsU5Em36Ndy
LjXcq6JvhRp0jXoM+NNTKtsxp4CWGx5jms8FVVePy9ScT3QLEVC1GNW7yrq3JhDY
Cyu9Z1EXC4+vafX9PSaneTtXaaC48gpIw8TJ0vIsp8oiroypECatDpH2CigF8qZw
ugN9WqFVZi+uWT9NGOhUaWXYUWYYI7vDz7WG0NqliMbKkJOxl6LgHU/OjYTZCfeR
pilsjH8RDQMnDvbXdCfXTXMfvFGy507K/rjmFoGZcasJ13CXRg44halE7ZsafCsb
dzcuI51a/y4YHD7MOdi1EWKQQSjVulTUw0rxL88GYCWXrOGYsxmvtQd6i4+ebX0d
JhkRFKe0mQv+dC5y6H3okkLfe75nMnLcckJ8InP7/lj/u19wjyuPu9sWK6WCu9Sp
+gdI/SAEJFI81TDHzZ6JkQfzB4LbmjJNRIJE9UtgN/G/f2iSl/U/uH/F1k+qZbIE
K29W1uijg1Faa66+n05siDqPkVml8DJ6I5r7oK7xwO658fbGepkKQvSXr+/M+QNi
90Qu3gsgY3Mf0GdAAoxc
=Ru5g
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-05-18 18:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-07 15:52 [U-Boot] [PATCH 1/2] SPL: Makefile: Build a separate autoconf.mk for SPL Joel A Fernandes
2013-05-07 15:52 ` [U-Boot] [PATCH 2/2] am33xx: Board: Make CPSW section of ethernet initialization depend on CPSW driver Joel A Fernandes
2013-05-17 21:03 ` [U-Boot] [PATCH 1/2] SPL: Makefile: Build a separate autoconf.mk for SPL Tom Rini
2013-05-18 18:22 ` Joel A Fernandes
2013-05-18 18:25 ` Tom Rini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox