1. 09 May, 2013 1 commit
  2. 01 May, 2013 1 commit
    • Simon Glass's avatar
      Trigger generic board error only when building · fada9e20
      Simon Glass authored
      At present the generic board error can occur when configuring U-Boot, or
      during distclean, but this is incorrect. The existing autoconf.mk may come
      from an earlier U-Boot configuration which is about to be overwritten.
      Make the error conditional so that it will only be triggered when we are
      actually building U-Boot.
      This avoids a problem where the system is being reconfigured to remove
      CONFIG_SYS_GENERIC_BOARD on an architecture that does not support it.
      Currently this will print an error and require the manual removal of
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
  3. 22 Apr, 2013 1 commit
    • Stefan Roese's avatar
      Makefile: Add target for combined u-boot.img & spl/u-boot.bin · ecddccd0
      Stefan Roese authored
      This new make target "u-boot-img-spl-at-end.bin" consists of the
      the real, full-blown U-Boot image and the U-Boot SPL binary
      directly attached to it. The full-blown U-Boot image has the
      mkimage header included, with its load-address and entry-point.
      This will be used by the upcoming lwmon5 PPC440EPx derivate board
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
  4. 12 Apr, 2013 1 commit
    • Benoît Thébaudeau's avatar
      Makefile: Move SHELL setup to config.mk · 120ae609
      Benoît Thébaudeau authored
      make never uses the SHELL variable from the environment. Instead, it
      uses /bin/sh, or the value assigned to the SHELL variable by the Makefile. This
      makes the export of the SHELL variable useless for sub-makes (but still useful
      for the environment of recipes). However, we want all makes to use the same
      This patch fixes this issue by moving the SHELL variable setup and export to the
      top config.mk, so that all Makefile-s including it use the same shell.
      Since BASH is used by default, this makes it possible to use things
      like 'echo -e ...' in sub-makes, which would otherwise fail e.g. with /bin/sh
      symlinked to /bin/dash on Ubuntu.
      Signed-off-by: default avatarBenoît Thébaudeau <benoit.thebaudeau@advansee.com>
      Reviewed-by: default avatarTom Rini <trini@ti.com>
  5. 15 Mar, 2013 1 commit
  6. 12 Mar, 2013 1 commit
    • Albert ARIBAUD's avatar
      Refactor linker-generated arrays · ef123c52
      Albert ARIBAUD authored
      Refactor linker-generated array code so that symbols
      which were previously linker-generated are now compiler-
      generated. This causes relocation records of type
      R_ARM_ABS32 to become R_ARM_RELATIVE, which makes
      code which uses LGA able to run before relocation as
      well as after.
      Note: this affects more than ARM targets, as linker-
      lists span possibly all target architectures, notably
      Signed-off-by: default avatarAlbert ARIBAUD <albert.u.boot@aribaud.net>
  7. 22 Oct, 2012 1 commit
    • Marek Vasut's avatar
      common: Add symbol handling for generic lists into Makefile · 97b24d3d
      Marek Vasut authored
      This patch adds essential components for generation of the contents of
      the linker section that is used by the linker-generated array. All of
      the contents is held in a separate file, u-boot.lst, which is generated
      at runtime just before U-Boot is linked.
      The purpose of this code is to especially generate the appropriate
      boundary symbols around each subsection in the section carrying the
      linker-generated arrays. Obviously, the interim linker code for actual
      placement of the variables into the section is generated too. The
      generated file, u-boot.lst, is included into u-boot.lds via the linker
      INCLUDE directive in u-boot.lds .
      Adjustments are made in the Makefile and spl/Makefile so that the
      u-boot.lds and u-boot-spl.lds depend on their respective .lst files.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Joe Hershberger <joe.hershberger@gmail.com>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Acked-by: default avatarJoe Hershberger <joe.hershberger@ni.com>
      Tested-by: default avatarJoe Hershberger <joe.hershberger@ni.com>
  8. 15 Oct, 2012 3 commits
    • Kim Phillips's avatar
      add check infrastructure, default sparse · 4ab64933
      Kim Phillips authored
      Add support for running source code checkers on u-boot source, e.g.,
      using sparse to aid with typechecking.  This comes in especially
      handy as SoC vendors mix and match cores and devices with different
      endianness, thus here we add CHECK_ENDIAN to the otherwise linux
      kernel default CHECKFLAGS.
      Signed-off-by: default avatarKim Phillips <kim.phillips@freescale.com>
    • Marek Vasut's avatar
      serial: Compile drivers/serial/serial.c by default · c1f5805a
      Marek Vasut authored
      Compile drivers/serial/serial.c by default both into SPL and into
      non-SPL builds, since CONFIG_SERIAL_MULTI is now the default state.
      Also having common/serial.c in by default now, it's pointless to keep
      -DCONFIG_SERIAL_MULTI in CPPFLAGS any longer, so remove it as well.
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Marek Vasut <marek.vasut@gmail.com>
      Cc: Tom Rini <trini@ti.com>
      Cc: Anatolij Gustschin <agust@denx.de>
      Cc: Stefan Roese <sr@denx.de>
    • Marek Vasut's avatar
      serial: Unconditionally enable CONFIG_SERIAL_MULTI · 82dda962
      Marek Vasut authored
      Enable CONFIG_SERIAL_MULTI for all builds of U-Boot. That includes
      both SPL builds and non-SPL builds, everything. To avoid poluting
      this patch with removal of ifdef-endif constructions containing
      CONFIG_SERIAL_MULTI, the CONFIG_SERIAL_MULTI is temporarily added
      into CPPFLAGS in config.mk . This will be again removed in following
      Signed-off-by: default avatarMarek Vasut <marex@denx.de>
      Cc: Marek Vasut <marek.vasut@gmail.com>
      Cc: Tom Rini <trini@ti.com>
  9. 04 Oct, 2012 1 commit
  10. 10 Aug, 2012 1 commit
    • Khem Raj's avatar
      config: Always use GNU ld · 7cb714a5
      Khem Raj authored
      This patch makes sure that we always use the GNU ld. U-Boot uses certain
      construct e.g. OVERLAY which are not implemented in gold therefore it
      always needs GNU ld for linking.
      It works well if default linker in toolchain is GNU ld but in some
      cases we can have gold to be the default linker and also ship GNU ld
      but not as default in such cases its called $(PREFIX)ld.bfd, with this
      patch we make sure that if $(PREFIX)ld.bfd exists than we use that for
      our ld.
      This way it does not matter what the default ld is.
      Signed-off-by: default avatarOtavio Salvador <otavio@ossystems.com.br>
      Signed-off-by: default avatarKhem Raj <raj.khem@gmail.com>
      Acked-by: default avatarMike Frysinger <vapier@gentoo.org>
  11. 07 Jul, 2012 1 commit
    • Stefan Roese's avatar
      Makefile: Add u-boot.spr build target (SPEAr) · 94aebe6c
      Stefan Roese authored
      On x600 (SPEAr600) U-Boot is appended to U-Boot SPL. Both images are
      created using mkimage (crc etc), so that the ROM bootloader can check
      its integrity. Padding needs to be done to the SPL image (with
      mkimage header) and not the binary. Otherwise the resulting image
      which is loaded/copied by the ROM bootloader to SRAM doesn't fit.
      The resulting image containing both U-Boot images is called u-boot.spr.
      Signed-off-by: default avatarStefan Roese <sr@denx.de>
      Cc: Amit Virdi <amit.virdi@st.com>
      Cc: Vipin Kumar <vipin.kumar@st.com>
  12. 15 May, 2012 1 commit
  13. 26 Mar, 2012 2 commits
  14. 07 Nov, 2011 1 commit
  15. 03 Nov, 2011 1 commit
    • Wolfgang Denk's avatar
      Reduce build times · cca4e4ae
      Wolfgang Denk authored
      U-Boot Makefiles contain a number of tests for compiler features etc.
      which so far are executed again and again.  On some architectures
      (especially ARM) this results in a large number of calls to gcc.
      This patch makes sure to run such tests only once, thus largely
      reducing the number of "execve" system calls.
      Example: number of "execve" system calls for building the "P2020DS"
      (Power Architecture) and "qong" (ARM) boards, measured as:
      	-> strace -f -e trace=execve -o /tmp/foo ./MAKEALL <board>
      	-> grep execve /tmp/foo | wc -l
      	Before: After:	Reduction:
      P2020DS 20555	15205	-26%
      qong	31692	14490	-54%
      As a result, built times are significantly reduced, typically by
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      Cc: Andy Fleming <afleming@gmail.com>
      Cc: Kumar Gala <galak@kernel.crashing.org>
      Cc: Albert Aribaud <albert.aribaud@free.fr>
      cc: Graeme Russ <graeme.russ@gmail.com>
      cc: Mike Frysinger <vapier@gentoo.org>
      Tested-by: default avatarGraeme Russ <graeme.russ@gmail.com>
      Tested-by: default avatarMatthias Weisser <weisserm@arcor.de>
      Tested-by: default avatarSanjeev Premi <premi@ti.com>
      Tested-by: default avatarSimon Glass <sjg@chromium.org>
      Tested-by: default avatarMacpaul Lin <macpaul@gmail.com>
      Acked-by: default avatarMike Frysinger <vapier@gentoo.org>
  16. 26 Oct, 2011 1 commit
    • Simon Glass's avatar
      fdt: Add support for embedded device tree (CONFIG_OF_EMBED) · bbb0b128
      Simon Glass authored
      This new option allows U-Boot to embed a binary device tree into its image
      to allow run-time control of peripherals. This device tree is for U-Boot's
      own use and is not necessarily the same one as is passed to the kernel.
      The device tree compiler output should be placed in the $(obj)
      rooted tree. Since $(OBJCOPY) insists on adding the path to the
      generated symbol names, to ensure consistency it should be
      invoked from the directory where the .dtb file is located and
      given the input file name without the path.
      This commit contains my entry for the ugliest Makefile / shell interaction
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
  17. 21 Oct, 2011 1 commit
  18. 17 Oct, 2011 1 commit
    • Simon Glass's avatar
      Adjust dependency rules to permit per-file flags · 47508843
      Simon Glass authored
      The dependency rules are currently done in a shell 'for' loop. This does not
      permit Makefile variables to adjust preprocessor flags as is done with normal
      compile flags, using the CFLAGS_path/file.o syntax.
      This change moves the dependency generation into the Makefile itself, and
      permits a CPPFLAGS_path/file.o to adjust preprocessor flags on a file or
      directory basis.
      The CPPFLAGS_... variable is also folded into CFLAGS during the build.
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
  19. 26 Jul, 2011 2 commits
  20. 22 Jun, 2011 1 commit
  21. 29 Apr, 2011 1 commit
    • Scott Wood's avatar
      Handle most LDSCRIPT setting centrally · 83b7e2a7
      Scott Wood authored
      Currently, some linker scripts are found by common code in config.mk.
      Some are found using CONFIG_SYS_LDSCRIPT, but the code for that is
      sometimes in arch config.mk and sometimes in board config.mk.  Some
      are found using an arch-specific rule for looking in CPUDIR, etc.
      Further, the powerpc config.mk rule relied on CONFIG_NAND_SPL
      when it really wanted CONFIG_NAND_U_BOOT -- which covered up the fact
      that not all NAND_U_BOOT builds actually wanted CPUDIR/u-boot-nand.lds.
      Replace all of this -- except for a handful of boards that are actually
      selecting a linker script in a unique way -- with centralized ldscript
      If board code specifies LDSCRIPT, that will be used.
      Otherwise, if CONFIG_SYS_LDSCRIPT is specified, that will be used.
      If neither of these are specified, then the central config.mk will
      check for the existence of the following, in order:
      $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds (only if CONFIG_NAND_U_BOOT)
      $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds (only if CONFIG_NAND_U_BOOT)
      Some boards (sc3, cm5200, munices) provided their own u-boot.lds that
      were dead code, because they were overridden by a CPUDIR u-boot.lds under
      the old powerpc rules.  These boards' own u-boot.lds have bitrotted and
      no longer work -- these lds files have been removed.
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      Tested-by: default avatarGraeme Russ <graeme.russ@gmail.com>
  22. 22 Mar, 2011 1 commit
  23. 21 Mar, 2011 1 commit
  24. 25 Jan, 2011 1 commit
  25. 17 Dec, 2010 1 commit
    • Mike Frysinger's avatar
      config.mk: unify duplicated flag setting · 326a6945
      Mike Frysinger authored
      Multiple rules are using the expanded AFLAGS/CFLAGS settings and some are
      getting so long that the rules need to be line wrapped.  So unify them in
      one variable, use that variable in the rule, and then unwrap things.  This
      makes the actual `make` output nicer as it doesn't have line continuations
      in it anymore.
      Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
  26. 27 Nov, 2010 1 commit
  27. 17 Nov, 2010 1 commit
    • Sebastien Carlier's avatar
      Switch from archive libraries to partial linking · 6d8962e8
      Sebastien Carlier authored
      Before this commit, weak symbols were not overridden by non-weak symbols
      found in archive libraries when linking with recent versions of
      binutils.  As stated in the System V ABI, "the link editor does not
      extract archive members to resolve undefined weak symbols".
      This commit changes all Makefiles to use partial linking (ld -r) instead
      of creating library archives, which forces all symbols to participate in
      linking, allowing non-weak symbols to override weak symbols as intended.
      This approach is also used by Linux, from which the gmake function
      cmd_link_o_target (defined in config.mk and used in all Makefiles) is
      The name of each former library archive is preserved except for
      extensions which change from ".a" to ".o".  This commit updates
      references accordingly where needed, in particular in some linker
      This commit reveals board configurations that exclude some features but
      include source files that depend these disabled features in the build,
      resulting in undefined symbols.  Known such cases include:
      - disabling CMD_NET but not CMD_NFS;
      - enabling CONFIG_OF_LIBFDT but not CONFIG_QE.
      Signed-off-by: default avatarSebastien Carlier <sebastien.carlier@gmail.com>
  28. 18 Oct, 2010 1 commit
    • Wolfgang Denk's avatar
      Rename TEXT_BASE into CONFIG_SYS_TEXT_BASE · 14d0a02a
      Wolfgang Denk authored
      The change is currently needed to be able to remove the board
      configuration scripting from the top level Makefile and replace it by
      a simple, table driven script.
      Moving this configuration setting into the "CONFIG_*" name space is
      also desirable because it is needed if we ever should move forward to
      a Kconfig driven configuration system.
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
  29. 08 Aug, 2010 1 commit
    • Mike Frysinger's avatar
      config.mk: avoid -traditional-cpp on OS X 10.5 · f534c7cd
      Mike Frysinger authored
      Simply trying to include a basic header file like stdlib.h on OS X 10.5
      and then building with -traditional-cpp fails with lots of errors like:
      In file included from /usr/include/stdlib.h:63,
                       from test.c:3:
      /usr/include/available.h:85: error: stray '#' in program
      /usr/include/available.h:85: error: syntax error before numeric constant
      /usr/include/available.h:86: error: stray '#' in program
      In the past, I hadn't noticed because the old logic for these flags were
      restricted to Darwin running on PowerPC systems while I'm running on an
      Intel system.  But after some recent clean ups and changes, the flag was
      being applied to all Darwin systems and my host tools broke.
      Signed-off-by: default avatarMike Frysinger <vapier@gentoo.org>
  30. 28 May, 2010 1 commit
  31. 26 May, 2010 1 commit
  32. 13 Apr, 2010 4 commits
    • Peter Tyser's avatar
      ppc: Move cpu/$CPU to arch/ppc/cpu/$CPU · 8d1f2682
      Peter Tyser authored
      Signed-off-by: default avatarPeter Tyser <ptyser@xes-inc.com>
    • Peter Tyser's avatar
      Move lib_$ARCH directories to arch/$ARCH/lib · ea0364f1
      Peter Tyser authored
      Also move lib_$ARCH/config.mk to arch/$ARCH/config.mk
      This change is intended to clean up the top-level directory structure
      and more closely mimic Linux's directory organization.
      Signed-off-by: default avatarPeter Tyser <ptyser@xes-inc.com>
    • Peter Tyser's avatar
      Change directory-specific CFLAGS to use full path · 89f39e17
      Peter Tyser authored
      Previously, a specific file or directory could be compiled with custom
      CFLAGS by adding a Makefile variable such as:
        CFLAGS_dlmalloc.o = <custom flags for common/dlmalloc.c>
        CFLAGS_lib = <custom flags for lib directory>
      This method breaks down once multiple files or directories share the
      same path.  Eg FLAGS_fileA = <custom flags> would incorrectly result in
      both dir1/fileA.c and dir2/fileA.c being compiled with <custom flags>.
      This change allows finer grained control which we need once we move
      lib_$ARCH to arch/$ARCH/lib/ and lib_generic/ to lib/.  Without this
      change all lib/ directories would share the same custom CFLAGS.
      Signed-off-by: default avatarPeter Tyser <ptyser@xes-inc.com>
    • Peter Tyser's avatar
      Create CPUDIR variable · 03b7004d
      Peter Tyser authored
      The CPUDIR variable points to the location of a target's CPU directory.
      Currently, it is set to cpu/$CPU.  However, using $CPUDIR will allow for
      more flexibility in the future.  It lays the groundwork for reorganizing
      U-Boot's directory structure to support a layout such as:
        arch/$ARCH/cpu/$CPU/* (architecture with multiple CPU types)
        arch/$ARCH/cpu/*      (architecture with one CPU type)
      Signed-off-by: default avatarPeter Tyser <ptyser@xes-inc.com>
  33. 02 Dec, 2009 1 commit
    • Scott Wood's avatar
      makefiles: fixes for building build tools · d984fed0
      Scott Wood authored
      Currently, some of the tools instead set CC to be HOSTCC in order to re-use
      some pattern rules -- but this fails when the user overrides CC on the make
      command line.  Also, the HOSTCFLAGS in tools/Makefile are currently not
      being used because config.mk overwrites them.
      This patch adds static pattern rules for files that have been requested to
      be built with the native compiler using $(HOSTSRCS) and $(HOSTOBJS), and
      converts the tools to use them.
      It restores easylogo to using the host compiler, which was broken by commit
      38d299c2 (if this was an intentional change,
      please let me know -- but it seems to be a build tool).
      It restores -pedantic and the special flags for darwin and cygwin that were
      requested in tools/makefile (but keeps the flags added by config.mk) --
      hopefully someone can test this on those platforms.  It no longer
      conditionalizes -pedantic on not being darwin; it wasn't clear that that was
      intentional, and unless there's a real problem it's just inviting people to
      contribute non-pedantic patches to those files (I'm not a fan of -pedantic
      personally, but if it's on for one platform it should be on for all).
      HOST_LDFLAGS is renamed HOSTLDFLAGS for consistency with the previous
      HOST_CFLAGS to HOSTCFLAGS rename.  A new HOSTCFLAGS_NOPED is made available
      for those files which currently cannot be built with -pedantic, and replaces
      the old FIT_CFLAGS.
      imls now uses the cross compiler properly, rather than by trying to
      reconstruct CC using the typoed $(CROSS_COMPILER).
      envcrc.c is now dependency-processed unconditionally -- previously it would
      be built without being on (HOST)SRCS if CONFIG_ENV_IS_EMBEDDED was not
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>