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...
raja
Shogun
Shogun
Posts: 434
Joined: 02 May 2017, 09:51
Distribution: v3.2.2-32 and Porteus-Artix-64
Location: Chennai,India

Porteus Kernel Builder

Post#586 by raja » 25 Jun 2019, 09:13

nekosan, May be you can include support fot zstd.

Pseudo filesystems:

CONFIG_SQUASHFS_ZSTD=y

Thanks.
Linux Kernel-4.4.272 -32 bit; Linux Kernel-5.4.185 - 64 bit

neko
DEV Team
DEV Team
Posts: 2109
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

Porteus Kernel Builder

Post#587 by neko » 25 Jun 2019, 13:41

1. "Porteus Kernel Builder" was updated.
(1) Shell script
The number of CPUs is used in option -j of make command for best performance.
It was a fixed number 4. It might be mismatched with the number of real CPUs.
It is gotten from number of real CPUs with "nproc --all" command at updated version.
@fulalas, thank you for your advice.

(2) config data
Setting "CONFIG_SQUASHFS_ZSTD=y" was requested by raja.

=== Before

Code: Select all

% grep CONFIG_SQUASHFS_ZSTD /usr/local/share/mkKernel/lib/v*/*.config
/usr/local/share/mkKernel/lib/v4.14/32bit.config:CONFIG_SQUASHFS_ZSTD=y
/usr/local/share/mkKernel/lib/v4.14/64bit.config:CONFIG_SQUASHFS_ZSTD=y
/usr/local/share/mkKernel/lib/v4.15/32bit.config:CONFIG_SQUASHFS_ZSTD=y
/usr/local/share/mkKernel/lib/v4.15/64bit.config:CONFIG_SQUASHFS_ZSTD=y
/usr/local/share/mkKernel/lib/v4.16-rc/32bit.config:CONFIG_SQUASHFS_ZSTD=y
/usr/local/share/mkKernel/lib/v4.16-rc/32bit.org-18.05.13.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v4.16-rc/32bit.org-18.05.13.i586.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v4.16-rc/32bit.org.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v4.16-rc/64bit.config:CONFIG_SQUASHFS_ZSTD=y
/usr/local/share/mkKernel/lib/v4.16-rc/64bit.org-18.05.13.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v4.16-rc/64bit.org.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v4.16/32bit.config:CONFIG_SQUASHFS_ZSTD=y
/usr/local/share/mkKernel/lib/v4.16/32bit.org-18.05.13.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v4.16/32bit.org-18.05.13.i586.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v4.16/32bit.org.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v4.16/64bit.config:CONFIG_SQUASHFS_ZSTD=y
/usr/local/share/mkKernel/lib/v4.16/64bit.org-18.05.13.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v4.16/64bit.org.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v4.17/32bit.NVIDIA.config:CONFIG_SQUASHFS_ZSTD=y
/usr/local/share/mkKernel/lib/v4.17/32bit.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v4.17/32bit.old.config:CONFIG_SQUASHFS_ZSTD=y
/usr/local/share/mkKernel/lib/v4.17/64bit.NVIDIA.config:CONFIG_SQUASHFS_ZSTD=y
/usr/local/share/mkKernel/lib/v4.17/64bit.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v4.17/64bit.old.config:CONFIG_SQUASHFS_ZSTD=y
/usr/local/share/mkKernel/lib/v4.18-rc/32bit.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v4.18-rc/64bit.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v4.18/32bit.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v4.18/64bit.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v4.19/32bit.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v4.19/64bit.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v4.20/32bit.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v4.20/64bit.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v5.0-rc/32bit.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v5.0-rc/64bit.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v5.0/32bit.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v5.0/64bit.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v5.1-rc/32bit.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v5.1-rc/64bit.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v5.1/32bit.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v5.1/64bit.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v5.2-rc/32bit.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v5.2-rc/64bit.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v5.2/32bit.config:# CONFIG_SQUASHFS_ZSTD is not set
/usr/local/share/mkKernel/lib/v5.2/64bit.config:# CONFIG_SQUASHFS_ZSTD is not set
==== Update 32Bit/64Bit configs of 5.2-rc, 5.1, & 4.19 with "make menuconfig" command.
Location:
-> File systems -> Miscellaneous filesystems
[*] Include support for ZSTD compressed file systems

==== After

Code: Select all

% diff -r /usr/local/share/mkKernel mkKernel-19.06.25-noarch-1/usr/local/share/mkKernel
diff -r /usr/local/share/mkKernel/lib/v4.19/32bit.config mkKernel-19.06.25-noarch-1/usr/local/share/mkKernel/lib/v4.19/32bit.config
3c3
< # Linux/x86 4.19.50 Kernel Configuration
---
> # Linux/x86 4.19.56 Kernel Configuration
7c7
< # Compiler: gcc (GCC) 8.3.0
---
> # Compiler: gcc (GCC) 9.1.0
10c10
< CONFIG_GCC_VERSION=80300
---
> CONFIG_GCC_VERSION=90100
5728c5728
< # CONFIG_SQUASHFS_ZSTD is not set
---
> CONFIG_SQUASHFS_ZSTD=y
6111c6111
< CONFIG_XXHASH=m
---
> CONFIG_XXHASH=y
6123c6123
< CONFIG_ZSTD_DECOMPRESS=m
---
> CONFIG_ZSTD_DECOMPRESS=y
diff -r /usr/local/share/mkKernel/lib/v4.19/64bit.config mkKernel-19.06.25-noarch-1/usr/local/share/mkKernel/lib/v4.19/64bit.config
3c3
< # Linux/x86 4.19.50 Kernel Configuration
---
> # Linux/x86 4.19.56 Kernel Configuration
7c7
< # Compiler: gcc (GCC) 8.3.0
---
> # Compiler: gcc (GCC) 9.1.0
10c10
< CONFIG_GCC_VERSION=80300
---
> CONFIG_GCC_VERSION=90100
5742c5742
< # CONFIG_SQUASHFS_ZSTD is not set
---
> CONFIG_SQUASHFS_ZSTD=y
6157c6157
< CONFIG_XXHASH=m
---
> CONFIG_XXHASH=y
6169c6169
< CONFIG_ZSTD_DECOMPRESS=m
---
> CONFIG_ZSTD_DECOMPRESS=y
diff -r /usr/local/share/mkKernel/lib/v5.1/32bit.config mkKernel-19.06.25-noarch-1/usr/local/share/mkKernel/lib/v5.1/32bit.config
3c3
< # Linux/x86 5.1.9 Kernel Configuration
---
> # Linux/x86 5.1.15 Kernel Configuration
7c7
< # Compiler: gcc (GCC) 8.3.0
---
> # Compiler: gcc (GCC) 9.1.0
10c10
< CONFIG_GCC_VERSION=80300
---
> CONFIG_GCC_VERSION=90100
5765c5765
< # CONFIG_SQUASHFS_ZSTD is not set
---
> CONFIG_SQUASHFS_ZSTD=y
6153c6153
< CONFIG_XXHASH=m
---
> CONFIG_XXHASH=y
6165c6165
< CONFIG_ZSTD_DECOMPRESS=m
---
> CONFIG_ZSTD_DECOMPRESS=y
diff -r /usr/local/share/mkKernel/lib/v5.1/64bit.config mkKernel-19.06.25-noarch-1/usr/local/share/mkKernel/lib/v5.1/64bit.config
3c3
< # Linux/x86 5.1.9 Kernel Configuration
---
> # Linux/x86 5.1.15 Kernel Configuration
7c7
< # Compiler: gcc (GCC) 8.3.0
---
> # Compiler: gcc (GCC) 9.1.0
10c10
< CONFIG_GCC_VERSION=80300
---
> CONFIG_GCC_VERSION=90100
5776c5776
< # CONFIG_SQUASHFS_ZSTD is not set
---
> CONFIG_SQUASHFS_ZSTD=y
6195c6195
< CONFIG_XXHASH=m
---
> CONFIG_XXHASH=y
6207c6207
< CONFIG_ZSTD_DECOMPRESS=m
---
> CONFIG_ZSTD_DECOMPRESS=y
diff -r /usr/local/share/mkKernel/lib/v5.2/32bit.config mkKernel-19.06.25-noarch-1/usr/local/share/mkKernel/lib/v5.2/32bit.config
6040c6040
< # CONFIG_SQUASHFS_ZSTD is not set
---
> CONFIG_SQUASHFS_ZSTD=y
6453c6453
< CONFIG_XXHASH=m
---
> CONFIG_XXHASH=y
6465c6465
< CONFIG_ZSTD_DECOMPRESS=m
---
> CONFIG_ZSTD_DECOMPRESS=y
diff -r /usr/local/share/mkKernel/lib/v5.2/64bit.config mkKernel-19.06.25-noarch-1/usr/local/share/mkKernel/lib/v5.2/64bit.config
6058c6058
< # CONFIG_SQUASHFS_ZSTD is not set
---
> CONFIG_SQUASHFS_ZSTD=y
6502c6502
< CONFIG_XXHASH=m
---
> CONFIG_XXHASH=y
6514c6514
< CONFIG_ZSTD_DECOMPRESS=m
---
> CONFIG_ZSTD_DECOMPRESS=y
diff -r /usr/local/share/mkKernel/lib/v5.2-rc/32bit.config mkKernel-19.06.25-noarch-1/usr/local/share/mkKernel/lib/v5.2-rc/32bit.config
6040c6040
< # CONFIG_SQUASHFS_ZSTD is not set
---
> CONFIG_SQUASHFS_ZSTD=y
6453c6453
< CONFIG_XXHASH=m
---
> CONFIG_XXHASH=y
6465c6465
< CONFIG_ZSTD_DECOMPRESS=m
---
> CONFIG_ZSTD_DECOMPRESS=y
diff -r /usr/local/share/mkKernel/lib/v5.2-rc/64bit.config mkKernel-19.06.25-noarch-1/usr/local/share/mkKernel/lib/v5.2-rc/64bit.config
6058c6058
< # CONFIG_SQUASHFS_ZSTD is not set
---
> CONFIG_SQUASHFS_ZSTD=y
6502c6502
< CONFIG_XXHASH=m
---
> CONFIG_XXHASH=y
6514c6514
< CONFIG_ZSTD_DECOMPRESS=m
---
> CONFIG_ZSTD_DECOMPRESS=y

2. Most recent versions of build examples were updated.


Please refer to the top article of this thread.
Porteus Kernel Builder



-----------------------------------
@raja
Build examples of 5.1.15/4.19.56 version were built with new config.



Thanks.

neko
DEV Team
DEV Team
Posts: 2109
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

Porteus Kernel Builder

Post#588 by neko » 30 Jun 2019, 10:13

Most recent versions of build examples were updated.


Please refer to the top article of this thread.
Porteus Kernel Builder


-----------------------------------
@raja
Build examples of 5.2-rc7 version was built with new config "CONFIG_SQUASHFS_ZSTD=y".


Thanks.

fulalas
DEV Team
DEV Team
Posts: 2050
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

Porteus Kernel Builder

Post#589 by fulalas » 30 Jun 2019, 10:25

@neko, I haven't tried 5.2rc7, but both 5.1.15 and 5.2rc6 have a problem with aufs so we can't activate a xzm module from a system folder (e.g. /home/guest).

jssouza
Legendary
Legendary
Posts: 1165
Joined: 09 Jul 2015, 14:17
Distribution: Porteus x86 arm

Porteus Kernel Builder

Post#590 by jssouza » 30 Jun 2019, 10:31

fulalas, I told this to you already in our development section - Modules should always be activated from outside of aufs.

browser updates (Post by jssouza #72160)
All modules are connected as readonly branches, with the writable part on the live system overlayed as changes on the aufs union. If you activate a module from within aufs, you are connecting another readonly branch from the writeable branch back to the aufs union.

fulalas
DEV Team
DEV Team
Posts: 2050
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

Porteus Kernel Builder

Post#591 by fulalas » 30 Jun 2019, 10:53

But this used to work in the past. :( Try with Porteus 4, for instance. Even early builds of Porteus 5.

Here's the output:

Image

jssouza
Legendary
Legendary
Posts: 1165
Joined: 09 Jul 2015, 14:17
Distribution: Porteus x86 arm

Porteus Kernel Builder

Post#592 by jssouza » 30 Jun 2019, 11:11

fulalas wrote:
30 Jun 2019, 10:53
But this used to work in the past
Yeah, you are right it used to work. And I had thought about opening a discussion on it, how we can make our scripts not to allow it. So in a sense glad that aufs itself fixes this.
Maybe I can check in recent aufs sources and see if there is now a guard against allowing this.
fulalas wrote:
30 Jun 2019, 10:53
Here's the output:
Have you tried the activate from command line, maybe add some debug prints in activate or aufs-insert script that displays the actual error message why module insert fails.

fulalas
DEV Team
DEV Team
Posts: 2050
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

Porteus Kernel Builder

Post#593 by fulalas » 30 Jun 2019, 23:15

Is this enough?

Code: Select all

mount: /: mount point not mounted or bad option.
jssouza wrote:
30 Jun 2019, 11:11
how we can make our scripts not to allow it. So in a sense glad that aufs itself fixes this
Really? :shock: I think quite the opposite! I think that Porteus has now an issue, hahaha!

fulalas
DEV Team
DEV Team
Posts: 2050
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

Porteus Kernel Builder

Post#594 by fulalas » 01 Jul 2019, 08:23

@neko, another suggestion: you create a desktop file inside /usr/share/applications that doesn't ask for root privileges, so it doesn't work. What if you edit this desktop file and at the line where you call /usr/local/sbin/guimkKernel you change to:

Code: Select all

/opt/porteus-scripts/xorg/psu /usr/local/sbin/guimkKernel
:)

neko
DEV Team
DEV Team
Posts: 2109
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

Porteus Kernel Builder

Post#595 by neko » 01 Jul 2019, 13:44

@fulalas
I apologize for the time taken for analysis.

The cause was that I changed the application method of AUFS patch.
It is a phenomenon that occurred after changing from previous full application to partial application.

An example of applying the whole patch has been uploaded.
The bug has been corrected.
Please check it.

32bit-kernel5.2-rc7-2.tar (86 M)
http://www.mediafire.com/file/fob3lo9on ... -rc7-2.tar
md5sum: 12a508fa715032f0d94d95c101639426 32bit-kernel5.2-rc7-2.tar

64bit-kernel5.2-rc7-2.tar (92 M)
http://www.mediafire.com/file/uj48nncac ... -rc7-2.tar
md5sum: 6c74150c5944871048501457b706ba67 64bit-kernel5.2-rc7-2.tar


Partially applied was in order to avoid the AUFS update stop problem.
Further analysis will be made to determine how to apply future patches.


Thanks.

fulalas
DEV Team
DEV Team
Posts: 2050
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

Porteus Kernel Builder

Post#596 by fulalas » 01 Jul 2019, 22:59

@neko, thanks! It's working now :good:

neko
DEV Team
DEV Team
Posts: 2109
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

Porteus Kernel Builder

Post#597 by neko » 03 Jul 2019, 12:50

AUFS Patch Problem Analysis Report

====[AUFS patch]====
AUFS patches consist of multiple patches.
It can be divided into basic patches and optional patches.
Basic patches are classified into two types:
one for statically incorporated AUFS functionality
(kernel build config paramater: CONFIG_AUFS_FS=y <-----Porteus)
and
one for dynamically incorporated AUFS functionality
(kernel build config paramater: CONFIG_AUFS_FS=m).

1. Basic patch group
1.1. Basic patches for static integration
{Documentation,fs,include/uapi/linux/aufs_type.h} files
aufsN-base.patch
aufsN-kbuild.patch
aufsN-mmap.patch

1.2. Basic patches for dynamic integration

2. Optional patch group
aufsN-loopback.patch
lockdep-debug.patch
proc_mounts.patch (without 4.4 nor 4.9)
tmpfs-idr.patch
vfs-ino.patch

====[Patch application method (All)]====
The "Porteus kernel build procedure" describes
how to put all the patches together and apply them to the kernel source.
http://www.porteus.org/component/conten ... ernel.html

The kernel build tool "Kernel Builder" provides this procedure as a shell script.
This shell script is generated by inputting variable parameters such as kernel version via graphic interface.

The AUFS patching method generated by "Kernel Builder"
was the same as
the patching method of the "Porteus kernel build procedure".

====[Patch application error]====
Some patches in the AUFS patch group have stopped updating maintenance for kernel updates.

When patching error occurs, build kernel without AUFS patch.

There was no patch application error for kernel update for the static integration basic patches.

Note: Patching error of optional patches

Code: Select all

AUFS_VERSION "4.4-20170911" To kernel 4.4.184
aufs4-loopback.patch: FAILED
tmpfs-idr.patch: FAILED

AUFS_VERSION "4.9-20180730" To kernel 4.9.184
aufs4-loopback.patch: FAILED
tmpfs-idr.patch: FAILED

AUFS_VERSION "4.14-20190610" To kernel 4.14.131
aufs4-loopback.patch: FAILED
tmpfs-idr.patch: FAILED

AUFS_VERSION "4.19-20190610" To kernel 4.19.56
aufs4-loopback.patch: FAILED

AUFS_VERSION "5.0-20190610" To kernel 5.0.21
No error

AUFS_VERSION "5.1-20190610" To kernel 5.1.15
No error

AUFS_VERSION "5.x-rcN-20190610" To kernel 5.2-rc7
No error

====[Patch application method (Basic)]====
"Kernel Builder" has been changed to apply only these static integration basic patches
in order to avoid "no AUFS patch application".

A nested loopback mount in a branch-fs does not work
because aufsN-loopback.patch, which is one of optional patches, is not patched.

Note: aufsN-loopback.patch
Supports a nested loopback mount in a branch-fs. This patch is
unnecessary until aufs produces a message like "you may want to try
another patch for loopback file".

====[Change of AUFS patch application method of "Kernel Builder"]====
<Current>
Apply only basic patches.
When an error occurs in the basic patches, the AUFS patch is not applied.

<After change>
Apply basic patches and aufsN-loopback.patch.
When an error occurs in applying aufsN-loopback.patch, apply only the basic patches.
When an error occurs in the basic patches, the AUFS patch is not applied.

This change will be included at the next "Kernel Builder" update.


Thanks.

neko
DEV Team
DEV Team
Posts: 2109
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

Porteus Kernel Builder

Post#598 by neko » 04 Jul 2019, 06:50

1. Most recent versions of build examples were updated.
2. The example of replacement the kernel of another distri which uses OverlayFS/AUFS was updated.

Please refer to the top article of this thread.
Porteus Kernel Builder


Thanks.

User avatar
babam
Warlord
Warlord
Posts: 526
Joined: 16 Nov 2016, 10:30
Distribution: Porteus 5.0rc3 Xfce K6.1.1
Location: Rainy city

Porteus Kernel Builder

Post#599 by babam » 06 Jul 2019, 14:21

@neko I use the kernel 4.19.56 that you built, with that kernel I can't build Paragon NTFS for Linux.

Porteus 3.2.2 ( Kernel 4.9.0 ) ---> Success
Porteus 3.2.2 ( Kernel 4.16.8 http://dl.porteus.org/x86_64/kernel/porteus-4.16.8/ ) ---> Success
Porteus 4.0 ( Kernel 4.16.3 ) ---> Success

Porteus 3.2.2 ( Kernel 4.19.56 ) ---> Can't prepare driver configuration
Porteus 4.0 ( Kernel 4.19.56 ) ---> Can't prepare driver configuration
Sorry, my English is bad.

neko
DEV Team
DEV Team
Posts: 2109
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

Porteus Kernel Builder

Post#600 by neko » 06 Jul 2019, 15:43

@babam
I don't know about Paragon.
I will study it. (Maybe it will take enough time.)

If you have available time to fix the probrem,
please try to build kernel by yourself.
I am happy that you make me know the result. I will update "Kernel Builder" by your result report.


Thanks.

Post Reply