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#1471 by neko » 15 Dec 2021, 05:22

@fulalas
"Kernel Builder" shows the kernel version list from
the value of https://www.kernel.org/finger_banner
and
directories vN.N.N of its work.

[For example]
the value of http:
The latest stable version of the Linux kernel is: 5.15.8
The latest mainline version of the Linux kernel is: 5.16-rc5
The latest stable 5.15 version of the Linux kernel is: 5.15.8
The latest stable 5.14 version of the Linux kernel is: 5.14.21 (EOL)
The latest longterm 5.10 version of the Linux kernel is: 5.10.85
The latest longterm 5.4 version of the Linux kernel is: 5.4.165
The latest longterm 4.19 version of the Linux kernel is: 4.19.221
The latest longterm 4.14 version of the Linux kernel is: 4.14.258
The latest longterm 4.9 version of the Linux kernel is: 4.9.293
The latest longterm 4.4 version of the Linux kernel is: 4.4.295
The latest linux-next version of the Linux kernel is: next-20211214

"Kernel Builder" work: /home/guest/kernel
$ mkdir -p /home/guest/kernel/v5.12.14 /home/guest/kernel/v5.11.1

"Kernel Builder" shows the version list as followed.

Code: Select all

The latest stable version of the Linux kernel is:             5.15.8
The latest mainline version of the Linux kernel is:           5.16-rc5
The latest stable 5.15 version of the Linux kernel is:        5.15.8
The latest stable 5.14 version of the Linux kernel is:        5.14.21
The latest longterm 5.10 version of the Linux kernel is:      5.10.85
The latest longterm 5.4 version of the Linux kernel is:       5.4.165
The latest longterm 4.19 version of the Linux kernel is:      4.19.221
The latest longterm 4.14 version of the Linux kernel is:      4.14.258
The latest longterm 4.9 version of the Linux kernel is:       4.9.293
The latest longterm 4.4 version of the Linux kernel is:       4.4.295
5.11.1
5.12.14

Thanks.

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

Porteus Kernel Builder

Post#1472 by fulalas » 15 Dec 2021, 08:23

@neko, I see. :)

Do you mind explaining to me what's the criteria you're using to decide which firmware files you're including in the kernel package?

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#1473 by neko » 15 Dec 2021, 10:52

@fulalas
You can see how to do that by reading the shell script.
If you press the "Help" button instead of the "OK" button,
you will get the shell script .

For example of "Kernel Builder" usage
<Setting>
Kernel Builder Directory: /home/guest/kernel
Kernel Version: 5.16-rc5
Build Kernel: 64Bit, [x]download, expand & AUFS patch, compile with prototype config, [x]Create FW
<Push>
"Help" button
Confirm --> "Yes" button

Code: Select all

$ cat /home/guest/kernel/perform
#!/bin/sh
#
###=== For manual use ===###
# % su
# # mkdir -p /tmp/work11716
# # sh ./perform
# # cat /tmp/work11716/errorMSG
#


###=== Expand kernel source ===###
cd /home/guest/kernel/v5.16-rc5/64
rm -fr linux-5.16-rc5
if [ -f /home/guest/kernel/v5.16-rc5/linux-5.16-rc5.tar.gz ]
then
	tar -xzvf  /home/guest/kernel/v5.16-rc5/linux-5.16-rc5.tar.gz
else
	xz -dc /home/guest/kernel/v5.16-rc5/linux-5.16-rc5.tar.xz | tar -xv
fi
cd linux-5.16-rc5
cp /home/guest/kernel/v5.16-rc5/64bit.config .config


###=== AUFS PATCH Download ===###
cd /home/guest/kernel/v5.16-rc5
rm -f aufs.patch auf
/usr/local/share/mkKernel/bin/getAUFS.sh 5.16-rc5
#/usr/local/share/mkKernel/lib/v5.16-rc/get.aufs.patch
if [ ! -f aufs.patch ]
then
	if [ ! -d auf ]
	then
		echo "git error: aufs patch cannot be gotten"  >> /tmp/work11716/errorMSG
		exit 1
	fi
fi

###=== Apply the AUFS patch ===###
reExpand()
{
	cd /home/guest/kernel/v5.16-rc5/64/
	rm -fr linux-5.16-rc5
	if [ -f /home/guest/kernel/v5.16-rc5/linux-5.16-rc5.tar.gz ]
	then
		tar -xzvf  /home/guest/kernel/v5.16-rc5/linux-5.16-rc5.tar.gz
	else
		xz -dc /home/guest/kernel/v5.16-rc5/linux-5.16-rc5.tar.xz | tar -xv
	fi
	cp /home/guest/kernel/v5.16-rc5/64bit.config linux-5.16-rc5/.config
}

cd /home/guest/kernel/v5.16-rc5/64/linux-5.16-rc5

if ( /usr/local/share/mkKernel/bin/aufsBase.sh /home/guest/kernel 5.16-rc5 64 )
then
	if ( /usr/local/share/mkKernel/bin/aufsOption.sh /home/guest/kernel 5.16-rc5 64 )
	then
		if ( /usr/local/share/mkKernel/bin/aufsOption2.sh /home/guest/kernel 5.16-rc5 64 )
		then
			touch /home/guest/kernel/v5.16-rc5/ALL
		else
			reExpand
			/usr/local/share/mkKernel/bin/aufsBase.sh /home/guest/kernel 5.16-rc5 64
			/usr/local/share/mkKernel/bin/aufsOption.sh /home/guest/kernel 5.16-rc5 64
			touch /home/guest/kernel/v5.16-rc5/BASEPLUS
		fi
	else
		reExpand
		/usr/local/share/mkKernel/bin/aufsBase.sh /home/guest/kernel 5.16-rc5 64
		touch /home/guest/kernel/v5.16-rc5/Restricted
	fi
else
	reExpand
	touch /home/guest/kernel/v5.16-rc5/OverlayFS
fi

###=== Compile ===###
cd /home/guest/kernel/v5.16-rc5/64/
rm -fr vmlinuz lib
cd linux-5.16-rc5
	
cp /home/guest/kernel/v5.16-rc5/64bit.config .config
make oldconfig
CPU_THREADS=`nproc --all`
make -j$CPU_THREADS
cp arch/x86/boot/bzImage ../vmlinuz
make modules_install INSTALL_MOD_PATH=../
make firmware_install INSTALL_MOD_PATH=../ 2>/dev/null

if [ -d ../../auf/aufs-util.git ]
then
	make O=../kernel-header-5.16-rc5 headers_install
fi

cp .config ../64bit.config
cd ../
if [ ! -f vmlinuz -o ! -d lib ]
then
	echo "compile error" >> /tmp/work11716/errorMSG
	exit 1
fi
DIR=`/bin/ls lib/modules/`
rm lib/modules/$DIR/build lib/modules/$DIR/source
ln -sf /usr/src/linux lib/modules/$DIR/build
ln -sf /usr/src/linux lib/modules/$DIR/source

if [ -d ../auf/aufs-util.git ]
then
	cp -a ../auf/aufs-util.git .
	cd aufs-util.git
	if [ ! -d /usr/include/linux ]
	then
		mkdir -p /usr/include/linux
	fi
	if [ -f /usr/include/linux/aufs_type.h ]
	then
		mv /usr/include/linux/aufs_type.h ORG.aufs_type.h
	fi
	cp ../kernel-header-5.16-rc5/usr/include/linux/aufs_type.h /usr/include/linux/
	AVER=`grep VERSION ../kernel-header-5.16-rc5/usr/include/linux/aufs_type.h | cut -d'"' -f2`
	UTIL=aufs-util-$AVER
	if [ 64 = 64 ]
	then
		UTIL=${UTIL}-x86_64
	else
		UTIL=${UTIL}-i686
	fi
#	make HOSTCC="cc -m64"
	make
	make install DESTDIR=../$UTIL
	if [ -f ORG.aufs_type.h ]
	then
		mv ORG.aufs_type.h /usr/include/linux/aufs_type.h
	else
		rm /usr/include/linux/aufs_type.h
	fi
	cd ../
	rm -fr aufs-util.git
fi
	
###=== Make firmware from packages ===###

#---- Set Variables ----#
WORK=/tmp/work11716
KDIR=/home/guest/kernel
KVER=5.16-rc5
COMPARCH=64

cd $KDIR
#---- get FW list ----#
/usr/local/share/mkKernel/bin/getFWlist $KDIR/v$KVER/$COMPARCH/lib 2>> $WORK/errorMSG
if [ $? -ne 0 ]
then
	exit 1
fi
mv FW.list v${KVER}-${COMPARCH}fw.list

#---- download FW package ----#
FWadr=`cat /usr/local/share/mkKernel/lib/firmware.adr | sed -n 1p`
FWname=${FWadr##*/}
if [ ! -f $FWname ]
then
	Gmd5=`mediafire $FWadr | cut -d' ' -f1`
	if [ $Gmd5 = "0" ]
	then
		mkKernelMSG_mkfw1=`gettext mkKernel "Error: Download Firmware Package."`
		echo $mkKernelMSG_mkfw1 >> $WORK/errorMSG
		exit 1
	fi
	Fmd5=`cat /usr/local/share/mkKernel/lib/firmware.adr | sed -n 2p`
	if [ $Gmd5 != $Fmd5 ]
	then
		mkKernelMSG_mkfw2=`gettext mkKernel "md5sum mismatch: Download Firmware Package."`
		echo $mkKernelMSG_mkfw2 >> $WORK/errorMSG
		exit 1
	fi
fi
mkdir mntFW$$
mount -t squashfs -o loop $FWname mntFW$$
if [ $? -ne 0 ]
then
	umount -f -l mntFW$$
	rm -fr mntFW$$
	mkKernelMSG_mkfw3=`gettext mkKernel "loop mount error: Firmware Package."`
	echo $mkKernelMSG_mkfw3 >> $WORK/errorMSG
	exit 1
fi

#---- create firmware ----#
/usr/local/share/mkKernel/bin/getFW v${KVER}-${COMPARCH}fw.list mntFW$$/lib 2>> $WORK/errorMSG
if [ $? -ne 0 ]
then
	umount -f -l mntFW$$
	rm -fr mntFW$$
	exit 1
fi
rm -f $WORK/errorMSG
REPO=`ls -ltd repo_getFW*|rev|cut -d' ' -f1|rev|grep -v 'repo_getFW-'|sed -n 1p`
rm -fr $KDIR/v$KVER/$COMPARCH/repo_getFW-v${KVER}-${COMPARCH}
mv $REPO $KDIR/v$KVER/$COMPARCH/repo_getFW-v${KVER}-${COMPARCH}

#---- set firmware ----#
if [ -d $KDIR/v$KVER/$COMPARCH/lib/firmware ]
then
	cp -a $KDIR/v$KVER/$COMPARCH/lib/firmware/* firmware/
	rm -fr $KDIR/v$KVER/$COMPARCH/lib/firmware
fi
mv firmware $KDIR/v$KVER/$COMPARCH/lib/

umount -f -l mntFW$$
rm -fr mntFW$$

#

exit 0

$
How to get pick up FW list ---> see /usr/local/share/mkKernel/bin/getFWlist
How to set FW depending on pick up list ---> see /usr/local/share/mkKernel/bin/getFW


Thanks.

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

Porteus Kernel Builder

Post#1474 by fulalas » 15 Dec 2021, 11:38

@neko, thanks. I know what the script is doing, yes. But I don't know why.

What's the criteria you're using to decide what firmware files to put inside the kernel package?

Also, why we have /sbin/cryptsetup?

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#1475 by neko » 15 Dec 2021, 12:22

@fulalas
"I know what the script is doing, yes. But I don't know why."
--->
Me too; I don't know the "reason".
If you will be able to know it, would you tell me it.

"What's the criteria..."
--->
Kernel config specifies pick up drivers.
Some of the driver need firmware.
The firmware needed are selected.
That is all what I understand.

"why we have /sbin/cryptsetup?"
--->
Because cheatcodes for Porteus has "changes=/path/file.dat".
It may be encrypted.
refer to Porteus Kernel Builder (Post by neko #85423)


Thanks.

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

Porteus Kernel Builder

Post#1476 by beny » 15 Dec 2021, 12:51

hi fulalas this is on porteus kernel:

Code: Select all

   uest@porteus:~$ sensors
nouveau-pci-0100
Adapter: PCI adapter
GPU core:    975.00 mV (min =  +0.84 V, max =  +1.16 V)
temp1:        +26.0°C  (high = +95.0°C, hyst =  +3.0°C)
                       (crit = +105.0°C, hyst =  +5.0°C)
                       (emerg = +135.0°C, hyst =  +5.0°C)

k10temp-pci-00c3
Adapter: PCI adapter
temp1:        +15.5°C  (high = +70.0°C)

fam15h_power-pci-00c4
Adapter: PCI adapter
power1:       13.04 W  (crit =  94.99 W)

guest@porteus:~$ sensors-connect
bash: sensors-connect: command not found
guest@porteus:~$ sensors-detect
bash: sensors-detect: command not found
guest@porteus:~$ sensors -help
Usage: sensors [OPTION]... [CHIP]...
  -c, --config-file     Specify a config file
  -h, --help            Display this help text
  -s, --set             Execute `set' statements (root only)
  -f, --fahrenheit      Show temperatures in degrees fahrenheit
  -A, --no-adapter      Do not show adapter for each chip
      --bus-list        Generate bus statements for sensors.conf
  -u                    Raw output
  -j                    Json output
  -v, --version         Display the program version

Use `-' after `-c' to read the config file from stdin.
If no chips are specified, all chip info will be printed.
Example chip names:
	lm78-i2c-0-2d	*-i2c-0-2d
	lm78-i2c-0-*	*-i2c-0-*
	lm78-i2c-*-2d	*-i2c-*-2d
	lm78-i2c-*-*	*-i2c-*-*
	lm78-isa-0290	*-isa-0290
	lm78-isa-*	*-isa-*
	lm78-*
guest@porteus:~$ su root
Password: 
root@porteus:/home/guest# sensors-detect
# sensors-detect version 3.6.0
# Board: ASRock 980DE3/U3S3 R2.0
# Kernel: 5.16.0-rc4-porteus x86_64
# Processor: AMD FX(tm)-6300 Six-Core Processor (21/2/0)

This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you're doing.

Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no): 
Module cpuid loaded successfully.
Silicon Integrated Systems SIS5595...                       No
VIA VT82C686 Integrated Sensors...                          No
VIA VT8231 Integrated Sensors...                            No
AMD K8 thermal sensors...                                   No
AMD Family 10h thermal sensors...                           No
AMD Family 11h thermal sensors...                           No
AMD Family 12h and 14h thermal sensors...                   No
AMD Family 15h thermal sensors...                           Success!
    (driver `k10temp')
AMD Family 16h thermal sensors...                           No
AMD Family 17h thermal sensors...                           No
AMD Family 15h power sensors...                             Success!
    (driver `fam15h_power')
AMD Family 16h power sensors...                             No
Hygon Family 18h thermal sensors...                         No
Intel digital thermal sensor...                             No
Intel AMB FB-DIMM thermal sensor...                         No
Intel 5500/5520/X58 thermal sensor...                       No
VIA C7 thermal sensor...                                    No
VIA Nano thermal sensor...                                  No

Some Super I/O chips contain embedded sensors. We have to write to
standard I/O ports to probe them. This is usually safe.
Do you want to scan for Super I/O sensors? (YES/no): 
Probing for Super-I/O at 0x2e/0x2f
Trying family `National Semiconductor/ITE'...               No
Trying family `SMSC'...                                     No
Trying family `VIA/Winbond/Nuvoton/Fintek'...               Yes
Found `Nuvoton NCT5573D/NCT5577D/NCT6776F Super IO Sensors' Success!
    (address 0x290, driver `nct6775')
Probing for Super-I/O at 0x4e/0x4f
Trying family `National Semiconductor/ITE'...               No
Trying family `SMSC'...                                     No
Trying family `VIA/Winbond/Nuvoton/Fintek'...               No
Trying family `ITE'...                                      No

Some systems (mainly servers) implement IPMI, a set of common interfaces
through which system health data may be retrieved, amongst other things.
We first try to get the information from SMBIOS. If we don't find it
there, we have to read from arbitrary I/O ports to probe for such
interfaces. This is normally safe. Do you want to scan for IPMI
interfaces? (YES/no): 
Probing for `IPMI BMC KCS' at 0xca0...                      No
Probing for `IPMI BMC SMIC' at 0xca8...                     No

Some hardware monitoring chips are accessible through the ISA I/O ports.
We have to write to arbitrary I/O ports to probe them. This is usually
safe though. Yes, you do have ISA I/O ports even if you do not have any
ISA slots! Do you want to scan the ISA I/O ports? (yes/NO): 

Lastly, we can probe the I2C/SMBus adapters for connected hardware
monitoring devices. This is the most risky part, and while it works
reasonably well on most systems, it has been reported to cause trouble
on some systems.
Do you want to probe the I2C/SMBus adapters now? (YES/no): 
Using driver `i2c-piix4' for device 0000:00:14.0: ATI Technologies Inc SB600/SB700/SB800 SMBus
Module i2c-dev loaded successfully.


Next adapter: nvkm-0000:01:00.0-bus-0000 (i2c-0)
Do you want to scan it? (yes/NO/selectively): 
Next adapter: nvkm-0000:01:00.0-bus-0001 (i2c-1)
Do you want to scan it? (yes/NO/selectively): 

Next adapter: nvkm-0000:01:00.0-bus-0002 (i2c-2)
Do you want to scan it? (yes/NO/selectively): 

Next adapter: nvkm-0000:01:00.0-bus-0005 (i2c-3)
Do you want to scan it? (yes/NO/selectively): 

Next adapter: nvkm-0000:01:00.0-bus-0006 (i2c-4)
Do you want to scan it? (yes/NO/selectively): 

Next adapter: nvkm-0000:01:00.0-bus-0007 (i2c-5)
Do you want to scan it? (yes/NO/selectively): 

Next adapter: nvkm-0000:01:00.0-bus-0008 (i2c-6)
Do you want to scan it? (yes/NO/selectively): 

Next adapter: nvkm-0000:01:00.0-bus-0009 (i2c-7)
Do you want to scan it? (yes/NO/selectively): 

Next adapter: nvkm-0000:01:00.0-aux-000a (i2c-8)
Do you want to scan it? (yes/NO/selectively): 

Next adapter: nvkm-0000:01:00.0-aux-000b (i2c-9)
Do you want to scan it? (yes/NO/selectively): 

Next adapter: nvkm-0000:01:00.0-aux-000c (i2c-10)
Do you want to scan it? (yes/NO/selectively): 

Next adapter: nvkm-0000:01:00.0-aux-000d (i2c-11)
Do you want to scan it? (yes/NO/selectively): 


Now follows a summary of the probes I have just done.
Just press ENTER to continue: 

Driver `k10temp' (autoloaded):
  * Chip `AMD Family 15h thermal sensors' (confidence: 9)

Driver `fam15h_power' (autoloaded):
  * Chip `AMD Family 15h power sensors' (confidence: 9)

Driver `nct6775':
  * ISA bus, address 0x290
    Chip `Nuvoton NCT5573D/NCT5577D/NCT6776F Super IO Sensors' (confidence: 9)

Do you want to generate /etc/sysconfig/lm_sensors? (yes/NO): 
To load everything that is needed, add this to one of the system
initialization scripts (e.g. /etc/rc.d/rc.local):

#----cut here----
# Chip drivers
modprobe nct6775
/usr/bin/sensors -s
#----cut here----

You really should try these commands right now to make sure everything
is working properly. Monitoring programs won't work until the needed
modules are loaded.

Unloading i2c-dev... OK
Unloading cpuid... OK


root@porteus:/home/guest# 
root@porteus:/home/guest# 
root@porteus:/home/guest# 
root@porteus:/home/guest# 
root@porteus:/home/guest# 
root@porteus:/home/guest# modprobe nct6775
root@porteus:/home/guest# /usr/bin/sensors -s
root@porteus:/home/guest# sensors
nouveau-pci-0100
Adapter: PCI adapter
GPU core:    975.00 mV (min =  +0.84 V, max =  +1.16 V)
temp1:        +31.0°C  (high = +95.0°C, hyst =  +3.0°C)
                       (crit = +105.0°C, hyst =  +5.0°C)
                       (emerg = +135.0°C, hyst =  +5.0°C)

k10temp-pci-00c3
Adapter: PCI adapter
temp1:        +13.1°C  (high = +70.0°C)

nct6776-isa-0290
Adapter: ISA adapter
Vcore:           1.20 V  (min =  +0.00 V, max =  +1.74 V)
in1:             1.86 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
AVCC:            3.34 V  (min =  +2.98 V, max =  +3.63 V)
+3.3V:           3.34 V  (min =  +2.98 V, max =  +3.63 V)
in4:            80.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
in5:             1.66 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
in6:            88.00 mV (min =  +0.00 V, max =  +0.00 V)  ALARM
3VSB:            3.46 V  (min =  +2.98 V, max =  +3.63 V)
Vbat:            3.36 V  (min =  +2.70 V, max =  +3.63 V)
fan1:             0 RPM  (min =    0 RPM)
fan2:          2513 RPM  (min =    0 RPM)
fan3:          1373 RPM  (min =    0 RPM)
SYSTIN:         +27.0°C  (high =  +0.0°C, hyst =  +0.0°C)  ALARM  sensor = thermistor
CPUTIN:         +30.0°C  (high = +80.0°C, hyst = +75.0°C)  sensor = thermistor
AUXTIN:        +127.5°C  (high = +101.0°C, hyst = +101.0°C)  ALARM  sensor = thermistor
PCH_CHIP_TEMP:   +0.0°C  
PCH_CPU_TEMP:    +0.0°C  
PCH_MCH_TEMP:    +0.0°C  
intrusion0:    ALARM
intrusion1:    ALARM
beep_enable:   disabled

fam15h_power-pci-00c4
Adapter: PCI adapter
power1:       13.04 W  (crit =  94.99 W)

root@porteus:/home/guest# uname -a
Linux porteus.example.net 5.16.0-rc4-porteus #1 SMP PREEMPT Wed Dec 8 16:43:41 Local time zone must be set--s x86_64 AMD FX(tm)-6300 Six-Core Processor AuthenticAMD GNU/Linux
root@porteus:/home/guest# 

    
i have loaded this part of
#----cut here----
# Chip drivers
modprobe nct6775
/usr/bin/sensors -s
#----cut here---- and with the sensor modules you can choose the right one for your system i think.

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

Porteus Kernel Builder

Post#1477 by beny » 15 Dec 2021, 13:02

and you can tweak the fan speed seem,but if you know how to do this i think:
# pwmconfig version 3.6.0
This program will search your sensors for pulse width modulation (pwm)
controls, and test each one to see if it controls a fan on
your motherboard. Note that many motherboards do not have pwm
circuitry installed, even if your sensor chip supports pwm.

We will attempt to briefly stop each fan using the pwm controls.
The program will attempt to restore each fan to full speed
after testing. However, it is ** very important ** that you
physically verify that the fans have been to full speed
after the program has completed.

Found the following devices:
hwmon0 is k10temp
hwmon1 is fam15h_power
hwmon2 is nouveau
hwmon3 is nct6776

Found the following PWM controls:
hwmon2/pwm1 current value: 30
hwmon2/pwm1 is currently setup for automatic speed control.
In general, automatic mode is preferred over manual mode, as
it is more efficient and it reacts faster. Are you sure that
you want to setup this output for manual control? (n)
i have stopped here.....

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

Porteus Kernel Builder

Post#1478 by fulalas » 15 Dec 2021, 22:10

@neko, I'm starting to understand now thanks to you. :) So how do you know which kernel config drivers require firmware? In Porteus official kernel build document we can see that there is this command here:

Code: Select all

make firmware_install
However, when I run it nothing seems to happen -- probably because I don't have any firmware files on my machine at this point of the building. So maybe I should have the firmware files somewhere so the kernel building process will know which ones it should pickup?

EDIT: found out!
Kernel 4.14-rc1 will soon be out, and one change is the removal of the ‘firmware’ portion of the kernel tree.. # make firmware_install will no longer work.
source

@beny, thanks for your help! I'm gonna try this later :)

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

Porteus Kernel Builder

Post#1479 by beny » 16 Dec 2021, 00:47

hi fulalas just for the record in porteus all went well without issue,but in slackware i have loaded two module before the nct6776, if you have this issue modinfo name of the module in terminal have a depends line very useful show you a linked modules if there is one...or more

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#1480 by neko » 16 Dec 2021, 02:27

@fulalas
"do you know which kernel config drivers require firmware?"
"the kernel building process will know which ones it should pickup?"
--->
You said "I know what the script is doing".
But please read these script one more time carefully.
/usr/local/share/mkKernel/bin/getFWlist
/usr/local/share/mkKernel/bin/getFW


"make firmware_install" issue
--->
"Kernel Builder" can buid an old kernel version.
Therefore "make firmware_install" step is still in the procedure.
At building new kernel version this step will be error and ignored.
Please read "perform" (refer to Porteus Kernel Builder (Post by neko #86148))

Code: Select all

cp /home/guest/kernel/v5.16-rc5/64bit.config .config
make oldconfig
CPU_THREADS=`nproc --all`
make -j$CPU_THREADS
cp arch/x86/boot/bzImage ../vmlinuz
make modules_install INSTALL_MOD_PATH=../
make firmware_install INSTALL_MOD_PATH=../ 2>/dev/null

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#1481 by raja » 16 Dec 2021, 11:49

Beny, thanks for information on 'sensors-detect'.

Since BIOS was having complete PC health status, I was wondering ,how to access that info....

Works with old and new kernels.(modules are available)

I have two sensor chips..intel's coretemp and it87..

Code: Select all

root@porteus:/home/guest# modprobe it87

root@porteus:/home/guest# sensors

[b]coretemp-isa-0000[/b]
Adapter: ISA adapter
Package id 0:  +61.0°C  (high = +76.0°C, crit = +95.0°C)
Core 0:        +61.0°C  (high = +76.0°C, crit = +95.0°C)
Core 1:        +57.0°C  (high = +76.0°C, crit = +95.0°C)

[b]it8728-isa-0290[/b]
Adapter: ISA adapter
in0:           1.03 V  (min =  +0.00 V, max =  +3.06 V)
in1:          36.00 mV (min =  +0.00 V, max =  +3.06 V)  ALARM
in2:           2.88 V  (min =  +0.00 V, max =  +3.06 V)
+3.3V:         3.00 V  (min =  +0.00 V, max =  +6.12 V)
in4:          12.00 mV (min =  +0.00 V, max =  +3.06 V)
in5:         768.00 mV (min =  +0.00 V, max =  +3.06 V)
in6:           1.52 V  (min =  +0.00 V, max =  +3.06 V)
3VSB:          3.36 V  (min =  +0.00 V, max =  +6.12 V)
Vbat:          1.03 V  
fan1:        1527 RPM  (min =    0 RPM)
fan2:           0 RPM  (min =    0 RPM)
temp1:        +38.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
temp2:        +43.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = thermistor
temp3:        +45.0°C  (low  = +127.0°C, high = +127.0°C)  sensor = Intel PECI
intrusion0:  ALARM
Linux Kernel-4.4.272 -32 bit; Linux Kernel-5.4.185 - 64 bit

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

Porteus Kernel Builder

Post#1482 by fulalas » 17 Dec 2021, 03:35

@neko, you're right. I didn't pay enough attention -- to be honest I was expecting something simpler :D But now I think I got it.

Thanks, you're very kind :)

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

Porteus Kernel Builder

Post#1483 by fulalas » 17 Dec 2021, 08:35

I invite you guys to try this 200 lines script I wrote to build kernel for Porteus. :)

Kernel builder script -- simple version

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

Porteus Kernel Builder

Post#1484 by beny » 17 Dec 2021, 13:30

hi:well how to solve this....

root@porteus:/home/guest# sh '/home/guest/kernel.sh' 5.15.10
Initial setup...
Downloading kernel source code...
--2021-12-17 13:37:09-- https://mirrors.edge.kernel.org/pub/lin ... .10.tar.xz
Resolving mirrors.edge.kernel.org (mirrors.edge.kernel.org)... 147.75.101.1, 2604:1380:2001:3900::1
Connecting to mirrors.edge.kernel.org (mirrors.edge.kernel.org)|147.75.101.1|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 121948408 (116M) [application/x-xz]
Saving to: ‘linux-5.15.10.tar.xz’

linux-5.15.10.tar.x 100%[===================>] 116.30M 5.61MB/s in 24s

2021-12-17 13:37:33 (4.92 MB/s) - ‘linux-5.15.10.tar.xz’ saved [121948408/121948408]

Extracting kernel source code...
Copying .config file...
Downloading AUFS...
Patching AUFS...
Building kernel (this may take a while)...
Fail to build kernel

also the mkernel have failed i think for the aufs patch

hi fulalas you have to add at your script the overlayfs build option the aufs patch fail to apply at the last 5.15.x kernel

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

Porteus Kernel Builder

Post#1485 by fulalas » 17 Dec 2021, 20:47

@beny, thanks for the feedback! Do you mind continuing on this in the other topic? :)

Post Reply