Skip to content
Snippets Groups Projects
  1. Feb 19, 2014
    • 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
    • Stephen Warren's avatar
      fat: implement exists() for FAT fs · b7b5f319
      Stephen Warren authored
      
      This hooks into the generic "file exists" support added in an earlier
      patch, and provides an implementation for the FAT filesystem.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      b7b5f319
    • Stephen Warren's avatar
      ext4: implement exists() for ext4fs · 55af5c93
      Stephen Warren authored
      
      This hooks into the generic "file exists" support added in an earlier
      patch, and provides an implementation for the ext4 filesystem.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      55af5c93
    • Stephen Warren's avatar
      sandbox: implement exists() function · 0a30aa1e
      Stephen Warren authored
      
      This hooks into the generic "file exists" support added in an earlier
      patch, and provides an implementation for the sandbox test environment.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      0a30aa1e
    • Stephen Warren's avatar
      fs: don't pass NULL dev_desc to most filesystems · 377202b5
      Stephen Warren authored
      
      FAT and ext4 expect that the passed in block device descriptor not be
      NULL. This causes problems on sandbox, where get_device_and_partition()
      succeeds for the "host" device, yet passes back a NULL device descriptor.
      Add special handling for this situation, so that the generic filesystem
      commands operate as expected on sandbox.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      377202b5
    • Stephen Warren's avatar
      fs: implement infrastructure for an 'exists' function · 6152916a
      Stephen Warren authored
      
      This could be used in scripts such as:
      
      if test -e mmc 0:1 /boot/boot.scr; then
          load mmc 0:1 ${scriptaddr} /boot/boot.scr
          source ${scriptaddr}
      fi
      
      rather than:
      
      if load mmc 0:1 ${scriptaddr} /boot/boot.scr; then
          source ${scriptaddr}
      fi
      
      This prevents errors being printed by attempts to load non-existent
      files, which can be important when checking for a large set of files,
      such as /boot/boot.scr.uimg, /boot/boot.scr, /boot/extlinux.conf,
      /boot.scr.uimg, /boot.scr, /extlinux.conf.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      6152916a
    • Stephen Warren's avatar
      fs: fix generic save command implementation · bd6fb31f
      Stephen Warren authored
      
      Fix a few issues with the generic "save" shell command, and fs_write()
      function.
      
      1) fstypes[].write wasn't filled in for some file-systems, and isn't
         checked when used, which could cause crashes/... if executing save
         on e.g. fat/ext filesystems.
      
      2) fs_write() requires the length argument to be non-zero, since it needs
         to know exactly how many bytes to write. Adjust the comments and code
         according to this.
      
      3) fs_write() wasn't prototyped in <fs.h> like other generic functions;
         other code should be able to call this directly rather than invoking
         the "save" shell command.
      
      Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
      Acked-by: default avatarSimon Glass <sjg@chromium.org>
      bd6fb31f
  2. Jan 20, 2014
  3. Dec 13, 2013
  4. Nov 17, 2013
  5. Nov 08, 2013
  6. Oct 31, 2013
  7. Oct 16, 2013
  8. Oct 14, 2013
  9. Oct 07, 2013
    • Wolfgang Denk's avatar
      Fix number base handling of "load" command · b770e88a
      Wolfgang Denk authored
      As documented, almost all U-Boot commands expect numbers to be entered
      in hexadecimal input format. (Exception: for historical reasons, the
      "sleep" command takes its argument in decimal input format.)
      
      This rule was broken for the "load" command; for details please see
      especially commits 045fa1e1 "fs: add filesystem switch libary,
      implement ls and fsload commands" and 3f83c87e "fs: fix number base
      behaviour change in fatload/ext*load".  In the result, the load
      command would always require an explicit "0x" prefix for regular
      (i. e. base 16 formatted) input.
      
      Change this to use the standard notation of base 16 input format.
      While strictly speaking this is a change of the user interface, we
      hope that it will not cause trouble.  Stephen Warren comments (see
      [1]):
      
              I suppose you can change the behaviour if you want; anyone
              writing "0x..." for their values presumably won't be
              affected, and if people really do assume all values in U-Boot
              are in hex, presumably nobody currently relies upon using
              non-prefixed values with the generic load command, since it
              doesn't work like that right now.
      
      [1] http://article.gmane.org/gmane.comp.boot-loaders.u-boot/171172
      
      
      
      Acked-by: default avatarTom Rini <trini@ti.com>
      Acked-by: default avatarStephen Warren <swarren@nvidia.com>
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
      b770e88a
  10. Sep 06, 2013
    • Wu, Josh's avatar
      fs: fat: don't call disk_write with zero sector num · 6b8f185f
      Wu, Josh authored
      
      In the set_cluster() function, it will convert the buffer size to sector
      numbers. Then call disk_write() to write by sector.
      For remaining buffer, the size is less than a sector, call disk_write()
      again to write them in one sector.
      
      But if the total buffer size is less then one sector, the original code
      will call disk_write() with zero sector number. It is unnecessary.
      So this patch fix this. Now it will not call disk_write() if total buffer size
      is less than one sector.
      
      Signed-off-by: default avatarJosh Wu <josh.wu@atmel.com>
      6b8f185f
  11. Aug 19, 2013
  12. Jul 24, 2013
  13. Jul 22, 2013
  14. Jul 15, 2013
    • Frederic Leroy's avatar
      Fix ext2/ext4 filesystem accesses beyond 2TiB · 04735e9c
      Frederic Leroy authored
      
      With CONFIG_SYS_64BIT_LBA, lbaint_t gets defined as a 64-bit type,
      which is required to represent block numbers for storage devices that
      exceed 2TiB (the block size usually is 512B), e.g. recent hard drives
      
      We now use lbaint_t for partition offset to reflect the lbaint_t change,
      and access partitions beyond or crossing the 2.1TiB limit.
      This required changes to signature of ext4fs_devread(), and type of all
      variables relatives to block sector.
      
      ext2/ext4 fs uses logical block represented by a 32 bit value. Logical
      block is a multiple of device block sector. To avoid overflow problem
      when calling ext4fs_devread(), we need to cast the sector parameter.
      
      Signed-off-by: default avatarFrédéric Leroy <fredo@starox.org>
      04735e9c
    • Holger Brunck's avatar
      cramfs: fix bug for wrong filename comparison · 457dd025
      Holger Brunck authored
      
      "cramfsload uImage_1" succeeds even though the actual file is named
      "uImage".
      
      Fix file name comparison when one name is the prefix of the other.
      
      Signed-off-by: default avatarHolger Brunck <holger.brunck@keymile.com>
      cc: Wolfgang Denk <wd@denx.de>
      cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
      457dd025
  15. May 31, 2013
    • Sergey Lapin's avatar
      mtd: resync with Linux-3.7.1 · dfe64e2c
      Sergey Lapin authored
      
      This patch is essentially an update of u-boot MTD subsystem to
      the state of Linux-3.7.1 with exclusion of some bits:
      
      - the update is concentrated on NAND, no onenand or CFI/NOR/SPI
      flashes interfaces are updated EXCEPT for API changes.
      
      - new large NAND chips support is there, though some updates
      have got in Linux-3.8.-rc1, (which will follow on top of this patch).
      
      To produce this update I used tag v3.7.1 of linux-stable repository.
      
      The update was made using application of relevant patches,
      with changes relevant to U-Boot-only stuff sticked together
      to keep bisectability. Then all changes were grouped together
      to this patch.
      
      Signed-off-by: default avatarSergey Lapin <slapin@ossfans.org>
      [scottwood@freescale.com: some eccstrength and build fixes]
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
      dfe64e2c
  16. May 24, 2013
  17. May 10, 2013
  18. May 01, 2013
  19. Apr 11, 2013
  20. Apr 01, 2013
    • York Sun's avatar
      Consolidate bool type · 472d5460
      York Sun authored
      
      'bool' is defined in random places. This patch consolidates them into a
      single header file include/linux/types.h, using stdbool.h introduced in C99.
      
      All other #define, typedef and enum are removed. They are all consistent with
      true = 1, false = 0.
      
      Replace FALSE, False with false. Replace TRUE, True with true.
      Skip *.py, *.php, lib/* files.
      
      Signed-off-by: default avatarYork Sun <yorksun@freescale.com>
      472d5460
  21. Mar 04, 2013
Loading