Linux内核编译2g内存,linux - Linux内核模块编译失败 - 堆栈内存溢出

我上一次的内核开发是在2.6版中进行的。现在,我尝试编译模块,并且在内核树之外进行编译时收到以下错误。

/bin/sh: 1: /home/blabla/workspace/kernel35/linux-3.5/scripts/recordmcount: not found

目标文件已正确创建,但是问题出在内核Makefile本身内,发生了一些变化,我没有更新吗?

我正在使用来自kernel.org的香草内核资源,而我已经做了

make oldconfig && make prepare

我发布了我正在使用的Makefile,这是内核模块的标准makefile

# Comment/uncomment the following line to disable/enable debugging

#DEBUG = y

# Add your debugging flag (or not) to CFLAGS

ifeq ($(DEBUG),y)

DEBFLAGS = -O -g -DBLABLA_DEBUG # "-O" is needed to expand inlines

else

DEBFLAGS = -O2

endif

ccflags-y += $(DEBFLAGS)

ccflags-y += -I..

ifneq ($(KERNELRELEASE),)

# call from kernel build system

obj-m := blabla.o

else

KERNELDIR ?= /home/blabla/workspace/kernel35/linux-3.5

PWD := $(shell pwd)

default:

$(MAKE) -C $(KERNELDIR) M=$(PWD) modules

endif

clean:

rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c .tmp_versions

depend .depend dep:

$(CC) $(CFLAGS) -M *.c > .depend

ifeq (.depend,$(wildcard .depend))

include .depend

endif

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值