欢迎来到天天文库
浏览记录
ID:16032634
大小:40.50 KB
页数:12页
时间:2018-08-07
《u-boot移植手册-hanson》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、u-boot移植手册-Hansonsourceinsighterror:unabletowritetotempfileforsavingoperation:修改内核与uboot中指定的MACH_TYPE:Kernel:include/asm-arm/mach-types.h#defineMACH_TYPE_SMDK2440A782Uboot:include/asm-arm/mach-types.h#defineMACH_TYPE_SMDK2440A782修改uboot的board/smdk2440a/smdk2440a.cgd->b
2、d->bi_arch_number=MACH_TYPE_SMDK2440A;启动过程:/u-boot.1.1.6/cpu/arm920t/start.S/u-boot.1.1.6/board/smdk2440a/lowlevel_init.S/u-boot.1.1.6/lib_arm/board.c----start_armboot()第二阶段C语言入口-/board/smdk2440a/smdk2440a.c--board_init()板级初始化MPLL机器类型ID等-/cpu/arm920t/s3c24x0/serial.c--serial_ini
3、t()串口初始化函数-/board/smdk2440a/smdk2440a.c--dram_init()检测系统的内存映射/u-boot.1.1.6/common/main.c-main_loop()为内核设置启动参数lib_arm/armlinux.c定义增加两个配置项标记就可以了:include/configs/smdk2440a.h/*fortag(s)totransfermessagetokernel*/#defineCONFIG_SETUP_MEMORY_TAGS1#defineCONFIG_CMDLINE_TAG1内核的启动:lib_arm
4、/armlinux.c-do_bootm_linux函数来启动内核theKernel(0,bd->bi_arch_number,bd->bi_boot_params);bd->bi_arch_number就是前面board_init设置的机器类型IDbd->bi_boot_params就是标记列表的开始地址移植步骤:(1)修改u-boot-1.1.6/Makefile添加:smdk2440a_config:unconfig@$(MKCONFIG)$(@:_config=)armarm920tsmdk2440aNULLs3c24x0(2)在board目录
5、下新建smdk2440a文件夹,即为BSP包可以直接拷贝board/QQ2440为board/smdk2440a(3)修改board/smdk2440a/Makefile,如下将COBJS:=smdk2440a.oflash.oboot_init.o中的flash.o去掉,即:COBJS:=smdk2440a.oboot_init.o(4)将board/smdk2440a/下的QQ2440.c改名为smdk2440a.c(5)拷贝include/configs/QQ2440.h并取名为include/configs/smdk2440a.h(6)修改bo
6、ard/smdk2440a/lowlevel_init.S//#defineB3_BWSCON(DW16+WAIT+UBLB)#defineB3_BWSCON(DW16)#defineB4_BWSCON(DW16+WAIT+UBLB)//HansonchangeforMini2440(7)修改board/smdk2440a/u-boot.ldsSECTIONS{.=0x00000000;.=ALIGN(4);.text:{cpu/arm920t/start.o(.text)board/smdk2440a/boot_init.o(.text)*(.tex
7、t)}(8)修改board/smdk2440a/smdk2440a.cDECLARE_GLOBAL_DATA_PTR;//增加宏,使得能够访问全局变量gb//时钟频率设置#defineS3C2440_MPLL_400MHZ0x7f021//((0x5c<<12)
8、(0x01<<4)
9、(0x01))#defineS3C2440_MPLL_200MHZ((0x5c<<12)
10、(0x01<<4)
11、(0x02))#defineS3C2440_MPLL_100MHZ((0x5c<<12)
12、(0x01<<4)
13、(0x03))#defineS3C2440_UPLL_
14、48MHZ((0x38<<12)
15、(0x02<<4)
16、(0x02))#defineS3C244
此文档下载收益归作者所有