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
     

25 Nov, 2013

2 commits


05 Nov, 2013

1 commit


24 Jul, 2013

1 commit


16 Nov, 2011

1 commit


22 Oct, 2011

1 commit

  • 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
     

10 Jan, 2011

1 commit


05 Jul, 2010

2 commits

  • The hush shell dynamically allocates (and re-allocates) memory for the
    argument strings in the "char *argv[]" argument vector passed to
    commands. Any code that modifies these pointers will cause serious
    corruption of the malloc data structures and crash U-Boot, so make
    sure the compiler can check that no such modifications are being done
    by changing the code into "char * const argv[]".

    This modification is the result of debugging a strange crash caused
    after adding a new command, which used the following argument
    processing code which has been working perfectly fine in all Unix
    systems since version 6 - but not so in U-Boot:

    int main (int argc, char **argv)
    {
    while (--argc > 0 && **++argv == '-') {
    /* ====> */ while (*++*argv) {
    switch (**argv) {
    case 'd':
    debug++;
    break;
    ...
    default:
    usage ();
    }
    }
    }
    ...
    }

    The line marked "====>" will corrupt the malloc data structures and
    usually cause U-Boot to crash when the next command gets executed by
    the shell. With the modification, the compiler will prevent this with
    an
    error: increment of read-only location '*argv'

    N.B.: The code above can be trivially rewritten like this:

    while (--argc > 0 && **++argv == '-') {
    char *arg = *argv;
    while (*++arg) {
    switch (*arg) {
    ...

    Signed-off-by: Wolfgang Denk
    Acked-by: Mike Frysinger

    Wolfgang Denk
     
  • Change the return type of the *printf() functions to the standard
    "int"; no changes are needed but returning the already available
    length count.

    This will save a few additional strlen() calls later...

    Signed-off-by: Wolfgang Denk

    Wolfgang Denk
     

22 Apr, 2010

1 commit

  • As discussed on the list, move "arch/ppc" to "arch/powerpc" to
    better match the Linux directory structure.

    Please note that this patch also changes the "ppc" target in
    MAKEALL to "powerpc" to match this new infrastructure. But "ppc"
    is kept as an alias for now, to not break compatibility with
    scripts using this name.

    Signed-off-by: Stefan Roese
    Acked-by: Wolfgang Denk
    Acked-by: Detlev Zundel
    Acked-by: Kim Phillips
    Cc: Peter Tyser
    Cc: Anatolij Gustschin

    Stefan Roese
     

13 Apr, 2010

2 commits


05 Dec, 2009

1 commit

  • According to the PPC reference implementation the udelay() function is
    responsible for resetting the watchdog timer as frequently as needed.
    Most other architectures do not meet that requirement, so long-running
    operations might result in a watchdog reset.

    This patch adds a generic udelay() function which takes care of
    resetting the watchdog before calling an architecture-specific
    __udelay().

    Signed-off-by: Ingo van Lil

    Ingo van Lil
     

27 Jul, 2009

1 commit


21 Jul, 2009

1 commit