Skip to contentSkip to conversation

Introductory message

DISCUSSION Sumitra Sharma 6 participants 6 messages Mar 8, 2023 – Mar 9, 2023

lore
Share & tools
lore
#0 lore raw

Hi I am Sumitra Sharma, an outreachy applicant. This is my first time applying to outreachy and linux-kernel. I am currently working on setting up the enviornment. I observed that building the kernel i.e. running "make -j2" command itself is taking a lot of time. I would appreciate some suggestions on it.
Also I recieved an error stating "make[2]: *** No rule to make target 'debian/canonical-certs.pem', needed by 'certs/x509_certificate_list'. Stop." to which I edited the .config file as below
#
# 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 CONFIG_SYSTEM_TRUSTED_KEYRING=y CONFIG_SYSTEM_TRUSTED_KEYS="" CONFIG_SYSTEM_EXTRA_CERTIFICATE=y CONFIG_SYSTEM_EXTRA_CERTIFICATE_SIZE=4096 CONFIG_SECONDARY_TRUSTED_KEYRING=y CONFIG_SYSTEM_BLACKLIST_KEYRING=y CONFIG_SYSTEM_BLACKLIST_HASH_LIST="" CONFIG_SYSTEM_REVOCATION_LIST=y CONFIG_SYSTEM_REVOCATION_KEYS=""
# CONFIG_SYSTEM_BLACKLIST_AUTH_UPDATE is not set

# end of Certificates for signature checking
#1 lore raw
Quoted 5 lines · Sumitra Sharma

Hi I am Sumitra Sharma, an outreachy applicant. This is my first time applying to outreachy and linux-kernel. I am currently working on setting up the enviornment. I observed that building the kernel i.e. running "make -j2" command itself is taking a lot of time. I would appreciate some suggestions on it.

I think it would take a lot of time...

You may be able to optimize your configuration to what modules are actually used on your machine, rather than everything that your distro wants to offer. Maybe make localconfig.

Quoted 7 lines

Also I recieved an error stating "make[2]: *** No rule to make target 'debian/canonical-certs.pem', needed by 'certs/x509_certificate_list'. Stop." to which I edited the .config file as below
#
# Certificates for signature checking
#
CONFIG_MODULE_SIG_KEY="certs/signing_key.pem"

I just have "" as the string.

julia

Quoted 15 lines

CONFIG_MODULE_SIG_KEY_TYPE_RSA=y
# CONFIG_MODULE_SIG_KEY_TYPE_ECDSA is not set
CONFIG_SYSTEM_TRUSTED_KEYRING=y
CONFIG_SYSTEM_TRUSTED_KEYS=""
CONFIG_SYSTEM_EXTRA_CERTIFICATE=y
CONFIG_SYSTEM_EXTRA_CERTIFICATE_SIZE=4096
CONFIG_SECONDARY_TRUSTED_KEYRING=y
CONFIG_SYSTEM_BLACKLIST_KEYRING=y
CONFIG_SYSTEM_BLACKLIST_HASH_LIST=""
CONFIG_SYSTEM_REVOCATION_LIST=y
CONFIG_SYSTEM_REVOCATION_KEYS=""
# CONFIG_SYSTEM_BLACKLIST_AUTH_UPDATE is not set

# end of Certificates for signature checking
#5 lore raw
In reply to Sumitra Sharma
Quoted 1 line · Sumitra Sharma

Hi I am Sumitra Sharma, an outreachy applicant. This is my first time

Hi Sumitra,

It's good that you posted this message for all to see and learn from.

It would be even better if posted as a new message and subject line.

There is another setup related question that is buried beneath an intro. It's better to do a new message with appropriate subject line.

Thanks,
Alison

Quoted 25 lines

applying to outreachy and linux-kernel. I am currently working on setting up the enviornment. I observed that building the kernel i.e. running "make -j2" command itself is taking a lot of time. I would appreciate some suggestions on it.
Also I recieved an error stating "make[2]: *** No rule to make target 'debian/canonical-certs.pem', needed by 'certs/x509_certificate_list'. Stop." to which I edited the .config file as below
#
# 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 CONFIG_SYSTEM_TRUSTED_KEYRING=y CONFIG_SYSTEM_TRUSTED_KEYS="" CONFIG_SYSTEM_EXTRA_CERTIFICATE=y CONFIG_SYSTEM_EXTRA_CERTIFICATE_SIZE=4096 CONFIG_SECONDARY_TRUSTED_KEYRING=y CONFIG_SYSTEM_BLACKLIST_KEYRING=y CONFIG_SYSTEM_BLACKLIST_HASH_LIST="" CONFIG_SYSTEM_REVOCATION_LIST=y CONFIG_SYSTEM_REVOCATION_KEYS=""
# CONFIG_SYSTEM_BLACKLIST_AUTH_UPDATE is not set

# end of Certificates for signature checking
#2 lore raw
In reply to Julia Lawall
Quoted 11 lines · Julia Lawall
Quoted 5 lines · Sumitra Sharma

Hi I am Sumitra Sharma, an outreachy applicant. This is my first time applying to outreachy and linux-kernel. I am currently working on setting up the enviornment. I observed that building the kernel i.e. running "make -j2" command itself is taking a lot of time. I would appreciate some suggestions on it.

I think it would take a lot of time...

Also:

-j is an option which chooses how many threads to build in parallel.

If you have enough cores on your machine you could increase '2' to something larger.

Ira

Quoted 33 lines

You may be able to optimize your configuration to what modules are actually used on your machine, rather than everything that your distro wants to offer. Maybe make localconfig.

Quoted 7 lines

Also I recieved an error stating "make[2]: *** No rule to make target 'debian/canonical-certs.pem', needed by 'certs/x509_certificate_list'. Stop." to which I edited the .config file as below
#
# Certificates for signature checking
#
CONFIG_MODULE_SIG_KEY="certs/signing_key.pem"

I just have "" as the string.

julia

Quoted 15 lines

CONFIG_MODULE_SIG_KEY_TYPE_RSA=y
# CONFIG_MODULE_SIG_KEY_TYPE_ECDSA is not set
CONFIG_SYSTEM_TRUSTED_KEYRING=y
CONFIG_SYSTEM_TRUSTED_KEYS=""
CONFIG_SYSTEM_EXTRA_CERTIFICATE=y
CONFIG_SYSTEM_EXTRA_CERTIFICATE_SIZE=4096
CONFIG_SECONDARY_TRUSTED_KEYRING=y
CONFIG_SYSTEM_BLACKLIST_KEYRING=y
CONFIG_SYSTEM_BLACKLIST_HASH_LIST=""
CONFIG_SYSTEM_REVOCATION_LIST=y
CONFIG_SYSTEM_REVOCATION_KEYS=""
# CONFIG_SYSTEM_BLACKLIST_AUTH_UPDATE is not set

# end of Certificates for signature checking
#3 lore raw
Quoted 8 lines · On mercoledì 8 marzo 2023 18:13:33 CET Ira Weiny wrote:
Quoted 7 lines · Julia Lawall
Quoted 5 lines · Sumitra Sharma

Hi I am Sumitra Sharma, an outreachy applicant. This is my first time applying to outreachy and linux-kernel. I am currently working on setting up the environment. I observed that building the kernel i.e. running "make -j2" command itself is taking a lot of time. I would appreciate some suggestions on it.

Quoted 9 lines
Quoted 1 line

I think it would take a lot of time...

Also:

-j is an option which chooses how many threads to build in parallel.

If you have enough cores on your machine you could increase '2' to something larger.

Sumitra,

That "something larger" can be calculated with a rule of thumb and then adapted to your necessities...

Look at /proc/cpuinfo if you don't know how many cores you have in your system...

# cat /proc/cpuinfo | grep processor
processor: 0
processor: 1
processor: 2
processor: 3
processor: 4
processor: 5
processor: 6
processor: 7
processor: 8
processor: 9
processor: 10
processor: 11

The output shows that I'm using a 12 core SMT system (https://
en.wikipedia.org/wiki/Simultaneous_multithreading).

So "-j12" is my usual choice for building a kernel in the host, minus the number of SMT cores reserved for running VMs.

Thanks,

Fabio

#4 lore raw
Quoted 41 lines · Fabio M. De Francesco
Quoted 8 lines · On mercoledì 8 marzo 2023 18:13:33 CET Ira Weiny wrote:
Quoted 7 lines · Julia Lawall
Quoted 5 lines · Sumitra Sharma

Hi I am Sumitra Sharma, an outreachy applicant. This is my first time applying to outreachy and linux-kernel. I am currently working on setting up the environment. I observed that building the kernel i.e. running "make -j2" command itself is taking a lot of time. I would appreciate some suggestions on it.

Quoted 9 lines
Quoted 1 line

I think it would take a lot of time...

Also:

-j is an option which chooses how many threads to build in parallel.

If you have enough cores on your machine you could increase '2' to something larger.

Sumitra,

That "something larger" can be calculated with a rule of thumb and then adapted to your necessities...

Look at /proc/cpuinfo if you don't know how many cores you have in your system...

# cat /proc/cpuinfo | grep processor
processor: 0
processor: 1
processor: 2
processor: 3
processor: 4
processor: 5
processor: 6
processor: 7
processor: 8
processor: 9
processor: 10
processor: 11
Quoted 5 lines

The output shows that I'm using a 12 core SMT system (https://
en.wikipedia.org/wiki/Simultaneous_multithreading).

So "-j12" is my usual choice for building a kernel in the host, minus the number of SMT cores reserved for running VMs.

or just run 'make -jnproc'. Notice it's not single quote "'" but "`" around nproc to execute the command. The return value of nproc is fed to make. That what it just picks the max threads on whatever system you are on.

Quoted 9 lines

Thanks,

Fabio