- 论坛徽章:
- 0
|
2.6.13
在编译2.6.13的时候,发现在kgdb选项打开后,编译不能通过。提示信息如下:
kernel/kgdb.c:130: error: `NUMCRITREGBYTES' undeclared here (not in a function)
kernel/kgdb.c:131: error: storage size of `kgdb_fault_jmp_regs' isn't known
make[1]: *** [kernel/kgdb.o] Error 1
make: *** [kernel] Error 2
提示NUMCRITREGBYTES没有被定义,这个错误原来是以为2.6.13版本的kgdb patch少了core.patch。后面网上也有遇到类似的毛病,并不是少了core.patch。所以这边把patch贴出来给大家:
--- linux-2.6.13/include/asm-arm/kgdb.h 2006-01-24 06:21:57.644718496 +0530
+++ linux-2.6.13.orig/include/asm-arm/kgdb.h 2006-01-24 04:41:21.000000000 +0530
@@ -65,6 +65,7 @@
#define KGDB_MAX_NO_CPUS 1
#define BUFMAX 400
#define NUMREGBYTES (GDB_MAX_REGS
#define _R0 0
#define _R1 1
修改后,2.6.13版本的kernel已经可以正常编译通过,kgdb的测试也正常。
2.6.15.5
2.6.15.5kernel在选上nfs client的支持4个选项后,发现也会出现编译错误,提示信息如下:
> CC [M] fs/nfs/direct.o
> fs/nfs/direct.c: In function ‘nfs_get_user_pages’:
> fs/nfs/direct.c:110: warning: implicit declaration of function ‘nfs_free_user_pages’
> fs/nfs/direct.c: At top level:
> fs/nfs/direct.c:127: warning: conflicting types for ‘nfs_free_user_pages’
> fs/nfs/direct.c:127: error: static declaration of ‘nfs_free_user_pages’ follows non-static declaration
> fs/nfs/direct.c:110: error: previous implicit declaration of ‘nfs_free_user_pages’ was here
> make[3]: *** [fs/nfs/direct.o] Error 1
主要是函数nfs_get_user_pages声明上出问题,这边把这个patch也贴给大家,希望对大家有点帮助。
--- a/fs/nfs/direct.c
+++ b/fs/nfs/direct.c
@@ -57,6 +57,7 @@
#define NFSDBG_FACILITY NFSDBG_VFS
#define MAX_DIRECTIO_SIZE (4096UL
+static void nfs_free_user_pages(struct page **pages, int npages, int do_dirty);
static kmem_cache_t *nfs_direct_cachep;
@@ -107,6 +108,15 @@ nfs_get_user_pages(int rw, unsigned long
page_count, (rw == READ), 0,
*pages, NULL);
up_read(¤t->mm->mmap_sem);
+ /*
+ * If we got fewer pages than expected from get_user_pages(),
+ * the user buffer runs off the end of a mapping; return EFAULT.
+ */
+ if (result >= 0 && result
加上声明后,编译能够正常通过了。但是kernel在启动后,不能正常挂载到ramdisk上。注意这边只是选择了nfs client的支持。至于原因还希望有知道的人帮忙指导指导!!
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/40405/showart_388140.html |
|