u-boot版本u-boot-1.1.4,编译器版本3.2.2。
修改/cpu/pxa/下的config.mk:
PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu)
改成:
PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,$(call cc-option,-mabi=apcs-gnu))
不然编译会出错。
CPU是PXA255,所以以lubbock为模板。
(1)在目录board下添加目标板目录
cp -af lubbock dn255
mv lubbock/lubbock.c dn255/dn255.c
修改Makefile
#COBJS := lubbock.o pcmcia.o
COBJS := dn255.o pcmcia.o
(2)添加目标板配置头文件
cd include/configs/
cp lubbock.h dn255.h
修改include/configs/dn255.h
添加
#define CONFIG_EXTRA_ENV_SETTINGS "program_uboot=" \
"tftp 0xa2000000 u-boot.bin " \
"protect off 0x0 0x3ffff; " \
"erase 0x0 0x3ffff; " \
"cp.b 0xa0010000 0x0 0x40000; " //自定义环境变量
#define CONFIG_ZERO_BOOTDELAY_CHECK //否则设置bootdelay=0,将不能进入u-boot
修改GPIO配置
#define CFG_GPSR0_VAL 0x00048000
#define CFG_GPSR1_VAL 0x01020002
#define CFG_GPSR2_VAL 0x0001C000
#define CFG_GPCR0_VAL 0x00000000
#define CFG_GPCR1_VAL 0x00000000
#define CFG_GPCR2_VAL 0x00000000
#define CFG_GPDR0_VAL 0xC3808000
#define CFG_GPDR1_VAL 0xFC028382
#define CFG_GPDR2_VAL 0x001FFFFF
#define CFG_GAFR0_L_VAL 0x80000000
#define CFG_GAFR0_U_VAL 0xA55A8150
#define CFG_GAFR1_L_VAL 0x000A9559
#define CFG_GAFR1_U_VAL 0xAAA00008
#define CFG_GAFR2_L_VAL 0xAAAAAAAA
#define CFG_GAFR2_U_VAL 0x00000002
(3)修改Makefile
添加
dn255_config: unconfig
@$(MKCONFIG) $(@:_config=) arm pxa dn255
make dn255_config
make
阅读(1302) | 评论(0) | 转发(0) |