Skip to content
Snippets Groups Projects
  1. Feb 19, 2014
    • Masahiro Yamada's avatar
    • Masahiro Yamada's avatar
      kbuild: use Linux Kernel build scripts · 6825a95b
      Masahiro Yamada authored
      
      Now we are ready to switch over to real Kbuild.
      
      This commit disables temporary scripts:
        scripts/{Makefile.build.tmp, Makefile.host.tmp}
      and enables real Kbuild scripts:
        scripts/{Makefile.build,Makefile.host,Makefile.lib}.
      
      This switch is triggered by the line in scripts/Kbuild.include
        -build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj
        +build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj
      
      We need to adjust some build scripts for U-Boot.
      But smaller amount of modification is preferable.
      
      Additionally, we need to fix compiler flags which are
      locally added or removed.
      
      In Kbuild, it is not allowed to change CFLAGS locally.
      Instead, ccflags-y, asflags-y, cppflags-y,
      CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o
      are prepared for that purpose.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      Tested-by: default avatarGerhard Sittig <gsi@denx.de>
      6825a95b
    • Masahiro Yamada's avatar
      kbuild: change out-of-tree build · 9e414032
      Masahiro Yamada authored
      
      This commit changes the working directory
      where the build process occurs.
      
      Before this commit, build process occurred under the source
      tree for both in-tree and out-of-tree build.
      
      That's why we needed to add $(obj) prefix to all generated
      files in makefiles like follows:
        $(obj)u-boot.bin:  $(obj)u-boot
      
      Here, $(obj) is empty for in-tree build, whereas it points
      to the output directory for out-of-tree build.
      
      And our old build system changes the current working directory
      with "make -C <sub-dir>" syntax when descending into the
      sub-directories.
      
      On the other hand, Kbuild uses a different idea
      to handle out-of-tree build and directory descending.
      
      The build process of Kbuild always occurs under the output tree.
      When "O=dir/to/store/output/files" is given, the build system
      changes the current working directory to that directory and
      restarts the make.
      
      Kbuild uses "make -f $(srctree)/scripts/Makefile.build obj=<sub-dir>"
      syntax for descending into sub-directories.
      (We can write it like "make $(obj)=<sub-dir>" with a shorthand.)
      This means the current working directory is always the top
      of the output directory.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      Tested-by: default avatarGerhard Sittig <gsi@denx.de>
      9e414032
    • Masahiro Yamada's avatar
      Makefile: move some flags to examples makefiles · d9580025
      Masahiro Yamada authored
      
      This commit moves some flags which are used
      under examples/ directory only.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      d9580025
    • Masahiro Yamada's avatar
      Makfile: move suffix rules to Makefile.build · 5651ccff
      Masahiro Yamada authored
      
      This commit moves suffix rules from config.mk
      to scripts/Makefile.build, which will allow us
      to switch smoothly to real Kbuild.
      
      Note1:
      post/lib_powerpc/fpu/Makefile has
      its own rule to compile C sources.
      We need to tweak it to keep the same behavior.
      
      Note2:
      There are two file2 with the same name:
      arch/arm/lib/crt0.S and eamples/api/crt0.S.
      To keep the same build behavior,
      examples/api/Makefile also has to be treaked.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      5651ccff
    • Masahiro Yamada's avatar
      4a20df39
  2. Feb 07, 2014
  3. Jan 09, 2014
  4. Dec 16, 2013
  5. Dec 12, 2013
    • Jeroen Hofstee's avatar
      ARM: fix the standalone programs · a5a42eec
      Jeroen Hofstee authored
      
      The standalone programs do not use the api calls, but rely
      directly on u-boot variable gd->jt for the jump table. Commit
      fe1378a9 - "ARM: use r9 for gd" changed the register holding
      the address of gd, but the assembly code in the standalone
      examples was not updated accordingly. This broke the programs
      on ARM relying on the jumptable in the v2013.10 release.
      This patch unbricks them by using the correct register.
      
      Cc: Michal Simek <monstr@monstr.eu>
      Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
      Signed-off-by: default avatarJeroen Hofstee <jeroen@myspectrum.nl>
      a5a42eec
  6. Nov 25, 2013
  7. Nov 15, 2013
  8. Nov 08, 2013
  9. Nov 04, 2013
  10. Sep 20, 2013
  11. Sep 12, 2013
    • Tom Rini's avatar
      Revert "standalone-examples: support custom GCC lib" · 8386ca8b
      Tom Rini authored
      
      After further testing, this patch has two problems.  First,
      examples/standalone/Makefile was already inherting PLATFORM_LIBS from
      the top-level Makefile so this lead to duplicating the private libgcc.
      Second, currently the private libgcc has a reference to 'hang' that is
      not being fulfilled.
      
      This reverts commit 4412db46.
      
      Signed-off-by: default avatarTom Rini <trini@ti.com>
      8386ca8b
  12. Sep 06, 2013
  13. Jul 24, 2013
  14. Jun 11, 2013
  15. Mar 15, 2013
  16. Feb 04, 2013
  17. Oct 22, 2012
  18. Oct 16, 2012
    • Zhi-zhou Zhang's avatar
      MIPS: add board qemu-mips64 support · 32afad78
      Zhi-zhou Zhang authored
      
      Both big-endian and little-endian are tested with below commands:
      Rom version: (Default, Now we config it as rom version)
      qemu-system-mips64el -M mips -bios u-boot.bin -cpu MIPS64R2-generic -nographic
      qemu-system-mips64 -M mips -bios u-boot.bin -cpu MIPS64R2-generic -nographic
      Ram version:
      qemu-system-mips64el -M mips -cpu MIPS64R2-generic -kernel u-boot -nographic
      qemu-system-mips64 -M mips -cpu MIPS64R2-generic -kernel u-boot -nographic
      
      Signed-off-by: default avatarZhizhou Zhang <etou.zh@gmail.com>
      Signed-off-by: default avatarDaniel Schwierzeck <daniel.schwierzeck@gmail.com>
      32afad78
  19. Mar 26, 2012
  20. Jan 13, 2012
  21. Dec 06, 2011
  22. Nov 15, 2011
  23. Nov 03, 2011
    • 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
      30...50%.
      
      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>
      cca4e4ae
  24. Oct 21, 2011
    • Macpaul Lin's avatar
      nds32: standalone support · 72c73dde
      Macpaul Lin authored
      
      Add standalone program related support for nds32 architecture.
      
      Signed-off-by: default avatarMacpaul Lin <macpaul@andestech.com>
      72c73dde
    • Che-liang Chiou's avatar
      examples: api: allow build with private libgcc · 349e83f0
      Che-liang Chiou authored
      
      The examples/api is not configured with USE_PRIVATE_LIBGCC.  This makes
      building examples/api break on certain boards that do not/cannot use the
      public libgcc.
      
      Nevertheless, this patch has to also touch the top-level Makefile to fix
      this problem because the current top-level Makefile does not specify
      libgcc as a prerequisite of examples/api, and explicitly builds
      examples/api _before_ libgcc.
      
      For testing this patch, I added the following to configs/seaboard.h and
      ran demo.bin on a Seaboard.
      
      +#define CONFIG_API
      +#define CONFIG_SYS_MMC_MAX_DEVICE 2
      +#define CONFIG_CMD_NET
      +#define CONFIG_NET_MULTI
      
      Signed-off-by: default avatarChe-Liang Chiou <clchiou@chromium.org>
      Acked-by: default avatarMike Frysinger <vapier@gentoo.org>
      349e83f0
  25. Oct 17, 2011
  26. May 12, 2011
    • Joakim Tjernlund's avatar
      Fix a few gcc warnings. · cd8c8775
      Joakim Tjernlund authored
      
      Noticed while building all of mpc8xx. Also
      constify usage string in timer.c
      Warnings fixed are:
      timer.c: In function 'timer':
      timer.c:189: warning: format not a string literal and no format arguments
      timer.c:258: warning: format not a string literal and no format arguments
      atm.c: In function 'atmUnload':
      atm.c:99: warning: array subscript is above array bounds
      atm.c: In function 'atmLoad':
      atm.c:65: warning: array subscript is above array bounds
      codec.c: In function 'codsp_write_pop_int':
      codec.c:678: warning: array subscript is above array bounds
      codec.c: In function 'codsp_write_cop_short':
      codec.c:585: warning: array subscript is above array bounds
      codec.c: In function 'codsp_write_sop_int':
      codec.c:512: warning: array subscript is above array bounds
      
      Signed-off-by: default avatarJoakim Tjernlund <Joakim.Tjernlund@transmode.se>
      cd8c8775
    • Che-liang Chiou's avatar
      Fix variable flavor in examples/standalone/Makefile · 0da43893
      Che-liang Chiou authored
      
      GNU Makefile have two flavors of variables, recursively expanded that is
      defined by using '=', and simply expanded that is defined by using ':='.
      
      The bug is caused by using recursively expanded flavor for BIN and SREC.
      As you can see below, they are prepended by $(obj) twice.
      
      We can reproduce this bug with a simplified version of this Makefile:
      $ cat >Makefile <<\EOF
      obj := /path/to/obj/
      ELF := hello_world
      
      BIN_rec = $(addsuffix .bin,$(ELF))      # recursively expanded
      BIN_sim := $(addsuffix .bin,$(ELF))     # simply expanded
      
      ELF := $(addprefix $(obj),$(ELF))
      BIN_rec := $(addprefix $(obj),$(BIN_rec))
      BIN_sim := $(addprefix $(obj),$(BIN_sim))
      
      show:
      	@echo BIN_rec=$(BIN_rec)
      	@echo BIN_sim=$(BIN_sim)
      
      .PHONY: show
      EOF
      $ make show
      BIN_rec=/path/to/obj//path/to/obj/hello_world.bin
      BIN_sim=/path/to/obj/hello_world.bin
      
      Signed-off-by: default avatarChe-Liang Chiou <clchiou@chromium.org>
      0da43893
  27. May 09, 2011
  28. Apr 13, 2011
  29. Apr 12, 2011
    • Wolfgang Denk's avatar
      Make STANDALONE_LOAD_ADDR configurable per board · 8ae86b76
      Wolfgang Denk authored
      
      Rename STANDALONE_LOAD_ADDR into CONFIG_STANDALONE_LOAD_ADDR
      and allow that the architecture-specific default value gets
      overwritten by defining the value in the board header file.
      
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      Cc: Mike Frysinger <vapier@gentoo.org>
      Cc: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp>
      Cc: Daniel Hellstrom <daniel@gaisler.com>
      Cc: Tsi Chung Liew <tsi-chung.liew@freescale.com>
      Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
      8ae86b76
Loading