1. 21 Mar, 2014 3 commits
  2. 12 Mar, 2014 1 commit
    • Masahiro Yamada's avatar
      kbuild: rename SRCTREE to srctree · 01286329
      Masahiro Yamada authored
      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: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      01286329
  3. 04 Mar, 2014 2 commits
  4. 19 Feb, 2014 7 commits
    • Masahiro Yamada's avatar
      kernel-doc: move kernel-doc tools to scripts/ · 8fac9c7b
      Masahiro Yamada authored
      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: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      8fac9c7b
    • Masahiro Yamada's avatar
      Makefile: refactor tools-all targets · 2887c473
      Masahiro Yamada authored
      - Move "easylogo", "gdb" tagets to tools/Makefile
       - Delete "gdbtools" target (same as "gdb")
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      2887c473
    • Masahiro Yamada's avatar
      kbuild: use Linux Kernel build scripts · 6825a95b
      Masahiro Yamada authored
      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: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      Tested-by: default avatarGerhard Sittig <gsi@denx.de>
      6825a95b
    • Masahiro Yamada's avatar
      kbuild: change out-of-tree build · 9e414032
      Masahiro Yamada authored
      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 <sub-dir>" 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=<sub-dir>"
      syntax for descending into sub-directories.
      (We can write it like "make $(obj)=<sub-dir>" with a shorthand.)
      This means the current working directory is always the top
      of the output directory.
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      Tested-by: default avatarGerhard Sittig <gsi@denx.de>
      9e414032
    • Masahiro Yamada's avatar
      Makefile: refactor include path settings · fea1ca8e
      Masahiro Yamada authored
      This commit merges commonly-used header include paths
      to UBOOTINCLUDE and NOSTDINC_FLAGS variables, which are placed
      at the top Makefile.
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      fea1ca8e
    • Masahiro Yamada's avatar
      tools: convert makefiles to kbuild style · 940db16d
      Masahiro Yamada authored
      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: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      940db16d
    • Ian Campbell's avatar
      tools: correct proftool build rule · 054c8388
      Ian Campbell authored
      The incorrect substitution made it rebuild every time.
      Signed-off-by: default avatarIan Campbell <ijc@hellion.org.uk>
      Cc: Tom Rini <trini@ti.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      054c8388
  5. 09 Jan, 2014 1 commit
    • Scott Wood's avatar
      arm64: Add tool to statically apply RELA relocations · 8137af19
      Scott Wood authored
      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: default avatarScott Wood <scottwood@freescale.com>
      Signed-off-by: default avatarDavid Feng <fenghua@phytium.com.cn>
      8137af19
  6. 30 Dec, 2013 1 commit
  7. 13 Dec, 2013 2 commits
    • Guilherme Maciel Ferreira's avatar
      Add dumpimage, a tool to extract data from U-Boot images · a804b5ce
      Guilherme Maciel Ferreira authored
      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: default avatarGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      a804b5ce
    • Guilherme Maciel Ferreira's avatar
      tools: moved code common to all image tools to a separated module. · f86ed6a8
      Guilherme Maciel Ferreira authored
      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   |--------> |           | <-----+
       +--------------+          |           |              +---------------+
                                 | imagetool | <------------|    imximage   |
       +--------------+          |           |              +---------------+
       |  dumpimage   |--------> |           | <-----+
       +--------------+          +-----------+       |      +---------------+
                                                     +------| default_image |
                                                            +---------------+
      
                register_image_tool()           register_image_type()
      
      Also, the struct "mkimage_params" was renamed to "image_tool_params" to make
      clear its general purpose.
      Signed-off-by: default avatarGuilherme Maciel Ferreira <guilherme.maciel.ferreira@gmail.com>
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      f86ed6a8
  8. 08 Nov, 2013 1 commit
  9. 14 Oct, 2013 1 commit
  10. 31 Aug, 2013 2 commits
  11. 27 Aug, 2013 1 commit
  12. 16 Aug, 2013 1 commit
  13. 24 Jul, 2013 1 commit
  14. 28 Jun, 2013 1 commit
    • Simon Glass's avatar
      mkimage: Build signing only if board has CONFIG_FIT_SIGNATURE · 29ce737d
      Simon Glass authored
      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: default avatarSimon Glass <sjg@chromium.org>
      29ce737d
  15. 26 Jun, 2013 3 commits
  16. 03 Jun, 2013 1 commit
  17. 14 May, 2013 2 commits
  18. 17 Apr, 2013 1 commit
    • Simon Glass's avatar
      fdt: Ensure that libfdt_env.h comes from U-Boot · 669dfc2e
      Simon Glass authored
      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: default avatarSimon Glass <sjg@chromium.org>
      669dfc2e
  19. 21 Jan, 2013 1 commit
  20. 15 Oct, 2012 1 commit
    • Marek Vasut's avatar
      kerneldoc: Implant DocBook from Linux kernel · 30ff8918
      Marek Vasut authored
      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: default avatarMarek Vasut <marex@denx.de>
      30ff8918
  21. 23 Aug, 2012 1 commit
  22. 08 Jul, 2012 1 commit
  23. 07 Jul, 2012 1 commit
  24. 12 Feb, 2012 1 commit
  25. 13 Jan, 2012 1 commit
  26. 22 Nov, 2011 1 commit