이것저것/My_Work

[v210] Eboot size 조절

우담바라 2012. 5. 15. 20:31

 

v210에 부트로고를 올리려니 eboot 사이즈가 작게 잡혀 빌드가 잘되지 않거나, 이미지 다운로드가 잘 되지 않았다

 

그래서 512kb => 2mb로 수정하였다.

 

 

※ 수정 포인트

1. Eboot rom size 설정 수정

[ ...\EBOOT\eboot.bib]

...

;//kys2012.0515// 512KB ->2MB
;    EBOOT    87700000  00080000  RAMIMAGE
     EBOOT    87580000  00200000  RAMIMAGE

     RAM     87800000  00700000  RAM

     DISPLAY  87F00000  00100000  RESERVED

...

;//kys2012.0515// 512KB ->2MB

; ROMSTART = 87700000
 ROMSTART = 87580000

 

// ROMSIZE  = 00080000
 ROMSIZE  = 00200000

 

2. Eboot loader.h eboot size 설정 수정

[...\EBOOT\loader.h]

...

//kys2012.0515// 512KB ->2MB
//#define EBOOT_RAM_IMAGE_BASE        0x87700000
#define EBOOT_RAM_IMAGE_BASE        0x87580000
//#define EBOOT_RAM_IMAGE_SIZE        0x00080000
#define EBOOT_RAM_IMAGE_SIZE        0x00200000

...

 

 

3. setpldr에서 호출할 eboot size 설정 수정 

[...\\STEPLDR\main.c]

#define LOAD_IMAGE_BYTE_COUNT       (IMAGE_EBOOT_SIZE)

▼▼▼

[...\platform\common\src\soc\S5PV210_SEC_V1\OAL\INC\image_cfg.h]

 

// Eboot

//kys2012.0515// 512KB ->2MB
//#define IMAGE_EBOOT_OFFSET                      (0x07700000)
#define IMAGE_EBOOT_OFFSET                      (0x07580000)
#define IMAGE_EBOOT_PA_START                    (DRAM_BASE_PA_START+IMAGE_EBOOT_OFFSET)
#define IMAGE_EBOOT_CA_START                    (DRAM_BASE_CA_START+IMAGE_EBOOT_OFFSET)
//#define IMAGE_EBOOT_SIZE                      (0x080000)       // 512KB
#define IMAGE_EBOOT_SIZE                        (0x00200000)       // 2MB

 

 

이상 수정 될 부분은 다 끝난 줄알았으나....

 

추가 수정

[ ...\platform\SMDKV210\SRC\INC\image_cfg.inc ]

...

;------------------------------------------------------------------------------
; Eboot
;------------------------------------------------------------------------------
;IMAGE_EBOOT_OFFSET EQU (0x07700000)
IMAGE_EBOOT_OFFSET        EQU    (0x07580000)
IMAGE_EBOOT_PA_START      EQU    (DRAM_BASE_PA_START+IMAGE_EBOOT_OFFSET)
IMAGE_EBOOT_CA_START      EQU    (DRAM_BASE_CA_START+IMAGE_EBOOT_OFFSET)
IMAGE_EBOOT_UA_START      EQU    (DRAM_BASE_UA_START+IMAGE_EBOOT_OFFSET)

;------------------------------------------------------------------------------
...

 

그리고, bl1에서 usb로 다운 받은 이미지의 시작 주소를 강제 코딩

 

void OTGDEV_HandleEvent_BulkOut(UINT32 fifoCntByte)
{
 if (oOtgDev.m_eOpMode == USB_CPU)
 {
     DWORD i;
        PDWORD pTemp=NULL;
//  OEMWriteDebugString("fifoCntByte : %x\n", fifoCntByte);g_pDownPt
//  OTGDEV_RdPktBulkOutEp((UINT8 *)g_pDownPt, fifoCntByte);


        if((dwImgAddr == 0) && (dwImgSize == 0))
        {
            Inp32(bulkOut_EP_FIFO, dwImgAddr);
            Inp32(bulkOut_EP_FIFO, dwImgSize);

 

dwImgSize=0x200000;

dwImgAddr=0x47580000;


 

            for(i=8; i<fifoCntByte;)
            {
                pTemp = (PDWORD)(dwImgAddr + dwXferCnt);
                Inp32(bulkOut_EP_FIFO, *pTemp);
                dwXferCnt += 4;
                i += 4;
            }
        }
        else
        {

            for(i=0; i<fifoCntByte;)
            {
                pTemp = (PDWORD)(dwImgAddr + dwXferCnt);
                //EdbgOutputDebugString("pTemp 0x%X, 0x%X, 0x%X\r\n", pTemp, dwImgAddr, dwXferCnt);

                Inp32(bulkOut_EP_FIFO, *pTemp);
                dwXferCnt += 4;
                i += 4;
            }

            if(dwXferCnt == dwImgSize)
            {
                bDoneLoading = TRUE;
            }
        }

  OTGDEV_SetOutEpXferSize(EP_TYPE_BULK, 1, fifoCntByte);

  Outp32(bulkOut_DOEPCTL, 1<<31|1<<26|2<<18|1<<15|oOtgDev.m_uBulkOutEPMaxPktSize<<0);  

//ep3 enable, clear nak, bulk, usb active, next ep3, max pkt 64


 }
}

 

'이것저것 > My_Work' 카테고리의 다른 글

dll dependent 체크  (0) 2013.06.14
Self_안드로이드  (0) 2013.03.13
[Android] - "u-boot" 명령추가  (0) 2012.02.24
[ MFC] - 파일 복사와 진행율 보기  (0) 2010.12.03
Power Management  (0) 2009.08.27