From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Mon, 12 Feb 2018 11:29:52 -0500 Subject: [U-Boot] Build system: Don't check for CONFIG_SYS_TEXT_BASE being set In-Reply-To: <1518452468.4154.10.camel@synopsys.com> References: <20180130152313.28099-1-abrodkin@synopsys.com> <20180211204733.GK3061@bill-the-cat> <1518442049.4974.50.camel@synopsys.com> <20180212142359.GM3061@bill-the-cat> <1518452468.4154.10.camel@synopsys.com> Message-ID: <20180212162952.GC10592@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Mon, Feb 12, 2018 at 04:21:09PM +0000, Alexey Brodkin wrote: > On Mon, 2018-02-12 at 09:23 -0500, Tom Rini wrote: > > On Mon, Feb 12, 2018 at 01:27:30PM +0000, Alexey Brodkin wrote: > > > Hi Tom, Simon, > > > > > > On Sun, 2018-02-11 at 15:47 -0500, Tom Rini wrote: > > > > On Tue, Jan 30, 2018 at 06:23:13PM +0300, Alexey Brodkin wrote: > > > > > > > > > CONFIG_SYS_TEXT_BASE must be set anyways and then it is used in many > > > > > places in the same Makefile without any checks so there's no point in > > > > > keeping this check araound just in one place. > > > > > > > > > > Signed-off-by: Alexey Brodkin > > > > > Cc: Tom Rini > > > > > Acked-by: Masahiro Yamada > > > > > --- > > > > > Makefile | 2 -- > > > > > 1 file changed, 2 deletions(-) > > > > > > > > > > diff --git a/Makefile b/Makefile > > > > > index ab3453dcebdc..6f15612b4d07 100644 > > > > > --- a/Makefile > > > > > +++ b/Makefile > > > > > @@ -820,9 +820,7 @@ LDFLAGS_u-boot += $(LDFLAGS_FINAL) > > > > > # Avoid 'Not enough room for program headers' error on binutils 2.28 onwards. > > > > > LDFLAGS_u-boot += $(call ld-option, --no-dynamic-linker) > > > > > > > > > > -ifneq ($(CONFIG_SYS_TEXT_BASE),) > > > > > LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE) > > > > > -endif > > > > > > > > This then causes xtensa to fail to build as it does not set > > > > CONFIG_SYS_TEXT_BASE. > > > > > > And that also obviously breaks "efi-x86" target as well because CONFIG_SYS_TEXT_BASE > > > seems to not be defined for EFI and then LD gets a string like "-Ttext -o u-boot" > > > where CONFIG_SYS_TEXT_BASE is supposed to be used as some value. > > [snip] > > > > So if "-Ttext CONFIG_SYS_TEXT_BASE" is not used for each and every board I may use > > > CONFIG_SYS_TEXT_BASE directly in linker just as we have it now, see > > > https://urldefense.proofpoint.com/v2/url?u=http-3A__git.denx.de_-3Fp-3Du-2Dboot.git-3Ba-3Dblob-3Bf-3Darch_arc_cpu_u-2Dboot.lds-23l14&d=DwIBAg&c=DP > > > L6_X_6JkXFx7AXWqB0tg&r=lqdeeSSEes0GFDDl656eViXO7breS55ytWkhpk5R81I&m=3oKsgMcKriZJ81auV4XDwr4ovIElxycDMpRlTqS7nhc&s=Yq0YW- > > > MQvofxwQ961IRHzIS5xWYtHHzxMp_Fwn91h5s&e= > > > and then there might be any section like .ivt, .text, .myfunkysection etc. > > > > > > In fact in the Linux kernel "-Ttext XXX" is not used for everybody - some > > > arches like MIPS and PPC indeed set it but others do other things. > > > > > > The simplest thing might be is to add another #ifdef for ARC and X86 which both > > > use CONFIG_SYS_TEXT_BASE directly in their linker scripts like that: > > > ------------------->8----------------- > > > --- a/Makefile > > > +++ b/Makefile > > > @@ -820,9 +820,11 @@ LDFLAGS_u-boot += $(LDFLAGS_FINAL) > > > # Avoid 'Not enough room for program headers' error on binutils 2.28 onwards. > > > LDFLAGS_u-boot += $(call ld-option, --no-dynamic-linker) > > > > > > +ifeq($(CONFIG_ARC)$(CONFIG_X86),) > > > LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE) > > > +endif > > > > > > # Normally we fill empty space with 0xff > > > quiet_cmd_objcopy = OBJCOPY $@ > > > ------------------->8----------------- > > > > > > Any thoughts? > > > > I'm largely ok with the above, but: > > - You need to exclude CONFIG_NIOS2 in the above as well, or convert the > > usage of CONFIG_SYS_MONITOR_BASE to CONFIG_SYS_TEXT_BASE (Thomas?) > > Looks like NIOS2 builds are not yet supported in TravisCI which is > quite unfortunate... are there any instructions on how to build for Nios2 > so that I may test my changes before posting them? So, part of the issue is that we need newer kernel.org toolchains (https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/7.3.0/) in order for buildman to be able to grab a nios2 toolchain, and that in turn has its own issues. You can however grab one of those (or the 6.4.0) version manually, extract into ~/.buildman/ and then just let buildman build the arch. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: not available URL: