1. 08 Dec, 2015 1 commit
    • Hans de Goede's avatar
      script_extractor: Remove unnecessary size argument · 55eec70c
      Hans de Goede authored
      
      
      The script_extractor tool before this commit used to take a size argument
      on the cmdline, but the passed in size was only used in some places not
      in others. Leading to a segfault if the passed in argument was not
      exactly the same as SCRIPT_SIZE.
      
      This commit drops the argument, so that script_extractor will just
      work.
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      55eec70c
  2. 07 Dec, 2015 5 commits
  3. 24 Nov, 2015 3 commits
  4. 19 Nov, 2015 2 commits
  5. 27 Oct, 2015 1 commit
  6. 23 Oct, 2015 3 commits
    • Ian Campbell's avatar
      Makefile: Add an install rule · 0f691878
      Ian Campbell authored
      
      
      Allow for separate installation of tools and target-tools, to aid in packaging.
      
      By default everything the tools are installed into /usr/local/bin but this can
      be overridden using PREFIX= or BINDIR= on the make invocation.
      
      To enable this it was necessary to split fex2bin and bin2fex out from $(TOOLS)
      into $(FEXC_LINKS), because install(1) does not seem to have a mode which
      preserves symlinks so it needs to be done separately.
      
      Supports DESTDIR to allow for convenient installation into a staging dir for
      distro packaging convenience.
      Signed-off-by: default avatarIan Campbell <ijc@hellion.org.uk>
      Acked-by: default avatarPeter Korsgaard <peter@korsgaard.com>
      0f691878
    • Ian Campbell's avatar
      Makefile: Split out target tools rules · bf4ec9a0
      Ian Campbell authored
      
      
      Target tools are those which are only useful on a target sunxi system (i.e.
      which probe hardware etc).
      
      Currently this is only sunxi-pio. At first I thought sunxi-nand-part might be
      included, but I think that is useful on NAND images as well as actual devices.
      
      This will allow for easier packaging, by letting packagers only include the
      target tools when building for a suitable ARM architecture.
      Signed-off-by: default avatarIan Campbell <ijc@hellion.org.uk>
      Acked-by: default avatarPeter Korsgaard <peter@korsgaard.com>
      bf4ec9a0
    • Ian Campbell's avatar
      Makefile: Prefix most tools with sunxi- · f1cb74d8
      Ian Campbell authored
      
      
      Several of the tools here are too generic and/or short for distro packaging
      purposes (which like to try and avoid naming clashes in $PATH). Prefix the
      following with "sunxi-":
        - fexc
        - bootinfo
        - fel
        - pio
        - meminfo
      
      Do not prefix any of the fel "payloads" or raw binaries since they would not
      normally be installed in $PATH.
      
      Do not prefix "phoenix_info", since "phoenix" already seems like an appropriate
      prefix for this particular tool.
      
      Update in-tree callers, README and .gitignore accordingly.
      Signed-off-by: default avatarIan Campbell <ijc@hellion.org.uk>
      Acked-by: default avatarPeter Korsgaard <peter@korsgaard.com>
      f1cb74d8
  7. 03 Oct, 2015 3 commits
  8. 13 Sep, 2015 2 commits
  9. 08 Sep, 2015 7 commits
  10. 29 Aug, 2015 2 commits
  11. 19 Aug, 2015 4 commits
  12. 18 Aug, 2015 1 commit
    • Ian Campbell's avatar
      fel-to-spl-thunk.S: Only depend on binutils. · 4079221f
      Ian Campbell authored
      
      
      A cross-binutils is generally a bit easier to get hold of, and in particular
      binutils-none-eabi (and binutils-arm-linux-gnueabi{,hf}) are available in
      Debian Jessie while the equivalent cross gcc is not.
      
      The only reason gcc/cpp are required are to strip the embedded Ruby code out
      before handing to the assembler, we can achieve the same by opening a multiline
      comment around the ruby instead. Care needs to be taken not to close the
      comment prematurely hence "*/" is written in the one place it is used as
      "\x2a/" (i.e. encoding the * in hex). Having done this we can pass the .S file
      directly to the cross-as.
      
      There is no change to the resulting header file.
      Signed-off-by: default avatarIan Campbell <ijc@hellion.org.uk>
      Acked-by: default avatarSiarhei Siamashka <siarhei.siamashka@gmail.com>
      4079221f
  13. 01 Aug, 2015 1 commit
  14. 26 Feb, 2015 5 commits
    • Hans de Goede's avatar
      b80e7ce7
    • Siarhei Siamashka's avatar
      fel: Set the AUXCR L2EN bit for A10/A13 · f6a1382b
      Siarhei Siamashka authored
      
      
      This is needed to have feature parity with the normal boot mode,
      where the L2EN bit in the CP15 Auxiliary Control Register is set
      by the BROM code right from the start. And if L2EN is not set,
      then the Linux system ends up booted with the L2 cache disabled.
      
      According to the Cortex-A8 TRM, the L2 cache is only enabled when
      both L2EN bit and the C bit from the CP15 Control Register c1 are
      set. Because the BROM does not set the C bit, this change should
      not affect the functionality of the FEL mode in any way.
      Signed-off-by: default avatarSiarhei Siamashka <siarhei.siamashka@gmail.com>
      Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
      f6a1382b
    • Siarhei Siamashka's avatar
      fel: Fix USB timeout on large transfers · eae30b2a
      Siarhei Siamashka authored
      
      
      Trying to use oversized initrd files (20 MB or more) can fail
      with the "libusb usb_bulk_send error -1" error message.
      
      To address this problem, we can split the transfer into smaller
      chunks and the problem disappears. Effectively, this is a revert
      of the older "fel: Increase timeout to 60 seconds instead of
      splitting bulk transfers" commmit.
      Signed-off-by: default avatarSiarhei Siamashka <siarhei.siamashka@gmail.com>
      Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
      eae30b2a
    • Siarhei Siamashka's avatar
      fel: Faster USB transfers via 'fel write' to DRAM · e4b3da2b
      Siarhei Siamashka authored
      
      
      By adjusting the MMU translation table before restoring it
      and by enabling the I-cache with branch prediction, we can
      improve performance. The DRAM area (0x40000000-0xC0000000)
      becomes write-combine mapped and the BROM code becomes mapped
      as cacheable memory. This is expected to be safe and should
      not cause any coherency problems.
      
      Transfer speed improvements:
      
      A10  : ~330 KB/s -> ~600 KB/s
      A13  : ~330 KB/s -> ~600 KB/s
      A20  : ~320 KB/s -> ~960 KB/s
      A31s : ~250 KB/s -> ~510 KB/s
      Signed-off-by: default avatarSiarhei Siamashka <siarhei.siamashka@gmail.com>
      Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
      e4b3da2b
    • Siarhei Siamashka's avatar
      fel: Disable MMU to get more SRAM space and fix A13 problems · dc6c801c
      Siarhei Siamashka authored
      
      
      The FEL BROM code has the MMU enabled for some reason (while
      I-cache and D-cache are disabled). Most likely the intention was
      to get a somewhat better performance. Everything is mapped as
      TEXCB=00000 (strongly ordered), except for the 0x00000000 (SRAM)
      and 0xFFF00000 (BROM) sections, which are mapped as TEXCB=00100
      (normal uncached memory).
      
      This becomes a problem for the A13 SoC, because it has less SRAM
      than the other chips. A13 stores the MMU addresses translation
      table at 0x8000 and uses up 16 KiB of the SRAM space there (while
      the A10, A20 and A31s keep the MMU table in the secure SRAM at
      0x20000). And because the 'spl' command needs space for backing
      up the FEL stacks, it was clashing with the MMU table.
      
      The solution is simple. We just backup the addresses translation
      table and disable the MMU before running the SPL. And then restore
      it back to the original state. This fixes problems on A13.
      
      Re-enabling the MMU in the end is only necessary to avoid performance
      losses. For example, the transfer speed of the 'fel write' command
      on A20 would drop from ~320 KB/s to ~260 KB/s without MMU.
      Signed-off-by: default avatarSiarhei Siamashka <siarhei.siamashka@gmail.com>
      Acked-by: default avatarHans de Goede <hdegoede@redhat.com>
      dc6c801c