見1系統(tǒng)移植實驗了解u boot代碼結構及方法_第1頁
見1系統(tǒng)移植實驗了解u boot代碼結構及方法_第2頁
見1系統(tǒng)移植實驗了解u boot代碼結構及方法_第3頁
見1系統(tǒng)移植實驗了解u boot代碼結構及方法_第4頁
見1系統(tǒng)移植實驗了解u boot代碼結構及方法_第5頁
已閱讀5頁,還剩13頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

u-boot1、ubuntu10.103FS_4412平臺(EXYNOS我們可以在下面這個上的和以前任一版本的$$tarxvfu-boot-$cdu-boot-$vim 把ifeqifeqPILEPILE?=arm-none-linux-CPUexynosu-bootCPUboard配置修改,$$cp-rfboard/samsung/origen/$mvboard/samsung/fs4412/origen.c$vimorigen.o為$cpinclude/configs/origen.h$vim#defineCONFIG_SYS_PROMPT"ORIGEN為#defineCONFIG_SYS_PROMPT"fs4412#defineCONFIG_IDENT_STRINGfor為#defineCONFIG_IDENT_STRINGfor Origenarmarmv7origenSamsungfs4412armarmv7fs4412samsung$make$make$make$u-boot.binu-bootarch/arm/cpu/armv7/start.S134#if#ifldrr0,=0x11000c40@GPK2_7led2ldrr1,[r0]bicr1,r1,#0xforrr1,r1,#0xstrr1,[r0]ldrr0,=0x11000c44movr1,#0xffstrr1,添加三星exynosu-boot,$cpsdfuse_qu-boot-2013.01- 注:sdfuse_q三星提供的加$cpCodeSign4SecureBootu-boot-2013.01- $vim sdfuse_q的編譯 $(OBJCOPY)${OBJCFLAGS}-Obinary$<@split@split-b14336u-boot.binbl2@+make-Csdfuse_q/@#cpu-boot.binu-boot-4212.bin@#cpu-boot.binu-boot-4412.bin@rm$cpbuild.shu-boot- od777u-boot-2013.01/$注:build.sh方式完成自動添加,u-boot_fs4412.binldrldr @useiRomstackin在beq #if#if1/*forclosewatchdog/*PS-Holdhighldrr0,cldrr1,orrr1,r1,#0x300strr1,[r0] ldrr1,=0x0strr1,/*ClearMASK_WDT_RESET_REQUESTldrr0,cldrr1,=0x00strr1,[r0]uart_asm_initr1,[r0,ldrr0, r1,r2,r1,[r0,r1,r2,r1,[r0,trustzone bl bl $ $vim structexynos4_gpio_part2*gpio2;#ifdef#ifdef#defineEXYNOS4412_SROMC_BASE#defineDM9000_Tacs(0x1)#defineDM9000_Tcos(0x1)#defineDM9000_Tacc(0x5)#defineDM9000_Tcoh(0x1)#defineDM9000_Tah(0xC)#defineDM9000_Tacp(0x9)#defineDM9000_PMCstructexynos_sromc{unsignedintbw;unsignedintbc[6];s5p_config_sromc()-selecttheproperSROMCBankandconfigurebandwidthcontrolandbankcontrol -srom_bw_conf-SMCBandwitdhregconfigurationsrom_bc_conf-SMCBankControlregconfigurationvoidexynos_config_sromc(u32srom_bank,u32srom_bw_conf,u32{unsignedintstructexynos_sromc*srom=(structexynos_sromc/*ConfigureSMC_BWregistertohandleproperSROMCbank*/tmp=srom->bw;tmp&=~(0xF<<(srom_bank*4));tmp|=srom_bw_conf;srom->bw=/*ConfigureSMC_BCregister*/srom->bc[srom_bank]=srom_bc_conf;}staticvoid{unsignedintunsignedcharsmc_bank_num=1;unsignedint unsignedint /*gpioconfiguration , + , +/*16Bitbuswidth , + + , + + , + +smc_bw_conf&=smc_bw_conf|=(1<<7)|(1<<6)|(1<<5)|(1<<4);smc_bc_conf=((DM9000_Tacs<<28)|(DM9000_Tcos<<|(DM9000_Tacc<<|(DM9000_Tcoh<<|(DM9000_Tah<<|(DM9000_Tacp<<|} gd->bd->bi_boot_paramsPHYS_SDRAM_10x100UL);#ifdef#ifdef#ifdef#ifdefCONFIG_CMD_NETintboard_eth_init(bd_t{intrc=#ifdefrc=dm9000_initialize(bis);return}2$vim #undef為#define#undef 為#define /*CONFIG_H#ifdefCONFIG_CMD_NET#defineCONFIG_DRIVER_DM9000#define #defineDM9000_IO#define#define1(CONFIG_DM9000_BASE+4)#define#define#define#define#define$ 192.168.9.120 1pinmux.o$vim 在#include #include#include#include在#ifdef u32u32sclk_mmc4;/*clocksourceforemmccontroller*/#defineREGMY(x)(*((volatileu32*)(x)))#defineCLK_SRC_FSYSREGMY(EXYNOS4_CLOCK_BASE+#defineCLK_DIV_FSYS3REGMY(EXYNOS4_CLOCK_BASE+int{u32tmp;u32clock;u32i;/*setup_hsmmc_clock/*MMC4clocksrc=SCLKMPLLtmp=CLK_SRC_FSYS&CLK_SRC_FSYS=tmp|;/*MMC4clockdivtmp=CLK_DIV_FSYS3&~(0x0000ff0f);clock=get_pll_clk(MPLL)/ for(i=0;i<=0xf;i++){if(sclk_mmc4<=160){CLK_DIV_FSYS3=tmp|}}emmcdbg("[mjdbg]sclk_mmc4:%dMHZ;mmc_ratio:%d\n",sclk_mmc4,i);sclk_mmc4*= MMC4EMMCGPIO*GPK0[0]GPK0[1]GPK0[2] );//SD4CLK/SD4CMDpull-);//cdnsettobe);//cdnpull-down);//cdnoutput0toshutdownthe );//cdnsettobe );//cdnoutput , (0x00003FF0, (0x00002AAA,#ifdef , (0x00003FC0,#ifdefUSE_MMC4}intboard_mmc_init(bd_t*bis)intintboard_mmc_init(bd_t{inti,#ifdefCONFIG_EMMCerr=emmc_init();return}#ifdef#ifdef#includeintchk_bootdev(void)//mjforbootdevice{charrun_cmd[100];structmmc*mmc;intboot_dev=0;intcmp_off=0x10;ulong mmc=if(mmc=={printf("ThereisnoeMMCcard,BootingdeviceisSDcard\n");boot_dev=1;return}start_blk=(24*1024/MOVI_BLKSIZE);t=0x10;mand(run_cmd,sprintf(runcmd,"mmc0%lx%lx%lx",CFG_PHY_KERNEL_BAS mand(run_cmd,0);/*switchmmctonormalparitition*/sprintf(run_cmd,"emmcclose0");mand(run_cmd,return}}intboard_late_init{intboot_dev=0;charboot_cmd[100];boot_dev=chk_bootdev();{printf("\n\nCheckingBootMode...}return}2$$ cmd_movi.c$ cmd_mmc.c$cpcmd_mmc_fdisk.c$ 在 $$$cp$$cpmmc.h$cpmovi.h$cps5p_mshc.h$vim #defineCONFIG_EVT1 #defineCONFIG_EVT1 /*EVT1*/#ifdefCONFIG_EVT1#defineCONFIG_EMMC44_CH4//eMMC44_CH4(OMPIN[5:1]=#ifdefCONFIG_SDMMC_CH2#defineCONFIG_S3C_HSMMC#undefDEBUG_S3C_HSMMC#defineUSE_MMC2#ifdefCONFIG_EMMC44_CH4#defineCONFIG_S5P_MSHC#defineCONFIG_EMMC #define/*#defineCONFIG_EMMC_8Bit*/#defineCONFIG_EMMC_EMERGENCY/*#defineemmcdbg(fmt,args.)printf(fmt,##args)*///foremmc#defineemmcdbg(fmt,args.#endif/*end

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經(jīng)權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論