23 Jan, 2018

1 commit

  • For testing EFI disk management we need an in-memory image of
    a disk.

    The tool file2include converts a file to a C include. The file
    is separated into strings of 8 bytes. Only the non-zero strings
    are written to the include. The output format has been designed
    to maintain readability.

    #define EFI_ST_DISK_IMG { 0x00010000, { \
    {0x000001b8, "\x94\x37\x69\xfc\x00\x00\x00\x00"}, /* .7i..... */ \
    {0x000001c0, "\x02\x00\x83\x02\x02\x00\x01\x00"}, /* ........ */ \
    {0x000001c8, "\x00\x00\x7f\x00\x00\x00\x00\x00"}, /* ........ */ \
    {0x000001f8, "\x00\x00\x00\x00\x00\x00\x55\xaa"}, /* ......U. */ \
    ...
    {0x00006000, "\x48\x65\x6c\x6c\x6f\x20\x77\x6f"}, /* Hello wo */ \
    {0x00006008, "\x72\x6c\x64\x21\x0a\x00\x00\x00"}, /* rld!.... */ \
    {0, NULL} } }

    As the disk image needed for testing contains mostly zeroes a high
    compression ratio can be attained.

    Signed-off-by: Heinrich Schuchardt
    Signed-off-by: Alexander Graf

    Heinrich Schuchardt
     

17 Nov, 2017

1 commit

  • The pylibfdt is used by dtoc (and, indirectly by binman), but there
    is no reason why it must be generated in the tools/ directory.

    Recently, U-Boot switched over to the bundled DTC, and the directory
    structure under scripts/dtc/ now mirrors the upstream DTC project.
    So, scripts/dtc/pylibfdt is the best location.

    I also rewrote the Makefile in a cleaner Kbuild style.

    The scripts from the upstream have been moved as follows:

    lib/libfdt/pylibfdt/setup.py -> scripts/dtc/pylibfdt/setup.py
    lib/libfdt/pylibfdt/libfdt.i -> scripts/dtc/pylibfdt/libfdt.i_shipped

    The .i_shipped is coped to .i during building because the .i must be
    located in the objtree when we build it out of tree.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

07 Sep, 2017

2 commits


26 Jul, 2017

1 commit

  • U-Boot has up until now built with -fpic for the MIPS architecture,
    producing position independent code which uses indirection through a
    global offset table, making relocation fairly straightforward as it
    simply involves patching up GOT entries.

    Using -fpic does however have some downsides. The biggest of these is
    that generated code is bloated in various ways. For example, function
    calls are indirected through the GOT & the t9 register:

    8f998064 lw t9,-32668(gp)
    0320f809 jalr t9

    Without -fpic the call is simply:

    0f803f01 jal be00fc04

    This is more compact & faster (due to the lack of the load & the
    dependency the jump has on its result). It is also easier to read &
    debug because the disassembly shows what function is being called,
    rather than just an offset from gp which would then have to be looked up
    in the ELF to discover the target function.

    Another disadvantage of -fpic is that each function begins with a
    sequence to calculate the value of the gp register, for example:

    3c1c0004 lui gp,0x4
    279c3384 addiu gp,gp,13188
    0399e021 addu gp,gp,t9

    Without using -fpic this sequence no longer appears at the start of each
    function, reducing code size considerably.

    This patch switches U-Boot from building with -fpic to building with
    -fno-pic, in order to gain the benefits described above. The cost of
    this is an extra step during the build process to extract relocation
    data from the ELF & write it into a new .rel section in a compact
    format, plus the added complexity of dealing with multiple types of
    relocation rather than the single type that applied to the GOT. The
    benefit is smaller, cleaner, more debuggable code. The relocate_code()
    function is reimplemented in C to handle the new relocation scheme,
    which also makes it easier to read & debug.

    Taking maltael_defconfig as an example the size of u-boot.bin built
    using the Codescape MIPS 2016.05-06 toolchain (gcc 4.9.2, binutils
    2.24.90) shrinks from 254KiB to 224KiB.

    Signed-off-by: Paul Burton
    Cc: Daniel Schwierzeck
    Cc: u-boot@lists.denx.de
    Reviewed-by: Daniel Schwierzeck
    Tested-by: Daniel Schwierzeck

    Paul Burton
     

07 Apr, 2017

1 commit

  • This program generates raw SPL images that can be flashed on the NAND with
    the ECC and randomizer properly set up.

    This has been copied (and tweaked to find the right headers) from the
    sunxi-tools (https://github.com/linux-sunxi/sunxi-tools) upstream
    repository, commit 1c3a6ca5.

    Signed-off-by: Maxime Ripard
    Acked-by: Boris Brezillon
    Reviewed-by: Hans de Goede
    Reviewed-by: Jagan Teki

    Maxime Ripard
     

08 Feb, 2017

1 commit


28 May, 2016

1 commit


05 Aug, 2015

1 commit


28 Jul, 2015

1 commit


25 Nov, 2014

1 commit


28 Oct, 2014

1 commit


12 Jun, 2014

2 commits


25 May, 2014

1 commit


22 Mar, 2014

2 commits


20 Feb, 2014

3 commits

  • tools/kernel-doc/docproc.c and tools/kernel-doc/kernel-doc are
    files imported from Linux Kernel.

    They originally resided under scripts/ directory in Linux Kernel.

    This commit moves them to the original location.

    Signed-off-by: Masahiro Yamada
    Acked-by: Simon Glass

    Masahiro Yamada
     
  • fw_printenv is a program which mostly runs on the target Linux.

    Before switching to Kbuild, we needed to set HOSTCC at the
    command line like this:
    make HOSTCC= env

    Going forward we can cross compile it by specifying CROSS_COMPILE:
    make CROSS_COMPILE= env
    This looks more natural.

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

    Masahiro Yamada
     
  • Before this commit, makefiles under tools/ directory
    were implemented with their own way.

    This commit refactors them by using "hostprogs-y" variable.

    Several C sources have been added to wrap other C sources
    to simplify Makefile.
    For example, tools/crc32.c includes lib/crc32.c

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

20 Jan, 2014

1 commit


16 Dec, 2013

1 commit


13 Dec, 2013

1 commit

  • 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
     

26 Jun, 2013

1 commit


16 Oct, 2012

1 commit

  • Pull slightly modified version of Documentation/DocBook, the related perl
    script scripts/kernel-doc and the scripts/docproc.c from Linux kernel and
    implant it into U-Boot. This will allow smooth generation of kerneldoc
    style documentation.

    It was necessary to modify the DocBook/Makefile to work with U-Boot build
    system. The changes were only minor though and involved replacing the kbuild
    specific parts.

    It was also necessary to replace use of variables like KERNEL_VERSION with
    U_BOOT_VERSION, strings like Linux kernel with U-Boot Bootloader etc. so
    the generated result actually matches.

    Finally, it was necessary to adjust docproc.c, since the documentation in
    U-Boot is located in doc/DocBook instead of Documentation/DocBook as is in
    case of the Linux kernel.

    Some parts of the DocBook Makefile are unused, but to allow easier sync with
    Linux kernel, these parts are still left in. The targets enabled now are
    "htmldocs" "pdfdocs" "psdocs" "xmldocs" and "cleandocs" to remove the results
    of documentation build.

    Linux scripts/docproc.c:
    commit f0f3ca8d967462dafb815412b14ca3339b9817a6
    Date: Wed Jun 15 11:53:13 2011 +0200

    Linux scripts/kernel-doc:
    commit 1b40c1944db445c1de1c47ffd8cd426167f488e8
    Date: Sun Aug 12 10:46:15 2012 +0200

    Linux Documentation/DocBook:
    commit bb8187d35f820671d6dd76700d77a6b55f95e2c5
    Date: Thu May 17 19:06:13 2012 -0400

    Signed-off-by: Marek Vasut

    Marek Vasut
     

11 Aug, 2012

1 commit


28 Jul, 2012

1 commit


27 Nov, 2011

1 commit


11 Nov, 2011

1 commit


20 Sep, 2010

1 commit


25 Nov, 2009

1 commit


04 Apr, 2009

5 commits


11 Sep, 2008

1 commit


16 Jul, 2008

1 commit


30 Apr, 2008

1 commit


14 Mar, 2008

1 commit