zoukankan      html  css  js  c++  java
  • learning uboot distro design in am335x-evm board

    reference: 

      uboot_dir/doc/README.distro

    Linux distributions are faced with supporting a variety of boot mechanisms,
    environments or bootloaders (PC BIOS, EFI, U-Boot, Barebox, ...). This makes
    life complicated. Worse, bootloaders such as U-Boot have a configurable set
    of features, and each board chooses to enable a different set of features.
    Hence, distros typically need to have board-specific knowledge in order to
    set up a bootable system.

      That's why it happens.

    in am335x uboot-2018.01, the follow code,very detailed describe the boot priority;

      

    #define CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG

    #define BOOTENV_DEV_LEGACY_MMC(devtypeu, devtypel, instance)
    "bootcmd_" #devtypel #instance "="
    "setenv mmcdev " #instance"; "
    "setenv bootpart " #instance":2 ; "
    "run mmcboot"

    #define BOOTENV_DEV_NAME_LEGACY_MMC(devtypeu, devtypel, instance)
    #devtypel #instance " "

    #define BOOTENV_DEV_NAND(devtypeu, devtypel, instance)
    "bootcmd_" #devtypel "="
    "run nandboot"

    #define BOOTENV_DEV_NAME_NAND(devtypeu, devtypel, instance)
    #devtypel #instance " "

    #define BOOT_TARGET_DEVICES(func)
    func(MMC, mmc, 0)
    func(LEGACY_MMC, legacy_mmc, 0)
    func(MMC, mmc, 1)
    func(LEGACY_MMC, legacy_mmc, 1)
    func(NAND, nand, 0)
    func(PXE, pxe, na)
    func(DHCP, dhcp, na)

    #include <config_distro_bootcmd.h>

    Note: when pcb board support boot from emmc and sdcard.

             cpu hardware design default emmc bootup was priority  than sdcard bootup.

             we can design sdcard was priority bootup than emmc under distro framwork ;

        so we can make sdcard bootup to upgrade emmc system in normal bootup.

        through sdcard burn image to emmc stroage.

      

                 

  • 相关阅读:
    网络爬虫工具
    Redmine
    数据挖掘算法Analysis Services-基于SQL Server的数据挖掘
    数据挖掘和互联网广告-如何应对网盟广告作弊

    支付宝VIE的罪与罚
    迭代
    App如何推广秘籍之”渠道为王”
    Introducing Holographic Emulation
    Resources.Load加载文件返回null的原因
  • 原文地址:https://www.cnblogs.com/lianghong881018/p/10219937.html
Copyright © 2011-2022 走看看