1. 15 Mar, 2017 5 commits
    • Alexander Pockes's avatar
      2a243058
    • Alexander Pockes's avatar
      cgtumx6: add falcon mode implementation · cddc3f79
      Alexander Pockes authored
      cddc3f79
    • Alexander Pockes's avatar
      a9ecf0b6
    • Alexander Pockes's avatar
      cgtqmx6eval: add falcon mode implementation · 16278856
      Alexander Pockes authored
      Based on the results of Alexander Schuller's Bachelor Thesis (i.mx6 quickboot)
      
      Overview
      --------
      A standard u-boot build consists of two image files: uboot.img and SPL.
      The bootrom is loading the SPL image which performs some basic/initial
      configuraion tasks. Afterwards, SPL loads the uboot.img which loads device-tree
      and kernel image files.
      Falcon mode means, enabling SPL to load/execute the kernel image directly.
      This accelerates boot time but requires special u-boot configuration as well as
      special (u)SD-card/EMMC setup.
      
      congatec's falcon mode implementation enables SPL to...
      -> load the kernel image directly from an arbitrary MMC device (uSD, SD, EMMC)
      -> select the boot target (uboot.img/kernel) dependent on GPIO-level or
         environment-settings
      -> load uboot.img stored at arbitrary MMC device by definition of
         <CONFIG_CGT_FALCON_MODE> and undefining <CONFIG_CGT_FALCON_MODE_OS_BOOT>.
         Please note, the environment has to be stored at SPI-flash.
      
      Notes
      -----
      -> MMC device must be specified by definition of <CONFIG_CGT_FALCON_MODE_USD>,
         <CONFIG_CGT_FALCON_MODE_SD> or <CONFIG_CGT_FALCON_MODE_EMMC>
      -> Boot target selection via GPIO...
          - is enabled by definition of <CONFIG_CGT_FALCON_MODE_IMG_SEL_GPIO>
          - is customizable via <BOOT_MODE_BTN>
      -> Boot target selection via environment variable...
          - is enabled by definition of <CONFIG_CGT_FALCON_MODE_IMG_SEL_ENV>
          - can be combined with selection via GPIO
      
      Standard behaviour
      ------------------
      Preconditions:
          -> Proper MMC setup
              - argument file stored at sector 0x800
              - kernel image (uImage) stored at sector 0x1000
              - ext3 root filesystem starting at sector 0x8000 (32768)
          -> Falcon mode enabled <SPL> and <uboot.img> are stored at SPI-flash
      
      a) Boot target selection via GPIO ENABLED:
          SPL tries to load kernel/uboot.img image from MMC device, if there is no
          boot image found, SPL loads uboot.img from SPI-flash.
          Press <BOOT_MODE_BTN> in order to force execution of uboot.img.
      
      b) Boot target selection via environment ENABLED:
          (I) <boot_os> is NOT set to <1>
              SPL tries to load uboot.img from MMC, if there is no uboot.img
              found, SPL loads uboot.img from SPI-flash.
              In order to load the kernel directly, the environtment variable
              <boot_os> must be set to <1>
          (II) <boot_os> is set to <1>
              SPL tries to load kernel image from MMC, if there is no kernel image
              found, SPL loads uboot.img from SPI-flash.
      
      c) Both boot target selections are ENABLED:
          (I) <boot_os> is NOT set to <1>
              SPL tries to load uboot.img from MMC, if there is no uboot.img found,
              SPL loads uboot.img from SPI-flash.
          (II) <boot_os> is set to <1>
              SPL tries to load kernelimage from MMC, if there is no boot
              image found, SPL loads uboot.img from SPI-flash.
              Press <BOOT_MODE_BTN> in order to force execution of uboot.img.
      
      d) Both boot target selections are DISABLED:
          SPL tries to load kernel/uboot.img image from MMC device, if there is no
          boot image found, SPL loads uboot.img from SPI-flash.
      
      Important changes at cgtqmx6eval specific code:
      -----------------------------------------------
      - boot order changed: MMC (1), SPI (2) by overloading board_boot_order()
      - SPL: selection of image type to boot (uboot.img/kernel) via GPIO or/and
        environment variable <boot_os> by overloading spl_start_uboot()
      
      Minor changes at common/imx6-related u-boot code required:
      ----------------------------------------------------------
      - arch/arm/imx-common/spl.c: introducing spl_boot_mode_mmc()
          spl_boot_mode() queries OTP register in order to determine the (boot)
          device, the kernel has to be loaded. The underlying assumption is, that
          SPL and u-boot.img/kernel image are always located at the same device.
          Because of the limited size of the SPI-flash (4 MB), the kernel image
          can't be stored at SPI-flash in most cases. spl_boot_mode_mmc()
          determines the boot device - device, where uboot.img/kernel image is
          stored - by evaluating the variable boot_device, refering to the
          specified boot priority list (spl_boot_list[]).
      - include/spl.h: spl_boot_mode_mmc() prototype added
      - common/spl/spl_mmc.c:
          calling spl_boot_mode_mmc() instead of spl_boot_mode() dependent on
          <CONFIG_CGT_FALCON_MODE>
      16278856
    • Alexander Pockes's avatar
  2. 11 Oct, 2016 2 commits
    • Alejandro de-Cabo-Garcia's avatar
      arm: config: enforce -fno-pic for gcc · cf874aa4
      Alejandro de-Cabo-Garcia authored
      Android's tool chain enable the -mandroid at default.
      This option will enable the -fpic, which cause uboot compilation
      failure:
      "
       LD      u-boot
       u-boot contains unexpected relocations: R_ARM_ABS32
       R_ARM_RELATIVE
      "
      
      In my testcase, arm-linux-androideabi-gcc-4.9 internally
      enables '-fpic', so when compiling code, there will be
      relocation entries using type R_ARM_GOT_BREL and .got
      section. When linking all the built-in.o using ld, there
      will be R_ARM_ABS32 relocation entry and .got section
      in the final u-boot elf image. This can not be handled
      by u-boot, since u-boot only expects R_ARM_RELATIVE
      relocation entry.
      arm-poky-linux-gnueabi-gcc-4.9 default does not enable '-fpic',
      so there is not .got section and R_ARM_GOT_BREL in built-in.o.
      And in the final u-boot elf image, all relocation entries are
      R_ARM_RELATIVE.
      
      we can pass '-fno-pic' to xxx-gcc to disable pic. whether
      the toolchain internally enables or disables pic, '-fno-pic'
      can work well.
      Signed-off-by: 's avatarPeng Fan <peng.fan@nxp.com>
      Signed-off-by: Alejandro de-Cabo-Garcia's avatarAlex dc <alejandro.de-cabo-garcia@congatec.com>
      cf874aa4
    • Alejandro de-Cabo-Garcia's avatar
      MA-7330-1 change tool chain to gcc4.9 for android kernel and uboot · 91dd1aab
      Alejandro de-Cabo-Garcia authored
      uboot will fail when loader zImage which is larger than 9M.
      Increasing CONFIG_SYS_BOOTM_LEN from 8 MB to 16 MB is necessary to
      support uncompressing images larger than 8 MB.
      Signed-off-by: 's avatarZhang Sanshan <b51434@freescale.com>
      Signed-off-by: Alejandro de-Cabo-Garcia's avatarAlex dc <alejandro.de-cabo-garcia@congatec.com>
      91dd1aab
  3. 26 Sep, 2016 1 commit
  4. 22 Sep, 2016 1 commit
  5. 05 Sep, 2016 2 commits
  6. 28 Jul, 2016 4 commits
  7. 08 Jul, 2016 2 commits
    • Michael Schanz's avatar
      cgtqmx6eval: change console prompt · bbcec9e2
      Michael Schanz authored
      Change console prompt from "CGT-QMX6-QUAD" to more generic "CGT-QMX6"
      because this entry is used for all congatec QMX6 variants (including
      single, dual lite, dual and quad core variants).
      Signed-off-by: Michael Schanz's avatarMichael Schanz <michael.schanz@congatec.com>
      bbcec9e2
    • Alexander Pockes's avatar
      cgtqmx6eval/cgtumx6: add defconfig files for manufacturing bootloader · cb2617e3
      Alexander Pockes authored
      Adds the default configuration files in order to build the manufacturing bootloaders
      for congatec i.MX6 based products (conga-QMX6, conga-UMX6).
      
      In order to build a suitable manufacturing bootloader for a specific partnumber, it is
      essential to choose the correct configuration file depending on product, memory size,
      memory frequency and bus width.
      
      For instance, if it's intended to build a manufacturing bootloader for conga-QMX6/DCL-1G eMMC4
      (with congatec part number 016101) the board parameters are:
      
      product: QMX6 (i.e. the target board is cgtqmx6eval)
      memorysize: 1GByte (i.e. 1024 MByte)
      memory buswidth: 64bit (the congatec i.MX6 solo core products are connected via a 32bit memory interface, all others are using 64bit)
      memory frequency: 400MHz, respectively 396MHz (i.MX6 solo and dual core lite operates at 396MHz, i.MX6 dual and quad core at 528MHz)
      
      Therefore, the correct configuration file for part number 016101 would be: cgtqmx6eval_mfg_1024_64_400_defconfig
      
      Respectively, the correct configuration file for part number 016212 (conga-UMX6/iDC-1G eMMC4) would be: cgtumx6_mfg_1024_64_528_defconfig
      Please contact the congatec technical support if you are unsure how to determine the correct configuration file.
      cb2617e3
  8. 29 Jun, 2016 7 commits
  9. 23 Jun, 2016 3 commits
  10. 23 Mar, 2016 2 commits
  11. 15 Mar, 2016 1 commit
  12. 25 Jan, 2016 10 commits