wince6.0 更新开机logo 的方法

 一样的格式,这样不需要可以共用Eboot.bin实验平台:WinCE6.0+Android6410 +4.3实现该方法的首要任务就是生成特定格式的Logo.bin文件的格式这里就不再细说了,可以参考李大为的《Windows CEBMP下面从格式角度说说Logo.binBMP、在bin);
       3字节的Logo.bin(当然也可以为其开辟单独的内存空间,不过需要配置bib字节的Logo.bin(本人是0x00100000 = 1M,如果确实超过1M、在往后应该就是映像的一条一条的记录Record部分:4字节的记录长度dwRecLen,最后是记录的真实数据。这里为了简单,把所有的BMP,校验和则是所有图片数据的和,记录的真实数据指的就是前面提到的BMP、这一部很重要,容易被忽视。就是在dwRecAddr=0
               1 文件,为 Flash 定义这些宏的目的是为了让程序的可读性更强一些,其实在代码中,你可以直接操作为 EBOOT_FRAMEBUFFER_UA_START ,但是这样做目的就变的模糊一些了。下面定义的 IMAGE_TYPE_LOGO 宏会在 OEMVerifyMemory 函数中使用。
Eboot 函数,如下:
 
                EdbgOutputDebugString ( "F) Low-level format the Smart Media card\r\n"); 
    //add by jazka 2011.09.05 
    //-----------------------------start--------------------------------- 
    EdbgOutputDebugString ( "G) DOWNLOAD Logo now(USB)\r\n"); 
    //----------------------------- end --------------------------------- 
                EdbgOutputDebugString ( "L) LAUNCH existing Boot Media image\r\n"); 
                EdbgOutputDebugString ( "R) Read Configuration \r\n"); 
                EdbgOutputDebugString ( "U) DOWNLOAD image now(USB)\r\n"); 
                EdbgOutputDebugString ( "W) Write Configuration Right Now\r\n"); 
                EdbgOutputDebugString ( "\r\nEnter your selection: "); 

                while (! ( ( (KeySelect >= '0') && (KeySelect <= '9') ) || 
                                     ( (KeySelect == 'A') || (KeySelect == 'a') ) || 
                                     ( (KeySelect == 'B') || (KeySelect == 'b') ) || 
                                     ( (KeySelect == 'C') || (KeySelect == 'c') ) || 
                                     ( (KeySelect == 'D') || (KeySelect == 'd') ) || 
                                     ( (KeySelect == 'E') || (KeySelect == 'e') ) || 
                                     ( (KeySelect == 'F') || (KeySelect == 'f') ) || 
             ( (KeySelect == 'G') || (KeySelect == 'g') ) ||                 //add by jazak 2011.09.05 
                                     ( (KeySelect == 'L') || (KeySelect == 'l') ) || 
                                     ( (KeySelect == 'R') || (KeySelect == 'r') ) || 
                                     ( (KeySelect == 'U') || (KeySelect == 'u') ) || 
                                     ( (KeySelect == 'W') || (KeySelect == 'w') ) )) 
                { 
                        KeySelect = OEMReadDebugByte(); 
                }
    //add by jazka 2011.09.05 
    //--------------------------start----------------------------- 
    case 'G': 
    case 'g': 
      //modify by jazka 2011.09.14 for download logo.bin 
      //++++++++++++++++++++++start+++++++++++++++++++++++++    
      g_bUSBDownload = TRUE; 
      bDownload = TRUE; 
      goto MENU_DONE; 
      //++++++++++++++++++++++end+++++++++++++++++++++++++    
      break; 
    //-------------------------- end -----------------------------
下载接收,然后写入Nand Flash目录下的内容拷贝了过来。之所以不直接采用’U’、修改Logo.bin这里需要强调一点的是添加的这部分代码,放置的位置,从原来的代码可以看出,依次是stepldr.bin,他们的存放地址和大小都是依次递增的,而Logo.bin的操作代码之后,否则会执行到其他的if函数,添加将Logo.bin
//add by jazka 2011.09.14 for logo.bin 
//---------------------------------------------start-------------------------------------------------------- 
case IMAGE_TYPE_LOGO: 
  if (!WriteLogoToBootMedia(dwImageStart, dwImageLength, dwLaunchAddr)) 
  { 
    OALMSG(OAL_ERROR, (TEXT("ERROR: OEMLaunch: Failed to store image to Smart Media.\r\n"))); 
    goto CleanUp; 
  } 
  OALMSG(TRUE, (TEXT("INFO: Logo image stored to Smart Media.    Please Reboot.    Halting...\r\n"))); 
  while(1) 
  { 
    // Wait... 
  } 
  break; 
//---------------------------------------------start--------------------------------------------------------
将图片数据写入到Flash函数,启动时调用函数DisplayLogoFromBootMedia中的一样,就不再重新上代码了。
       6DisplayLogoFromBootMedia       OK修改开机<span lang="EN-US" times="" new="" roman';="" mso-font-kerning:="" 1.0pt;="" mso-fareast-font-family:="" 宋体;="" mso-ansi-language:="" en-us;="" mso-fareast-language:="" zh-cn;="" mso-bidi-language:="" ar-sa"="" style="padding: 0px; margin: 0px; font-size: 10.5pt;">Logo<span times="" new="" roman';="" mso-font-kerning:="" 1.0pt;="" mso-hansi-font-family:="" 'times="" mso-ansi-language:="" en-us;="" mso-fareast-language:="" zh-cn;="" mso-bidi-language:="" ar-sa;="" mso-bidi-font-family:="" roman'"="" style="padding: 0px; margin: 0px; font-size: 10.5pt; font-family: 宋体;">方法就介绍完了,当然肯定还有很多方法,毕竟高手如云啊。

本文出自 “飞雪待剑” 博客,请务必保留此出处http://jazka.blog.51cto.com/809003/665721

你可能感兴趣的:(wince6.0 更新开机logo 的方法)