Kernel Compiling - Kernel-kit

discuss compiling applications for Puppy
Message
Author
User avatar
oldyeller
Posts: 889
Joined: Tue 15 Nov 2011, 14:26
Location: Alaska

#21 Post by oldyeller »

Thanks,

User avatar
vicmz
Posts: 1262
Joined: Sun 15 Jan 2012, 22:47

Kernel compile error

#22 Post by vicmz »

I'm using the kernel-kit from Woof-CE-testing in Precise Puppy. I can't compile any kernels. Apparently, I should install something else to get all the patches right, but I can't figure it out yet. I attach the build.log below. After downloading and applying the patches, compiling results in errors.
Attachments
build.log.gz
(120.16 KiB) Downloaded 796 times
[url=http://murga-linux.com/puppy/viewtopic.php?t=76948]Puppy Linux en español[/url]

User avatar
HoerMirAuf
Posts: 255
Joined: Tue 22 Jan 2008, 12:11
Location: Würzburg

#23 Post by HoerMirAuf »

Anybody experience with kernel > 4 and woofce?

Is aufs still needed? because new kernel have a own FS Overlay system.
And when yes .... can't add aufs patch to the latest kernel 4.3

But i am not very experienced in kernel configuring ... :cry:
[size=75][color=blue]Bionic64[/color][/size]

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#24 Post by peebee »

HoerMirAuf wrote:Anybody experience with kernel > 4 and woofce?
Yes - they work fine as long as the HUGE archive is named correctly....
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
HoerMirAuf
Posts: 255
Joined: Tue 22 Jan 2008, 12:11
Location: Würzburg

#25 Post by HoerMirAuf »

The archive named correctly?

But i havn't to name archive, isnt it? All archives are build by the buid.sh .. or i am wrong .... compiled some kernels but can't get compiled 4.3 ...

first a aufs download error. After donload the archive manually an packed it to the dist/source/vanilla folder allways a aufs patch error....

@ peebee which auf path do you use? can you give me a hint how to set the build.conf?
[size=75][color=blue]Bionic64[/color][/size]

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#26 Post by peebee »

HoerMirAuf wrote:The archive named correctly?

But i havn't to name archive, isnt it? All archives are build by the buid.sh .. or i am wrong .... compiled some kernels but can't get compiled 4.3 ...

first a aufs download error. After donload the archive manually an packed it to the dist/source/vanilla folder allways a aufs patch error....

@ peebee which auf path do you use? can you give me a hint how to set the build.conf?
Sorry - my misunderstanding of your question...

I thought you asked "can kernels >4 be used in woofce builds"....

I think you are asking "can >4 kernels be built using the kernel kit in woof-ce"?

The answer is yes and no - 01micko has built k4.1.11 but looks like k4.3 can't yet be built.

Stemsee has built k4,2,5 using his sukk tool but not k4.3.

I haven't built a kernel myself....only used the endeavours of others. If I did I would plagiarise (as usual ;-) )

Cheers
peebee
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
HoerMirAuf
Posts: 255
Joined: Tue 22 Jan 2008, 12:11
Location: Würzburg

#27 Post by HoerMirAuf »

Hi peebee ..

thank's for your reply.

Ok .... between ... i got it! Compiled successful a stable 4.3 kernel with woof-ce kernel kit :D
The only thing ... ndiswrapper will not compile with this kernel.
There was a patched 3.14 version which worked with kernel 4.0.0 but this version will not work wit 4.3 too.

Code: Select all

ndiswrapper-1.59/driver/crt.c: In function ‘_win_srand’:
ndiswrapper-1.59/driver/crt.c:470:2: error: implicit declaration of function ‘net_srandom’ [-Werror=implicit-function-declaration]
net_srandom(seed);
Nothing found on web to solve it :/

Anybody a idea?
[size=75][color=blue]Bionic64[/color][/size]

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

Please enable the Mediatek mt7601u wifi driver

#28 Post by peebee »

Please enable the Mediatek mt7601u wifi driver in the 4.2 and subsequent trees.

CONFIG_WL_MEDIATEK=y
CONFIG_MT7601U=m

Details

Thanks
peebee
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
moeppyfan
Posts: 47
Joined: Thu 11 Feb 2016, 18:59

#29 Post by moeppyfan »

666philb wrote:frugal is fine ....with the kernel kit from woof CE https://github.com/puppylinux-woof-CE/w ... esting.zip
This woof-CE version worked quite well for me when trying to compile 3.14.65. :) The steps I had to do (from what I remember):

- Open /kernel-kit/build.conf in a text editor
- Change the kernel_version= line to "3.14.65" (or the newest 3.14 on kernel.org)
- Change the sublevel= to no (so it doesn't display as 3.14.0)
- In the directory /kernel-kit/config-extras, copy the file DOTconfig-3.14.54-slacko32 to DOTconfig-3.14.65-slacko32
- Open the console, navigate into the kernel-kit directory and type ./build.sh (make sure a devx is mounted)
- When asked, select your 3.14.65-slacko32 config file, then later on I picked the "1. make menuconfig" option
- When the blue menu screen came on, I just pressed Esc twice to keep default values
- The Linux kernel 3.14.65 downloads (it was a ~79MB tar.xz file, took about 30 minutes for me @40KB/s)
- The next part "Compiling the kernel" took about 2 hours on my single core laptop (you can watch the progress in build.log)
- When that stage was finished, I selected "firmware-140621-cut" (~9MB) to add (I think that's what 3.14.55 also used)
- A ~34MB huge-3.14.65.tar.bz2 file should be in /kernel-kit/dist/packages that you can try with change_kernels. Bark bark! :lol:

One difference I noticed between the resulting zdrv and the original 3.14.55 in slacko was that /lib/modules/all-firmware was not added by default for me (saving ~800K squashed). I noticed it's also not in LxPupSc's kernel, so maybe it's safe to leave out?

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#30 Post by peebee »

moeppyfan wrote:One difference I noticed between the resulting zdrv and the original 3.14.55 in slacko was that /lib/modules/all-firmware was not added by default for me (saving ~800K squashed). I noticed it's also not in LxPupSc's kernel, so maybe it's safe to leave out?
all-firmware arises from .pets included in the woof-ce build and resides in the puppy_*.sfs not in the zdrv.....
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
moeppyfan
Posts: 47
Joined: Thu 11 Feb 2016, 18:59

#31 Post by moeppyfan »

peebee wrote:all-firmware arises from .pets included in the woof-ce build and resides in the puppy_*.sfs not in the zdrv.....
Thanks peebee. That's good to know. Also found some excellent tips to get ndiswrapper working again! :D

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#32 Post by peebee »

moeppyfan wrote:
peebee wrote:all-firmware arises from .pets included in the woof-ce build and resides in the puppy_*.sfs not in the zdrv.....
Thanks peebee. That's good to know. Also found some excellent tips to get ndiswrapper working again! :D
Yes - any "non-kernel" drivers have to be recompiled for a new kernel - includes ndiswrapper, broadcom wl, nvidia and other proprietary video drivers....etc.

Encourage you to upload your new kernel somewhere and put a link on:
http://www.murga-linux.com/puppy/viewtopic.php?t=106084
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

slavvo67
Posts: 1610
Joined: Sat 13 Oct 2012, 02:07
Location: The other Mr. 305

#33 Post by slavvo67 »

Is this still being supported, tested? Just wondering before I jump in and spend a bunch of time, here.

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#34 Post by peebee »

slavvo67 wrote:Is this still being supported, tested? Just wondering before I jump in and spend a bunch of time, here.
Short answer - yes

Longer answer - kernel kit is now a part of woof-ce and is therefore held on github from where you can download woof-ce including kernel-kit

https://github.com/puppylinux-woof-CE/w ... kernel-kit
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
oldyeller
Posts: 889
Joined: Tue 15 Nov 2011, 14:26
Location: Alaska

#35 Post by oldyeller »

Hello,

I have finally complied a kernel :lol: :lol: after all the puppies i did. Out of all the folders I have now which ones do I make the pet from?

Any help would be great Thanks

Sailor Enceladus
Posts: 1543
Joined: Mon 22 Feb 2016, 19:43

#36 Post by Sailor Enceladus »

Just out of curiosity, is there any way to upgrade a kernel using this? Say I make 4.4.112 with kernel-kit, then I want to make 4.4.113, and all the files compiled in the linux-4.4.112 folder are still there. My strategy so far is just to restart clean every time the 3.18, 4.1, 4.4, etc. branches have a new point update, which I've done probably at least 30 times now, which takes around 3-4 hours to compile on my laptop each time, so I usually start it up, go out for the day, then when I come back when it's usually done. I didn't see anything in the readme about this, so guessing it might be a complex thing to add, and might end up being buggy, though when I edit a few files in an IDE then recompile it seems to magically know which files it need to recompile, which is infinitely faster than doing Build All for each small change and probably healthier on the CPU and hard drive. Something like "if selected 4.4.113 and 4.4.x is already there, don't delete the compiled files, just replace the new files over the old ones". Does this sound like a practical feature to add, or just a daunting PITA? :lol: My impression is that cp -u only copies files that are newer, so maybe I could just add a line to stop kernel-kit at this point and try it manually to see if it only compiles the new files after...

edit: hmmm yes, I guess I can move the linux-4.4.112 directory somewhere else before starting build.sh again, then when it stops before "Compiling the Kernel" I can copy all the o files from the linux-4.4.112 directory into the linux-4.4.113 directory...

User avatar
Hesse James
Posts: 106
Joined: Mon 08 Feb 2010, 18:41

Kernel 4.9.77 with RETPOLINE active for Xenial64

#37 Post by Hesse James »

Hello
I expect that you have heard about the recent vulnerabilities of most of the actual CPU's. These vulnerabilities are known as Meltdown and Spectre. I think this picture about these vulverabilities exaggerates a bit
but the threat should not be underestimated (picture stems from an article in ct about Spectre/Meltdown).

Image

A mitigation (RETPOLINE) was shipped with the actual kernel 4.9.77. As a negative effect it might reduce the CPU-perfomance for about 5 %.
To evaluate the effect I compiled this kernel for Xenial64. These are the additional kernel parameters that are part of the base settings of 4.9.77 compared to 4.9.58:

# Linux/x86 4.9.77 Kernel Configuration
CONFIG_RETPOLINE=y
CONFIG_GENERIC_CPU_VULNERABILITIES=y
CONFIG_KEYS_COMPAT=y
CONFIG_PAGE_TABLE_ISOLATION=y

After changing the kernel I used HARDINFO to determine the CPU performance with the Xenial64 7.5 Standard-Kernel 4.9.58, the 4.9.77 without and with RETPOLINE activated.
According to the literature RETPOLINE should reduce the performance significantly.

______________________________________________Kernel 4.9.58________Kernel 4.9.77 no retpoline___Kernel 4.9.77 with retpoline

CPU Blowfish (lower is better)______This Machine___3581 MHz__2.025____ 3300 MHz__1.986_________3300 MHz__1.997
CPU CryptoHash (higher is better)__This Machine___3581 MHz__717.230___3300 MHz__781.685_______3300 MHz__755.834
CPU Fibonacci (lower is better)_____This Machine___3581 MHz__0.289_____3300 MHz__0.291_________3300 MHz__0.294
CPU N-Queens (lower is better)____This Machine___3581 MHz__7.153_____3300 MHz__6.935_________3300 MHz__7.236

According to these results I see only a performance reduction for N-QUEENS and CryptoHash. For some reasons the K4.9.58 doesn't determine the CPU frequency correctly.
If you are interested in testing and protecting your machine against the vulverability you can download here my compiled kernel with all necessary files including the used .config file.

Update !
http://www.mediafire.com/file/h1ys05ddq ... l64.tar.gz

Christian

P.S. These are the configuration differences between the standard kernel .config 4.9.58 and 4.9.124:
CONFIG_RETPOLINE=y
CONFIG_GENERIC_CPU_VULNERABILITIES=y
CONFIG_PAGE_TABLE_ISOLATION=y
CONFIG_HOTPLUG_SMT=y

User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

#38 Post by rockedge »

I am attempting to compile a 4.14.63 RT kernel using the aufs=4.14.56+ and the RT-patches-4.14.63....but have a compiling failure about half way through the compile itself.

Code: Select all

UPupBB 18.05 [i686]
gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0
git version 2.17.1
mksquashfs version 4.3 (2014/05/12)
Jobs for make: 2
kernel_version=4.14.63
kernel_version_info=
Linux: 4.14.63
aufs=4.14.56+
the build.log ends with

Code: Select all

CC [M]  net/wireless/ap.o
  CC [M]  net/wireless/trace.o
  CC [M]  net/wireless/ocb.o
  CC [M]  net/wireless/debugfs.o
  CC [M]  net/wireless/wext-compat.o
  CC [M]  net/wireless/wext-sme.o
  CC [M]  net/wireless/lib80211.o
  CC [M]  net/wireless/lib80211_crypt_wep.o
  CC [M]  net/wireless/lib80211_crypt_ccmp.o
  CC [M]  net/wireless/lib80211_crypt_tkip.o
  AR      net/wireless/built-in.o
  LD [M]  net/wireless/cfg80211.o
  AR      net/built-in.o
Error: failed to compile the kernel sources
.

I have tried 7 different variations but I am missing something that is causing the failure...anyone have any ideas to throw into the mix?

copy of the complete log...it is a compressed zip file
Attachments
build.log.zip
(46.02 KiB) Downloaded 495 times

User avatar
peebee
Posts: 4370
Joined: Sun 21 Sep 2008, 12:31
Location: Worcestershire, UK
Contact:

#39 Post by peebee »

the error is at line 6231 in the log:

CC [M] drivers/hv/vmbus_drv.o
drivers/hv/vmbus_drv.c: In function ‘vmbus_isr’:
drivers/hv/vmbus_drv.c:969:25: error: implicit declaration of function ‘get_irq_regs’; did you mean ‘get_mm_rss’? [-Werror=implicit-function-declaration]
struct pt_regs *regs = get_irq_regs();
^~~~~~~~~~~~
get_mm_rss
drivers/hv/vmbus_drv.c:969:25: warning: initialization makes pointer from integer without a cast [-Wint-conversion]
cc1: some warnings being treated as errors
scripts/Makefile.build:328: recipe for target 'drivers/hv/vmbus_drv.o' failed
make[2]: *** [drivers/hv/vmbus_drv.o] Error 1
scripts/Makefile.build:587: recipe for target 'drivers/hv' failed
make[1]: *** [drivers/hv] Error 2
Makefile:1035: recipe for target 'drivers' failed
make: *** [drivers] Error 2
ImageLxPup = Puppy + LXDE
Main version used daily: LxPupSc; Assembler of UPups, ScPup & ScPup64, LxPup, LxPupSc & LxPupSc64

User avatar
rockedge
Posts: 1864
Joined: Wed 11 Apr 2012, 13:32
Location: Connecticut, United States
Contact:

#40 Post by rockedge »

Thank you peebee!!!! I looked closer at that error and found a fix.
here : https://www.spinics.net/lists/linux-rt- ... 19382.html

this involved fixing drivers/hv/vmbus_drv.c by adding the line

Code: Select all

#include <asm/irq_regs.h>
this resulted in a Successful compile of a real time kernel! 4.14.63-rt37 PAE 32bit
I am about to use woof -CE to build a Tahr with this kernel.

log output :

Code: Select all

------------------
Output files:
- output/huge-4.14.63-upupbb.tar.bz2
  (kernel tarball: vmlinuz, modules.sfs - used in the woof process)
  you can use this to replace vmlinuz and zdrv.sfs from the current wce puppy install..

- output/kernel_sources-4.14.63-upupbb.sfs
  (you can use this to compile new kernel modules - load or install first..)
------------------
Included here is a DOT config file for anyone who would like to compile a similar kernel. Remove the .gz extension.

Here is the download link for the kernel 4.14.63-rt37
http://rockedge.org/kernels

again thank you peebee for the insight!
Attachments
DOTconfig-4.14.63-x86-060918.gz
(170.37 KiB) Downloaded 481 times
build.log.zip
(126.22 KiB) Downloaded 443 times

Post Reply