Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 18 Apr 2014, 09:01
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Compiling
Kernel Compiling - Kernel-kit
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [15 Posts]  
Author Message
01micko


Joined: 11 Oct 2008
Posts: 7547
Location: qld

PostPosted: Sat 11 Aug 2012, 17:55    Post subject:  Kernel Compiling - Kernel-kit
Subject description: Scripts to buld a woof compatible kernel
 

Preface

This kit is designed to make it easy to compile a kernel.

For about a year now, nearly all puppy kernels have been compiled using build scripts. Barry has his own scripts which you can find at http://bkhome.org/sources (user,pass required). This kit was originally designed by Iguleder.

A limitation of Barry's way is that a full install is required. Any type of install should work with this as long as the script is run on a Linux filesystem.

This kit will download,patch (aufs and others) and compile the kernel, extract the headers, make the kernel and install it into a directory ready for manual running of dir2pet and build the kernel source sfs without manual intervention.

History

A bit over a year ago, Iguleder introduced kernel-kit. Myself and pemasu have been using it to produce kernels for Slacko, Dpup-Exprimo, Upup and Saluki ever since. We have both added our own refinements and it has evolved to the point where almost anyone can compile a kernel for Puppy.

Prerequisites
    * you must be comfortable with scripts and command line usage
    * a late model Puppy install (YMMV with older pups, but it may work)
    * deps: gcc, git, mksquashfs
    * patience


Hardware
    * at least 512 RAM (may work with less)
    * any architecture supported by Puppy
    * at least 2 GB disk space


--------------------------------------------------------------------------------------------------------

from the README;
Quote:
version 0.1.2

gpl3, see /usr/share/doc/legal

THIS KIT COMES WITH ABSOLUTELY NO WARRANTY, USE ENTIRELY AT OWN RISK
NO RESPONSIBILITY ACCEPTED. YOU HAVE BEEN WARNED

ABOUT
-----
This kit is designed to make it easy to compile a kernel for Puppy Linux.
The packages produced are compatible with Woof/Woof2.
See Barry's Blog .. bkhome.org/blog
This kit assumes you are comfortable with shell scripts and command line usage.


DEPENDENCIES
------------
This kit is designed for Puppy Linux. A late model build is
recommended, such as Wary, Racy, Slacko, Precise, Dpup-Exprimo.
Be aware that for best results you should compile in a host
distro which is compatible with the target distro.

REQUIRED:
gcc - for compilation
git - for aufs sources
mksquashfs - for compressing the kernel source sfs, will build without

CREDIT
------
Much credit has to go to BarryK, for inventing Puppy Linux,
Iguleder, the original designer of this kit, pemasu for input and bugfixes,
and various testers on the Murga-Linux/puppy forum


Please read the rest of the README before you begin.

Thanks to BarryK for Puppy, Iguleder for the original concept and pemasu for hours of testing.

Have fun!

Changelog
---------
31-03-13 v0.1.3
added link to version.h - pemasu
added extra location for aufs.h - pemasu
added ability to compile aufs-utils from git - 01micko
added axtra configs for k3.8xx
kernel-kit-3.series-0.1.3.tar.bz2
Description  latest version
bz2

 Download 
Filename  kernel-kit-3.series-0.1.3.tar.bz2 
Filesize  101.91 KB 
Downloaded  471 Time(s) 
kernel-kit-3.series-0.1.2.tar.bz2
Description 
bz2

 Download 
Filename  kernel-kit-3.series-0.1.2.tar.bz2 
Filesize  74.95 KB 
Downloaded  697 Time(s) 

_________________
Woof Mailing List | keep the faith Cool |

Last edited by 01micko on Sat 30 Mar 2013, 22:22; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website 
mavrothal


Joined: 24 Aug 2009
Posts: 1384

PostPosted: Sun 12 Aug 2012, 03:53    Post subject:  

Hi Mick,
I believe the aufs lopback patch is not needed some time now (ref 1, ref 2)
Actually XO kernels run fine without it.

_________________
Kids all over the world go around with an XO laptop. They deserve one puppy (or many) too Very Happy
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7547
Location: qld

PostPosted: Sun 12 Aug 2012, 06:33    Post subject:  

Hi mavrothal

One time there I was not including that patch. I think it was beta testing for one of the slacko versions, forget which, but on Barry's advice I put it back. It was after the dates of your references.

ref1: From: <sfjro@us...> - 2010-07-25 23:48

ref2: From: <sfjro@us...> - 2010-03-23 09:03, From: Barry Kauler <bkauler@gm...> - 2010-03-24 00:04

Barry's patch in Precise:2011-05-11
Code:
diff -rupN aufs2.1-32-git100511-orig//fs/aufs/loop.c aufs2.1-32-git100511/fs/aufs/loop.c
--- aufs2.1-32-git100511-orig//fs/aufs/loop.c   2011-05-11 11:27:21.922000014 +0200
+++ aufs2.1-32-git100511/fs/aufs/loop.c   2011-05-11 11:28:00.310000011 +0200
@@ -28,6 +28,9 @@
  */
 int au_test_loopback_overlap(struct super_block *sb, struct dentry *h_adding)
 {
+   /* allow Squashfs file systems to be used as Aufs branches */
+   return 0;
+   
    struct super_block *h_sb;
    struct loop_device *l;
 

My patch is near identical: 2011-11-08 15:54:01

So, I'm not sure what to make of it. I know J. R. Okajima believes the patch is unnecessary, but why has Barry still got it?

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
Iguleder


Joined: 11 Aug 2009
Posts: 1775
Location: Israel, somewhere in the beautiful desert

PostPosted: Thu 16 Aug 2012, 15:26    Post subject:  

Thanks for sharing, 01micko!

While I'm waiting for my Raspberry Pi to arrive, I'm doing some automation work and I think it would be nice to have a kernel building kit for kernel 3.2.x, since the Raspberry Pi guys maintain a tree with all the modifications required for it.

Since it's a LTS kernel (and because the next Slacko is going to use it), it's a great fit for Puppy.

_________________
My homepage
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
pemasu


Joined: 08 Jul 2009
Posts: 5458
Location: Finland

PostPosted: Sat 12 Jan 2013, 15:24    Post subject:  

build.sh script for compiling 3.7.X kernel.
It needed modification to the aufs_type.h files, to copy them into 2 locations in kernel source.
build.sh.gz
Description 
gz

 Download 
Filename  build.sh.gz 
Filesize  10.31 KB 
Downloaded  436 Time(s) 
Back to top
View user's profile Send private message 
anikin

Joined: 10 May 2012
Posts: 389

PostPosted: Thu 28 Mar 2013, 14:27    Post subject:  

Is there a way to inject CFLAGS into this kit?
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7547
Location: qld

PostPosted: Sun 31 Mar 2013, 02:16    Post subject:  

anikin wrote:
Is there a way to inject CFLAGS into this kit?
Why? What exactly do you want to do?

You should be able to take care of everything in the configuration.

Anyway, a new kit is posted, compliant with k3.7 and onward plus it now compiles aufs-utils directly from git.

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
anikin

Joined: 10 May 2012
Posts: 389

PostPosted: Sun 31 Mar 2013, 03:39    Post subject:  

I want to compile the kernel with a list of predefined, machine specific CFLAGS - "march=native etc, etc,(as a noob, I have a long and dangerous list)." So that every bit of performance could be squeezed out of my equipment. Is there a way to "stick" the CFLAGS and make them permanent in this kit and ideally for any compilation task? Do once and forget about it approach?

Thank you in advance
Back to top
View user's profile Send private message 
01micko


Joined: 11 Oct 2008
Posts: 7547
Location: qld

PostPosted: Wed 03 Apr 2013, 19:32    Post subject:  

anikin


When you run ./build.sh, after the sources are downloaded, extracted and patched you are given the option to alter the configuration. It may take some time, but I recommend the first option which gives a dialog interface to configuration. Go through it fastidiously and check all the things related to your processor and what hardware you want supported. You can get a very specific kernel this way tuned exactly how you want. The configs supplied are very general to support as much hardware as possible.

------------------------------------------------------------------------------------------------------------

For anyone interested, I have found patches for k3.7 that support f2fs. They apply cleanly. Just put them into the patches directory in the kit. Attached also is a config I used. Vary it how you want. I haven't yet tested the resulting kernel. Soon.

Apparently patches can be applied to k3.6 for f2fs, but I didn't find them. They will be around somewhere, maybe even these ones will work. Probably not on anything earlier though.

Here is the original source of the patches. I only had to edit patch 16 because it didn't know about aufs, only 1 line.

EDIT: patches and config removed, while the kernel worked fine, f2fs was failing to mount, so stick to >= 3.8x if you want f2fs file system.

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send private message Visit poster's website 
oldyeller


Joined: 15 Nov 2011
Posts: 721
Location: Mishawaka IN

PostPosted: Mon 31 Mar 2014, 13:34    Post subject:  

Hello Mick,

I have tried doing a kernel but it would not compile. What do I need? I have the devx, Do I need the kernel-sources.sfs as well? I got the Dot-config for kernel 3.9.11 from Barryk site along with the source sfs. I want to compile kernel 3.12.

Since this is Barryk's DOT_config do I need to do this with a full install?
Back to top
View user's profile Send private message 
Hesse James


Joined: 08 Feb 2010
Posts: 38

PostPosted: Tue 01 Apr 2014, 17:14    Post subject:  

Hi Oldyeller
What do you mean by "it would not compile" ? ->e.g. "Error: failed to add Aufs to the kernel sources" ?
This occurs with Kernel 3.12 since 3.12.7 for some reasons. So 3.12.6 could be compiled by you. This desired version number has to be written down in the build.conf file in line 20.
I use a local install of Puppy which was recommended elsewhere for this purpose (I use a virtual machine) and of course the latest release of woof-CE-master kernel kit. Included is a .config file for 3.12.2 which could be used for your compilation purpose. Please save your changes as .config before you exit the kernel configuration program. The compilation results in a SFS file. The PET-file you are looking forward is not generated directly. How to get this PET-file is described in detail in the Readme file.
Good luck.
Christian
Back to top
View user's profile Send private message 
oldyeller


Joined: 15 Nov 2011
Posts: 721
Location: Mishawaka IN

PostPosted: Wed 02 Apr 2014, 11:49    Post subject:  

I get Error: failed to compile kernel_sources
Back to top
View user's profile Send private message 
Hesse James


Joined: 08 Feb 2010
Posts: 38

PostPosted: Fri 04 Apr 2014, 15:37    Post subject:  

Hi Oldyeller
I tested a kernel compilation with a setup I assume it is comparable to yours:
- Fluxpup with installed DEVX only,
- fresh frugal installation
- Savefile on EXT4-partition
(for sure one difference: everything is located in virtual machine).
I used the latest kernel-kit of woof-CE-master.
Two modifications as I mentioned before:
- build.conf modified so that kernel 3.12.6 can be downloaded and compiled (higher than 3.12.6 gives error)
- DOTconfig file from kernel-kit -> configs-extra for 3.12.2 used as basis.

Both files are attached. Then the compilation starts with ./build.sh and runs until "Done !". Kernel-source SFS is generated, PET for woofing builds has to be generated by dir2pet of the relevant folder which is also there (see readme).
Good luck.
Christian
DOTconfig.tar.gz
Description 
gz

 Download 
Filename  DOTconfig.tar.gz 
Filesize  31.39 KB 
Downloaded  21 Time(s) 
build.conf.tar.gz
Description 
gz

 Download 
Filename  build.conf.tar.gz 
Filesize  941 Bytes 
Downloaded  20 Time(s) 
Back to top
View user's profile Send private message 
gcmartin

Joined: 14 Oct 2005
Posts: 3624
Location: Earth

PostPosted: Fri 04 Apr 2014, 16:13    Post subject:  

Seen earlier, that kernel 3.14 is now released. There, it seems that ZRAM has been added back. Does the problem exhibited by 3.12.7+ also apply in latest kernel? Is this a continuing problem?
_________________
Get ACTIVE Create Circles; Do those good things which benefit people's needs!
We are all related ... Its time to show that we know this!
3 Different Puppy Search Engine or use DogPile
Back to top
View user's profile Send private message 
Hesse James


Joined: 08 Feb 2010
Posts: 38

PostPosted: Fri 11 Apr 2014, 15:30    Post subject:  

Hi
I just tried to compile 3.14. For some reasons the compilation worked out of the box. Interested to use the results ? I have no need to build up a system with it.
Christian
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [15 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Compiling
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0798s ][ Queries: 13 (0.0045s) ][ GZIP on ]