07 Mar, 2014

5 commits

  • "checkgcc4" is used only for PowerPC.
    Move it to arch/powerpc/config.mk.

    To make sure gcc is new enough before beginning build,
    run "checkgcc4" during "archprepare".

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • "checkthumb" makes sense only for ARM architecture.
    Move it to arch/arm/config.mk.

    To make sure gcc supports THUMB mode before beginning build,
    run "checkthumb" during "archprepare".

    Signed-off-by: Masahiro Yamada

    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
     
  • Before this commit, USE_PRIVATE_LIBGCC was defined in
    arch-specific config.mk and referenced in
    arch/$(ARCH)/lib/Makefile.

    We are not happy about parsing config.mk again and again.
    We have to keep the same behavior with a different way.

    By adding "CONFIG_" prefix, this macro appears
    in include/autoconf.mk, include/spl-autoconf.mk.
    (And treating USE_PRIVATE_LIBGCC as CONFIG macro
    is reasonable enough.)

    Tegra SoC family defined USE_PRIVATE_LIBGCC as "yes"
    in arch/arm/cpu/arm720t/tegra*/config.mk,
    whereas did not define it in arch/arm/cpu/armv7/tegra*/config.mk.

    It means Tegra enables PRIVATE_LIBGCC only for SPL.
    We can describe the same behavior by adding

    #ifdef CONFIG_SPL_BUILD
    # define CONFIG_USE_PRIVATE_LIBGCC
    #endif

    to include/configs/tegra-common.h.

    Signed-off-by: Masahiro Yamada
    Cc: Tom Warren
    Cc: Simon Glass
    Acked-by: Stephen Warren

    Masahiro Yamada
     
  • config.tmp is never generated

    Signed-off-by: Masahiro Yamada
    Cc: Michal Simek
    Acked-by: Michal Simek

    Masahiro Yamada
     

05 Mar, 2014

8 commits

  • U-Boot has compelled all boards to have
    board/${BOARD}/ or board/${VENDOR}/${BOARD}/ directory.

    Sometimes it does not seem suitable for some boards,
    for example Sandbox. (Is it a board?)

    And arcangel4 board has nothing to compile
    under the board directory.

    This commit makes the build system more flexible:
    If '' is given to the 6th column (=Board name) of boards.cfg,
    Kbuild will not descend into the board directory.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • Programs in tools/ directory are usually built for the host.
    But some of them (mkimage, dumpimge, gen_eth_addr, etc.) are
    useful on the target OS too.

    Actually, prior to Kbuild, U-Boot could build tools for
    the target like follows:

    $ make _config
    $ export CROSS_COMPILE=
    $ make HOSTCC=${CROSS_COMPILE}gcc HOSTSTRIP=${CROSS_COMPILE}strip tools

    In Kbuild, we can no longer replace HOSTCC at the command line.

    In order to get back that feature, this commit adds "cross-tools" target.

    Usage:

    Build tools for the host
    $ make CROSS_COMPILE= tools

    Build tools for the target
    $ make CROSS_COMPILE= cross_tools

    Besides, "make cross_tools" strip tools programs because we
    generally expect smaller storages on embedded systems.

    Signed-off-by: Masahiro Yamada
    Reported-by: Heiko Schocher
    Cc: Wolfgang Denk
    Cc: Tom Rini
    Tested-by: Heiko Schocher
    Acked-by: Heiko Schocher

    Masahiro Yamada
     
  • The top Makefile must export HOST_TOOLS_ALL to use it
    in tools/Makefile.

    Signed-off-by: Masahiro Yamada
    Tested-by: Heiko Schocher
    Acked-by: Heiko Schocher

    Masahiro Yamada
     
  • We had switched to Kbuild so now we can specify
    PLATFORM_LIBS/PLATFORM_LIBGCC with relative path.

    Signed-off-by: Masahiro Yamada
    Acked-by: Tom Rini
    Acked-by: Simon Glass
    Tested-by: Simon Glass

    Masahiro Yamada
     
  • As an example of how to write a uclass and a driver, provide a demo version
    of each, accessible through the 'demo' command.

    To use these with driver model, define CONFIG_CMD_DEMO and CONFIG_DM_DEMO.

    The two demo drivers are enabled with CONFIG_DM_DEMO_SIMPLE and
    CONFIG_DM_DEMO_SHAPE.

    Signed-off-by: Simon Glass
    Signed-off-by: Marek Vasut
    Signed-off-by: Pavel Herrmann
    Signed-off-by: Viktor Křivák
    Signed-off-by: Tomas Hlavacek

    Simon Glass
     
  • Add some tests of driver model functionality. Coverage includes:

    - basic init
    - binding of drivers to devices using platform_data
    - automatic probing of devices when referenced
    - availability of platform data to devices
    - lifecycle from bind to probe to remove to unbind
    - renumbering within a uclass when devices are probed/removed
    - calling driver-defined operations
    - deactivation of drivers when removed
    - memory leak across creation and destruction of drivers/uclasses
    - uclass init/destroy methods
    - automatic probe/remove of children/parents when needed

    This function is enabled for sandbox, using CONFIG_DM_TEST.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Add driver model functionality for generic board.

    This includes data structures and base code for registering devices and
    uclasses (groups of devices with the same purpose, e.g. all I2C ports will
    be in the same uclass).

    The feature is enabled with CONFIG_DM.

    Signed-off-by: Simon Glass
    Signed-off-by: Marek Vasut
    Signed-off-by: Pavel Herrmann
    Signed-off-by: Viktor Křivák
    Signed-off-by: Tomas Hlavacek

    Simon Glass
     
  • Add support for building a device tree for sandbox's CONFIG_OF_HOSTFILE
    option to make it easier to use device tree with sandbox.

    This adjusts the Makefile to build a u-boot.dtb file which can be passed
    to sandbox U-Boot with:

    ./u-boot -d u-boot.dtb

    Signed-off-by: Simon Glass

    Simon Glass
     

04 Mar, 2014

2 commits

  • Now we have two different frameworks for doing the same thing.
    I'd like to propose to drop nand_spl framework.
    How about deleting it before v2014.07 release?

    In the interim, this commit will display a warning message
    when compiling nand_spl board.

    Now we have 19 nand_spl boards:

    MPC8315ERDB_NAND
    SIMPC8313_LP
    SIMPC8313_SP
    MPC8536DS_NAND
    MPC8569MDS_NAND
    MPC8572DS_NAND
    P1023RDS_NAND
    P1011RDB_NAND
    P1020RDB_NAND
    P2010RDB_NAND
    P2020RDB_NAND
    acadia_nand
    bamboo_nand
    canyonlands_nand
    glacier_nand
    haleakala_nand
    kilauea_nand
    rainier_nand
    sequoia_nand

    They must be ported to SPL before the deadline,
    otherwise they will be removed.

    Signed-off-by: Masahiro Yamada
    Cc: Dave Liu
    Cc: Ron Madrid
    Cc: Roy Zang
    Cc: Stefan Roese
    Acked-by: Stefan Roese

    Masahiro Yamada
     
  • LDSCRIPT_MAKEFILE_DIR is not referenced from anywhere. Remove.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

26 Feb, 2014

18 commits


25 Feb, 2014

1 commit


22 Feb, 2014

2 commits


20 Feb, 2014

4 commits