请教:armlinux编译过程中遇到的问题
最终链接的时候报告有些函数找不到,如下有没有遇到这个问题的。
我完全按照陈渝他们那本书上的步骤来的,版本是Linux kernel 2.4.18-rmk7
cross 2.95.3
/usr/local/arm/2.95.3/bin/arm-linux-ld -p -X -T arch/arm/vmlinux.lds arch/arm/ker
nel/head-armv.o arch/arm/kernel/init_task.o init/main.o init/version.o \
--start-group \
arch/arm/kernel/kernel.o arch/arm/mm/mm.o arch/arm/mach-clps711x/clps711x
.o kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o \
drivers/serial/serial.o drivers/char/char.o drivers/block/block.o driver
s/misc/misc.o drivers/net/net.o drivers/media/media.o drivers/mtd/mtdlink.o drive
rs/video/video.o \
net/network.o \
arch/arm/lib/lib.a /home/liao/armlinux/linux/lib/lib.a \
--end-group \
-o vmlinux
drivers/char/char.o: In function `vt_ioctl':
drivers/char/char.o(.text+0xa598): undefined reference to `key_maps'
drivers/char/char.o(.text+0xa924): undefined reference to `key_maps'
drivers/char/char.o(.text+0xa92c): undefined reference to `keymap_count'
drivers/char/char.o(.text+0xa948): undefined reference to `func_table'
drivers/char/char.o(.text+0xa950): undefined reference to `funcbufleft'
drivers/char/char.o(.text+0xa954): undefined reference to `funcbufsize'
drivers/char/char.o(.text+0xa958): undefined reference to `funcbufptr'
drivers/char/char.o(.text+0xad4c): undefined reference to `func_table'
drivers/char/char.o(.text+0xad50): undefined reference to `funcbufsize'
drivers/char/char.o(.text+0xad54): undefined reference to `funcbufptr'
drivers/char/char.o(.text+0xad58): undefined reference to `func_buf'
drivers/char/char.o(.text+0xad5c): undefined reference to `funcbufleft'
drivers/char/char.o(.text+0xad60): undefined reference to `accent_table_size'
drivers/char/char.o(.text+0xad64): undefined reference to `accent_table'
drivers/char/char.o: In function `kbd_processkeycode':
drivers/char/char.o(.text+0x13cd0): undefined reference to `key_maps'
drivers/char/char.o: In function `handle_diacr':
drivers/char/char.o(.text+0x1446c): undefined reference to `accent_table_size'
drivers/char/char.o(.text+0x14470): undefined reference to `accent_table'
drivers/char/char.o: In function `do_fn':
drivers/char/char.o(.text+0x144c4): undefined reference to `func_table'
drivers/char/char.o: In function `compute_shiftstate':
drivers/char/char.o(.text+0x14888): undefined reference to `key_maps'
drivers/char/char.o: In function `do_slock':
drivers/char/char.o(.text+0x14a08): undefined reference to `key_maps'
make: *** Error 1
$ cd drivers 偶发现网上下载的代码在编译CLEP7312时初始配置可能有问题,字符部分的Makefile文件不对,总是没有key_maps,修改了一下,OK了。
后来编译Busybox的时候发现armlinux交叉编译的版本又不行,真是不幸。
把所有的东东搞定后启动,结果kernel执行死机,
没办法,gdb
发现
在 calibrate_delay 时挂起,应该是时钟中断没有搞好,好麻烦啦,最近太忙,没时间玩,有没有人一起看看
void __init calibrate_delay(void)
{
unsigned long ticks, loopbit;
int lps_precision = LPS_PREC;
loops_per_jiffy = (1<<12);
printk("Calibrating delay loop... ");
while (loops_per_jiffy <<= 1) {
/* wait for "start of" clock tick */
ticks = jiffies;
while (ticks == jiffies)
/* nothing */;
/* Go .. */
ticks = jiffies;
__delay(loops_per_jiffy);
ticks = jiffies - ticks;
if (ticks)
break;
}
/* Do a binary approximation to get loops_per_jiffy set to equal one clock
(up to lps_precision bits) */
loops_per_jiffy >>= 1;
loopbit = loops_per_jiffy;
while ( lps_precision-- && (loopbit >>= 1) ) {
loops_per_jiffy |= loopbit;
ticks = jiffies;
while (ticks == jiffies);
ticks = jiffies;
__delay(loops_per_jiffy);
if (jiffies != ticks) /* longer than 1 tick */
loops_per_jiffy &= ~loopbit;
}
/* Round the value and print it */
printk("%lu.%02lu BogoMIPS\n",
loops_per_jiffy/(500000/HZ),
(loops_per_jiffy/(5000/HZ)) % 100);
} 现在kernel运行起来了
出现了新的问题,挂不上root filesystem
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 1024 bind 1024)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
Root-NFS: No NFS server available, giving up.
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "" or 02:00
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on 02:00
页:
[1]