All of lore.kernel.org
 help / color / mirror / Atom feed
* How to compile source code of new kernel specifically for my pc hardware with uefi secure boot.
@ 2022-02-28 17:44 Guddla Rupesh
  2022-03-01  9:27 ` Greg KH
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Guddla Rupesh @ 2022-02-28 17:44 UTC (permalink / raw)
  To: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 3032 bytes --]

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 kernel.org 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

[CODE]
CONFIG_SIGNALFD=y
CONFIG_KEXEC_SIG=y
CONFIG_KEXEC_SIG_FORCE=y
CONFIG_KEXEC_BZIMAGE_VERIFY_SIG=y
# CONFIG_STRICT_SIGALTSTACK_SIZE is not set
CONFIG_ACPI_TINY_POWER_BUTTON_SIGNAL=38
CONFIG_OLD_SIGSUSPEND3=y
CONFIG_COMPAT_OLD_SIGACTION=y
CONFIG_DYNAMIC_SIGFRAME=y
CONFIG_MODULE_SIG_FORMAT=y
CONFIG_MODULE_SIG=y
CONFIG_MODULE_SIG_FORCE=y
CONFIG_MODULE_SIG_ALL=y
# CONFIG_MODULE_SIG_SHA1 is not set
# CONFIG_MODULE_SIG_SHA224 is not set
CONFIG_MODULE_SIG_SHA256=y
# CONFIG_MODULE_SIG_SHA384 is not set
# CONFIG_MODULE_SIG_SHA512 is not set
CONFIG_MODULE_SIG_HASH="sha256"
CONFIG_TCP_MD5SIG=y
CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y
# DesignWare PCI Core Support
# end of DesignWare PCI Core Support
CONFIG_I2C_DESIGNWARE_CORE=y
# CONFIG_I2C_DESIGNWARE_SLAVE is not set
CONFIG_I2C_DESIGNWARE_PLATFORM=y
CONFIG_I2C_DESIGNWARE_BAYTRAIL=y
# CONFIG_I2C_DESIGNWARE_PCI is not set
# CONFIG_SPI_DESIGNWARE is not set
# CONFIG_SND_HDA_CODEC_SIGMATEL is not set
# CONFIG_USB_ISIGHTFW is not set
CONFIG_FS_VERITY_BUILTIN_SIGNATURES=y
CONFIG_INTEGRITY_SIGNATURE=y
# CONFIG_IMA_SIG_TEMPLATE is not set
CONFIG_IMA_APPRAISE_MODSIG=y
CONFIG_IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY=y
CONFIG_SIGNED_PE_FILE_VERIFICATION=y
# Certificates for signature checking
CONFIG_MODULE_SIG_KEY="certs/signing_key.pem"
CONFIG_MODULE_SIG_KEY_TYPE_RSA=y
# CONFIG_MODULE_SIG_KEY_TYPE_ECDSA is not set
# end of Certificates for signature checking
CONFIG_CHECK_SIGNATURE=y
CONFIG_SIGNATURE=y
[/CODE]


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.


Regards,
Rupesh.

[-- Attachment #1.2: Type: text/html, Size: 4851 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to compile source code of new kernel specifically for my pc hardware with uefi secure boot.
  2022-02-28 17:44 How to compile source code of new kernel specifically for my pc hardware with uefi secure boot Guddla Rupesh
@ 2022-03-01  9:27 ` Greg KH
  2022-03-01 11:12 ` Guddla Rupesh
       [not found] ` <CALgyNi1WEeBSdfFDi5hV4KCZk5Gbwerr+CWDaqRdqqjEnDpZYA@mail.gmail.com>
  2 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2022-03-01  9:27 UTC (permalink / raw)
  To: Guddla Rupesh; +Cc: kernelnewbies

On Mon, Feb 28, 2022 at 11:14:32PM +0530, Guddla Rupesh wrote:
> 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 kernel.org and the kernel source code present in
> /usr/src/linux*** but I can't.

Independant of you running a custom kernel on your machine (hint, turn
off secure boot in your BIOS/UEFI in order to load an unsigned kernel
image, or add your own keys to the BIOS that you create yourself), what
is wrong with the tumbleweed kernel that is not working for you?  That
kernel should be very close to the upstream kernel.

thanks,

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to compile source code of new kernel specifically for my pc hardware with uefi secure boot.
  2022-02-28 17:44 How to compile source code of new kernel specifically for my pc hardware with uefi secure boot Guddla Rupesh
  2022-03-01  9:27 ` Greg KH
@ 2022-03-01 11:12 ` Guddla Rupesh
  2022-03-02 20:31   ` Greg KH
       [not found] ` <CALgyNi1WEeBSdfFDi5hV4KCZk5Gbwerr+CWDaqRdqqjEnDpZYA@mail.gmail.com>
  2 siblings, 1 reply; 6+ messages in thread
From: Guddla Rupesh @ 2022-03-01 11:12 UTC (permalink / raw)
  To: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 6408 bytes --]

Someone of you asked what is the need of compiling source code of kernel
and I am doing so due to the following reasons.

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.
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 kernel.org
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

Regards,
Rupesh.

On Mon, 28 Feb 2022, 11:14 pm Guddla Rupesh, <rupeshforu3@gmail.com> wrote:

> 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 kernel.org 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
>
> [CODE]
> CONFIG_SIGNALFD=y
> CONFIG_KEXEC_SIG=y
> CONFIG_KEXEC_SIG_FORCE=y
> CONFIG_KEXEC_BZIMAGE_VERIFY_SIG=y
> # CONFIG_STRICT_SIGALTSTACK_SIZE is not set
> CONFIG_ACPI_TINY_POWER_BUTTON_SIGNAL=38
> CONFIG_OLD_SIGSUSPEND3=y
> CONFIG_COMPAT_OLD_SIGACTION=y
> CONFIG_DYNAMIC_SIGFRAME=y
> CONFIG_MODULE_SIG_FORMAT=y
> CONFIG_MODULE_SIG=y
> CONFIG_MODULE_SIG_FORCE=y
> CONFIG_MODULE_SIG_ALL=y
> # CONFIG_MODULE_SIG_SHA1 is not set
> # CONFIG_MODULE_SIG_SHA224 is not set
> CONFIG_MODULE_SIG_SHA256=y
> # CONFIG_MODULE_SIG_SHA384 is not set
> # CONFIG_MODULE_SIG_SHA512 is not set
> CONFIG_MODULE_SIG_HASH="sha256"
> CONFIG_TCP_MD5SIG=y
> CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y
> # DesignWare PCI Core Support
> # end of DesignWare PCI Core Support
> CONFIG_I2C_DESIGNWARE_CORE=y
> # CONFIG_I2C_DESIGNWARE_SLAVE is not set
> CONFIG_I2C_DESIGNWARE_PLATFORM=y
> CONFIG_I2C_DESIGNWARE_BAYTRAIL=y
> # CONFIG_I2C_DESIGNWARE_PCI is not set
> # CONFIG_SPI_DESIGNWARE is not set
> # CONFIG_SND_HDA_CODEC_SIGMATEL is not set
> # CONFIG_USB_ISIGHTFW is not set
> CONFIG_FS_VERITY_BUILTIN_SIGNATURES=y
> CONFIG_INTEGRITY_SIGNATURE=y
> # CONFIG_IMA_SIG_TEMPLATE is not set
> CONFIG_IMA_APPRAISE_MODSIG=y
> CONFIG_IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY=y
> CONFIG_SIGNED_PE_FILE_VERIFICATION=y
> # Certificates for signature checking
> CONFIG_MODULE_SIG_KEY="certs/signing_key.pem"
> CONFIG_MODULE_SIG_KEY_TYPE_RSA=y
> # CONFIG_MODULE_SIG_KEY_TYPE_ECDSA is not set
> # end of Certificates for signature checking
> CONFIG_CHECK_SIGNATURE=y
> CONFIG_SIGNATURE=y
> [/CODE]
>
>
> 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.
>
>
> Regards,
> Rupesh.
>

[-- Attachment #1.2: Type: text/html, Size: 9590 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to compile source code of new kernel specifically for my pc hardware with uefi secure boot.
       [not found] ` <CALgyNi1WEeBSdfFDi5hV4KCZk5Gbwerr+CWDaqRdqqjEnDpZYA@mail.gmail.com>
@ 2022-03-02 16:55   ` Guddla Rupesh
       [not found]     ` <CALgyNi3=c+HT9SiuJK+r5ovCyBrB+OR4fR0kQP5Z9eAbWcJwQg@mail.gmail.com>
  0 siblings, 1 reply; 6+ messages in thread
From: Guddla Rupesh @ 2022-03-02 16:55 UTC (permalink / raw)
  To: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 5474 bytes --]

I have seen the config from /proc/config.gz and found that processor family
as generic x86 64.

Actually my system consists of i3 10th gen comet lake 10100 which has
integrated graphics and pci express 4.0 and also lots of new instructions
like avx2, sse4 etc.,.

The main reason of compiling source code of kernel is it detects all my
hardware and provide support for opencl, video acceleration etc.,. But I
can't find any option to select my processor especially comet lake or
atleast skylake and instead there is an option called core2 in the section
processor family.

Finally I have disabled secure boot mode in bios and compiled source code
successfully and now I am able to boot into the latest build kernel but
there is no difference in performance between old and new kernels.

I think that normal kernel shipped by the distro is generic and it doesn't
have support for latest instructions like avx2, sse4 etc.,. To get support
we must compile kernel with lots of tuning.

I have exported the modules running on system and disable others by running
the command

make localmodconfig

What I want is " is there any way to export my cpu instruction set to
kernel .config file and compile kernel and install the modules.".

If I can compile kernel source code then my Linux system will run at
extreme speeds never before.

On Tue, 1 Mar 2022, 11:28 pm Rogério Valentim Feitoza da Silva, <
rogerio.silva3920@gmail.com> wrote:

> On Tuesday, 1 March 2022 at 00:08, Guddla Rupesh <rupeshforu3@gmail.com>
> wrote:
> >
> > 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 kernel.org 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
> >
> > [CODE]
> > CONFIG_SIGNALFD=y
> > CONFIG_KEXEC_SIG=y
> > CONFIG_KEXEC_SIG_FORCE=y
> > CONFIG_KEXEC_BZIMAGE_VERIFY_SIG=y
> > # CONFIG_STRICT_SIGALTSTACK_SIZE is not set
> > CONFIG_ACPI_TINY_POWER_BUTTON_SIGNAL=38
> > CONFIG_OLD_SIGSUSPEND3=y
> > CONFIG_COMPAT_OLD_SIGACTION=y
> > CONFIG_DYNAMIC_SIGFRAME=y
> > CONFIG_MODULE_SIG_FORMAT=y
> > CONFIG_MODULE_SIG=y
> > CONFIG_MODULE_SIG_FORCE=y
> > CONFIG_MODULE_SIG_ALL=y
> > # CONFIG_MODULE_SIG_SHA1 is not set
> > # CONFIG_MODULE_SIG_SHA224 is not set
> > CONFIG_MODULE_SIG_SHA256=y
> > # CONFIG_MODULE_SIG_SHA384 is not set
> > # CONFIG_MODULE_SIG_SHA512 is not set
> > CONFIG_MODULE_SIG_HASH="sha256"
> > CONFIG_TCP_MD5SIG=y
> > CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y
> > # DesignWare PCI Core Support
> > # end of DesignWare PCI Core Support
> > CONFIG_I2C_DESIGNWARE_CORE=y
> > # CONFIG_I2C_DESIGNWARE_SLAVE is not set
> > CONFIG_I2C_DESIGNWARE_PLATFORM=y
> > CONFIG_I2C_DESIGNWARE_BAYTRAIL=y
> > # CONFIG_I2C_DESIGNWARE_PCI is not set
> > # CONFIG_SPI_DESIGNWARE is not set
> > # CONFIG_SND_HDA_CODEC_SIGMATEL is not set
> > # CONFIG_USB_ISIGHTFW is not set
> > CONFIG_FS_VERITY_BUILTIN_SIGNATURES=y
> > CONFIG_INTEGRITY_SIGNATURE=y
> > # CONFIG_IMA_SIG_TEMPLATE is not set
> > CONFIG_IMA_APPRAISE_MODSIG=y
> > CONFIG_IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY=y
> > CONFIG_SIGNED_PE_FILE_VERIFICATION=y
> > # Certificates for signature checking
> > CONFIG_MODULE_SIG_KEY="certs/signing_key.pem"
> > CONFIG_MODULE_SIG_KEY_TYPE_RSA=y
> > # CONFIG_MODULE_SIG_KEY_TYPE_ECDSA is not set
> > # end of Certificates for signature checking
> > CONFIG_CHECK_SIGNATURE=y
> > CONFIG_SIGNATURE=y
> > [/CODE]
> >
> >
> > 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.
> >
> >
> > Regards,
> > Rupesh.
> > _______________________________________________
> > Kernelnewbies mailing list
> > Kernelnewbies@kernelnewbies.org
> > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> The "bad shim signature" error is probably from GRUB's "kernel"
> command. That might mean the "kernel" command has failed to load the
> kernel, and therefore the "boot" command failed because there is no
> kernel to transfer control to.
>
> -Rogério Valentim
>

[-- Attachment #1.2: Type: text/html, Size: 6649 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to compile source code of new kernel specifically for my pc hardware with uefi secure boot.
  2022-03-01 11:12 ` Guddla Rupesh
@ 2022-03-02 20:31   ` Greg KH
  0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2022-03-02 20:31 UTC (permalink / raw)
  To: Guddla Rupesh; +Cc: kernelnewbies

On Tue, Mar 01, 2022 at 04:42:53PM +0530, Guddla Rupesh wrote:
> Someone of you asked what is the need of compiling source code of kernel
> and I am doing so due to the following reasons.
> 
> 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.

How do you know this is a kernel issue?  Sounds like userspace still has
something to do to shut down.  Look into that first.

You can verify this by rebooting from the kernel directly using the
specific sysrq key combination.  I'll let you read the documentation to
find what that is as it can cause data loss if used without syncing the
disks first, so be careful.

> 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

That sounds like an android device issue, not the kernel problem.  Not
much the kernel can do when the device shuts off.

> 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.

Which USB device exactly?

> 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.,.

Do you have the needed hardware for the cl libraries?

Try solving one at a time.

good luck!

greg k-h

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to compile source code of new kernel specifically for my pc hardware with uefi secure boot.
       [not found]     ` <CALgyNi3=c+HT9SiuJK+r5ovCyBrB+OR4fR0kQP5Z9eAbWcJwQg@mail.gmail.com>
@ 2022-03-03 15:21       ` Guddla Rupesh
  0 siblings, 0 replies; 6+ messages in thread
From: Guddla Rupesh @ 2022-03-03 15:21 UTC (permalink / raw)
  To: kernelnewbies


[-- Attachment #1.1: Type: text/plain, Size: 10122 bytes --]

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.

On Thu, 3 Mar 2022, 2:15 am Rogério Valentim Feitoza da Silva, <
rogerio.silva3920@gmail.com> wrote:

> On Wednesday, 2 March 2022 at 13:56, Guddla Rupesh
> <rupeshforu3@gmail.com> wrote:
> >
> > I have seen the config from /proc/config.gz and found that processor
> family as generic x86 64.
> >
> > Actually my system consists of i3 10th gen comet lake 10100 which has
> integrated graphics and pci express 4.0 and also lots of new instructions
> like avx2, sse4 etc.,.
> >
> > The main reason of compiling source code of kernel is it detects all my
> hardware and provide support for opencl, video acceleration etc.,. But I
> can't find any option to select my processor especially comet lake or
> atleast skylake and instead there is an option called core2 in the section
> processor family.
> >
> > Finally I have disabled secure boot mode in bios and compiled source
> code successfully and now I am able to boot into the latest build kernel
> but there is no difference in performance between old and new kernels.
> >
> > I think that normal kernel shipped by the distro is generic and it
> doesn't have support for latest instructions like avx2, sse4 etc.,. To get
> support we must compile kernel with lots of tuning.
> >
> > I have exported the modules running on system and disable others by
> running the command
> >
> > make localmodconfig
> >
> > What I want is " is there any way to export my cpu instruction set to
> kernel .config file and compile kernel and install the modules.".
> >
> > If I can compile kernel source code then my Linux system will run at
> extreme speeds never before.
> >
> >
> > On Tue, 1 Mar 2022, 11:28 pm Rogério Valentim Feitoza da Silva, <
> rogerio.silva3920@gmail.com> wrote:
> >>
> >> On Tuesday, 1 March 2022 at 00:08, Guddla Rupesh <rupeshforu3@gmail.com>
> wrote:
> >> >
> >> > 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 kernel.org 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
> >> >
> >> > [CODE]
> >> > CONFIG_SIGNALFD=y
> >> > CONFIG_KEXEC_SIG=y
> >> > CONFIG_KEXEC_SIG_FORCE=y
> >> > CONFIG_KEXEC_BZIMAGE_VERIFY_SIG=y
> >> > # CONFIG_STRICT_SIGALTSTACK_SIZE is not set
> >> > CONFIG_ACPI_TINY_POWER_BUTTON_SIGNAL=38
> >> > CONFIG_OLD_SIGSUSPEND3=y
> >> > CONFIG_COMPAT_OLD_SIGACTION=y
> >> > CONFIG_DYNAMIC_SIGFRAME=y
> >> > CONFIG_MODULE_SIG_FORMAT=y
> >> > CONFIG_MODULE_SIG=y
> >> > CONFIG_MODULE_SIG_FORCE=y
> >> > CONFIG_MODULE_SIG_ALL=y
> >> > # CONFIG_MODULE_SIG_SHA1 is not set
> >> > # CONFIG_MODULE_SIG_SHA224 is not set
> >> > CONFIG_MODULE_SIG_SHA256=y
> >> > # CONFIG_MODULE_SIG_SHA384 is not set
> >> > # CONFIG_MODULE_SIG_SHA512 is not set
> >> > CONFIG_MODULE_SIG_HASH="sha256"
> >> > CONFIG_TCP_MD5SIG=y
> >> > CONFIG_CFG80211_REQUIRE_SIGNED_REGDB=y
> >> > # DesignWare PCI Core Support
> >> > # end of DesignWare PCI Core Support
> >> > CONFIG_I2C_DESIGNWARE_CORE=y
> >> > # CONFIG_I2C_DESIGNWARE_SLAVE is not set
> >> > CONFIG_I2C_DESIGNWARE_PLATFORM=y
> >> > CONFIG_I2C_DESIGNWARE_BAYTRAIL=y
> >> > # CONFIG_I2C_DESIGNWARE_PCI is not set
> >> > # CONFIG_SPI_DESIGNWARE is not set
> >> > # CONFIG_SND_HDA_CODEC_SIGMATEL is not set
> >> > # CONFIG_USB_ISIGHTFW is not set
> >> > CONFIG_FS_VERITY_BUILTIN_SIGNATURES=y
> >> > CONFIG_INTEGRITY_SIGNATURE=y
> >> > # CONFIG_IMA_SIG_TEMPLATE is not set
> >> > CONFIG_IMA_APPRAISE_MODSIG=y
> >> > CONFIG_IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY=y
> >> > CONFIG_SIGNED_PE_FILE_VERIFICATION=y
> >> > # Certificates for signature checking
> >> > CONFIG_MODULE_SIG_KEY="certs/signing_key.pem"
> >> > CONFIG_MODULE_SIG_KEY_TYPE_RSA=y
> >> > # CONFIG_MODULE_SIG_KEY_TYPE_ECDSA is not set
> >> > # end of Certificates for signature checking
> >> > CONFIG_CHECK_SIGNATURE=y
> >> > CONFIG_SIGNATURE=y
> >> > [/CODE]
> >> >
> >> >
> >> > 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.
> >> >
> >> >
> >> > Regards,
> >> > Rupesh.
> >> > _______________________________________________
> >> > Kernelnewbies mailing list
> >> > Kernelnewbies@kernelnewbies.org
> >> > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> >> The "bad shim signature" error is probably from GRUB's "kernel"
> >> command. That might mean the "kernel" command has failed to load the
> >> kernel, and therefore the "boot" command failed because there is no
> >> kernel to transfer control to.
> >>
> >> -Rogério Valentim
> >
> > _______________________________________________
> > Kernelnewbies mailing list
> > Kernelnewbies@kernelnewbies.org
> > https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
> If your system is working well, then you don't need to compile a new
> Linux kernel. The Linux kernel rarely or never does floating-point
> calculations (which is what AVX is used for) and it also doesn't use
> SSE for string processing (which is what SSE is used for). I have
> looked at the implementation of strcmp() and strcpy() that the Linux
> kernel uses, and it doesn't use SSE. Therefore, AVX/SSE won't make a
> difference in Linux kernel performance.
>
> However, user-space applications that frequently process strings
> and/or floating-point calculations use the system's C library, which
> in most Linux distros is the GNU C library, which optimizes the
> strcmp(), strcpy() and other string-processing functions using SSE and
> math functions using AVX. But the Linux kernel configuration won't
> affect AVX/SSE in userspace.
>
> Basically, if your system is working well, you don't need to compile
> the Linux kernel to use new x86 instruction sets like SSE4 or AVX2.
>
> -Rogério Valentim
>

[-- Attachment #1.2: Type: text/html, Size: 12855 bytes --]

[-- Attachment #2: Type: text/plain, Size: 170 bytes --]

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-03-03 15:23 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-28 17:44 How to compile source code of new kernel specifically for my pc hardware with uefi secure boot Guddla Rupesh
2022-03-01  9:27 ` Greg KH
2022-03-01 11:12 ` Guddla Rupesh
2022-03-02 20:31   ` Greg KH
     [not found] ` <CALgyNi1WEeBSdfFDi5hV4KCZk5Gbwerr+CWDaqRdqqjEnDpZYA@mail.gmail.com>
2022-03-02 16:55   ` Guddla Rupesh
     [not found]     ` <CALgyNi3=c+HT9SiuJK+r5ovCyBrB+OR4fR0kQP5Z9eAbWcJwQg@mail.gmail.com>
2022-03-03 15:21       ` Guddla Rupesh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.