Porteus Kernel Builder

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...
User avatar
Rava
Contributor
Contributor
Posts: 2853
Joined: 11 Jan 2011, 02:46
Distribution: Porteus 5.0rc2 x86-64 XFCe
Location: Forests of Germany

Porteus Kernel Builder

Post#1081 by Rava » 08 Jan 2021, 07:42

Blaze wrote:
07 Jan 2021, 19:55
I didn't used the zstd module compression patches :wall: :ROFL:
Seems I must to use 0009-add-zstd-compressed-modules.patch
Not created a kernel in ages myself, and for sure not one in need of xz or zstd compression, but does the above mean this version Porteus Kernel Builder (Post by Blaze #80931) should be updated to include the 0009-add-zstd-compressed-modules.patch ?
Cheers!
Yours Rava

User avatar
Blaze
DEV Team
DEV Team
Posts: 3088
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

Porteus Kernel Builder

Post#1082 by Blaze » 08 Jan 2021, 09:58

Rava wrote:
08 Jan 2021, 07:42
should be updated to include the 0009-add-zstd-compressed-modules.patch ?
No, it does not need. Its experimental patch for very faster booting Porteus.
Linux 5.4.85-porteus #1 SMP Wed Dec 23 12:36:37 UTC 2020 x86_64 Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Tobago PRO [Radeon R7 360 / R9 360 OEM] (rev 81) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

roadie
Full of knowledge
Full of knowledge
Posts: 304
Joined: 02 Jan 2011, 18:41
Distribution: Porteus 5.0-RC1
Location: In a hayfield

Porteus Kernel Builder

Post#1083 by roadie » 08 Jan 2021, 17:52

When compiling the kernel to include zstd module compression, the system you're using must have the patched kmod in place and working. The reason for this is that when

Code: Select all

make modules && make modules_ install
is executed, depmod is run at the end on the newly installed modules. If you're using the standard kmod version in Porteus, then depmod doesn't recognize the .zst modules.

The result of this is that the files in /lib/modules/5.10.4-porteus are not updated and modules.dep is in fact empty. So, when you boot with your shiny new modules, modprobe doesn't recognize them and can't load them. This is one of the reasons my kernel isn't acting nice, I've yet to find the others........but on the bright side, it only took an entire day to figure this out.

EDIT: This still doesn't fix the depmod problem, there are a couple of other files that still aren't updated, I've yet to figure out why they're not.

User avatar
babam
Samurai
Samurai
Posts: 181
Joined: 16 Nov 2016, 10:30
Distribution: Porteus 3.2.2 Xfce K5.10.5
Location: Rainy city

Porteus Kernel Builder

Post#1084 by babam » 09 Jan 2021, 12:49

roadie wrote:
08 Jan 2021, 17:52

EDIT: This still doesn't fix the depmod problem, there are a couple of other files that still aren't updated, I've yet to figure out why they're not.
You must use kmod with zstd support, try to compile kmod with zstd support.

kmod zstd support

Good luck.
Sorry, my English is bad.

roadie
Full of knowledge
Full of knowledge
Posts: 304
Joined: 02 Jan 2011, 18:41
Distribution: Porteus 5.0-RC1
Location: In a hayfield

Porteus Kernel Builder

Post#1085 by roadie » 09 Jan 2021, 18:01

babam wrote:
09 Jan 2021, 12:49
roadie wrote:
08 Jan 2021, 17:52

EDIT: This still doesn't fix the depmod problem, there are a couple of other files that still aren't updated, I've yet to figure out why they're not.
You must use kmod with zstd support, try to compile kmod with zstd support.

kmod zstd support

Good luck.
babam,

Yes, it has to be a patched kmod, and I'm using kmod-28 which was released a couple of days ago. It does work to modprobe a .zst module. The problem seems to be that kmod and udev are not playing together nicely. The kernel boots well, udev finds all the hardware, but modprobe isn't called for some reason.

The system works as far as functioning well. If the modules were loaded when they should be, then it would boot to the desktop like any other. It does with gzipped modules, as well as xz compressed modules, no problems with either one. It's the zstd compressed ones that give trouble, and I have to think it's because kmod isn't doing what it should be doing.

I tried the patch at the link you show with kmod-27, but it wouldn't compile properly whereas kmod-28 built well and is already patched. It wouldn't take any patches I tried to apply, saying that those files were already done. As I said, it handles the compressed modules fine when you call it manually, it just doesn't do it during the boot process when it should. I'll try building kmod-27 again with the Arch patch and see if there's a difference.

User avatar
babam
Samurai
Samurai
Posts: 181
Joined: 16 Nov 2016, 10:30
Distribution: Porteus 3.2.2 Xfce K5.10.5
Location: Rainy city

Porteus Kernel Builder

Post#1086 by babam » 09 Jan 2021, 18:45

roadie wrote:
09 Jan 2021, 18:01
I tried the patch at the link you show with kmod-27, but it wouldn't compile properly
Maybe this will help kmod patch
Sorry, my English is bad.

roadie
Full of knowledge
Full of knowledge
Posts: 304
Joined: 02 Jan 2011, 18:41
Distribution: Porteus 5.0-RC1
Location: In a hayfield

Porteus Kernel Builder

Post#1087 by roadie » 09 Jan 2021, 20:09

babam wrote:
09 Jan 2021, 18:45
roadie wrote:
09 Jan 2021, 18:01
I tried the patch at the link you show with kmod-27, but it wouldn't compile properly
Maybe this will help kmod patch
Thanks babam, but that one isn't finding the modules with modprobe. I recompiled kmod-28 with the same results, it loads the modules manually, but not when booting.

Code: Select all

root@porteus:/home/guest# kmod -V
kmod version 28
+ZSTD +XZ +ZLIB -LIBCRYPTO -EXPERIMENTAL
So, I don't think the problem is kmod except maybe how it's working with udev. But, I noticed an error in dmesg:

Code: Select all

Module has invalid ELF header
From what I've seen, that error is caused by compiling on one machine and using on a different machine. That's not the case here, kernels are compiled and used on the same machine. All the other kernels work fine, uncompressed modules, gzipped, xz compressed, no problems and that error isn't in dmesg with any of them.

I use the same .config to compile for zstd as for the others, just changing the compression algorithm, nothing else. It's frustrating in that zstd is the only thing different, yet it won't work properly. I'm posting this from the zstd version and everything seems fine, I can modprobe whatever I need, no errors show.

Code: Select all

ls /lib/modules/5.10.4-porteus/kernel/drivers/hid
hid-lg-g15.ko.zst       hid-logitech-hidpp.ko.zst  hid-multitouch.ko.zst
hid-logitech-dj.ko.zst  hid-logitech.ko.zst        i2c-hid/
I'll try different things in the .config, maybe something there is causing problems.

roadie
Full of knowledge
Full of knowledge
Posts: 304
Joined: 02 Jan 2011, 18:41
Distribution: Porteus 5.0-RC1
Location: In a hayfield

Porteus Kernel Builder

Post#1088 by roadie » 09 Jan 2021, 21:27

Finally, it's working.

I rebuilt 001-core.xzm to update the kmod files which I think were being messed with by the Porteus version. The kmod-28 locates the library files in /usr/lib rather than lib64 which is where Porteus has them. It boots to the desktop with no errors and seems to run good, too early to tell. I also went to 5.10.5 for the kernel, I doubt that makes a difference as I used the same .config as for 5.10.4.

Code: Select all

guest@porteus:~$ uname -r
5.10.5-porteus

Code: Select all

guest@porteus:~$ ls /lib/modules/5.10.5-porteus/kernel/drivers/hid
hid-lg-g15.ko.zst       hid-logitech-hidpp.ko.zst  hid-multitouch.ko.zst
hid-logitech-dj.ko.zst  hid-logitech.ko.zst        i2c-hid/
Now, on to the next shiny thing.

User avatar
babam
Samurai
Samurai
Posts: 181
Joined: 16 Nov 2016, 10:30
Distribution: Porteus 3.2.2 Xfce K5.10.5
Location: Rainy city

Porteus Kernel Builder

Post#1089 by babam » 10 Jan 2021, 05:09

roadie wrote:
09 Jan 2021, 21:27
Finally, it's working.
Congrats! :thumbsup:
Is the boot time getting faster?
Sorry, my English is bad.

User avatar
Blaze
DEV Team
DEV Team
Posts: 3088
Joined: 28 Dec 2010, 11:31
Distribution: ⟰ Porteus current ☯ all DEs ☯
Location: ☭ Russian Federation, Lipetsk region, Dankov
Contact:

Porteus Kernel Builder

Post#1090 by Blaze » 10 Jan 2021, 08:45

Code: Select all

Sat Jan  9 20:53:30 UTC 2021
a/kmod-28-x86_64-1.txz:  Upgraded.
  Built using --with-zstd to support zstd compressed modules. This means that
  this package depends on libzstd or it will not function.
  Thanks to Robby Workman
Awesome. Thanks.
Linux 5.4.85-porteus #1 SMP Wed Dec 23 12:36:37 UTC 2020 x86_64 Intel(R) Core(TM) i5-6600K CPU @ 3.50GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Tobago PRO [Radeon R7 360 / R9 360 OEM] (rev 81) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

raja
Shogun
Shogun
Posts: 256
Joined: 02 May 2017, 09:51
Distribution: v3.2.2-32 and v5.0-rc1-zstd-64
Location: Chennai,India

Porteus Kernel Builder

Post#1091 by raja » 10 Jan 2021, 08:53

I don think there will be any noticeable speed boost. As discussed long ago , Porteus boots to Desktop in 12 seconds(AUFS), and 10 seconds with Nekoś overlay and with application modules compressed with zstd.

If you see dmesg, Kernel completes its main job in under 2 seconds further delay of 4-7 seconds is only due to device enumeration and network related
activity.

So kernel,initrd and kernel modules compression with zstd, may not result in any benefits.

3-4 seconds of boot time is consumed by xorg, after init 4.
Linux Kernel-4.4.243-32 bit; Linux kernel-5.9.1-64 bit.

User avatar
fortix
White ninja
White ninja
Posts: 7
Joined: 11 Dec 2011, 10:42
Location: Berlin

Porteus Kernel Builder

Post#1092 by fortix » 10 Jan 2021, 14:46

roadie wrote:
09 Jan 2021, 21:27
I rebuilt 001-core.xzm
Hi roadie, I was wondering, if U could share Ur rebuilt 001-core.xzm with us. This might inevitably solve a couple of prob´s I´ve been facing - thanks in advance :)

User avatar
babam
Samurai
Samurai
Posts: 181
Joined: 16 Nov 2016, 10:30
Distribution: Porteus 3.2.2 Xfce K5.10.5
Location: Rainy city

Porteus Kernel Builder

Post#1093 by babam » 10 Jan 2021, 15:53

fortix,

Code: Select all

$ getpkg kmod
Sorry, my English is bad.

roadie
Full of knowledge
Full of knowledge
Posts: 304
Joined: 02 Jan 2011, 18:41
Distribution: Porteus 5.0-RC1
Location: In a hayfield

Porteus Kernel Builder

Post#1094 by roadie » 10 Jan 2021, 16:28

babam wrote:
10 Jan 2021, 05:09
roadie wrote:
09 Jan 2021, 21:27
Finally, it's working.
Congrats! :thumbsup:
Is the boot time getting faster?
Thanks babam,

I wish I could say it's blazing fast, but it's not much different to anything else. It might take 1 second off the boot time compared to xz, but that's it. We have to look elsewhere for it.

roadie
Full of knowledge
Full of knowledge
Posts: 304
Joined: 02 Jan 2011, 18:41
Distribution: Porteus 5.0-RC1
Location: In a hayfield

Porteus Kernel Builder

Post#1095 by roadie » 10 Jan 2021, 16:35

fortix wrote:
10 Jan 2021, 14:46
roadie wrote:
09 Jan 2021, 21:27
I rebuilt 001-core.xzm
Hi roadie, I was wondering, if U could share Ur rebuilt 001-core.xzm with us. This might inevitably solve a couple of prob´s I´ve been facing - thanks in advance :)
fortix,

I'm not using the modified core, I built a module instead. I like to keep the base files original so they don't cause problems when testing stuff.

https://www.mediafire.com/file/gvs1eg8c ... s.xzm/file

Post Reply