18 Apr, 2014

1 commit


07 Mar, 2014

2 commits

  • Before this commit, CONFIG_MPC8260 and CONFIG_8260
    were used mixed-up.

    All boards with mpc8260 cpu defined both of them:
    - CONFIG_MPC8260 was defined in board config headers
    and include/common.h
    - CONFIG_8260 was defined arch/powerpc/cpu/mpc8260/config.mk

    We do not need to have both of them.
    This commit keeps only CONFIG_MPC8260.

    This commit does:
    - Delete CONFIG_8260 and CONFIG_MPC8260 definition
    in config headers and include/common.h
    - Rename CONFIG_8260 to CONFIG_MPC8260
    in arch/powerpc/cpu/mpc8260/config.mk.
    - Rename #ifdef CONFIG_8260 to #ifdef CONFIG_MPC8260

    Signed-off-by: Masahiro Yamada
    Cc: Wolfgang Denk

    Masahiro Yamada
     
  • Kbuild brought about many advantages for us but a significant
    performance regression was reported by Simon Glass.

    After some discussions and analysis, it turned out
    its main cause is in $(call cc-option,...).

    Historically, U-Boot parses all config.mk
    (arch/*/config.mk and board/*/config.mk)
    every time descending into subdirectories.
    That means cc-options are evaluated over and over again.

    $(call cc-option,...) is useful but costly.
    So we want to evaluate them only in ./Makefile
    and spl/Makefile and export compiler flags.

    This commit changes the build system as follows:

    - Modify scripts/Makefile.build to not include config.mk
    Instead, add $(PLATFORM_CPPFLAGS) to asflags-y, ccflags-y,
    cppflags-y.

    - Export many variables
    Going forward, Kbuild will not parse config.mk files
    when it descends into subdirectories.
    If we want to set variables in config.mk and use them
    in subdirectories, they must be exported.

    This is the list of variables to get exported:
    PLATFORM_CPPFLAGS
    CPUDIR
    BOARDDIR
    OBJCOPYFLAGS
    LDFLAGS
    LDFLAGS_FINAL
    (used in nand_spl/board/*/*/Makefile)
    CONFIG_STANDALONE_LOAD_ADDR
    (used in examples/standalone/Makefile)
    SYM_PREFIX
    (used in examples/standalone/Makefile)
    RELFLAGS
    (used in examples/standalone/Makefile)

    - Delete CPPFLAGS
    This variable has been replaced with PLATFORM_CPPFLAGS

    - Copy gcclibdir from example/standalone/Makefile
    to arch/sparc/config.mk
    The reference in CONFIG_STANDALONE_LOAD_ADDR must be
    resolved before it is exported.

    Signed-off-by: Masahiro Yamada
    Reported-by: Simon Glass
    Acked-by: Simon Glass
    Tested-by: Simon Glass [on Sandbox]
    Tested-by: Stephen Warren [on Tegra]

    Masahiro Yamada
     

26 Feb, 2014

2 commits


20 Feb, 2014

6 commits

  • Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • 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: Masahiro Yamada
    Tested-by: Gerhard Sittig

    Masahiro Yamada
     
  • 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 " 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="
    syntax for descending into sub-directories.
    (We can write it like "make $(obj)=" with a shorthand.)
    This means the current working directory is always the top
    of the output directory.

    Signed-off-by: Masahiro Yamada
    Tested-by: Gerhard Sittig

    Masahiro Yamada
     
  • This commit moves some flags which are used
    under examples/ directory only.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • 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: Masahiro Yamada

    Masahiro Yamada
     
  • Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

07 Feb, 2014

1 commit


10 Jan, 2014

1 commit


09 Jan, 2014

1 commit


16 Dec, 2013

3 commits


12 Dec, 2013

1 commit

  • The standalone programs do not use the api calls, but rely
    directly on u-boot variable gd->jt for the jump table. Commit
    fe1378a - "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
    Cc: Albert ARIBAUD
    Signed-off-by: Jeroen Hofstee

    Jeroen Hofstee
     

25 Nov, 2013

2 commits


16 Nov, 2013

1 commit


08 Nov, 2013

1 commit


05 Nov, 2013

1 commit


20 Sep, 2013

1 commit


12 Sep, 2013

1 commit

  • 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 4412db46468d5965da736d06f84d13e68a6e0b51.

    Signed-off-by: Tom Rini

    Tom Rini
     

07 Sep, 2013

1 commit


24 Jul, 2013

2 commits


12 Jun, 2013

1 commit


16 Mar, 2013

1 commit


04 Feb, 2013

1 commit


22 Oct, 2012

1 commit


16 Oct, 2012

1 commit

  • 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: Zhizhou Zhang
    Signed-off-by: Daniel Schwierzeck

    Zhi-zhou Zhang
     

27 Mar, 2012

1 commit


14 Jan, 2012

1 commit


07 Dec, 2011

1 commit


16 Nov, 2011

1 commit


04 Nov, 2011

1 commit

  • 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
    -> 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: Wolfgang Denk
    Cc: Andy Fleming
    Cc: Kumar Gala
    Cc: Albert Aribaud
    cc: Graeme Russ
    cc: Mike Frysinger
    Tested-by: Graeme Russ
    Tested-by: Matthias Weisser
    Tested-by: Sanjeev Premi
    Tested-by: Simon Glass
    Tested-by: Macpaul Lin
    Acked-by: Mike Frysinger

    Wolfgang Denk
     

22 Oct, 2011

2 commits

  • Add standalone program related support for nds32 architecture.

    Signed-off-by: Macpaul Lin

    Macpaul Lin
     
  • 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: Che-Liang Chiou
    Acked-by: Mike Frysinger

    Che-liang Chiou