Ask Your Question
1

Linux Kernel 4.19 wont compile on Fedora 29

asked 2018-12-06 20:17:12 -0600

Lebro LinuxAndFriends gravatar image

updated 2018-12-07 12:11:13 -0600

Hey, I cant seem to compile the linux kernel 4.19 (SAME KERNEL ON PC NOW). I run these commands:

wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.19.5.tar.gz
tar -xvzf linux-4.19.5.tar.gz
cd linux-4.19.5/
cp /boot/config-$(uname -r) .config
make

I put it into a script. I run it. After the first 4 lines make starts to do its thing and looks good at first until...

PART OF OUTPUT:

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

what am i doing wrong??

UPDATE: So it seemed to have compiled i am not quite sure. i wake up and it says:

>      CALL    scripts/checksyscalls.sh
>       DESCEND  objtool
>       CHK     include/generated/compile.h
>       TEST    posttest
>     arch/x86/tools/insn_decoder_test: success: Decoded and checked 5426122
> instructions
>       TEST    posttest
>     arch/x86/tools/insn_sanity: Success: decoded and checked 1000000
> random instructions with 0 errors
> (seed:0x4f864da4)
>     Kernel: arch/x86/boot/bzImage is ready  (#1)
>       Building modules, stage 2.
>       MODPOST 3414 modules # LAST LINE

And it looked like that QUIT A WAYS UP

Then i see my bash promt and i run it again but make some changes first: OUTPUT:

>   CALL    scripts/checksyscalls.sh  
> DESCEND  objtool   CHK    
> include/generated/compile.h   TEST   
> posttest
> arch/x86/tools/insn_decoder_test:
> success: Decoded and checked 5426122
> instructions   TEST    posttest
> arch/x86/tools/insn_sanity: Success:
> decoded and checked 1000000 random
> instructions with 0 errors
> (seed:0x4f864da4) Kernel:
> arch/x86/boot/bzImage is ready  (#1)  
> Building modules, stage 2.   MODPOST
> 3414 modules

Is this a bad thing or a good thing?? BTW I AM TRYING TO MAKE A DISTRO. here is my git so you can see what i am doing https://gitlab.com/lebro/linuxandfriends ..! by the way i am just a 6 grade and got to do school but i can checkup on this every break

edit retag flag offensive close merge delete

Comments

2

Looks like you are missing openssl-devel package

aeperezt gravatar imageaeperezt ( 2018-12-06 21:08:19 -0600 )edit

ok i will try that

Lebro LinuxAndFriends gravatar imageLebro LinuxAndFriends ( 2018-12-06 22:02:37 -0600 )edit

aeperezt i will let it compile over the night and will see how it goes! so far so good

Lebro LinuxAndFriends gravatar imageLebro LinuxAndFriends ( 2018-12-06 22:20:14 -0600 )edit

@Lebro LinuxAndFriends

is the text in your question the things you always do to compile a custom kernel ?

**if yes:** what is the benefit to compile a kernel with the same **config of a allready installed/ running kernel** ?
sixpack13 gravatar imagesixpack13 ( 2018-12-06 23:49:07 -0600 )edit

how is it.......your compile ...progress???

simmon gravatar imagesimmon ( 2018-12-07 01:46:43 -0600 )edit

4 Answers

Sort by ยป oldest newest most voted
4

answered 2018-12-07 09:17:03 -0600

ed209 gravatar image

To compile the kernel under fedora you need some packages not installed by default. Follow this guide and everything will work. https://fedoraproject.org/wiki/Buildi...

edit flag offensive delete link more
3

answered 2018-12-07 09:12:12 -0600

sixpack13 gravatar image

updated 2018-12-07 09:31:35 -0600

How do I compile custom kernels

PREMISE (do only once)

  1. sudo dnf install bison bison-devel ccache gcc gcc-c++ lz4 openssl-devel patch qt4-devel

  2. makedir -p ~/DATA/devel/CCACHE;

  3. makedir -p ~/DATA/devel/SRC;

  4. compose a custom defconfig via make xconfig && make savedefconfig

  5. copy this defconfig to ~/DATA/devel/

COMPILE a new custom kernel (do for each new kernels)

run the following bash script as user (!)

#!/bin/bash

MY_JOBS=-j8;
CCACHE_DIR=~/DATA/devel/CCACHE;
export CCACHE_DIR;


NEW_SRC=linux-*.xz;
OLD_SRC=$(find . -type d -name 'linux-*');

if [ -e linux-*.xz ]
then
   [ -s ${OLD_SRC} ] && rm -rf ${OLD_SRC};
   echo -e "\n unpacking src, wait...\n"
   tar -Jxf ${NEW_SRC} && mv ${NEW_SRC} ./SRC;
   OLD_SRC=$(find . -type d -name 'linux-*')
   ccache -cz;
fi;

[ -z ${OLD_SRC} ]  && echo -e "\n\n damn NO source OR working Linux Tree !!! \n\n" && exit 13;

   [ -s defconfig ] && [ ! -e defconfig.OLD ] && cp defconfig defconfig.OLD;

   cd ./linux-*; 

      echo -e "\n cleaning tree ...\n"

      [ -e vmlinux.o ] && make clean mrproper;
      [ -e defconfig ] && rm -rf ./defconfig;

      echo -e "\n building kernel ...\n"

      [ -s ../defconfig ] && make KCONFIG_ALLCONFIG=../defconfig alldefconfig; 

      make xconfig && make savedefconfig && cp defconfig ../ && make all ${MY_JOBS};   
      RC=$?
      [ "$RC" -gt 0 ] && echo -e "\n error in make\n" && exit 13;

      echo -e "\n installing kernel ...\n"

      sudo make modules_install && sudo make install &&  sudo rm -rf /boot/{System.map,vmlinuz,*.old} && sudo grub2-mkconfig -o /boot/grub2/grub.cfg && sudo grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg;

   sync && sync && sync;

exit 0;

my script is NOT completely bug free, there some points I could do better ..., but it runs !!!

What it does (in short):

- looks for a new linux-*.tar.xz (fetched from kernel.org)
- unpacks it and saves linux-*.tar.xz for later use
- cleans the tree (removes gruft from previous run)
- generate a new defconfig and saves old one and the new one for later use
- makes kernel and modules (runs as user)
- installs the new kernel (runs as root)
- adjusts grub.cfg  (runs as root)
edit flag offensive delete link more

Comments

ok...it's a good way...to compile for kernel. i'm just to show easy compile to use and experience... I'm Fedora29S KDE User and it make me Happy to use...and see a good user and give me a energy...have a nice day...written by simmon

simmon gravatar imagesimmon ( 2018-12-07 09:20:54 -0600 )edit

this will install it to my fedora system. I want to make it a binary and make a custom linux distro

Lebro LinuxAndFriends gravatar imageLebro LinuxAndFriends ( 2018-12-07 09:25:42 -0600 )edit
2

answered 2018-12-06 22:06:54 -0600

Nicholas gravatar image

updated 2018-12-06 22:42:03 -0600

aeperezt comment is correct. You will need to install openssl-devel.

sudo dnf install -y openssl-devel
edit flag offensive delete link more

Comments

so far so good. just got to wait for problem

Lebro LinuxAndFriends gravatar imageLebro LinuxAndFriends ( 2018-12-06 22:46:04 -0600 )edit
1

answered 2018-12-06 23:14:50 -0600

simmon gravatar image

updated 2018-12-14 11:17:11 -0600

kernel compile...progress - New Kernel..4.19.5....In Compile Fedora29S KDE

A. question.! I agree install openssl* or lib*ssl for pactch and improve compile, also did you already gcc library..?

 dnf -y install bison*
 dnf -y install flex*
 cd /usr/local/src

B. NeW Kernel Check and Get Kernel https://cdn.kernel.org/pub/linux/kern...

 wget https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.19.5.tar.gz
 tar zxvf linux-4.19.5.tar.gz 
 cd linux-4.19.5
 cp /boot/config-`uname -r` .config

 make menuconfig
   YACC    scripts/kconfig/zconf.tab.c
   LEX     scripts/kconfig/zconf.lex.c
   HOSTCC  scripts/kconfig/zconf.tab.o
   HOSTCC  scripts/kconfig/lxdialog/checklist.o
   HOSTCC  scripts/kconfig/lxdialog/inputbox.o
   HOSTCC  scripts/kconfig/lxdialog/menubox.o
   HOSTCC  scripts/kconfig/lxdialog/textbox.o
   HOSTCC  scripts/kconfig/lxdialog/util.o
   HOSTCC  scripts/kconfig/lxdialog/yesno.o
   HOSTLD  scripts/kconfig/mconf
   scripts/kconfig/mconf  Kconfig

 Your configuration changes were NOT saved.

 uname -ar
 Linux kalnal 4.19.5 #1 SMP Fri Dec 7 14:35:37 KST 2018 x86_64 x86_64 x86_64 GNU/Linux

C. compile...fine..no error show me..dell workstation...check and work to...setup asterisk with fedora29s.... but...fedora more faster than this compile version.. now kernel...4.19.6...in natural update kernel....anyway...take care!!!

Fedora29...will be good show to me... have a nice day...wirtten by simmon

edit flag offensive delete link more

Comments

i did. i vave an updated post soon (NOT SURE IF IT COMPILED)

Lebro LinuxAndFriends gravatar imageLebro LinuxAndFriends ( 2018-12-07 06:14:52 -0600 )edit
1

ok....it's good to hear that!!

simmon gravatar imagesimmon ( 2018-12-07 07:42:34 -0600 )edit

@simmon can you see of the output i got is good

Lebro LinuxAndFriends gravatar imageLebro LinuxAndFriends ( 2018-12-07 08:08:03 -0600 )edit
1

how is it run after boot? reboot..it 'll be show in grub2 ...boot select it'll be show new kernel list....! I would compile that it run in booting progress at.....login... like a use 'uname -ar' it's a new kernel.......in my system...

[root@kalnal simmon]# uname -ar Linux kalnal 4.19.5 #1 SMP Fri Dec 7 14:35:37 KST 2018 x86_64 x86_64 x86_64 GNU/Linux

simmon gravatar imagesimmon ( 2018-12-07 11:02:32 -0600 )edit

@simmon i am building it for my linux distro

Lebro LinuxAndFriends gravatar imageLebro LinuxAndFriends ( 2018-12-07 12:07:31 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2018-12-06 20:17:12 -0600

Seen: 146 times

Last updated: Dec 14