S5PV210 SD卡启动流程分析

 0. 在S5PV210.dat允许SD启动
1. 初始化并进入到OEMPlatformInit
 1.1 SDHC_INIT(SDMMCDRV.c)
  全局变量初始化->内存映射->...
 1.2   BP_Init
  Sets up locations for various objects in memory provided by caller
  全部变量g_FlashInfo、g_partStateTable...等初始化。 
 1.3 FMD_GetInfo
  Provides information on the NAND flash
  pFlashInfo等全局变量初始化
 1.4 TOC_Read(NAND.CPP)
  Try to retrieve TOC (and Boot config) from boot media
  1.4.1  TOC_Init
   1.4.1.1  BootConfigInit
       Set default boot configuration values,g_pBootCfg初始化
  1.4.2  TOC_Write
 1.5 SetCPUClock()
 1.6 OEMPMICInit()
 1.7 InitializeDisplay()
2. OEMPreDownload
 根据g_bDownloadImage返回跳转或下载
3 DownloadImage
 根据第2步返回的为下载进入此函数
 3.1 GetImageType
  从内存中获得前七个字节(假设SD卡中的NK.BIN已经搬入内存中)
 3.2  根据3.1得到的类型进行下载
  3.2.1 DownloadSignedBin(其中一个是Bin类型)
   3.2.1.1 memset()
      Clearing memory ensures no garbage between sparse .bin records, so that
         our post-download checksum will be accurate.
   3.2..1.2 OEMIsFlashAddr
       判断是否为Flash地址
   3.2.1.3  OEMStartEraseFlash
      擦除Flash
   3.2.1.4 OEMReadData (RANDOM_SEED_LENGTH, (LPBYTE) &packetData.bRandomSeed)
      read random seed at start of signed .bin file
   3.2.1.5  OEMReadData (...) Download signed packets (.bin records or record chunks)
   3.2.1.6  OEMReadData (...) Read the .bin record header
   ... ...
   3.2.1.7   ComputeChecksum
   3.2.1.8   WriteImageToFlash(FLASH.c)
        3.2.1.8.1   OEMWriteFlash(FLASH.c)->WriteFlashNK
          3.2.1.8.1.1 (NOSDBOOT)
        FMD_ReadSector(NOSDBOOT)
        BP_LowLevelFormat
        BP_OpenPartition
        BP_GetPartitionInfo
        EraseBlocks
        FMD_WriteSector
        BP_SetDataPointer
        BP_WriteData
        TOC_Write
      3.2.1.8.1.2 (SDBOOT)
        FMD_ReadSector(NOSDBOOT)
        BP_LowLevelFormat
        BP_OpenPartition
        BP_GetPartitionInfo
        EraseBlocks
        FMD_WriteSector
        BP_OpenPartition
        BP_Storage_Init
        BP_OpenStoragePartition
        SDHC_WRITE
        BP_SetDataPointer
        BP_WriteData
        TOC_Write
4.  根据第2步得到的类型进行跳转
  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

zhengmeifu

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值