在加入head.s後有這麼幾個鏈接錯誤:
'CONFIG_BANK_0' referenced from 'corea.dlb[head.doj]'
'CONFIG_BANK_1' referenced from 'corea.dlb[head.doj]'
'CONFIG_BANK_2' referenced from 'corea.dlb[head.doj]'
'CONFIG_BANK_3' referenced from 'corea.dlb[head.doj]'
查一下CONFIG_BANK_x的定義,它們的作用是EBIU的配置,在asm/mach/bf561.h中是這樣使用的:
#define AMBCTL0VAL ((CONFIG_BANK_1 << 16) | CONFIG_BANK_0)
#define AMBCTL1VAL ((CONFIG_BANK_3 << 16) | CONFIG_BANK_2)
而在head.s中配置EBIU時使用了這兩個值
/* Code for initializing Async memory banks */
p2.h = hi(EBIU_AMBCTL1);
p2.l = lo(EBIU_AMBCTL1);
r0.h = hi(AMBCTL1VAL);
r0.l = lo(AMBCTL1VAL);
[p2] = r0;
ssync;
p2.h = hi(EBIU_AMBCTL0);
p2.l = lo(EBIU_AMBCTL0);
r0.h = hi(AMBCTL0VAL);
r0.l = lo(AMBCTL0VAL);
[p2] = r0;
ssync;
p2.h = hi(EBIU_AMGCTL);
p2.l = lo(EBIU_AMGCTL);
r0 = AMGCTLVAL;
w[p2] = r0;
ssync;
顯然,編譯器找不到CONFIG_BANK_x的定義,想當然地以為它是一個整數,所以出錯,解決此錯誤的方法是在config.h中加上這樣的定義:
// EBIU_AMBCTL Control
#define CONFIG_BANK_0 0x7BB0
#define CONFIG_BANK_1 0x7BB0
#define CONFIG_BANK_2 0x7BB0
#define CONFIG_BANK_3 0xAAC3
#define CONFIG_C_AMBEN_ALL 1
當然,根據需要,它們可以配置為其它的值。
uclinux-2008R1-RC8(bf561)到VDSP5的移植(62)
uclinux-2008R1-RC8(bf561)到VDSP5的移植(61):KBUILD_MODNAME
uclinux-2008R1-RC8(bf561)到VDSP5的移植(60):current_text_addr
uclinux-2008R1-RC8(bf561)到VDSP5的移植(58)
uclinux-2008R1-RC8(bf561)到VDSP5的移植(57)
uclinux-2008R1-RC8(bf561)到VDSP5的移植(56):__grab_cache_page