添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

I am staring with a Baremetal Fedora Image. It has 344 packages installed already. I’m going to assume that this set is available when I do my automated build as well, or that the needed packages will get pulled in by dependencies. If not, I will find out when my automation fails to run and I will add them at that point.

Most Fedora and CentOS based documents on building the Kernel have you do a group install of the “Development Tools” yum package group. I don’t want to do this for two reasons. First, I want to use the beaker format which just lists the packages in the job description. Second, I want to minimize the non-required packages, and Development Tools is general purpose group for coding; not everyone needs everythingm, and I don’t want to put non-essential packages on the system.

In order to build the linux Kernel, I need to get the code on the server. While I could push it from a remote system, if I want to run this from a beaker job, I will have no machine that can push it. Thus, I will start by installing git.

$ make olddefconfig
  HOSTCC  scripts/basic/fixdep
/bin/sh: line 1: gcc: command not found
make[1]: *** [scripts/Makefile.host:95: scripts/basic/fixdep] Error 127
make: *** [Makefile:552: scripts_basic] Error 2

$ make olddefconfig HOSTCC scripts/basic/fixdep /bin/sh: line 1: gcc: command not found make[1]: *** [scripts/Makefile.host:95: scripts/basic/fixdep] Error 127 make: *** [Makefile:552: scripts_basic] Error 2

HOSTCC scripts / basic / fixdep HOSTCC scripts / kconfig / conf.o HOSTCC scripts / kconfig / confdata.o HOSTCC scripts / kconfig / expr.o LEX scripts / kconfig / lexer.lex.c / bin / sh: line 1 : flex: command not found make [ 1 ] : *** [ scripts / Makefile.host: 9 : scripts / kconfig / lexer.lex.c ] Error 127 make: *** [ Makefile: 616 : olddefconfig ] Error 2

$ make olddefconfig HOSTCC scripts/basic/fixdep HOSTCC scripts/kconfig/conf.o HOSTCC scripts/kconfig/confdata.o HOSTCC scripts/kconfig/expr.o LEX scripts/kconfig/lexer.lex.c /bin/sh: line 1: flex: command not found make[1]: *** [scripts/Makefile.host:9: scripts/kconfig/lexer.lex.c] Error 127 make: *** [Makefile:616: olddefconfig] Error 2

$ make olddefconfig
  LEX     scripts/kconfig/lexer.lex.c
  YACC    scripts/kconfig/parser.tab.[ch]
/bin/sh: line 1: bison: command not found
make[1]: *** [scripts/Makefile.host:17: scripts/kconfig/parser.tab.h] Error 127
make: *** [Makefile:616: olddefconfig] Error 2

$ make olddefconfig LEX scripts/kconfig/lexer.lex.c YACC scripts/kconfig/parser.tab.[ch] /bin/sh: line 1: bison: command not found make[1]: *** [scripts/Makefile.host:17: scripts/kconfig/parser.tab.h] Error 127 make: *** [Makefile:616: olddefconfig] Error 2

scripts/sign-file.c:25:10: fatal error: openssl/opensslv.h: No such file or directory
   25 | #include <openssl/opensslv.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.host:95: scripts/sign-file] Error 1
make: *** [Makefile:1203: scripts] Error 2

scripts/sign-file.c:25:10: fatal error: openssl/opensslv.h: No such file or directory 25 | #include <openssl/opensslv.h> | ^~~~~~~~~~~~~~~~~~~~ compilation terminated. make[1]: *** [scripts/Makefile.host:95: scripts/sign-file] Error 1 make: *** [Makefile:1203: scripts] Error 2

/bin/sh: line 1: bc: command not found
make[1]: *** [Kbuild:24: include/generated/timeconst.h] Error 127
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1219: prepare0] Error 2

/bin/sh: line 1: bc: command not found make[1]: *** [Kbuild:24: include/generated/timeconst.h] Error 127 make[1]: *** Waiting for unfinished jobs.... make: *** [Makefile:1219: prepare0] Error 2

main.c:55:10: fatal error: libelf.h: No such file or directory
   55 | #include <libelf.h>
      |          ^~~~~~~~~~

main.c:55:10: fatal error: libelf.h: No such file or directory 55 | #include <libelf.h> | ^~~~~~~~~~

If you have an RPM, yes. But what if you only have the raw Kernel sources? I’m doing a minimal build based on a git checkout of the Kernel tree.

And…sometimes it is good to check your assumptions, as I am doing in this post.

Leave a Reply

Your email address will not be published. Required fields are marked *