zoukankan      html  css  js  c++  java
  • 编译模块的时候出现的莫名奇怪的错误

     

    [root@qljt globalmem]# make -C /linux_kernel/linux-2.6.30/ M=/linux_drivers/06/globalmem/ modules

    make: Entering directory `/linux_kernel/linux-2.6.30'

    CC [M] /linux_drivers/06/globalmem/globalmem.o

    In file included from include/linux/gfp.h:4,

    from include/linux/kmod.h:22,

    from include/linux/module.h:13,

    from /linux_drivers/06/globalmem/globalmem.c:7:

    include/linux/mmzone.h:18:26: error: linux/bounds.h: No such file or directory

    include/linux/mmzone.h:256:5: warning: "MAX_NR_ZONES" is not defined

    In file included from include/linux/gfp.h:4,

    from include/linux/kmod.h:22,

    from include/linux/module.h:13,

    from /linux_drivers/06/globalmem/globalmem.c:7:

    include/linux/mmzone.h:290: error: 'MAX_NR_ZONES' undeclared here (not in a function)

    In file included from /linux_drivers/06/globalmem/globalmem.c:11:

    include/linux/mm.h:446:63: warning: "NR_PAGEFLAGS" is not defined

    include/linux/mm.h:494:62: warning: "NR_PAGEFLAGS" is not defined

    /linux_drivers/06/globalmem/globalmem.c: In function 'globalmem_read':

    /linux_drivers/06/globalmem/globalmem.c:89: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'

    /linux_drivers/06/globalmem/globalmem.c: In function 'globalmem_write':

    /linux_drivers/06/globalmem/globalmem.c:118: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'

    make[1]: *** [/linux_drivers/06/globalmem/globalmem.o] Error 1

    make: *** [_module_/linux_drivers/06/globalmem] Error 2

    make: Leaving directory `/linux_kernel/linux-2.6.30

    解决的办法:

    到你内核的根目录下执行

    #make zImage

    #make prepare

     

    本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/qiaoliang328/archive/2010/01/14/5191063.aspx

  • 相关阅读:
    openstack对接VMware浅析
    一键部署 Docker Datacenter ---简化docker数据中心安装步骤
    基于Kubernetes(k8s)网络方案演进
    kubernetes1.4 基础篇:Learn Kubernetes 1.4 by 6 steps
    使用Netsil监控Kubernetes上的微服务
    Kubernetes(k8s)容器运行时(CRI)
    在Openstack上创建并访问Kubernetes集群
    html5--canvas绘制简单的时钟
    html5——canva 绘图1简单图形
    html5 兼容火狐 ev的事件
  • 原文地址:https://www.cnblogs.com/feisky/p/1746884.html
Copyright © 2011-2022 走看看