22 Jan, 2014

1 commit


21 Jan, 2014

1 commit


14 Jan, 2014

1 commit


10 Jan, 2014

1 commit


09 Jan, 2014

3 commits

  • Signed-off-by: Scott Wood
    Signed-off-by: David Feng

    Scott Wood
     
  • While performing relocations on u-boot.bin should be good enough for
    booting on real hardware, some simulators insist on booting an ELF file
    (and yet don't perform ELF relocations), so convert the relocated
    binary back into an ELF file. This can go away in the future if we
    change relocate-rela to operate directly on the ELF file, or if and
    when we stop caring about a simulator with this restriction.

    Signed-off-by: Scott Wood
    Signed-off-by: David Feng

    Scott Wood
     
  • ARM64 uses the newer RELA-style relocations rather than the older REL.
    RELA relocations have an addend in the relocation struct, rather than
    expecting the loader to read a value from the location to be updated.

    While this is beneficial for ordinary program loading, it's problematic
    for U-Boot because the location to be updated starts out with zero,
    rather than a pre-relocation value. Since we need to be able to run C
    code before relocation, we need a tool to apply the relocations at
    build time.

    In theory this tool is applicable to other newer architectures (mainly
    64-bit), but currently the only relocations it supports are for arm64,
    and it assumes a 64-bit little-endian target. If the latter limitation
    is ever to be changed, we'll need a way to tell the tool what format
    the image is in. Eventually this may be replaced by a tool that uses
    libelf or similar and operates directly on the ELF file. I've written
    some code for such an approach but libelf does not make it easy to poke
    addresses by memory address (rather than by section), and I was
    hesitant to write code to manually parse the program headers and do the
    update outside of libelf (or to iterate over sections) -- especially
    since it wouldn't get test coverage on things like binaries with
    multiple PT_LOAD segments. This should be good enough for now to let
    the manual relocation stuff be removed from the arm64 patches.

    Signed-off-by: Scott Wood
    Signed-off-by: David Feng

    Scott Wood
     

19 Dec, 2013

1 commit


18 Dec, 2013

2 commits

  • Before this commit, a broken pipe error sometimes happened
    when building lcd4_lwmon5 board with Buildman.

    This commit re-writes build rules of
    u-boot.spr and u-boot-img-spl-at-end.bin
    more simply without using a pipe.

    Besides fixing a broken pipe error,
    this commit gives us other advantages:

    - Do not generate intermidiate files, spl/u-boot-spl.img
    and spl/u-boot-spl-pad.img for creating u-boot.spr

    - Do not generate an intermidiate file, u-boot-pad.img
    for creating u-boot-img-spl-at-end.bin

    Such intermidiate files were not deleted by "make clean" or "make mrpropr".
    Nor u-boot-pad.img was ignored by git.

    Signed-off-by: Masahiro Yamada
    Acked-by: Stefan Roese

    Masahiro Yamada
     
  • Fix the typo error for mrproper from mkproper.

    Signed-off-by: Bo Shen
    Acked-by: Simon Glass

    Bo Shen
     

17 Dec, 2013

1 commit


16 Dec, 2013

4 commits


13 Dec, 2013

8 commits

  • We have some scripts imported from Linux Kernel:
    setlocalversion, checkstack.pl, checkpatch.pl, cleanpatch

    They are located under tools/ directory in U-Boot now.
    But they were originally located under scripts/ directory
    in Linux Kernel.

    This commit moves them to the original location.

    It is true that binutils-version.sh and dtc-version.sh
    do not originate in Linux Kernel, but they should
    be moved by analogy to gcc-version.sh.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • All objects under post/ directory are enabled by CONFIG_HAS_POST.
    (post/tests.o is enabled by CONFIG_POST_STD_LIST.
    But CONFIG_POST_STD_LIST depends on CONFIG_HAS_POST.)

    We can move CONFIG_HAS_POST switch to the top Makefile.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • $(LDSCRIPT) is a source file, not a generated file.
    We do not need a make rule of $(LDSCRIPT).

    And one more trivial fix:
    $(obj)/u-boot should not dierectly depend on $(LDSCRIPTS).

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • These four generated files depends on neither {spl,tpl}-autoconf.mk
    nor autoconf.mk.dep.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • Some editors such as Emacs can highlight source files.
    But their parser algorithm is not perfect.

    If you use one double-quotation alone, some editor cannot
    handle it nicely and mark source lines as a string by mistake.

    It is preferable to use two double-quotations as a pair.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • The build rules of
    - include/autoconf.mk.dep
    - include/autoconf.mk
    - include/spl-autoconf.mk
    - include/tpl-autoconf.mk
    were not nice.

    They created empty files (which are never updated)
    if an error occurs during preprocessing.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     
  • Given a multi-file image created through the mkimage's -d option:

    $ mkimage -A x86 -O linux -T multi -n x86 -d vmlinuz:initrd.img:System.map \
    multi.img

    Image Name: x86
    Created: Thu Jul 25 10:29:13 2013
    Image Type: Intel x86 Linux Multi-File Image (gzip compressed)
    Data Size: 13722956 Bytes = 13401.32 kB = 13.09 MB
    Load Address: 00000000
    Entry Point: 00000000
    Contents:
    Image 0: 4040128 Bytes = 3945.44 kB = 3.85 MB
    Image 1: 7991719 Bytes = 7804.41 kB = 7.62 MB
    Image 2: 1691092 Bytes = 1651.46 kB = 1.61 MB

    It is possible to perform the innverse operation -- extracting any file from
    the image -- by using the dumpimage's -i option:

    $ dumpimage -i multi.img -p 2 System.map

    Although it's feasible to retrieve "data files" from image through scripting,
    the requirement to embed tools such 'dd', 'awk' and 'sed' for this sole purpose
    is cumbersome and unreliable -- once you must keep track of file sizes inside
    the image. Furthermore, extracting data files using "dumpimage" tool is faster
    than through scripting.

    Signed-off-by: Guilherme Maciel Ferreira
    Signed-off-by: Simon Glass

    Guilherme Maciel Ferreira
     

11 Dec, 2013

2 commits


07 Dec, 2013

1 commit

  • Current LDS files /DISCARD/ a lot of sections when linking ELF
    files, causing diagnostic tools such as readelf or objdump to
    produce partial output. Keep all section at link stage, filter
    only at objcopy time so that .bin remains minimal.

    Signed-off-by: Albert ARIBAUD
    Reviewed-by: Benoît Thébaudeau

    Albert ARIBAUD
     

06 Dec, 2013

1 commit


02 Dec, 2013

1 commit


26 Nov, 2013

2 commits


25 Nov, 2013

3 commits


18 Nov, 2013

7 commits