Kernel Builder script -- simple version

Here is a place for your projects which are not officially supported by the Porteus Team. For example: your own kernel patched with extra features; desktops not included in the standard ISO like Gnome; base modules that are different than the standard ISO, etc...
beny
Full of knowledge
Full of knowledge
Posts: 2092
Joined: 02 Jan 2011, 11:33
Location: italy

Kernel builder script -- simple version

Post#46 by beny » 28 Feb 2022, 20:34

hi Ed_P you can do a try to change the devel version seem that you have not all you need to build it maybe if you have a different one i have run the script and now is running without error well i wait the end of....and if you want to know how to run the script run top the cc1 are the trread of the build.
and the kernel script have done the task so like the fail of the script with blaze the devel package have something wrong.

User avatar
Ed_P
Contributor
Contributor
Posts: 8360
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Kernel builder script -- simple version

Post#47 by Ed_P » 28 Feb 2022, 22:23

And another Porteus 4.0 fail.

Code: Select all

guest@porteus:/mnt/sda6/porteus4.0/kernelBuilder$ ./kernel.sh 5.16.11
Please enter root's password below: 
Password: 

Initial setup...
Downloading kernel source code...
--2022-02-28 15:59:04--  https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/linux-5.16.11.tar.xz
Resolving mirrors.edge.kernel.org (mirrors.edge.kernel.org)... 2604:1380:1:3600::1, 147.75.197.195
Connecting to mirrors.edge.kernel.org (mirrors.edge.kernel.org)|2604:1380:1:3600::1|:443... connected.
WARNING: cannot verify mirrors.edge.kernel.org's certificate, issued by ‘CN=R3,O=Let's Encrypt,C=US’:
  Issued certificate has expired.
HTTP request sent, awaiting response... 200 OK
Length: 127555284 (122M) [application/x-xz]
Saving to: ‘linux-5.16.11.tar.xz’

linux-5.16.11.tar.x 100%[===================>] 121.65M  2.41MB/s    in 52s     

2022-02-28 15:59:56 (2.33 MB/s) - ‘linux-5.16.11.tar.xz’ saved [127555284/127555284]

Extracting kernel source code...
Copying .config file...
Downloading AUFS...
Patching AUFS...

Mon Feb 28 16:00:29 EST 2022

Building kernel (this may take up to an hour)...
/bin/sh: zstd: command not found
make[2]: *** [arch/x86/boot/compressed/Makefile:139: arch/x86/boot/compressed/vmlinux.bin.zst] Error 127
make[2]: *** Deleting file 'arch/x86/boot/compressed/vmlinux.bin.zst'
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [arch/x86/boot/Makefile:115: arch/x86/boot/compressed/vmlinux] Error 2
make: *** [arch/x86/Makefile:253: bzImage] Error 2
make: *** Waiting for unfinished jobs....
Fail to build kernel.
guest@porteus:/mnt/sda6/porteus4.0/kernelBuilder$ 
My latest change:

Code: Select all

# make olddefconfig > /dev/null 2>&1 && make -j$cpuThreads > /dev/null 2>&1 || { echo "Fail to build kernel."; exit 1; }
make olddefconfig > olddefconfig.txt && make -j$cpuThreads > j$cputhreads.txt || { echo "Fail to build kernel."; exit 1; }
But no .txt files. :o :%)
beny wrote:
28 Feb 2022, 20:34
you can do a try to change the devel version
I'm running with the Porteus 4.0 version, to ensure the 5.16.11 kernel supports Porteus 4.0. The script ran fine when I did the upgrade for Porteus 5.0 and used the Porteus 5.0 05-devel.xzm module.
beny wrote:
28 Feb 2022, 20:34
if you want to know how to run the script run top the cc1 are the trread of the build.
:%) :%)
beny wrote:
28 Feb 2022, 20:34
the kernel script have done the task so like the fail of the script with blaze the devel package have something wrong.
Indeed very possible, but can a 05-devel.xzm from a different release be used without making an invalid kernel for 4.0?? The 5.16.11 kernel I made for Porteus 5.0 didn't help with the Porteus 4.0 problems on the new notebook when I added it to the iso.
Ed

beny
Full of knowledge
Full of knowledge
Posts: 2092
Joined: 02 Jan 2011, 11:33
Location: italy

Kernel builder script -- simple version

Post#48 by beny » 28 Feb 2022, 22:58

hi Ed_P, the top software show you the real tread of a build, in mine i have six tread full power cc1 on top show you the work of the kernel script but why you have an oldconfig running the kernel script work with the own kernel config, the devel need only to build software,cmake or ninja gcc and other,i can confirm that fulalas script work so the issue is into other place. well i try to install the porteus 4 on an usb key ....well i have to search one and report here

beny
Full of knowledge
Full of knowledge
Posts: 2092
Joined: 02 Jan 2011, 11:33
Location: italy

Kernel builder script -- simple version

Post#49 by beny » 01 Mar 2022, 00:10

well the porteus4 is an old system you can run the 5.16.11-porteus i have done this, but no way to build kernel this version is based on the 14.2 with a gcc very old so Ed_P you are right you can't build kernel on this system,but you can run a new one.

User avatar
Ed_P
Contributor
Contributor
Posts: 8360
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Kernel builder script -- simple version

Post#50 by Ed_P » 01 Mar 2022, 05:21

The 5.16.11 kernel that I built for Porteus 5.0 works with Porteus 5.0 and the new notebook but the Porteus 4.0 ISO I made with the same kernel does not work on the new notebook. No sound and no wifi and the no wifi problem is why I'm trying to build the kernel for Porteus 4.0 on the old notebook. I use 4.0 for USM updates and some new modules.
Ed

User avatar
M. Eerie
Moderator
Moderator
Posts: 622
Joined: 31 Aug 2017, 21:18
Distribution: Nemesis Xfce/MATE x64

Kernel builder script -- simple version

Post#51 by M. Eerie » 02 Mar 2022, 17:30

I've successfully built kernel 5.15.25 with Porteus 5.0 rc3 LXQt and 05-devel module.

However I can't success in Nemesis.

What is the difference between the two development modules?

The last one I built (5.15.13), I did it with Nemesis, I'd swear.
> Does not compute_ 🖖

https://forum.porteus.org/viewtopic.php?p=94310#p94310
https://forum.porteus.org/viewtopic.php?p=84002#p84002
https://forum.porteus.org/viewtopic.php?p=77174#p77174
https://forum.porteus.org/viewtopic.php?f=39&t=8584

User avatar
Ed_P
Contributor
Contributor
Posts: 8360
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Kernel builder script -- simple version

Post#52 by Ed_P » 02 Mar 2022, 18:48

Who/what searches for the porteus-v5.0-x86_64.cfg file when booting and where does it look for it? Didn't Porteus 4.0 have 2 porteus cfg files? Does Porteus 5.0 also? :unknown:
Ed

User avatar
Ed_P
Contributor
Contributor
Posts: 8360
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Kernel builder script -- simple version

Post#53 by Ed_P » 14 Mar 2022, 22:38

fulalas my latest kernel build attempt.

Code: Select all

guest@porteus:/mnt/nvme0n1p7/porteus5.0/rc3ISOModules/kernelBuilder$ ./kernel.sh 5.16.14
05-devel.xzm needs to be active.
guest@porteus:/mnt/nvme0n1p7/porteus5.0/rc3ISOModules/kernelBuilder$ ./kernel.sh 5.16.14
Please enter root's password below: 
Password: 

Initial setup...
Downloading kernel source code...
Extracting kernel source code...
Copying .config file...
Downloading AUFS...
Patching AUFS...

Mon Mar 14 18:27:33 EDT 2022

Building kernel (this may take up to an hour)...
Fail to build kernel.
guest@porteus:/mnt/nvme0n1p7/porteus5.0/rc3ISOModules/kernelBuilder$ 
:(

Added in 27 minutes 36 seconds:
Interesting.

Code: Select all

guest@porteus:/mnt/nvme0n1p7/porteus5.0/rc3ISOModules/kernelBuilder$ ./kernel.sh 5.16.14
Please enter root's password below: 
Password: 

Initial setup...
Downloading kernel source code...
Extracting kernel source code...
Copying .config file...
Downloading AUFS...
Patching AUFS...

Mon Mar 14 19:01:34 EDT 2022

Building kernel (this may take up to an hour)...
as: error while loading shared libraries: libbfd-2.36.1-slack15.so: cannot open shared object file: No such file or directory
make[1]: *** [scripts/Makefile.host:95: scripts/basic/fixdep] Error 1
make: *** [Makefile:555: scripts_basic] Error 2
Fail to build kernel.
guest@porteus:/mnt/nvme0n1p7/porteus5.0/rc3ISOModules/kernelBuilder$ uname -a
Linux porteus.example.net 5.16.14-porteus #1 SMP PREEMPT Fri Mar 11 22:12:13 UTC 2022 x86_64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz GenuineIntel GNU/Linux
guest@porteus:/mnt/nvme0n1p7/porteus5.0/rc3ISOModules/kernelBuilder$ 
I'll retry with the working 5.16.11 kernel.

Added in 6 hours 11 minutes 54 seconds:
Same error with 5.16.11. :(

Code: Select all

guest@porteus:/mnt/nvme0n1p7/porteus5.0/rc3ISOModules/kernelBuilder$ ./kernel.sh 5.16.14
Please enter root's password below: 
Password: 

Initial setup...
Downloading kernel source code...
Extracting kernel source code...
Copying .config file...
Downloading AUFS...
Patching AUFS...

Tue Mar 15 00:50:34 EDT 2022

Building kernel (this may take up to an hour)...
as: error while loading shared libraries: libbfd-2.36.1-slack15.so: cannot open shared object file: No such file or directory
make[1]: *** [scripts/Makefile.host:95: scripts/basic/fixdep] Error 1
make: *** [Makefile:555: scripts_basic] Error 2
Fail to build kernel.
guest@porteus:/mnt/nvme0n1p7/porteus5.0/rc3ISOModules/kernelBuilder$ uname -a
Linux porteus.example.net 5.16.11-porteus #1 SMP PREEMPT Thu Feb 24 15:07:26 EST 2022 x86_64 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz GenuineIntel GNU/Linux
guest@porteus:/mnt/nvme0n1p7/porteus5.0/rc3ISOModules/kernelBuilder$ 
Added in 23 hours 52 minutes 52 seconds:
So, where do I find libbfd-2.36.1-slack15.so and what folder do I put it in? :%)

Added in 1 hour 1 second:
Ed_P wrote:
16 Mar 2022, 05:11
So, where do I find libbfd-2.36.1-slack15.so
Apparently it is in the <>. :good:

Added in 27 minutes 32 seconds:

Code: Select all

guest@porteus:/mnt/nvme0n1p7/porteus5.0/rc3ISOModules/kernelBuilder$ ./kernel.sh 5.16.14
05-devel.xzm needs to be active.
guest@porteus:/mnt/nvme0n1p7/porteus5.0/rc3ISOModules/kernelBuilder$ ./kernel.sh 5.16.14
Please enter root's password below: 
Password: 

Initial setup...
Downloading kernel source code...
Extracting kernel source code...
Copying .config file...
Downloading AUFS...
Patching AUFS...

Wed Mar 16 02:02:16 EDT 2022

Building kernel (this may take up to an hour)...
Creating symlinks...
Downloading firmware...
Extracting firmware...
Adding firmware...
./kernel.sh: line 122: [: too many arguments
Blacklisting...
Copying cryptsetup...
Creating kernel xzm module...
Creating crippled xzm module...
Cleaning up...
Finished successfully.

The following files were generated:
vmlinuz -> should go into boot/syslinux
000-kernel.xzm -> should go into porteus/base
06-crippled_sources-5.16.14.xzm -> should go into porteus/base
guest@porteus:/mnt/nvme0n1p7/porteus5.0/rc3ISOModules/kernelBuilder$ date
Wed Mar 16 02:33:44 EDT 2022
guest@porteus:/mnt/nvme0n1p7/porteus5.0/rc3ISOModules/kernelBuilder$ 
Ed

beny
Full of knowledge
Full of knowledge
Posts: 2092
Joined: 02 Jan 2011, 11:33
Location: italy

Kernel builder script -- simple version

Post#54 by beny » 16 Mar 2022, 06:39

hi Ed_P this is part of binutils that if i remember well is modified by porteus crew so you have to see if the lib is in.

User avatar
Ed_P
Contributor
Contributor
Posts: 8360
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Kernel builder script -- simple version

Post#55 by Ed_P » 16 Mar 2022, 16:18

I suspect you are right beny because the last run was with updated base mods and it ran. :happy62:

It's also interesting to note that the last run was with this change to the script and it produced no output. :)

Code: Select all

#make olddefconfig > /dev/null 2>&1 && make -j$cpuThreads > /dev/null 2>&1 || { echo "Fail to build kernel."; exit 1; }
make olddefconfig > /dev/null      && make -j$cpuThreads > /dev/null      || { echo "Fail to build kernel."; exit 1; }
Ed

beny
Full of knowledge
Full of knowledge
Posts: 2092
Joined: 02 Jan 2011, 11:33
Location: italy

Kernel builder script -- simple version

Post#56 by beny » 16 Mar 2022, 18:48

hi Ed_P the kernel version have changed to 5.16.15 check the script again if work

User avatar
Ed_P
Contributor
Contributor
Posts: 8360
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Kernel builder script -- simple version

Post#57 by Ed_P » 17 Mar 2022, 16:50

Thank you beny. I'm posting with it.

Added in 4 hours 48 minutes 50 seconds:
5.16.15 Mouse works on the Lenovo notebook, without the pci=nocrs parameter but no wifi network support.
Works fine so far on the Dell.

Added in 1 hour 42 minutes 51 seconds:
5.16.15 Works with TightVNC's vncviewer of remote desktops. :good:

A new base for me.

Added in 31 minutes 3 seconds:
Need to try it with Porteus 4.0 and on my old Dell notebook.

Added in 5 hours 34 minutes 28 seconds:
It's doesn't help booting Porteus 4.0 on the new Dell.
Ed

beny
Full of knowledge
Full of knowledge
Posts: 2092
Joined: 02 Jan 2011, 11:33
Location: italy

Kernel builder script -- simple version

Post#58 by beny » 18 Mar 2022, 16:41

hi Ed_P for porteus 4.0 you can try to build the 5.10.106 i am not sure that the aufs patch work for the old kernel version like the 5.4.185,but you can try to build it.

User avatar
Ed_P
Contributor
Contributor
Posts: 8360
Joined: 06 Feb 2013, 22:12
Distribution: Cinnamon 5.01 ISO
Location: Western NY, USA

Kernel builder script -- simple version

Post#59 by Ed_P » 18 Mar 2022, 17:11

Thanks beny. Does 5.10.106 have HVMe drive support?
Ed

beny
Full of knowledge
Full of knowledge
Posts: 2092
Joined: 02 Jan 2011, 11:33
Location: italy

Kernel builder script -- simple version

Post#60 by beny » 18 Mar 2022, 17:36

hi Ed_P if you can use the config like usual:
#
# NVME Support
#
CONFIG_NVME_CORE=y
CONFIG_BLK_DEV_NVME=m
CONFIG_NVME_MULTIPATH=y
CONFIG_NVME_FABRICS=y
CONFIG_NVME_RDMA=m
CONFIG_NVME_FC=y
CONFIG_NVME_TCP=y
# CONFIG_NVME_TARGET is not set
# end of NVME Support
this is in my config for the 5.10.106 so i think yes....

Post Reply