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 19 Dec 2014, 04:04
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Kernel build script
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 3 [43 Posts]   Goto page: 1, 2, 3 Next
Author Message
Iguleder


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

PostPosted: Tue 10 May 2011, 13:10    Post subject:  Kernel build script
Subject description: An automatic script for compiling a Puppy kernel
 

I wrote a script which builds the kernel automatically. It has three input fields:
- A kernel version
- A kernel sources mirror
- An Aufs major version

... and a valid configuration file for the kernel version specified.

This is beta-quality software, so don't get too excited. At the moment, you can use it to build linux_kernel-2.6.32-40-lts.pet, a very very very very very, but VERY good kernel. It's very solid and the building kit also patches it with BFS, which makes it fly on weak hardware. Power consumption is very low.

The main idea behind this kit is allowing Puppy developers to compile a kernel (let's say it's 2.6.32) and once later kernels of the same series come out, compile them the same way the first one was built to maintain compatibility and reduce the risk of breaking something. In other words - the ability to update the kernel safely and transparently to the user.

If you wonder why it's so good - here's my story with kernel updates - my 2010 netbook's sound card was unsupported on Linux because two pins were not handled in the HDA driver. The required fix came in 2.6.35.7, which was the most recent kernel version back then, but it was also backported to 2.6.32.29. I couldn't use any Puppy, because no puplet had a kernel with that fix. Those kernel updates add more than just bug fixes - they also add security, hardware support and features. That's why they're so important.

The kit provides compatibility by automatically patching the kernel to appear as its major version - for example, 2.6.32.40 is patched to appear as 2.6.32, so if you build nvidia or ATI drivers against 2.6.32.39 and the kernel gets updated, you won't get any X startup failure, BSOD, CPU melting or whatever. Everything will work just fine. It is particularly useful for Wary or any puplets that stick with one kernel for some time. The Lupu guys could do occasional updates to the 2.6.33.2 kernel ... but it's too late Crying or Very sad

Also, it patches the kernel to be quiet (that's the way Puppy kernels are, traditionally) and reduces the number of available consoles (TTYs) from 8 to 5, because 3 are unused and waste precious memory.

The kit consists of four components:
- build.sh - the script which does the real magic
- DOTconfig - a kernel .config file
- patches - a directory with kernel patches to apply
- aufs-allow-sfs.patch - Barry's traditional, must-have patch to allow Squashfs to be used with Aufs.

Just run build.sh to make your own linux_kernel-2.6.32-40-lts. It's very easy - takes 1-2 hours. The result packages can be used with Woof.

As a PoC, I built a kernel (the result was a 20 MB PET, without any stripping) and used it with EZ-Woof to produce a conservative Lupu 5.2.5, it used 57 MB of RAM with nothing running. Pretty good.

EDIT: you can find my kernel here; the script used to build it is in the parent directory. It has one small fix on top of the attached script.
screeny.png
Description 
png

 Download 
Filename  screeny.png 
Filesize  565.42 KB 
Downloaded  873 Time(s) 
kernel-kit.tar.bz2
Description 
bz2

 Download 
Filename  kernel-kit.tar.bz2 
Filesize  89.35 KB 
Downloaded  782 Time(s) 

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


Joined: 14 Jul 2007
Posts: 608

PostPosted: Thu 12 May 2011, 05:53    Post subject:  

Hello Iguleder,

- Very nice work looking forward to testing this.

Best regards,
Johan
Back to top
View user's profile Send private message MSN Messenger 
Aitch


Joined: 04 Apr 2007
Posts: 6825
Location: Chatham, Kent, UK

PostPosted: Thu 12 May 2011, 06:22    Post subject:  

Hey Iggy

Can this be used to reconfigure a kernel, if, say you want SCSI bootup support, PXE enabled, or some PCMCIA feature that wasn't enabled?

btw puppyluvr has done a 539 - 529 plus typo ( Wink ) Lupu with 2.6.38.4 kernel

http://www.murga-linux.com/puppy/viewtopic.php?p=520175

Aitch Smile
Back to top
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3398
Location: Oregon

PostPosted: Thu 12 May 2011, 09:03    Post subject:  

I just wanted to pass along that Barry likes your kernel build script and talks about it on his blog.
He also talked about doing away with the kernel subversion number on kernel builds
to save on not having to recompile driver modules for each subversion.

So as has already been said, Good Work!
Back to top
View user's profile Send private message 
stu90


Joined: 25 Feb 2010
Posts: 1401
Location: England. Dell Inspiron 1501. Dpup

PostPosted: Thu 12 May 2011, 09:06    Post subject:  

Nice one Iguleder - i made a build with EZ-woof using your kernel .pet and updated:
flash
gnome-mplayer
geko-mediaplayer
mtpaint
lupu-update

With htop and scrot running it was using just less than 50mb or ram Very Happy

cheers.


Last edited by stu90 on Thu 12 May 2011, 12:21; edited 1 time in total
Back to top
View user's profile Send private message 
gcmartin


Joined: 14 Oct 2005
Posts: 4502
Location: Earth

PostPosted: Thu 12 May 2011, 12:20    Post subject: Re: Kernel build script
Subject description: An automatic script for compiling a Puppy kernel
 

Iguleder wrote:
... kernel (the result was a 20 MB PET, without any stripping) and used it with EZ-Woof to produce a conservative Lupu 5.2.5, it used 57 MB of RAM with nothing running. Pretty good.
Hi @Iguleder. Great.
2 Questions
  1. Would you post your PUP525 ISO for review, please?
  2. Will this script also work for the work we see with kernel builds by @Pemasu?
Thanks in advance

_________________
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 
Iguleder


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

PostPosted: Thu 12 May 2011, 14:34    Post subject:  

I guess I'll generate a new ISO tomorrow if I find the time Smile

And yes - it should work with any kernel, as long as you provide working patches and a matching configuration file. You'll have to tweak and test the script too, but just once Smile

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


Joined: 25 Feb 2010
Posts: 1401
Location: England. Dell Inspiron 1501. Dpup

PostPosted: Thu 12 May 2011, 15:45    Post subject:  

Here is my lucid 525 EZ-woof build.

Full Lucid Puppy with updated:
kernel - 2.6.32-40-lts
flash
gnome-mplayer
geko-mediaplayer
mtpaint
lupu-update
mint openbox theme
changed icon set and wallpaper

(screen shot in my post above)
http://smokey01.com/stu90/lupu-540.iso
md5: 45c80dd429d6839875dfea8bf4febd14
Back to top
View user's profile Send private message 
Iguleder


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

PostPosted: Thu 12 May 2011, 15:56    Post subject:  

Uploaded a package with extra, third-party drivers:

Quote:
agrsm048pci-2.1.60-20100108-patched1
agrsm06pci-2.1.80-20100106-patched1
agrsm-11c11040-2.1.80-20091225-patched1
dgcmodem-1.13
intel-536-537
ltmodem-20100102
ndiswrapper-2729
orinoco_usb-git11122010
pctel-0.9.7-9-rht-11-patched1
slmodem-2.9.11-20100303-patched1
sysprof-1.0.12
ungrab-winmodem-20090716


8 MB, quite big - but it's worth it if you need any of those Smile

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


Joined: 26 Mar 2009
Posts: 5969
Location: Kentucky

PostPosted: Fri 13 May 2011, 02:29    Post subject:  

stu90 wrote:
Here is my lucid 525 EZ-woof build.

Full Lucid Puppy with updated:
kernel - 2.6.32-40-lts
flash
gnome-mplayer
geko-mediaplayer
mtpaint
lupu-update
mint openbox theme
changed icon set and wallpaper

(screen shot in my post above)
http://smokey01.com/stu90/lupu-540.iso
md5: 45c80dd429d6839875dfea8bf4febd14


Since I can't find a thread for this I'll make a quick post here. Smile Did a frugal install on the old P4 test box and everything appears to be working correctly ootb.
Back to top
View user's profile Send private message 
Iguleder


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

PostPosted: Fri 13 May 2011, 03:02    Post subject:  

Started a Woof build of dpup from Debian Squeeze, I want to give this kernel some serious testing. If everything works well, I might turn this into a puplet.

I want to do a build script for a later kernel too, probably 2.6.39. This could be a very good tool for the IcePuppy and Lite front, in the struggle against old kernels. Smile

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


Joined: 08 Jul 2009
Posts: 5465
Location: Finland

PostPosted: Fri 13 May 2011, 03:09    Post subject:  

Quote:
I want to do a build script for a later kernel too, probably 2.6.39. This could be a very good tool for the IcePuppy and Lite front


Razz Smile Very Happy
Back to top
View user's profile Send private message 
stu90


Joined: 25 Feb 2010
Posts: 1401
Location: England. Dell Inspiron 1501. Dpup

PostPosted: Fri 13 May 2011, 14:14    Post subject:  

James C wrote:
stu90 wrote:
Here is my lucid 525 EZ-woof build.

Full Lucid Puppy with updated:
kernel - 2.6.32-40-lts
flash
gnome-mplayer
geko-mediaplayer
mtpaint
lupu-update
mint openbox theme
changed icon set and wallpaper

(screen shot in my post above)
http://smokey01.com/stu90/lupu-540.iso
md5: 45c80dd429d6839875dfea8bf4febd14


Since I can't find a thread for this I'll make a quick post here. Smile Did a frugal install on the old P4 test box and everything appears to be working correctly ootb.


Hi James C thanks for testing - did this one have any problems with boot to desktop?

Been using this build for a couple of days and not run into any problems myself - finding 2.6.32-40-lts kernel to be nice and stable as well as light on resources.

cheers.
Back to top
View user's profile Send private message 
James C


Joined: 26 Mar 2009
Posts: 5969
Location: Kentucky

PostPosted: Fri 13 May 2011, 14:51    Post subject:  

stu90 wrote:

Hi James C thanks for testing - did this one have any problems with boot to desktop?

Been using this build for a couple of days and not run into any problems myself - finding 2.6.32-40-lts kernel to be nice and stable as well as light on resources.

cheers.


Went straight to the desktop this time, only thing I had to do was the internet connection.
According to Htop, under no load this was only using 41 mb of ram, pretty good.
Really nothing bad to report. Smile
Back to top
View user's profile Send private message 
Iguleder


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

PostPosted: Fri 13 May 2011, 14:54    Post subject:  

I rebuilt pretty much all 5.2.5's applications and compiled extras, like xbindkeys, acpid, acpitool, deadbeef, geany, etc' - I want to build a "lite" 5.2.5 with these and 2.6.32.x to see how light I can get it while maintaining usability.

I do this experiment both because 01micko is interested in this kernel for a "retro" 5.3 and because I have an evil plan to (help) maintain a conservative 5.3 branch, if there is any interest. Sort of the middle between Wary and 5.3 - recent packages with frozen libraries and kernel, but newish applications, built for new hardware and people who appreciate stability.

_________________
My homepage
My GitHub profile
Back to top
View user's profile Send private message Visit poster's website MSN Messenger 
ICQ Number 
Display posts from previous:   Sort by:   
Page 1 of 3 [43 Posts]   Goto page: 1, 2, 3 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
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.0995s ][ Queries: 13 (0.0089s) ][ GZIP on ]