394 Star 1.4K Fork 1.3K

GVPopenEuler / kernel

 / 详情

Build kernel-4.19 in out-tree way is failed

已完成
缺陷
创建于  
2021-02-25 14:43

【标题描述】Build kernel-4.19 in out-tree way got failed
【环境信息】
Hardware: D06
System:
NAME="openEuler"
VERSION="20.03 (LTS)"
ID="openEuler"
VERSION_ID="20.03"
PRETTY_NAME="openEuler 20.03 (LTS)"
ANSI_COLOR="0;31"

kernel version: 4.19.90-2003.4.0.0036.oe1.aarch64

【问题复现步骤】

  1. create a kernel source tree with kernel-4.19 branch of 'https://gitee.com/openeuler/kernel'
  2. mkdir -p /path/to/different/directory (which is the output directory of out-tree kernel build)
  3. perform the out-tree kernel build sourced from the kernel-4.19 tree
    cd kernel-4.19 tree
    make O=xxxx openeuler_defconfig
    cd xxx (xxx is the output directory)
    make Image.gz

【预期结果】
The build should be successful.

【实际结果】

Failed as below:

Error 1

Error 2

【附件信息】
NA

评论 (8)

erik_yuan 创建了缺陷
erik_yuan 关联仓库设置为openEuler/kernel
展开全部操作日志

Hey erik_yuan, Welcome to openEuler Community.
All of the projects in openEuler Community are maintained by @openeuler-ci-bot.
That means the developers can comment below every pull request or issue to trigger Bot Commands.
Please follow instructions at https://gitee.com/openeuler/community/blob/master/en/sig-infrastructure/command.md to find the details.

成坚 (CHENG Jian) 任务状态待办的 修改为修复中
成坚 (CHENG Jian) 修改了描述

您好,

我本地这边找了几台环境都没有复现这个问题。

查看了下certs 内核 build 的流程,怀疑是因为 touch 的时候 certs 目录没有创建,因此导致出现

Can't open certs/x509.genkey for reading, No such file or directory

目前看到这块 touch 的处理时,是如下补丁引入的
KEYS: Introduce load_pgp_public_keyring()

diff --git a/certs/Makefile b/certs/Makefile
index 5d0999b9e21b..5053e3c86c97 100644
--- a/certs/Makefile
+++ b/certs/Makefile
@@ -4,6 +4,12 @@
 #

 obj-$(CONFIG_SYSTEM_TRUSTED_KEYRING) += system_keyring.o system_certificates.o
+ifdef CONFIG_PGP_PRELOAD_PUBLIC_KEYS
+ifneq ($(shell ls certs/pubring.gpg 2> /dev/null), certs/pubring.gpg)
+$(shell touch certs/pubring.gpg)
+endif
+$(obj)/system_certificates.o: certs/pubring.gpg
+endif
 obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist.o
 ifneq ($(CONFIG_SYSTEM_BLACKLIST_HASH_LIST),"")
 obj-$(CONFIG_SYSTEM_BLACKLIST_KEYRING) += blacklist_hashes.o

我会后面找作者了解下情况。

谢谢参与 openEuler, 社区有你更精彩

---- CHENG Jian

由于我本地复现不出来,因此麻烦帮忙把你那边环境 make 的调试信息打出来提供下

make 后面添加 --debug=all 和 -n 参与可以提供更多的调试信息。
内核提供了 V=1 选项,调试内核的构建流程
因此执行make 的时候请加上如上的参数,然后把 build log 导出来提供下,谢谢

make -n --debug=all V=1 | tee -a build.log

然后把 build.log 提供出来
谢谢

---- CHENG Jian

I made a fix in certs/Makefile, then everything is OK.

ifdef CONFIG_PGP_PRELOAD_PUBLIC_KEYS
#ifneq ($(shell ls certs/pubring.gpg 2> /dev/null), certs/pubring.gpg)
#$(shell touch certs/pubring.gpg)
#endif
#$(obj)/system_certificates.o: certs/pubring.gpg

$(obj)/system_certificates.o: $(obj)/pubring.gpg
$(obj)/pubring.gpg:
$(Q)touch $@
endif

But I don't understand why we need to touch this 'pubring.gpg'
Actually, in 5.10, there is no this processing.

Anyway, I will send a patch for review.

Thanks!

branch tag commit
kernel-4.19 NA 7e1923228051

@erik_yuan 问题已修复。

谢谢

---- 成坚

本地验证情况:

make certs                                                                                                          !10477
  GEN     ./Makefile
scripts/kconfig/conf  --syncconfig Kconfig
  UPD     include/config/kernel.release
  Using /home/chengjian/Work/OpenEuler/kernel/src as source for kernel
  GEN     ./Makefile
  UPD     include/generated/uapi/linux/version.h
  UPD     include/generated/utsrelease.h
  CC      kernel/bounds.s
  CC      arch/arm64/kernel/asm-offsets.s
  CALL    /home/chengjian/Work/OpenEuler/kernel/src/scripts/checksyscalls.sh
  LDS     arch/arm64/kernel/vdso/vdso.lds
  CC      arch/arm64/kernel/vdso/gettimeofday.o
  AS      arch/arm64/kernel/vdso/note.o
  AS      arch/arm64/kernel/vdso/sigreturn.o
  VDSOL   arch/arm64/kernel/vdso/vdso.so.dbg
  VDSOSYM include/generated/vdso-offsets.h
  LEX     scripts/dtc/dtc-lexer.lex.c
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  HOSTLD  scripts/dtc/dtc
  CC      scripts/mod/empty.o
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/modpost.o
  CC      scripts/mod/devicetable-offsets.s
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTLD  scripts/mod/modpost
  HOSTCC  scripts/recordmcount
Generating X.509 key generation config
###
### Now generating an X.509 key pair to be used for signing modules.
###
### If this takes a long time, you might wish to run rngd in the
### background to keep the supply of entropy topped up.  It
### needs to be run as root, and uses a hardware random
### number generator if one is available.
###
Generating a RSA private key
.........++++
.............................................................................................................................................................++++
writing new private key to 'certs/signing_key.pem'
-----
###
### Key pair generated.
###
  CC      certs/system_keyring.o
  EXTRACT_CERTS   
  EXTRACT_CERTS   certs/signing_key.pem
  AS      certs/system_certificates.o
  AR      certs/built-in.a
成坚 (CHENG Jian) 任务状态修复中 修改为已确认
成坚 (CHENG Jian) 任务状态已确认 修改为已完成

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(3)
5329419 openeuler ci bot 1632792936
C
1
https://gitee.com/openeuler/kernel.git
git@gitee.com:openeuler/kernel.git
openeuler
kernel
kernel

搜索帮助