1. 07 May, 2018 1 commit
    • Tom Rini's avatar
      SPDX: Convert all of our single license tags to Linux Kernel style · 83d290c5
      Tom Rini authored
      When U-Boot started using SPDX tags we were among the early adopters and
      there weren't a lot of other examples to borrow from.  So we picked the
      area of the file that usually had a full license text and replaced it
      with an appropriate SPDX-License-Identifier: entry.  Since then, the
      Linux Kernel has adopted SPDX tags and they place it as the very first
      line in a file (except where shebangs are used, then it's second line)
      and with slightly different comment styles than us.
      In part due to community overlap, in part due to better tag visibility
      and in part for other minor reasons, switch over to that style.
      This commit changes all instances where we have a single declared
      license in the tag as both the before and after are identical in tag
      contents.  There's also a few places where I found we did not have a tag
      and have introduced one.
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
  2. 16 Oct, 2017 2 commits
    • Vagrant Cascadian's avatar
      fs/jffs2/mini_inflate.c: use "static inline" instead of "inline" · c005f7ed
      Vagrant Cascadian authored
      This makes gcc no longer expect an out-of-line version of the
      functions being present elsewhere.
      This fixes a failure to build on several marvell targets with gcc-7 on
        https://bugs.debian.org/877963Signed-off-by: default avatarAdrian Bunk <bunk@debian.org>
      Signed-off-by: default avatarVagrant Cascadian <vagrant@debian.org>
    • Engling, Uwe's avatar
      jffs2: ECC corrected nand data is ignored · 41ba7f52
      Engling, Uwe authored
      I ran into a problem with the JFFS2 filesystem driver implemented in U-Boot.
      I've got a NAND device that has correctable ECC errors (corrected somewhere in mtd/nand/nand_base.c).
      The NAND driver tells the filesystem layer (jffs2_1pass.c) above that there occurred correctable ECC errors and returns with a "value > 0".
      The JFFS2 driver recognizes the corrected ECC errors as real error and skips this block because the only accepts a "return value == 0" as correct.
      This problem exists for over 8 years (I checked version 2010.09) so I'm a little bit worried that I interpreted something wrong or didn't get the whole context.
      Can someone confirm this bug (and the bugfix) in the u-boot jffs2 driver?
      There was a mail in 2012 that mentioned the same problem, but there was no patch:
      Sometime after this discussion the return value of nand_read() changed from -EUCLEAN as correctable ECC error to a positive value with the count of ECC corrected errors.
      With kind reguards,
      Uwe Engling
  3. 04 Oct, 2017 1 commit
    • Masahiro Yamada's avatar
      treewide: replace with error() with pr_err() · 9b643e31
      Masahiro Yamada authored
      U-Boot widely uses error() as a bit noisier variant of printf().
      This macro causes name conflict with the following line in
        # define __compiletime_error(message) __attribute__((error(message)))
      This prevents us from using __compiletime_error(), and makes it
      difficult to fully sync BUILD_BUG macros with Linux.  (Notice
      Linux's BUILD_BUG_ON_MSG is implemented by using compiletime_assert().)
      Let's convert error() into now treewide-available pr_err().
      Done with the help of Coccinelle, excluing tools/ directory.
      The semantic patch I used is as follows:
      // <smpl>
      // </smpl>
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
      [trini: Re-run Coccinelle]
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
  4. 12 Jul, 2017 1 commit
  5. 22 May, 2017 1 commit
  6. 23 Sep, 2016 1 commit
  7. 04 Jun, 2016 2 commits
  8. 01 Apr, 2016 1 commit
  9. 13 Aug, 2015 8 commits
    • Mark Tomlinson's avatar
      JFFS2: Use merge sort when parsing filesystem · 10d3ac34
      Mark Tomlinson authored
      When building the file system the existing code does an insertion into
      a linked list. It attempts to speed this up by keeping a pointer to
      where the last entry was inserted but it's still slow.
      Now the nodes are just inserted into the list without searching
      through for the correct place. This unsorted list is then sorted once
      using mergesort after all the entries have been added to the list.
      This speeds up the scanning of the flash file system considerably.
      Signed-off-by: default avatarMark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
    • Mark Tomlinson's avatar
      JFFS2: Use CLEANMARKER to reduce scanning time · 54a88384
      Mark Tomlinson authored
      If a sector has a CLEANMARKER at the beginning, it indicates that the
      entire sector has been erased. Therefore, if this is found, we can skip the
      entire block. This was not being done before this patch.
      The code now does the same as the kernel does when encountering a
      CLEANMARKER. It still checks that the next few words are FFFFFFFF, and if
      so, the block is assumed to be empty, and so is skipped.
      Signed-off-by: default avatarMark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
    • Mark Tomlinson's avatar
      JFFS2: Change scansize to match linux kernel · 081adef7
      Mark Tomlinson authored
      The scan code is similar to the linux kernel, but the kernel defines a much
      smaller size to scan through before deciding a sector is blank. Assuming
      that what is in the kernel is OK, make these two match.
      On its own, this change makes no difference to scanning of any sectors
      which have a clean marker at the beginning, since the entire sector is not
      Signed-off-by: default avatarMark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
    • Mark Tomlinson's avatar
      JFFS2: Optimize building lists during scan · c5b1940f
      Mark Tomlinson authored
      If the flash is slow, reading less from the flash into buffers makes
      the process faster.
      Signed-off-by: default avatarMark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
    • Mark Tomlinson's avatar
      JFFS2: Improve speed reading flash files · 2d6d93a2
      Mark Tomlinson authored
      jffs2_1pass_read_inode() would read the entire data for each node
      in the filesystem, regardless of whether it was part of the file
      to be loaded or not. By only reading the header data for an inode,
      and then reading the data only when it is found to be part of the
      file to be loaded, much copying of data is saved.
      jffs2_1pass_list_inodes() read each inode for every file in the
      directory into a buffer. By using NULL as a buffer pointer, NOR
      flash simply returns a pointer, and therefore avoids a memory copy.
      Signed-off-by: default avatarMark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
    • Mark Tomlinson's avatar
      JFFS2: Only list each directory entry once · 891224a5
      Mark Tomlinson authored
      If multiple versions of a file exist, only the most recent version
      should be used. The scheme to write 0 for the inode in older versions
      did not work, since this would have required writing to flash.
      The only time this caused an issue was listing a directory, where older
      versions of the file would still be seen. Since the directory entries
      are sorted, just look at the next entry in the list, and if it's the same
      move to that entry instead.
      Signed-off-by: default avatarMark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
    • Mark Tomlinson's avatar
      JFFS2: Speed up and fix comparison functions · 225cf4cd
      Mark Tomlinson authored
      Copying complete nodes from flash can be slow if the flash is slow
      to read. By only reading the data needed, the sorting operation can
      be made much faster.
      The directory entry comparison function also had a two bugs. First, it
      did not ensure the name was copied, so the name comparison may have
      been faulty (although it would have worked with NOR flash).  Second,
      setting the ino to zero to ignore the entry did not work, since this
      was either writing to a temporary buffer, or (for NOR flash) directly
      to flash. Either way, the change was not remembered.
      Signed-off-by: default avatarMark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
    • Mark Tomlinson's avatar
      JFFS2: Return early when file read not necessary · 3799b3f4
      Mark Tomlinson authored
      If a destination is not provided, jffs2_1pass_read_inode() only
      returns the length of the file. In this case, avoid reading all
      the data nodes, and return as soon as the length of the file is
      Signed-off-by: default avatarMark Tomlinson <mark.tomlinson@alliedtelesis.co.nz>
  10. 25 Sep, 2014 1 commit
  11. 11 Jun, 2014 1 commit
  12. 13 Dec, 2013 1 commit
  13. 17 Nov, 2013 1 commit
  14. 31 Oct, 2013 1 commit
  15. 24 Jul, 2013 1 commit
  16. 30 Apr, 2012 1 commit
  17. 09 Oct, 2011 1 commit
  18. 12 Apr, 2011 1 commit
  19. 17 Nov, 2010 1 commit
    • Sebastien Carlier's avatar
      Switch from archive libraries to partial linking · 6d8962e8
      Sebastien Carlier authored
      Before this commit, weak symbols were not overridden by non-weak symbols
      found in archive libraries when linking with recent versions of
      binutils.  As stated in the System V ABI, "the link editor does not
      extract archive members to resolve undefined weak symbols".
      This commit changes all Makefiles to use partial linking (ld -r) instead
      of creating library archives, which forces all symbols to participate in
      linking, allowing non-weak symbols to override weak symbols as intended.
      This approach is also used by Linux, from which the gmake function
      cmd_link_o_target (defined in config.mk and used in all Makefiles) is
      The name of each former library archive is preserved except for
      extensions which change from ".a" to ".o".  This commit updates
      references accordingly where needed, in particular in some linker
      This commit reveals board configurations that exclude some features but
      include source files that depend these disabled features in the build,
      resulting in undefined symbols.  Known such cases include:
      - disabling CMD_NET but not CMD_NFS;
      - enabling CONFIG_OF_LIBFDT but not CONFIG_QE.
      Signed-off-by: default avatarSebastien Carlier <sebastien.carlier@gmail.com>
  20. 31 Mar, 2010 1 commit
  21. 15 Jan, 2010 1 commit
    • Wolfgang Denk's avatar
      JFFS2: drop support for LZARI compression mode · f0983371
      Wolfgang Denk authored
      Support for LZARI compression mode was added based on a MTD CVS
      snapshot of March 13, 2005. However, fs/jffs2/compr_lzari.c contains
      contradictory licensing terms: the original copyright clause says "All
      rights reserved. Permission granted for non-commercial use.", but
      later reference to the file 'LICENCE' in the jffs2 directory was added
      which says GPL v2 or later.
      As no boards ever used LZARI compression, and this file is also not
      present in recent MTD code, we resolve this conflict by removing the
      conflicting file and references to it.
      Also copy the referenced but missing file 'LICENCE' from the current
      MTD source tree.
      Signed-off-by: default avatarWolfgang Denk <wd@denx.de>
  22. 21 Aug, 2009 1 commit
    • Ilya Yanok's avatar
      jffs2: some fixes to summary support · 8cf19b9f
      Ilya Yanok authored
      This patch fixes some issues with JFFS2 summary support in U-Boot.
      1/ Summary support made compilation configurable (as summary support
      considered expiremental even in Linux).
      2/ Summary code can do unaligned 16-bit and 32-bit memory accesses.
      We need to get data byte by byte to exclude data aborts.
      3/ Make summary scan in two passes so we can safely fall back to full
      scan if we found unsupported entry in the summary.
      Signed-off-by: default avatarIlya Yanok <yanok@emcraft.com>
  23. 18 Aug, 2009 1 commit
  24. 17 Jul, 2009 1 commit
    • Scott Wood's avatar
      Remove legacy NAND and disk on chip code. · be33b046
      Scott Wood authored
      Legacy NAND had been scheduled for removal.  Any boards that use this
      were already not building in the previous release due to an #error.
      The disk on chip code in common/cmd_doc.c relies on legacy NAND,
      and it has also been removed.  There is newer disk on chip code
      in drivers/mtd/nand; someone with access to hardware and sufficient
      time and motivation can try to get that working, but for now disk
      on chip is not supported.
      Signed-off-by: default avatarScott Wood <scottwood@freescale.com>
  25. 16 Dec, 2008 1 commit
  26. 09 Dec, 2008 5 commits
  27. 31 Oct, 2008 1 commit