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...
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#166 by neko » 01 Aug 2017, 10:42

@amplatfus
"The questions regarding Kernel are for me?"
--->
Yes, I asked you.

Excuse me that I replied to 2 persons at one article.
This part is reply for you.
----------------------------------
@amplatfus
=== About VBOX:
I apologize that unfortunately I am ignorant about VBOX.
Following the advice of fulalas,
crippled_sources generation function, 000-kernel generation function etc. have been added.
I expect that you will receive an advice from someone on this matter.

=== About "Kernel Builder" tool: needs more exactly information.
Currently the latest version of this tool is "mkKernel-17.07.22-noarch-1.xzm".

1. the case where your own build
What is the version of mkKernel ?

2. the case where using the kernel package provided as a build example

2.1. the case where the build example tar.xz is decomposed and used directly?

2.2. the case where using it via the mkKernel tool?
What is the version of mkKernel ?
and
How to get 000-kernel.xzm (via replacing one of ISO or creating 000-kernel.xzm) ?


Thanks.
Thanks.

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

Porteus Kernel Builder

Post#167 by fulalas » 01 Aug 2017, 13:32

@amplatfus, I'm not sure if this is the case, but I noticed that Vbox doesn't like /opt folder ownership to be anything different from root. Sometimes we use some bad modules that have wrong ownership or we even use /rootcopy/etc from inside a non-Linux partition. If you're not sure, try this:

Code: Select all

echo guest | sudo -S chown -R root:root /opt
One more thing: usually I get the module created by vboxbuilder (inside /tmp), copy it to my modules folder and then reboot. I don't why, but before rebooting Vbox doesn't work. By doing that I can create and use VBox built against neko's kernel with no problem :good:

@neko, thanks for the reply. No need to hurry :)

User avatar
amplatfus
Samurai
Samurai
Posts: 153
Joined: 30 Oct 2012, 14:55
Distribution: MATE Porteus-v5.0rc1
Location: Romania

Porteus Kernel Builder

Post#168 by amplatfus » 01 Aug 2017, 13:54

neko wrote:
01 Aug 2017, 10:42
@amplatfus
"The questions regarding Kernel are for me?"
--->
Yes, I asked you.

Excuse me that I replied to 2 persons at one article.
This part is reply for you.
----------------------------------
@amplatfus
=== About VBOX:
I apologize that unfortunately I am ignorant about VBOX.
Following the advice of fulalas,
crippled_sources generation function, 000-kernel generation function etc. have been added.
I expect that you will receive an advice from someone on this matter.

=== About "Kernel Builder" tool: needs more exactly information.
Currently the latest version of this tool is "mkKernel-17.07.22-noarch-1.xzm".

1. the case where your own build
What is the version of mkKernel ?

2. the case where using the kernel package provided as a build example

2.1. the case where the build example tar.xz is decomposed and used directly?

2.2. the case where using it via the mkKernel tool?
What is the version of mkKernel ?
and
How to get 000-kernel.xzm (via replacing one of ISO or creating 000-kernel.xzm) ?


Thanks.
Thanks.
@neko
My VirtualBox module was build using VirtualBox builder from menu on Kernel: 4.9.0 original Porteus kernel on MATE from 3.2.2 version.
I have tried with this entered sudo chown root:root /opt/VirtualBox/VirtualBox and sudo chmod 4511 /opt/VirtualBox/VirtualBox and I runned as root. Same error.

I have tried with 000-kernel-4.10.8, same error.
In both scenarios I did not use mkKernel tool.

@fulalas,
Nice tip. I will try later on and post the update.

Thank you all,
amplatfus
Porteus-v5.0. rc1 MATE. Thank you all dev team and @Blaze for helping to configure it, thanks to entire Porteus community members for great topics.
Kernel: 000-kernel-5.4.8,xzm

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

Porteus Kernel Builder

Post#169 by fulalas » 01 Aug 2017, 14:08

@amplatfus, if you're not using neko's kernel, maybe you should open a new topic so we won't pollute this one with a parallel subject. :good:

User avatar
amplatfus
Samurai
Samurai
Posts: 153
Joined: 30 Oct 2012, 14:55
Distribution: MATE Porteus-v5.0rc1
Location: Romania

Porteus Kernel Builder

Post#170 by amplatfus » 01 Aug 2017, 14:34

@fulalas you are right. I will do so. But I have tried with 000-kernel-4.11.4 x64 version from #119. It seems to be very little 19mb instead of more than 40mb 000-kernel-4.10.8.
I guess I am missing something.
I came here because I saw almost the same error like post here #115 Re: Porteus Kernel Builder (Post by fulalas #55928)
I will update this #170 with if I will do a separate thread.
For now I will try your suggestion and after I want to try 000-kernel-4.11.4 x64 but do not know how to manage it because of only 19mb. Could you please help?

Edit: solved using http://dl.porteus.org/x86_64/kernel/porteus-4.9.12/(crippled_sources.xzm and vmlinuz) and devel from vbox build script.

Thank you,
amplatfus
Last edited by amplatfus on 02 Aug 2017, 06:28, edited 1 time in total.
Porteus-v5.0. rc1 MATE. Thank you all dev team and @Blaze for helping to configure it, thanks to entire Porteus community members for great topics.
Kernel: 000-kernel-5.4.8,xzm

donald
Full of knowledge
Full of knowledge
Posts: 2064
Joined: 17 Jun 2013, 13:17
Distribution: Porteus 3.2.2 XFCE 32bit
Location: Germany

Porteus Kernel Builder

Post#171 by donald » 01 Aug 2017, 14:45

@ amplatfus

Have you already tried this one?...(kernel 4.9.0)
Re: Virtual Box (Post by donald #55940)

User avatar
amplatfus
Samurai
Samurai
Posts: 153
Joined: 30 Oct 2012, 14:55
Distribution: MATE Porteus-v5.0rc1
Location: Romania

Porteus Kernel Builder

Post#172 by amplatfus » 01 Aug 2017, 17:18

donald wrote:
01 Aug 2017, 14:45
@ amplatfus

Have you already tried this one?...(kernel 4.9.0)
Re: Virtual Box (Post by donald #55940)
Thank you @donald. I from this I have below error.
I wil open another thread I think

Code: Select all

Effective UID is not root (euid=1000 egid=100 uid=1000 gid=100) (rc=-10)
Please try reinstalling VirtualBox.
where: SUPR3HardenedMain what: 2 VERR_PERMISSION_DENIED (-10) - Permission denied.
Edit: solved using http://dl.porteus.org/x86_64/kernel/porteus-4.9.12/(crippled_sources.xzm and vmlinuz) and devel from vbox build script.
Porteus-v5.0. rc1 MATE. Thank you all dev team and @Blaze for helping to configure it, thanks to entire Porteus community members for great topics.
Kernel: 000-kernel-5.4.8,xzm

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#173 by neko » 05 Aug 2017, 01:31

"Porteus Kernel Builder" was updated to mkKernel-17.08.04-noarch-1.xzm.
Please refer to Porteus Kernel Builder

(1) "b43" kernel module was deleted from blacklist.

(2) "b43-firmware" was ported from ArchLinux AUR and offered.

---------------------------------------------------------
On "broadcom" issue, all cards cannot be covered.
Therefore only kernel module "b43" will be activated (by deleting from blacklist).
And firmware module "b43-firmware" & "b43-firmware-classic" that were gotten from Archlinux AUR was uploaded.
Merge one of "b43-firmware" or "b43-firmware-classic" to 000-kernel module.

Note:
BCM4306 rev.3, BCM4311, BCM4312 and BCM4318 rev.2 have been noticed to experience problems with b43-firmware.
---> Use b43-firmware-classic for these cards instead.
BCM4331 noticed to have problems with b43-firmware-classic.
---> Use b43-firmware for this card instead.

For none covered cards, please tune by yourself.
refer to https://wiki.archlinux.org/index.php/broadcom_wireless

Example: merge b43-firmware to 000-kernel (Porteus 3.2.2)

Code: Select all

% su
# ls -1
000-kernel.xzm
b43-firmware-6.30.163.46-noarch-slk1.xzm
# mkdir new.000-kernel
# mloop 000-kernel.xzm
# cp -a /mnt/loop/* new.000-kernel
# uloop
# mloop b43-firmware-6.30.163.46-noarch-slk1.xzm
# cp -a /mnt/loop/* new.000-kernel/
# uloop
# mksquashfs new.000-kernel new.000-kernel.xzm -b 256K -comp xz -Xbcj x86 -noappend
# rm -fr new.000-kernel
# ls -1
000-kernel.xzm
b43-firmware-6.30.163.46-noarch-slk1.xzm
new.000-kernel.xzm

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#174 by neko » 07 Aug 2017, 02:20

This article was deleted.
Last edited by neko on 07 Apr 2018, 00:01, edited 146 times in total.

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#175 by neko » 12 Aug 2017, 13:06

NEW Example of updated kernels that were built by "Porteus Kernel builder" were updated.

Refer to Porteus Kernel Builder (Post by neko #57468)
or
refer to Porteus Kernel Builder (Post by neko #52232)


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#176 by neko » 13 Aug 2017, 15:43

WARNING !!

4.12.6 ---> 4.12.7
4.9.42 ---> 4.9.43
4.4.81 ---> 4.4.82
3.18.64 ---> 3.18.65
These update span were very short. (1 day)

Thanks

User avatar
brokenman
Site Admin
Site Admin
Posts: 6105
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v4 all desktops
Location: Brazil

Porteus Kernel Builder

Post#177 by brokenman » 13 Aug 2017, 21:14

Thanks again for this AWESOME tool!

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#178 by neko » 13 Aug 2017, 22:08

@brokenman

Thank you for encouraging words.

By the way, AUFS patches for version line 4.12 and 4.13-rc need a little modify (own patch).
I have made this own patch in order to avoid the compile error without understanding AUFS context.
I am expecting an official AUFS patch to be offered.
And I am investigating overlay FS as an alternative to AUFS

Thanks.

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#179 by raja » 14 Aug 2017, 08:33

Neko,

You have been updating Kernels regularly. Do you have page where changes incorporated from one to another version are recorded.

Shut down/reboot problems surfaced in 2016, some said it is due to changes made in Kernel, some said it may be due to Systemd. Kernel version has reached 4.13, still Computers like mine suffer from this bug.

Gianpaolo 2016-11-07, analysed this problem and identified, a bad commit,
2c85025c75dfe7ddc2bb33363a998dad59383f94 - ACPI: Execute _PTS before system reboot
as the source of trouble.
ACPI: Execute _PTS before system reboot

The _PTS control method is defined in the section 7.4.1 of acpi 6.0
spec. The _PTS control method is executed by the OS during the sleep
transition process for S1, S2, S3, S4, and for orderly S5 shutdown.

The _PTS control method provides the BIOS a mechanism for performing
some housekeeping, such as writing the sleep type value to the embedded
controller, before entering the system sleeping state. Note that some
Lenovo Server BIOS use this mechanism to detect reboot event and
prompt user by popped dialog box.

According to section 7.5 of acpi 6.0 spec, _PTS should run after _TTS.
Add a _PTS evaulation to the existing _TTS reboot notifier and change
the notifier name to reflect the fact that it's not for _TTS only any
more.
A patch was offered by kernel.org and supposed to have been rectified in subsequent versions, after 4.7. But my Laptop works fine only with v4.4.76. and anything above made to hang, after systemd comment "Reached target Shutdown".

Code: Select all

https://patchwork.kernel.org/patch/9041141/

Patch

diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c
index 2a8b596..8b290fb 100644
--- a/drivers/acpi/sleep.c
+++ b/drivers/acpi/sleep.c
@@ -55,6 +55,26 @@  static struct notifier_block tts_notifier = {
 	.priority	= 0,
 };
 
+static int pts_notify_reboot(struct notifier_block *this,
+			unsigned long code, void *x)
+{
+	acpi_status status;
+
+	status = acpi_execute_simple_method(NULL, "\\_PTS", ACPI_STATE_S5);
+	if (ACPI_FAILURE(status) && status != AE_NOT_FOUND) {
+		/* It won't break anything. */
+		printk(KERN_NOTICE "Failure in evaluating _PTS object\n");
+	}
+
+	return NOTIFY_DONE;
+}
+
+static struct notifier_block pts_notifier = {
+	.notifier_call	= pts_notify_reboot,
+	.next		= NULL,
+	.priority	= 0,
+};
+
 static int acpi_sleep_prepare(u32 acpi_state)
 {
 #ifdef CONFIG_ACPI_SLEEP
@@ -896,5 +916,12 @@  int __init acpi_sleep_init(void)
 	 * object can also be evaluated when the system enters S5.
 	 */
 	register_reboot_notifier(&tts_notifier);
+
+	/*
+	 * According to section 7.5 of acpi 6.0 spec, _PTS should run after
+	 * _TTS when the system enters S5.
+	 */
+	register_reboot_notifier(&pts_notifier);
+
 	return 0;
 }
Can you confirm if this patch is applied to your kernels?

For your other query on openchrome,

versions, 0.4.1, 0.5.1, and 0.5.3 don't work (deb packages). Version 0.6.0, a rpm package works in Debian Stretch and Apoteus too is okay. But video copy benchmark is too low compared to version 0.3.3.
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#180 by neko » 14 Aug 2017, 15:34

@raja

[ Q & A]
1.Do you have page where changes incorporated from one to another version are recorded.
No, I do not have.
Anybody can check the changes on the kernel page and AUFS page.

2.Can you confirm if this patch is applied to your kernels?
Yes, I can. (And you can too.)
For example, on the case version 4.12.7, this patch is not applied.


[How to apply your own patch]
Please refer to Porteus Kernel Builder (Post by neko #52232)
step 1. prepare tools.
(1)get recent version Kernel Builder.
activate mkKernel-NN.NN.NN-noarch-N.xzm
(2)get 05-devel.xzm for your architecture from Porteus release site.
activate "05-devel.xzm".

step 2. set working direcory.
First, prepare the directory for 'Porteus Kernel Builder'.
This direcory must be in LINUX file system (ext4 etc.,).
From GUI I/F, execute Kernel Builder.
Select this in "Kernel Builder directory" of "setting window"

step 3. select kernel version.
select kernel version line in left item of "Kernel Version" of "setting window".
right item will display the latest version of the line.
if older version is needed, select kernel version in right item.

step 4. "Build kernel" circle
"download" item:
---->check it on.

"expand & patch" item:
---->check it on.

"own patch" item:
---->if version is v4.12 line or v4.13-rc line, check it on.

step 5. push OK.

step 6.
(You can confirm if this patch is applied to kernel.)
modify "Kernel Builder directory"/v"Kernel Version"/"architecture"/linux-"Kernel Version"/sleep.c

step 7. (option)
modify kernel configuration.
excute "make menuconfig" command in "Kernel Builder directory"/v"Kernel Version"/"architecture"/linux-"Kernel Version"/ directory.

step 8. compile
From GUI I/F, execute Kernel Builder.
Select "Kernel Builder directory".
Select "kernel version".
"Build kernel" circle "compile" item: ---->check it on
push OK.


-----------------------------
Example:
This patch was applied to kernel version 4.12.7.

v4.12.7-2.tar.xz (41 M)
http://www.mediafire.com/file/odrl9fa8f ... 7-2.tar.xz
md5sum: c21d40f24affdf6b44f234787f74a3fd v4.12.7-2.tar.xz

crippled_sources-4.12.7-2-32bit.xzm (19 M)
http://www.mediafire.com/file/oug1er7u2 ... -32bit.xzm
md5sum: 9d309e7ca7ecc1f487d21fc582a95ddf crippled_sources-4.12.7-2-32bit.xzm

crippled_sources-4.12.7-2-64bit.xzm (19 M)
http://www.mediafire.com/file/r7p454cd7 ... -64bit.xzm
md5sum: 497c40049ed4819a4728db9c2823db0a crippled_sources-4.12.7-2-64bit.xzm



Thanks.

Post Reply