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...
beny
Full of knowledge
Full of knowledge
Posts: 2254
Joined: 02 Jan 2011, 11:33
Location: italy

Porteus Kernel Builder

Post#1936 by beny » 11 Nov 2023, 21:55

hi roadie, you have to remove the old kernel version patch before to apply the new one,just for the record
patch -R -p1 < ../patch-x.y.z

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

Porteus Kernel Builder

Post#1937 by fulalas » 11 Nov 2023, 23:38

@roadie, could you upload your 6.6.x kernel module so I can test it?

Thanks!

roadie
Full of knowledge
Full of knowledge
Posts: 428
Joined: 02 Jan 2011, 18:41
Distribution: Porteus v5.01.....PorteuX v1.4
Location: In the bush now

Porteus Kernel Builder

Post#1938 by roadie » 12 Nov 2023, 00:13

fulalas wrote:
11 Nov 2023, 23:38
@roadie, could you upload your 6.6.x kernel module so I can test it?

Thanks!
@fulalas,

Here's the link, as you'll see, it's what might be called a sparse kernel. I think it may be of no use to you as it's built specifically for AMD machines, all Intel has been removed.

https://www.mediafire.com/file/xr6vhchn ... ar.gz/file

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

Porteus Kernel Builder

Post#1939 by fulalas » 12 Nov 2023, 10:28

@roadie, thanks but it didn't work since I have an Intel machine.

Anyway, I managed to make everything work with this code:

Code: Select all

rm ../aufs_sources/tmpfs-idr.patch # this patch isn't useful
cp -r ../aufs_sources/{fs,Documentation} .
cp ../aufs_sources/include/uapi/linux/aufs_type.h include/uapi/linux
for i in ../aufs_sources/*.patch; do
	patch -N -p1 < "$i" > /dev/null 2>&1 || { echo "Failed to add AUFS patch '${i}'."; exit 1; }
done

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

Porteus Kernel Builder

Post#1940 by Blaze » 30 Nov 2023, 16:28

[Updated kernel Examples]
==== AUFS Kernel only for Porteus ====
Simple package (vmlinuz, 000-kernel.xzm, 06-crippled_sources-NNN-XXbit.xzm, 64bit.config)

6.6.3 <-- NEW : "All patches" patching was done.
64bit-ALL-kernel6.6.3.tar (~156 M)
https://www.mediafire.com/file/x09ttty3 ... l6.6.3.tar
5c60f6528ecb309490530c47c4cb51e3 64bit-ALL-kernel6.6.3.tar

Note 1: Compiler that was used.
for kernel 6.5.1: 11.2.0-x86_64

Note 2: Compilated under Porteus 5.01 (Slackware 15.0 base. Note. glibc-2.33 replaced on glibc-2.35)

Note 3: A new cryptsetup (version 2.3.5: presented by @ncmprhnsbl)

Note 4: ZSTD compression

Thanks to neko for support.
Linux 6.6.11-porteus #1 SMP PREEMPT_DYNAMIC Sun Jan 14 12:07:37 MSK 2024 x86_64 Intel(R) Xeon(R) CPU E3-1270 v6 @ 3.80GHz GenuineIntel GNU/Linux
MS-7A12 » [AMD/ATI] Navi 23 [Radeon RX 6600] [1002:73ff] (rev c7) » Vengeance LPX 16GB DDR4 K2 3200MHz C16

peebee
Black ninja
Black ninja
Posts: 45
Joined: 13 Oct 2013, 15:31
Distribution: 4
Location: UK

Porteus Kernel Builder

Post#1941 by peebee » 04 Dec 2023, 15:34

There seems to be an aufs problem with kernel 6.6.4
https://github.com/sfjro/aufs-standalone/issues/32

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

Porteus Kernel Builder

Post#1942 by beny » 04 Dec 2023, 17:11

hi blaze the 6.6.4 kernel also with the kernel builder fail to add the devices to union, operation not permitted, but the build task is ok just for the record.
the message is mkdir can't create directory union operation not permitted

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

Porteus Kernel Builder

Post#1943 by beny » 08 Dec 2023, 20:13

hi, so thanks to roadie we have finally the aufs kernel work:
Linux porteux.example.net 6.6.5-porteux #1 SMP PREEMPT_DYNAMIC Fri Dec 8 19:31:49 CET 2023 x86_64 AMD Ryzen 5 3500X 6-Core Processor AuthenticAMD GNU/Linux

roadie
Full of knowledge
Full of knowledge
Posts: 428
Joined: 02 Jan 2011, 18:41
Distribution: Porteus v5.01.....PorteuX v1.4
Location: In the bush now

Porteus Kernel Builder

Post#1944 by roadie » 09 Dec 2023, 07:53

If anyone wants a bit easier method until the sfjro patch set is ready, here's a patch I made. Just copy, paste and name it whatever. I'm not sure how the Kernel Builder handles patches, I use my own building script so it's just included with the sfjro patches. Tested on kernel-6.6.4 and kernel-6.6.5......works on 6.7-rc4 too, but aufs6-mmap doesn't yet.

Code: Select all

--- a/fs/stat.c	2023-12-07 23:52:25.000000000 -0800
+++ b/fs/stat.c	2023-10-29 19:31:08.000000000 -0700
@@ -133,8 +133,7 @@
 	idmap = mnt_idmap(path->mnt);
 	if (inode->i_op->getattr)
 		return inode->i_op->getattr(idmap, path, stat,
-					    request_mask,
-					    query_flags | AT_GETATTR_NOSEC);
+					    request_mask, query_flags);
 
 	generic_fillattr(idmap, request_mask, inode, stat);
 	return 0;
@@ -167,9 +166,6 @@
 {
 	int retval;
 
-	if (WARN_ON_ONCE(query_flags & AT_GETATTR_NOSEC))
-		return -EPERM;
-
 	retval = security_inode_getattr(path);
 	if (retval)
 		return retval;

rchase
Shogun
Shogun
Posts: 282
Joined: 10 Jan 2016, 17:26
Distribution: Porteus 5.0 rc3 xfce
Location: Denver, Colorado

Porteus Kernel Builder

Post#1945 by rchase » 09 Dec 2023, 21:46

Blaze, could you spell out how to use your 6.6.3 kernel? I tried using it on my N100-equipped mini PC, but still couldn't boot with graphical support; I understand that this CPU was supported as of kernel 6.2 -- bluetooth and wireless have apparently been problematic. Where does the .config file go?

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

Porteus Kernel Builder

Post#1946 by Blaze » 10 Dec 2023, 11:10

Hi rchase.
What is CPU of your mini PC (Intel Alder Lake N100)?
Can you share these logs files
  • Xorg.0.log
  • dmesg
in /var/log ?

The config file 64bit.config I put to tarball.
If you have activated 06-crippled_sources module you can look at /usr/src/linux/.config

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

Porteus Kernel Builder

Post#1947 by beny » 10 Dec 2023, 20:08

hi blaze take a look into the web page there is the device listed:
https://cateee.net/lkddb/web-lkddb/DRM_I915.html

roadie
Full of knowledge
Full of knowledge
Posts: 428
Joined: 02 Jan 2011, 18:41
Distribution: Porteus v5.01.....PorteuX v1.4
Location: In the bush now

Porteus Kernel Builder

Post#1948 by roadie » 11 Dec 2023, 00:08

I've been playing with kernel-6.6.5 without patching fs/stat.c and I've managed to make it boot cleanly by adding

Code: Select all

udba=none


to the mount options in linuxrc in the "Setup aufs" section.

In this post EXIT cheatcode/multiple saves... fanthom mentions that this option is already used in Porteus-v2.0 I believe.

I don't know if there might be problems doing this, though I wonder why it was removed in later initrd's. I haven't seen problems so far.

roadie
Full of knowledge
Full of knowledge
Posts: 428
Joined: 02 Jan 2011, 18:41
Distribution: Porteus v5.01.....PorteuX v1.4
Location: In the bush now

Porteus Kernel Builder

Post#1949 by roadie » 11 Dec 2023, 07:20

I haven't seen any issues using the "udba=none" option in the linuxrc aufs mount. I tried "udba=reval", and it failed to boot, same as the unpatched kernel with stock initrd.xz. I also tried "udba=notify" which also failed to boot....unable to mount union.

Since the post I linked to mentioned "changes=EXIT:", I tried it, and it seems to work as designed. I have little experience with that form of saving. But, /mnt/live/memory/changes looks right, and changes are copied to the folder I specified. Shutdown and reboots are as normal, fsck shows clean partitions. It works in PorteuX as well, though I didn't expect anything else.

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

Porteus Kernel Builder

Post#1950 by fulalas » 11 Dec 2023, 12:50

@roadie, thanks for looking at this!

I'm testing udba=none on kernel 6.6.1 and it seems to be working quite well, indeed.

Only 2 things to consider:
1. I couldn't find this flag in any Porteus I tested (old ISOs here: http://ftp.riken.jp/Linux/porteus/x86_6 ... .0-x86_64/). I wonder why it didn't go to any final release.
2. the official documentation isn't exactly clear (to my limited knowledge) what are the practical drawbacks of using this flag:
aufs-documentation wrote: Aufs trusts the dentry and the inode cache on the system, and never test about UDBA. With this option, aufs runs fastest, but it may show you incorrect data. Additionally, if you often modify a branch directly, aufs will not be able to trace the changes of inodes on the branch. It can be a cause of wrong behaviour, deadlock or anything else.

It is recommended to use this option only when you are sure that nobody access a file on a branch. It might be difficult for you to achieve real ’no UDBA’ world when you cannot stop your users doing ’find / −ls’ or something.

Post Reply