20 Feb, 2014

1 commit

  • 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
     

01 Nov, 2013

1 commit


24 Jul, 2013

1 commit


16 Oct, 2011

1 commit

  • The top level Makefile does not do any recursion into subdirs when
    cleaning, so these clean/distclean targets in random arch/board dirs
    never get used. Punt them all.

    MAKEALL didn't report any errors related to this that I could see.

    Signed-off-by: Mike Frysinger

    Mike Frysinger
     

06 Oct, 2011

1 commit

  • This is long over due. All but two net drivers have been converted, but
    those have now been dropped.

    The only thing left to do is actually delete all references to NET_MULTI
    and code that is compiled when that is not defined. So here we scrub the
    core code.

    Signed-off-by: Mike Frysinger

    Mike Frysinger
     

12 Jul, 2011

1 commit


04 Jun, 2011

1 commit


08 Apr, 2011

3 commits


18 Nov, 2010

1 commit

  • 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
    inspired.

    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
    scripts.

    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: Sebastien Carlier

    Sebastien Carlier
     

19 Oct, 2010

1 commit

  • 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: Wolfgang Denk

    Wolfgang Denk
     

03 Oct, 2010

3 commits


05 Jul, 2010

3 commits

  • Use the common gpio layer rather than bang on MMRs directly.

    Signed-off-by: Mike Frysinger

    Mike Frysinger
     
  • Now that we have a unified gpio layer, the misc partial gpio commands
    can be unified and made complete (support all possible gpios).

    Signed-off-by: Mike Frysinger

    Mike Frysinger
     
  • 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
     

13 Apr, 2010

2 commits

  • Now that the other architecture-specific lib directories have been
    moved out of the top-level directory there's not much reason to have the
    '_generic' suffix on the common lib directory.

    Signed-off-by: Peter Tyser

    Peter Tyser
     
  • Previously, a specific file or directory could be compiled with custom
    CFLAGS by adding a Makefile variable such as:
    CFLAGS_dlmalloc.o =
    or
    CFLAGS_lib =

    This method breaks down once multiple files or directories share the
    same path. Eg FLAGS_fileA = would incorrectly result in
    both dir1/fileA.c and dir2/fileA.c being compiled with .

    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: Peter Tyser

    Peter Tyser
     

17 Jan, 2010

1 commit


24 Aug, 2009

1 commit


16 Jun, 2009

1 commit


15 Jun, 2009

2 commits

  • All the Blackfin linker scripts were duplicated across the board dirs with
    no difference save from the semi-often used ENV_IS_EMBEDDED option. So
    unify all of them in the lib_blackfin/ dir and for the few boards that
    need to embedded the environment directly, add a LDS_BOARD_TEXT define for
    them to customize via their board config file. This is much simpler than
    forcing them to duplicate the rest of the linker script.

    Signed-off-by: Mike Frysinger

    Mike Frysinger
     
  • Signed-off-by: Mike Frysinger

    Mike Frysinger