• 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
Name
Last commit
Last update
..
init Loading commit data...
spl Loading commit data...
Kconfig Loading commit data...
Makefile Loading commit data...
autoboot.c Loading commit data...
bedbug.c Loading commit data...
board_f.c Loading commit data...
board_info.c Loading commit data...
board_r.c Loading commit data...
bootm.c Loading commit data...
bootm_os.c Loading commit data...
bootretry.c Loading commit data...
bootstage.c Loading commit data...
bouncebuf.c Loading commit data...
cli.c Loading commit data...
cli_hush.c Loading commit data...
cli_readline.c Loading commit data...
cli_simple.c Loading commit data...
cmd_aes.c Loading commit data...
cmd_ambapp.c Loading commit data...
cmd_armflash.c Loading commit data...
cmd_bdinfo.c Loading commit data...
cmd_bedbug.c Loading commit data...
cmd_blob.c Loading commit data...
cmd_bmp.c Loading commit data...
cmd_boot.c Loading commit data...
cmd_bootldr.c Loading commit data...
cmd_bootm.c Loading commit data...
cmd_bootmenu.c Loading commit data...
cmd_bootstage.c Loading commit data...
cmd_cache.c Loading commit data...
cmd_cbfs.c Loading commit data...
cmd_clk.c Loading commit data...
cmd_console.c Loading commit data...
cmd_cplbinfo.c Loading commit data...
cmd_cpu.c Loading commit data...
cmd_cramfs.c Loading commit data...
cmd_dataflash_mmc_mux.c Loading commit data...
cmd_date.c Loading commit data...
cmd_dcr.c Loading commit data...
cmd_demo.c Loading commit data...
cmd_dfu.c Loading commit data...
cmd_diag.c Loading commit data...
cmd_disk.c Loading commit data...
cmd_display.c Loading commit data...
cmd_dtt.c Loading commit data...
cmd_echo.c Loading commit data...
cmd_eeprom.c Loading commit data...
cmd_efi.c Loading commit data...
cmd_elf.c Loading commit data...
cmd_ethsw.c Loading commit data...
cmd_exit.c Loading commit data...
cmd_ext2.c Loading commit data...
cmd_ext4.c Loading commit data...
cmd_fastboot.c Loading commit data...
cmd_fat.c Loading commit data...
cmd_fdc.c Loading commit data...
cmd_fdt.c Loading commit data...
cmd_fitupd.c Loading commit data...
cmd_flash.c Loading commit data...
cmd_fpga.c Loading commit data...
cmd_fpgad.c Loading commit data...
cmd_fs.c Loading commit data...
cmd_fs_uuid.c Loading commit data...
cmd_fuse.c Loading commit data...
cmd_gettime.c Loading commit data...
cmd_gpio.c Loading commit data...
cmd_gpt.c Loading commit data...
cmd_hash.c Loading commit data...
cmd_help.c Loading commit data...
cmd_host.c Loading commit data...
cmd_i2c.c Loading commit data...
cmd_ide.c Loading commit data...
cmd_immap.c Loading commit data...
cmd_ini.c Loading commit data...
cmd_io.c Loading commit data...
cmd_iotrace.c Loading commit data...
cmd_irq.c Loading commit data...
cmd_itest.c Loading commit data...
cmd_jffs2.c Loading commit data...
cmd_ldrinfo.c Loading commit data...
cmd_led.c Loading commit data...
cmd_license.c Loading commit data...
cmd_load.c Loading commit data...
cmd_log.c Loading commit data...
cmd_lzmadec.c Loading commit data...
cmd_mac.c Loading commit data...
cmd_md5sum.c Loading commit data...
cmd_mdio.c Loading commit data...
cmd_mem.c Loading commit data...
cmd_mfsl.c Loading commit data...
cmd_mii.c Loading commit data...
cmd_misc.c Loading commit data...
cmd_mmc.c Loading commit data...
cmd_mmc_spi.c Loading commit data...
cmd_mp.c Loading commit data...
cmd_mtdparts.c Loading commit data...
cmd_nand.c Loading commit data...
cmd_net.c Loading commit data...
cmd_nvedit.c Loading commit data...
cmd_onenand.c Loading commit data...
cmd_otp.c Loading commit data...
cmd_part.c Loading commit data...
cmd_pci.c Loading commit data...
cmd_pcmcia.c Loading commit data...
cmd_pmic.c Loading commit data...
cmd_portio.c Loading commit data...
cmd_pxe.c Loading commit data...
cmd_read.c Loading commit data...
cmd_reginfo.c Loading commit data...
cmd_regulator.c Loading commit data...
cmd_reiser.c Loading commit data...
cmd_remoteproc.c Loading commit data...
cmd_sata.c Loading commit data...
cmd_scsi.c Loading commit data...
cmd_setexpr.c Loading commit data...
cmd_sf.c Loading commit data...
cmd_sha1sum.c Loading commit data...
cmd_softswitch.c Loading commit data...
cmd_sound.c Loading commit data...
cmd_source.c Loading commit data...
cmd_spi.c Loading commit data...
cmd_spibootldr.c Loading commit data...
cmd_spl.c Loading commit data...
cmd_strings.c Loading commit data...
cmd_terminal.c Loading commit data...
cmd_test.c Loading commit data...
cmd_thordown.c Loading commit data...
cmd_time.c Loading commit data...
cmd_tpm.c Loading commit data...
cmd_tpm_test.c Loading commit data...
cmd_trace.c Loading commit data...
cmd_tsi148.c Loading commit data...
cmd_ubi.c Loading commit data...
cmd_ubifs.c Loading commit data...
cmd_universe.c Loading commit data...
cmd_unzip.c Loading commit data...
cmd_usb.c Loading commit data...
cmd_usb_mass_storage.c Loading commit data...
cmd_version.c Loading commit data...
cmd_ximg.c Loading commit data...
cmd_yaffs2.c Loading commit data...
cmd_zfs.c Loading commit data...
cmd_zip.c Loading commit data...
command.c Loading commit data...
console.c Loading commit data...
cros_ec.c Loading commit data...
ddr_spd.c Loading commit data...
dlmalloc.c Loading commit data...
dlmalloc.src Loading commit data...
edid.c Loading commit data...
env_attr.c Loading commit data...
env_callback.c Loading commit data...
env_common.c Loading commit data...
env_dataflash.c Loading commit data...
env_eeprom.c Loading commit data...
env_embedded.c Loading commit data...
env_fat.c Loading commit data...
env_flags.c Loading commit data...
env_flash.c Loading commit data...
env_mmc.c Loading commit data...
env_nand.c Loading commit data...
env_nowhere.c Loading commit data...
env_nvram.c Loading commit data...
env_onenand.c Loading commit data...
env_remote.c Loading commit data...
env_sf.c Loading commit data...
env_ubi.c Loading commit data...
exports.c Loading commit data...
fb_mmc.c Loading commit data...
fb_nand.c Loading commit data...
fdt_support.c Loading commit data...
flash.c Loading commit data...
hash.c Loading commit data...
hwconfig.c Loading commit data...
image-android.c Loading commit data...
image-fdt.c Loading commit data...
image-fit.c Loading commit data...
image-sig.c Loading commit data...
image-sparse.c Loading commit data...
image.c Loading commit data...
iomux.c Loading commit data...
iotrace.c Loading commit data...
kallsyms.c Loading commit data...
kgdb.c Loading commit data...
kgdb_stubs.c Loading commit data...
lcd.c Loading commit data...
lcd_console.c Loading commit data...
lcd_console_rotation.c Loading commit data...
lcd_simplefb.c Loading commit data...
lynxkdi.c Loading commit data...
main.c Loading commit data...
malloc_simple.c Loading commit data...
memsize.c Loading commit data...
menu.c Loading commit data...
miiphyutil.c Loading commit data...
modem.c Loading commit data...
s_record.c Loading commit data...
splash.c Loading commit data...
splash_source.c Loading commit data...
stdio.c Loading commit data...
system_map.c Loading commit data...
update.c Loading commit data...
usb.c Loading commit data...
usb_hub.c Loading commit data...
usb_kbd.c Loading commit data...
usb_storage.c Loading commit data...
xyzModem.c Loading commit data...