Your SlideShare is downloading. ×
Mango64 u boot 업데이트 하기
Mango64 u boot 업데이트 하기
Mango64 u boot 업데이트 하기
Mango64 u boot 업데이트 하기
Mango64 u boot 업데이트 하기
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Mango64 u boot 업데이트 하기

1,996

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,996
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
19
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. (mango64:s3c6410& u-boot) u-boot 업그레이드 하기-1<br />삼성에서 받은 u-boot를 소스를 망고64보드에 맞게 끔 수정을 해 보겠습니다. <br />SD card인식이 됩니다. <br />다른 기능은 포팅을 하면서 살펴 보겠습니다. <br />우선 <br />소스 압축을 풀어서, 소스에 가장 Top 디렉토리에 있는 Makefile에서 <br />아래와 같이 추가를 합니다. <br />mango6410_config : unconfig @$(MKCONFIG) $(@:_config=) arm s3c64xx mango6410 crztech s3c6410 @echo " TEXT_BASE = 0x57e00000" > $(obj)board/crztech/mango6410/config.mk<br />참조자료는 <br />http://cafe.naver.com/embeddedcrazyboys/7000<br />디렉토리를 추가 및 아래와 같이 copy합니다. <br />mkdir -p board/crztech/mango6410cp -a board/samsung/smdk6410/* board/crztech/mango6410/mv board/crztech/mango6410/smdk6410.c mango6410.cmkdir board/crztech/commoncp -a board/samsung/common/* board/crztech/common/<br />“board/crztech/mango6410/Makefile”을 열어서 수정<br />OBJS := mango6410.o flash.o<br />“vi board/crztech/mango6410/u-boot.lds” 수정<br />board/crztech/mango6410/lowlevel_init.o (.text)<br />“common/cmd_onenand.c” 수정 (망고6410은 onenand가 없으므로)<br />COBJS-$(CONFIG_CMD_ONENAND) += cmd_onenand.o<br />그리고, “include/configs”에 mango6410.h을 만듭니다. 만드는 방법 <br />cp include/configs/smdk6410.h include/configs/mango6410.h<br />“vi board/crztech/mango6410/mango6410.c” 파일 수정<br />/* ------------------------------------------------------------------------- */#define SMSC9220_Tacs(0x0)// 0clkaddress set-up#define SMSC9220_Tcos(0x4)// 4clkchip selection set-up#define SMSC9220_Tacc(0xE)// 14clkaccess cycle#define SMSC9220_Tcoh(0x1)// 1clkchip selection hold#define SMSC9220_Tah(0x4)// 4clkaddress holding time#define SMSC9220_Tacp(0x6)// 6clkpage mode access cycle#define SMSC9220_PMC(0x0)// normal(1data)page mode configurationstatic inline void delay(unsigned long loops){__asm__ volatile (" 1: " " subs %0, %1, #1 " " bne 1b" :" =r" (loops):" 0" (loops));}/* * Miscellaneous platform dependent initialisations *//* mango64 use SROM bank 4 for Ethernet */#define SMSC9220_SROM_BANK_4static void smsc9220_pre_init(void){#if defined(SMSC9220_SROM_BANK_1)SROM_BW_REG &= ~(0xf << 4);SROM_BW_REG |= (1<<7) | (1<<6) | (1<<4);SROM_BC1_REG = ((SMSC9220_Tacs<<28)+(SMSC9220_Tcos<<24)+(SMSC9220_Tacc<<16)+(SMSC9220_Tcoh<<12)+(SMSC9220_Tah<<8)+(SMSC9220_Tacp<<4)+(SMSC9220_PMC));#elif defined(SMSC9220_SROM_BANK_2)SROM_BW_REG &= ~(0xf << 8);SROM_BW_REG |= (1<<11) | (1<<10) | (1<<8);SROM_BC2_REG = ((SMSC9220_Tacs<<28)+(SMSC9220_Tcos<<24)+(SMSC9220_Tacc<<16)+(SMSC9220_Tcoh<<12)+(SMSC9220_Tah<<8)+(SMSC9220_Tacp<<4)+(SMSC9220_PMC));#elif defined(SMSC9220_SROM_BANK_3)SROM_BW_REG &= ~(0xf << 12);SROM_BW_REG |= (1<<15) | (1<<14) | (1<<12);SROM_BC3_REG = ((SMSC9220_Tacs<<28)+(SMSC9220_Tcos<<24)+(SMSC9220_Tacc<<16)+(SMSC9220_Tcoh<<12)+(SMSC9220_Tah<<8)+(SMSC9220_Tacp<<4)+(SMSC9220_PMC));#elif defined(SMSC9220_SROM_BANK_4)SROM_BW_REG &= ~(0xf << 16);SROM_BW_REG |= (1<<19) | (1<<18) | (1<<16);SROM_BC4_REG = ((SMSC9220_Tacs<<28)+(SMSC9220_Tcos<<24)+(SMSC9220_Tacc<<16)+(SMSC9220_Tcoh<<12)+(SMSC9220_Tah<<8)+(SMSC9220_Tacp<<4)+(SMSC9220_PMC));#elif defined(SMSC9220_SROM_BANK_5)SROM_BW_REG &= ~(0xf << 20);SROM_BW_REG |= (1<<23) | (1<<22) | (1<<20);SROM_BC5_REG = ((SMSC9220_Tacs<<28)+(SMSC9220_Tcos<<24)+(SMSC9220_Tacc<<16)+(SMSC9220_Tcoh<<12)+(SMSC9220_Tah<<8)+(SMSC9220_Tacp<<4)+(SMSC9220_PMC));#endif}int board_init(void){DECLARE_GLOBAL_DATA_PTR;smsc9220_pre_init();gd->bd->bi_arch_number = MACH_TYPE;gd->bd->bi_boot_params = (PHYS_SDRAM_1+0x100);#if 0icache_enable();dcache_enable();#endifreturn 0;}<br />망고6410(S3C6410) 하드웨어 맞게 “include/configs/mango6410.h”을 수정을 합니다. <br />수정 부분은 <br />//#define CONFIG_ENABLE_MMU#define CONFIG_SERIAL2 1/* we use SERIAL 1 on mango6410 */#define USBD_DOWN_ADDR0x50000000//#undef CONFIG_NET_MULTI#define CONFIG_DRIVER_SMC911X1 // MANGO64#ifdef CONFIG_DRIVER_SMC911X#define CONFIG_DRIVER_SMC911X_16_BIT#undefCONFIG_DRIVER_CS8900#define CONFIG_DRIVER_SMC911X_BASE0x30000300#define CFG_PROMPT" MANGO64 # " /* Monitor Command Prompt*/#define CONFIG_IDENT_STRING" for MANGO6410" //#define CFG_NAND_HWECC#undefCFG_NAND_FLASH_BBT//#define CONFIG_NAND_BL1_8BIT_ECC#define USE_MMC1//#define CONFIG_CMD_ONENAND//#define DEBUG_S3C_HSMMC<br />USB OTG로 다운로드 기능 추가<br />자세한 내용은 Mango64 & U-boot)DNW(usb-otg)로 이미지 다운로드 하기 를 참조하세요<br />수정한 소스만 넣어 보겠습니다. <br />“./cpu/s3c64xx/usbd-otg-hs.c” 파일에 아래와 같이 수정을 합니다. <br />void s3c_usb_init_phy(void){writel(0x0, S3C_OTG_PHYPWR); //if 48Mhz Oscillator is used //writel(0x20, S3C_OTG_PHYCTRL); //if 48Mhz X-tal is used writel(0x00, S3C_OTG_PHYCTRL);writel(0x1, S3C_OTG_RSTCON);udelay(10);writel(0x0, S3C_OTG_RSTCON);udelay(10);}int s3c_usbctl_init(void){u8 ucMode;DBG_SETUP0(" USB Control Init " );OTHERS_REG |= (1<<16);/*unmask usb signal *///by crazyboy begin writel(readl(GPNPUD) & ~(3<<12), GPNPUD); // GPN6 Pull-up/dn disable - (00 - disable) writel((readl(GPNCON) & ~(3<<12)) | (1<<12), GPNCON); //set GPN6 to output (01) writel(readl(GPNDAT) | (1<<6), GPNDAT); //set GPN6 to high//by crazyboy end<br />수정 후 컴파일 해서 Target에 올려보겠습니다.<br />컴파일 순서 <br />#make mango6410_config#make <br />원본 소스 다운로드<br />업데이트 된 소스 다운로드 <br />두개의 소스를 비교하면, 재미있을 것입니다. <br />푸우님이 작성한 u-boot 포팅하기를 참조하시면, 많은 도움이 될 것입니다. <br />(ARM S3C6410) 망고64에 u-boot 포팅하기 (1) HYPERLINK " http://cafe.naver.com/embeddedcrazyboys/5271(ARM" o " http://cafe.naver.com/embeddedcrazyboys/5271(ARM" S3C6410) 망고64에 u-boot 포팅하기 (2)(ARM S3C6410) 망고64에 u-boot 포팅하기 (3)(ARM S3C6410) 망고64에 u-boot 포팅하기 (4)(ARM S3C6410) 망고64에 u-boot 포팅하기 (5) HYPERLINK " http://cafe.naver.com/embeddedcrazyboys/5307" o " http://cafe.naver.com/embeddedcrazyboys/5307" (ARM S3C6410) 망고64에 u-boot 포팅하기 (6) - 최종<br />

×