Skip to content
  1. Feb 19, 2014
    • Masahiro Yamada's avatar
      dts: re-write dts/Makefile more simply with Kbuild · 6ab6b2af
      Masahiro Yamada authored
      
      Useful rules in scripts/Makefile.lib allows us to easily
      generate a device tree blob and wrap it in assembly code.
      
      We do not need to parse a linker script to get output format and arch.
      
      This commit deletes ./u-boot.dtb since it is a copy of dts/dt.dtb.
      
      Signed-off-by: default avatarMasahiro Yamada <yamada.m@jp.panasonic.com>
      6ab6b2af
    • 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
    • Dan Murphy's avatar
      common: spl: Add spl sata boot support · fff40a7e
      Dan Murphy authored
      
      Add spl_sata to read a fat partition from a bootable SATA
      drive.
      
      Signed-off-by: default avatarDan Murphy <dmurphy@ti.com>
      Reviewed-by: default avatarRoger Quadros <rogerq@ti.com>
      fff40a7e
    • Wolfgang Denk's avatar
      EXT4: Fix number base handling of "ext4write" command · f7740f77
      Wolfgang Denk authored
      
      Unlike other commands (for example, "fatwrite"), ext4write would
      interpret the "sizebytes" as decimal number.  This is not only
      inconsistend and unexpected to most users, it also breaks usage
      like this:
      
      	tftp ${addr} ${name}
      	ext4write mmc 0:2 ${addr} ${filename} ${filesize}
      
      Change this to use the standard notation of base 16 input format.
      See also commit b770e88a
      
      WARNING: this is a change to the user interface!!
      
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      Cc: Uma Shankar <uma.shankar@samsung.com>
      Cc: Stephen Warren <swarren@nvidia.com>
      f7740f77
    • Masahiro Yamada's avatar
    • Stephen Warren's avatar
      cmd_test: implement -e test for file existence · e5e897c0
      Stephen Warren authored
      
      This is much like a regular shell's -e operator, except that it takes
      multiple arguments to specify the device type and  device/partition ID
      in addition to the usual filename:
      
      if test -e mmc 0:1 /boot/boot.scr; then echo yes; else echo no; fi
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      e5e897c0
    • Stephen Warren's avatar
      cmd_test: evaluate to false without any arguments · 2453de99
      Stephen Warren authored
      
      This emulates bash:
      $ if test; then echo yes; else echo no; fi
      no
      
      Currently, the code sets expr = -1 in this case, which gets mapped to
      0 (true) at the end of do_test() by the logical -> shell exit code
      conversion.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      2453de99
    • Stephen Warren's avatar
      cmd_test: implement ! on sub-expressions · d9b651ce
      Stephen Warren authored
      
      Currently, ! can only be parsed as the first operator in an expression.
      This prevents the following from working:
      
      $ if test ! ! 1 -eq 1; then echo yes; else echo no; fi
      yes
      $ if test ! 1 -eq 2 -a ! 3 -eq 4; then echo yes; else echo no; fi
      yes
      
      Fix this by parsing ! like any other operator, and and handling it
      similarly to -a and -o.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      d9b651ce
    • Stephen Warren's avatar
      cmd_test: check for binary operators before unary · 4c80f29e
      Stephen Warren authored
      
      This better mirrors the behaviour of bash, for example:
      
      $ if test -z = -z; then echo yes; else echo no; fi
      yes
      
      This is parsed as a string comparison of "-z" and "-z", since the check
      for the binary "=" operator occurs first. Without this change, the
      command would be parsed as a -z test of "-", followed by a syntax error;
      a trailing -z without and operand.
      
      This is a behavioural change, but I believe any commands affected were
      previously invalid or bizarely formed.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      4c80f29e
    • Stephen Warren's avatar
      cmd_test: use table lookup for parsing · 490ba833
      Stephen Warren authored
      
      do_test() currently uses strcmp() twice to determine which operator is
      present; once to determine how many arguments the operator needs, then
      a second time to actually decode the operator and implement it.
      
      Rewrite the code so that a table lookup is used to translate the operator
      string to an integer, and use a more efficient switch statement to decode
      and execute the operator.
      
      This approach also acts as enablement for the following patches.
      
      This patch should introduce no behavioural change.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      490ba833
  2. Feb 07, 2014
  3. Feb 04, 2014
  4. Feb 03, 2014
  5. Jan 27, 2014
    • Alexey Brodkin's avatar
      board_r - fixup functions table after relocation · 7395398a
      Alexey Brodkin authored
      
      This is only required for "PIC" relocation and doesn't apply to modern
      "PIE" relocation which does data relocation as well as code.
      
      "init_sequence_r" is just an array that consists of compile-time
      adresses of init functions. Since this is basically an array of integers
      (pointers to "void" to be more precise) it won't be modified during
      relocation - it will be just copied to new location as it is.
      
      As a consequence on execution after relocation "initcall_run_list" will
      be jumping to pre-relocation addresses. As long as we don't overwrite
      pre-relocation memory area init calls are executed correctly. But still
      it is dangerous because after relocation we don't expect initially used
      memory to stay untouched.
      
      Cc: Tom Rini <trini@ti.com>
      Cc: Masahiro Yamada <yamada.m@jp.panasonic.com>
      Cc: Doug Anderson <dianders@chromium.org>
      Cc: Thomas Langer <thomas.langer@lantiq.com>
      Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      Signed-off-by: default avatarAlexey Brodkin <abrodkin@synopsys.com>
      7395398a
  6. Jan 24, 2014
  7. Jan 20, 2014
  8. Jan 14, 2014
    • Heiko Schocher's avatar
      common, env: optimize boottime · 1b610271
      Heiko Schocher authored
      
      when creating the hashtable, for each environmentvariable
      getenv(ENV_CALLBACK_VAR) and getenv(ENV_FLAGS_VAR) is called,
      which costs at this point a lot of time. So call this two
      getenv() calls only once.
      
      Boottime on the ids8313 board without this patch:
      
      2013-12-19 13:38:22,894:  NAND:  128 MiB
      2013-12-19 13:38:27,659:  In:    serial
      (~4.8 sec)
      
      Bootime with this patch on the ids8313 board:
      
      2013-12-19 13:40:25,332:  NAND:  128 MiB
      2013-12-19 13:40:25,546:  In:    serial
      (~0.2 sec)
      
      Signed-off-by: default avatarHeiko Schocher <hs@denx.de>
      Cc: Tom Rini <trini@ti.com>
      Cc: Joe Hershberger <joe.hershberger@ni.com>
      Cc: Wolfgang Denk <wd@denx.de>
      1b610271
    • Simon Glass's avatar
      bootm: Reinstate special case for standalone images · c5cbe1e2
      Simon Glass authored
      
      For standalone images, bootm had a special case where the OS boot function
      was NULL but did actually exist. It was just called manually.
      
      This was removed by commit 35fc84fa which checks for the non-existence of
      this function before the special case is examined.
      
      There is no obvious reason why standalone is handled with a special case.
      Adjust the code so that standalone has a normal OS boot function. We still
      need a special case for when the function returns, but at least we can
      avoid the main problem.
      
      This is intended to fix the reported:
      
          ERROR: booting os 'U-Boot' (17) is not supported
      
      but needs testing.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      c5cbe1e2
    • miao.yan@windriver.com's avatar
      common/image.c: move VxWorks header string out of CONFIG_CMD_ELF · 68b15e83
      miao.yan@windriver.com authored
      
      Otherwise, when booting VxWorks kernel, the incorrect message will
      be seen:
      
          ARM Unknown OS Kernel Image (uncompressed)
      
      Signed-off-by: default avatarMiao Yan <miao.yan@windriver.com>
      68b15e83
    • Andrew Gabbasov's avatar
      command.c: Fix auto-completion for the full commands list case · 9b438946
      Andrew Gabbasov authored
      
      Compiling of full list of commands does not advance the counter,
      so it always results in an empty list.
      This seems to be (inadvertently?) introduced by commit
      6c7c946c.
      
      Signed-off-by: default avatarAndrew Gabbasov <andrew_gabbasov@mentor.com>
      9b438946
  9. Jan 13, 2014
  10. Jan 11, 2014
  11. Jan 09, 2014
    • David Feng's avatar
      arm64: generic board support · cce6be7f
      David Feng authored
      
      Signed-off-by: default avatarDavid Feng <fenghua@phytium.com.cn>
      cce6be7f
    • David Feng's avatar
      arm64: core support · 0ae76531
      David Feng authored
      
      Relocation code based on a patch by Scott Wood, which is:
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      
      Signed-off-by: default avatarDavid Feng <fenghua@phytium.com.cn>
      0ae76531
    • David Feng's avatar
      cmd_pxe: remove compiling warnings · 5cea95cb
      David Feng authored
      
      Signed-off-by: default avatarDavid Feng <fenghua@phytium.com.cn>
      5cea95cb
    • David Feng's avatar
      f77a606a
    • Markus Niebel's avatar
      mmc: add setdsr support · ab71188c
      Markus Niebel authored
      
      The eMMC and the SD-Card specifications describe the optional SET_DSR command.
      During measurements at our lab we found that some cards implementing this feature
      having really strong driver strengts per default. This can lead to voltage peaks
      above the specification of the host on signal edges for data sent from a card to
      the host.
      
      Since availability of a given card type may be shorter than the time a certain
      hardware will be produced it is useful to have support for this command (Alternative
      would be changing termination resistors and adapting the driver strength of the
      host to the used card.)
      
      Following proposal for an implementation:
      
      - new field that reflects CSD field DSR_IMP in struct mmc
      - new field for design specific DSR value in struct mmc
      - board code can set DSR value in mmc struct just after registering an controller
      - mmc_startup sends the the stored DSR value before selecting a card, if DSR_IMP is set
      
      Additionally the mmc command is extended to make is possible to play around with different
      DSR values.
      
      The concept was tested on a i.MX53 based platform using a Micron eMMC card where the default
      DSR is 0x0400 (12mA) but in our design 0x0100 (0x0100) were enough. To use this feature for
      instance on a mx53loco one have to add a call to mmc_set_dsr() in board_mmc_init() after
      calling fsl_esdhc_initialize() for the eMMC.
      
      Signed-off-by: default avatarMarkus Niebel <Markus.Niebel@tqs.de>
      Acked-by: default avatarPantelis Antoniou <panto@antoniou-consulting.com>
      ab71188c
    • Simon Glass's avatar
      sandbox: Allow reading/writing of RAM buffer · 5c2859cd
      Simon Glass authored
      
      It is useful to be able to save and restore the RAM contents of sandbox
      U-Boot either for setting up tests, for later analysys, or for chaining
      together multiple tests which need to keep the same memory contents.
      
      Add a function to provide a memory file for U-Boot. This is read on
      start-up and written when shutting down. If the file does not exist
      on start-up, it will be created when shutting down.
      
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
      5c2859cd
Loading