13 Mar, 2014

1 commit

  • Prior to Kbuild, $(TOPDIR) or $(SRCTREE) was used for
    pointing to the top of source directory.
    (No difference between the two.)

    In Kbuild style, $(srctree) is used for instead.
    This commit renames SRCTREE to srctree and deletes the
    defition of SRCTREE.

    Note that SRCTREE in scripts/kernel-doc, scripts/docproc.c,
    doc/DocBook/Makefile should be keep.

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

05 Mar, 2014

2 commits

  • LOGO_BMP was never overwritten by board-specific or
    vendor-specific logos.

    Signed-off-by: Masahiro Yamada
    Reported-by: Bo Shen
    Tested-by: Bo Shen

    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
     

20 Feb, 2014

6 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
     
  • - Move "easylogo", "gdb" tagets to tools/Makefile
    - Delete "gdbtools" target (same as "gdb")

    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 merges commonly-used header include paths
    to UBOOTINCLUDE and NOSTDINC_FLAGS variables, which are placed
    at the top Makefile.

    Signed-off-by: Masahiro Yamada

    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
     

19 Feb, 2014

1 commit


10 Jan, 2014

1 commit


09 Jan, 2014

1 commit

  • 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
     

30 Dec, 2013

1 commit


13 Dec, 2013

2 commits

  • 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
     
  • In order to avoid duplicating code and keep only one point of modification,
    the functions, structs and defines useful for "dumpimage" were moved from
    "mkimage" to a common module called "imagetool".

    This modification also weakens the coupling between image types (FIT, IMX, MXS,
    and so on) and image tools (mkimage and dumpimage). Any tool may initialize the
    "imagetool" through register_image_tool() function, while the image types
    register themselves within an image tool using the register_image_type()
    function:

    +---------------+
    +------| fit_image |
    +--------------+ +-----------+ | +---------------+
    | mkimage |--------> | | | |
    Signed-off-by: Simon Glass

    Guilherme Maciel Ferreira
     

08 Nov, 2013

1 commit

  • In-tree build:
    - Do not create a symbolic link
    from include/asm to arch/${ARCH}/include/asm
    - Add ${SRCTREE}/arch/arm/include into the header search path

    Out-of-tree build:
    - Do not create a directory ${OBJTREE}/include2
    - Do not create a symbolic link
    from ${OBJTREE}/include2/asm to ${SRCTREE}/arch/${ARCH}/include/asm
    - Add ${SRCTREE}/arch/arm/include into the header search path

    Signed-off-by: Masahiro Yamada

    Masahiro Yamada
     

15 Oct, 2013

1 commit


11 Sep, 2013

1 commit


05 Sep, 2013

1 commit


31 Aug, 2013

2 commits

  • Fix the lists of files so they are in order again.

    Signed-off-by: Marek Vasut
    Cc: Tom Rini
    Cc: Stefano Babic

    Marek Vasut
     
  • Add mkimage support for generating and verifying MXS bootstream.
    The implementation here is mostly a glue code between MXSSB v0.4
    and mkimage, but the long-term goal is to rectify this and merge
    MXSSB with mkimage more tightly. Once this code is properly in
    U-Boot, MXSSB shall be deprecated in favor of mkimage-mxsimage
    support.

    Note that the mxsimage generator needs libcrypto from OpenSSL, I
    therefore enabled the libcrypto/libssl unconditionally.

    MXSSB: http://git.denx.de/?p=mxssb.git;a=summary

    The code is based on research presented at:
    http://www.rockbox.org/wiki/SbFileFormat

    Signed-off-by: Marek Vasut
    Cc: Tom Rini
    Cc: Fabio Estevam
    Cc: Stefano Babic
    Cc: Otavio Salvador

    Marek Vasut
     

27 Aug, 2013

1 commit


17 Aug, 2013

1 commit

  • Commit 669dfc2e adds libfdt_env.h to HOSTCPPFLAGS. It causes stdio.h
    to be included before _GNU_SOURCE is defined in C files. On some old hosts
    some prototypes are protected by #ifdef __USE_GNU, which is set when
    _GNU_SOURCE is defined.

    Signed-off-by: York Sun
    Acked-by: Simon Glass

    York Sun
     

24 Jul, 2013

1 commit


29 Jun, 2013

1 commit

  • At present mkimage is set up to always build with image signing support.
    This means that the SSL libraries (e.g. libssl-dev) are always required.

    Adjust things so that mkimage can be built with and without image signing,
    controlled by the presence of CONFIG_FIT_SIGNATURE in the board config file.

    If CONFIG_FIT_SIGNATURE is not enabled, then mkimage will report a warning
    that signing is not supported. If the option is enabled, but libraries are
    not available, then a build error similar to this will be shown:

    lib/rsa/rsa-sign.c:26:25: fatal error: openssl/rsa.h: No such file or directory

    Signed-off-by: Simon Glass

    Simon Glass
     

26 Jun, 2013

3 commits

  • RSA provides a public key encryption facility which is ideal for image
    signing and verification.

    Images are signed using a private key by mkimage. Then at run-time, the
    images are verified using a private key.

    This implementation uses openssl for the host part (mkimage). To avoid
    bringing large libraries into the U-Boot binary, the RSA public key
    is encoded using a simple numeric representation in the device tree.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Add a structure to describe an algorithm which can sign and (later) verify
    images.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • This tool provides the facility to decode U-Boot trace data and write out
    a text file in Linux ftrace format for use with pytimechart.

    Signed-off-by: Simon Glass

    Simon Glass
     

08 Jun, 2013

1 commit


03 Jun, 2013

1 commit

  • The boot logo matching is now done in following way:

    - use LOGO_BMP if it is set, or
    - use $(BOARD).bmp if it exists in tools/logos, or
    - use $(VENDOR).bmp if it exists in tools/logos, or
    - use denx.bmp otherwise.

    Signed-off-by: Otavio Salvador
    Acked-by: Wolfgang Denk

    Otavio Salvador
     

15 May, 2013

2 commits


17 Apr, 2013

1 commit

  • When building host utilities, we include libfdt.h from the host, not from
    U-Boot. This in turn brings in libfdt_env.h from the host, which can mess
    up the types and cause a build failure, depending on the host environment.
    To fix this, force inclusion of U-Boot's libfdt_env.h so that the types
    are correct.

    Another way to fix this is to use -nostdinc and -idirafter to ensure that
    system includes are included after U-Boot ones. Unfortunately this means
    that U-Boot's errno.h gets included instead of the system one. This in
    turn requires a hack to errno.h to redirect things, so all in all the
    solution in this patch is probably cleaner.

    Signed-off-by: Simon Glass

    Simon Glass
     

21 Jan, 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
     

23 Aug, 2012

1 commit

  • Provides a tool to build boot Image for PBL(Pre boot loader) which is
    used on Freescale CoreNet SoCs, PBL can be used to load some instructions
    and/or data for pre-initialization. The default output image is u-boot.pbl,
    for more details please refer to doc/README.pblimage.

    Signed-off-by: Shaohui Xie
    Signed-off-by: Andy Fleming

    Shaohui Xie
     

09 Jul, 2012

1 commit


07 Jul, 2012

1 commit


12 Feb, 2012

1 commit


14 Jan, 2012

1 commit