How to compile source code of new kernel specifically for my pc hardware with uefi secure boot.

Hi I am Rupesh from India and I have pc i3 processor and h510 motherboard It has uefi. I have installed open suse tumblewood and all the packages have been updated. As the default kernel provided by open suse tumblewood is not working properly I want to compile source code of new kernel which is obtained from and the kernel source code present in /usr/src/linux*** but I can’t.

As the pc is uefi based I am getting lot of errors related to signing. I have installed all latest packages related to gcc, make, ctags, cscope, open ssh, open SSL, auto make, auto conf, cmake etc.,.

I have created the config file from the existing configuration of system using the following command

make localmodconfig

I have succeeded in compiling source code of new kernel using make command but when I execute the command

make install

I am getting error as

" certificate must have code signing extended key usage defined for secure boot ".

After some time vmlinux, initrd files are created but when I try to boot the newly compiled kernel from grub I am getting errors as

“bad shim signature”
“you need to load the kernel first”

I have tried a number of ways to compile successfully such as disabling secure boot in yast boot loader, selecting load all modules by verifying signature etc.,.

Currently my .config file consists of the following lines containing the word sig

# CONFIG_MODULE_SIG_SHA224 is not set
# CONFIG_MODULE_SIG_SHA384 is not set
# CONFIG_MODULE_SIG_SHA512 is not set
# DesignWare PCI Core Support
# end of DesignWare PCI Core Support
# Certificates for signature checking
# end of Certificates for signature checking

Kindly try to suggest how to compile the source code of kernel for uefi system with automatic key singing and how to boot the compiled kernel from grub2.

The current 5.16.11, or an older one?

What are the symptoms constituting “not working properly”?

Why do you think compiling your own kernel will solve your problems?

I’ve never found need to compile a kernel in two decades of using SUSE and openSUSE.

You consistently misspell distribution name.

I want to compile source code of new kernel which is obtained from
Kindly try to suggest how to compile the source code of kernel for uefi system with automatic key singing and how to boot the compiled kernel from grub2.

How is this question related to Install/Boot/Login openSUSE that is the topic of this subforum?

Ok may I know where to place the current thread.

The main issues are when I click the shutdown button in desktop environments like gnome, mate the system is not shutting down immediately. When I run the command halt in terminal the monitor gets turned off but still the cpu runs a long time until I switch off the power.

Previously I have tried to connect to internet through android tethering and the connection turns off with in 6 minutes and so I have tried a number of ways such as installing android udev rools and trying the commands

adb tcpip 5555
adb connect <my phone ip address>

Still there is no use and so I have bought usb wifi adapter which consists of RTL 8188 and this time I am able to connect to internet all the time through wifi.

Now the issue is when I want to copy files from android smartphone to pc and connect the phone to pc the system is showing error as usb device not recognised.

Before installing wifi dongle through usb I am able to connect my phone to pc and transfer files between the two but now it is not possible.

Most of the time I work using ffmpeg tool and so I have installed open CL packages like beignet, beignet devel, opencl headers, ocl-dev, clinfo packages. When I issue the command clinfo I am getting errors as no open CL devices found etc.,.

If these issues are resolved then there is no need to compile source code of kernel.

Try to suggest how to configure the system for the following

  1. shutdown the system properly when I click on the shutdown button.
  2. shutdown the system properly when I issue the command halt or poweroff.
  3. how to connect my smartphone through usb at the same time wifi adapter or dongle running.
  4. how tools such as ffmpeg or clinfo detect my cpu.

The last two are subjects deserving unique threads. Shutting down properly without random waits is pretty important. Start one about only that.

Proper shutdown procedures are straight forward. However to my experience many users are reluctant to deal with them:

Hi let me know how to compile source code of kernel first.

At present I have made changes in bios secure boot as

Os type to “other os”
Secure boot mode to “standard”

After that I have disabled secure boot option in yast boot loader.

After that I have compiled kernel source code and this time also when I issue the command “make install” I am getting same error as " must have certificates…".

After reboot when I select the new kernel I am not getting shim error but instead I am getting error as

“systemd: failed to load modules”

After some time I am able to see message as reached target but there is no user login window.

Another thing I want to mention is that when I issue the command " make install " I am able to see messages as moving vmlinuz.5.11 to vmlinuz.5.11.old, initrd.5.11 to United.5.11.old etc.,.

Also the modules newly compiled are going to overwrite the existing modules present in /lib/modules/kernel version.

My question is suppose I download the kernel source code from and it’s file name is kernel.5.13.1 and the present kernel I am running is 5.13.1 then how to compile source code of kernel and create kernel with file name vmlinuz.5.13.1-new and initrd.5.13.1-new and finally place the kernel modules under the directory /lib/modules/5.13.1-new

Don’t be surprised if no one answers this. openSUSE users have the openSUSE build service at their disposal for custom builds. Seeing discussions of compiling kernels in the various openSUSE forums is rare. There may be no one familiar with self compiling who reads here.

Well I want to use obs to compile source code of kernel but is it possible compile locally on my machine without uploading to server.

Can I install obs server as a package.

There are a number of guis for compilers like eclipse, visual studio, android studio. In these software just we can open the .sln or other project files and automatically the executable code is generated. These tools take care of setting up the environment, loading repository like git etc.,.

I think that compiling source code using obs involve creating a package, home directory etc., and in order to create these we must read lots of manuals etc.,.

I prefer always gui than cli because it is easy to use. For example ffmpeg tool consists of lot of manual and one must read thoroughly inorder to work in terminal and instead there are nice guis for ffmpeg in which we need to provide input file name and output file name and codec option.

While working with command line if we forget any , or ; or : there are lots of risk.

Finally what I want is a nice front end for osc which sets up environment, home directory, load other repository etc.,. Here there is no need to read manual of osc.

1 Like

Pentium MMX was launched about 30 years ago and at that time video processing was new and there was no proper hardware just to play any video file I mean if you play any video file video playback stops sometimes and resume after some time.

At present there is lot of development in video hardware and at the same time new technologies in both hardware and software has been evolved. Coming into hardware CPUs with integrated graphics came and coming into software many video and audio codecs have been developed like h265, vpx, av1, aac, opus etc.,.Of these aac and opus are audio codecs which produces lowest disk size at reasonable quality and h265, av1 are video codecs which provides lowest disk size at reasonable quality.

Most of the time I download videos from youtube and other sources which are of large size. When you record a video in android smartphone it takes around 600 mb for 3 minutes 50 seconds and it uses h265 codec. It is difficult to store such files in my android smartphone.

Mostly I use Linux and ffmpeg tool to compress these video files. Of h265 and av1 aom encoders. av1 aom encoder provide lowest disk size at lowest video bitrate. H265 encoding and decoding are supported in all hardware including pc and smartphone but unfortunately av1 files are not supported in none but definitely I think that it will become defacto standard in future.

If h265 encoding takes 1 minute then aom av1 encoding takes about 10 minutes. If video acceleration is present the encoding takes about 7 minutes. Video acceleration come into action only if GPU is detected properly and the necessary drivers are installed. If the system can detect opecl version of GPU then av1 encoding takes about 5 minutes through ffmpeg.

As MMX was trending about 30 years ago I think that latest processors have vector instructions for video transcoding or encoding like avx2 or avx 512, simd etc.,. These new instructions are not present in 15 years back processors.

As 64 bit processor came into action around 20 years back nowadays processors are 10 times are greater in performance than old.

I think that all the kernels shipped by distros are not considering latest processors instruction set. I think that even windows is doing the same.

If opencl is detected properly any application can have improvement in performance about 10 percent.

I can’t find any option to set opencl in the Linux kernel config file or in any of the kernel source files.

Atleast I am lucky to select option core 2 in the main .config file of kernel.

Finally my request is there any way to export instruct set of my cpu to the kernel configuration and so after compilation my video encoding takes less time than previous.

If it’s a difficult task leave it and if it’s possible try to suggest how to do so.

Get an Nvidia card that has the hardware encoder/decoder, I have Quadro T400 for this task and use with ffmpeg…

2x H.264 and HVEC Encoders
1x Decode Engine

Hevc encoder is present in my integrated gpu also but there is no av1 aom encoder.

I see it present in ffmpeg here;

 V..... libaom-av1           libaom AV1 (codec av1)

I am not against obs but I am searching for easy way to compile source code of kernel etc.,. I have examined some like obs, autotools, meson, ninja etc.,. I can’t determine which is best.

I don’t want to build packages and distribute to others and so I think that autotools is enough for me but I am reading obs autotools etc., and it will take some time to use them because I am new to those.