野火电子论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 4446|回复: 7

[求助] linux内核编译不通过

[复制链接]
发表于 2023-3-9 12:49:40 | 显示全部楼层 |阅读模式
编译时出现以下提示:
/****************************************/



root@dzw-virtual-machine:/usr/ebf_linux_kernel_6ull_depth1# make
HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  YACC    scripts/kconfig/zconf.tab.c
  LEX     scripts/kconfig/zconf.lex.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --syncconfig Kconfig
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[2]: *** [scripts/kconfig/Makefile:69:syncconfig] 错误 1
make[1]: *** [Makefile:539:syncconfig] 错误 2
make: 重新执行 makefile“include/config/auto.conf”失败。
  SYSTBL  arch/x86/include/generated/asm/syscalls_32.h
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_32.h
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_64.h
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_x32.h
  HOSTCC  arch/x86/tools/relocs_32.o
  HOSTCC  arch/x86/tools/relocs_64.o
  HOSTCC  arch/x86/tools/relocs_common.o
  HOSTLD  arch/x86/tools/relocs
Error: kernelrelease not valid - run 'make prepare' to update it
  UPD     include/config/kernel.release
  WRAP    arch/x86/include/generated/uapi/asm/bpf_perf_event.h
  WRAP    arch/x86/include/generated/uapi/asm/poll.h
  WRAP    arch/x86/include/generated/asm/dma-contiguous.h
  WRAP    arch/x86/include/generated/asm/early_ioremap.h
  WRAP    arch/x86/include/generated/asm/export.h
  WRAP    arch/x86/include/generated/asm/mcs_spinlock.h
  WRAP    arch/x86/include/generated/asm/mm-arch-hooks.h
  UPD     include/generated/uapi/linux/version.h
  UPD     include/generated/utsrelease.h
  CC      kernel/bounds.s
In file included from <command-line>:
././include/linux/kconfig.h:5:10: fatal error: generated/autoconf.h: 没有那个文件或目录
    5 | #include <generated/autoconf.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Kbuild:21:kernel/bounds.s] 错误 1
make: *** [Makefile:1102:prepare0] 错误 2
root@dzw-virtual-machine:/usr/ebf_linux_kernel_6ull_depth1# make prepare
scripts/kconfig/conf  --syncconfig Kconfig
***
*** Configuration file ".config" not found!
***
*** Please run some configurator (e.g. "make oldconfig" or
*** "make menuconfig" or "make xconfig").
***
make[2]: *** [scripts/kconfig/Makefile:69:syncconfig] 错误 1
make[1]: *** [Makefile:539:syncconfig] 错误 2
make: 重新执行 makefile“include/config/auto.conf”失败。
Error: kernelrelease not valid - run 'make prepare' to update it
  CC      kernel/bounds.s
In file included from <command-line>:
././include/linux/kconfig.h:5:10: fatal error: generated/autoconf.h: 没有那个文件或目录
    5 | #include <generated/autoconf.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Kbuild:21:kernel/bounds.s] 错误 1
make: *** [Makefile:1102:prepare0] 错误 2



回复

使用道具 举报

发表于 2023-3-10 08:47:13 | 显示全部楼层
file ".config" not found! 没有配置文件
回复 支持 反对

使用道具 举报

 楼主| 发表于 2023-3-10 15:05:27 | 显示全部楼层
H781997429 发表于 2023-3-10 08:47
file ".config" not found! 没有配置文件

我是直接git clone下来的喔
回复 支持 反对

使用道具 举报

发表于 2023-3-11 10:10:45 | 显示全部楼层
激昂旋律 发表于 2023-3-10 15:05
我是直接git clone下来的喔

要先应用配置文件再编译 make ARCH=arm npi_v7_defconfig
回复 支持 反对

使用道具 举报

发表于 2023-3-11 10:11:09 | 显示全部楼层
回复 支持 反对

使用道具 举报

 楼主| 发表于 2023-3-11 22:10:14 | 显示全部楼层
H781997429 发表于 2023-3-11 10:11
具体流程参考文档 https://doc.embedfire.com/lubancat/build_and_deploy/zh/latest/building_image/buil ...

谢谢!我要先把ubuntu换成18.04版本先
回复 支持 反对

使用道具 举报

 楼主| 发表于 2023-3-13 18:43:15 | 显示全部楼层
H781997429 发表于 2023-3-11 10:11
具体流程参考文档 https://doc.embedfire.com/lubancat/build_and_deploy/zh/latest/building_image/buil ...

也不行。
执行sudo ./make_deb.sh有以下的错误:
make KERNELRELEASE=4.19.35-carp-imx6 ARCH=arm         KBUILD_BUILD_VERSION=1stable KBUILD_SRC=
make[5]: *** /usr/ebf_linux_kernel_6ull_depth1: 没有那个文件或目录。 停止。
Makefile:24: recipe for target '__sub-make' failed
make[4]: *** [__sub-make] Error 2
debian/rules:4: recipe for target 'build' failed
make[3]: *** [build] Error 2
dpkg-buildpackage: 错误: debian/rules build subprocess returned exit status 2
/home/book/embedfire/ebf_linux_kernel_6ull_depth1/scripts/package/Makefile:79: recipe for target 'bindeb-pkg' failed
make[2]: *** [bindeb-pkg] Error 2
/home/book/embedfire/ebf_linux_kernel_6ull_depth1/Makefile:1365: recipe for target 'bindeb-pkg' failed
make[1]: *** [bindeb-pkg] Error 2
make[1]: 离开目录“/home/book/embedfire/ebf_linux_kernel_6ull_depth1/build_image/build”
Makefile:146: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2
回复 支持 反对

使用道具 举报

 楼主| 发表于 2023-3-13 20:05:37 | 显示全部楼层
H781997429 发表于 2023-3-11 10:11
具体流程参考文档 https://doc.embedfire.com/lubancat/build_and_deploy/zh/latest/building_image/buil ...


野火论坛202303132005168129..png
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

联系站长|手机版|野火电子官网|野火淘宝店铺|野火电子论坛 ( 粤ICP备14069197号 ) 大学生ARM嵌入式2群

GMT+8, 2024-4-28 22:45 , Processed in 0.068972 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表