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 Tue 21 Oct 2014, 18:23
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
Compiling kernel 2.4.29, recreate live-CD on other computer
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
Staffan

Joined: 14 Sep 2005
Posts: 12
Location: Sweden

PostPosted: Fri 30 Sep 2005, 11:29    Post_subject:  Compiling kernel 2.4.29, recreate live-CD on other computer  

Hello,

perhaps this is of less interest to most people, but I found that I needed to re-compile the kernel for the live-CD and also add some files. This I wanted to do on a separate computer, but I wasn't successful in finding any Howto so I wrote down what I did and include it here.
All disclaimers apply and please beware that there may be errors.
I also attach the files I needed, that weren't directly available from the Puppy homepage. They are compressed to save space and you should especifally uncompress unionfs.o.gz if you plan on using it.

Regards,
Staffan

===================================================
Steps for recompiling the kernel of the live Puppy CD and generating a
new iso-image


Prerequisites:

There should exist a suitable location for the editing and where to
store the relevant files. It is here assumed that you have a directory
~/puppyRemaster in which all files that are needed are stored. It is
also assumed that it contains the subdirectory
~/puppyRemaster/isolinux-builds.

The following files should be available:
www.kernel.org
linux-2.4.29.tar
www.goosee.com/puppy/development/compilekernel.htm:
linux-2.4.29-ntfs-2.1.6b.patch
squashfs2.1-patch-k2.4.26

unionfs-1.0.11.tar.gz _or_ unionfs.o.gz
updatemodules.sh

The live-CD should be available. Alternatively, it is sufficient to
have the iso-image and mount it at a suitable location in order to
copy the files.

1. Mount the CD or iso-image and copy the contents to a working directory

mount /dev/cdrom /mnt/cdrom
//
if only the iso-image is available, located at
~puppyRemaster/puppy-1.0.4-mozilla.iso, it is possible to mount it
instead of the CD as:
mount ~puppyRemaster/puppy-1.0.4-mozilla.iso /mnt/cdrom -o loop
//

cd /mnt/cdrom
cp -r /mnt/cdrom/* ~/puppyRemaster/isolinux-builds/
umount /mnt/cdrom

2. Step into the directory where you have copied the CD to
(~/puppyRemaster/isolinux-builds). Uncompress the image.gz and mount
the file image (which is an ext2 filesystem) somewhere you can
access it conveniently, e.g., /mnt/tmp. It is not necessary to use
/mnt/tmp, but it will be assumed here.

cd ~/puppyRemaster/isolinux-builds
gunzip image.gz
mount ~/puppyRemaster/isolinux-builds/image /mnt/tmp -o loop

3. The configuration file for compiling the kernel and the modules
should now be available under /mnt/tmp/lib/modules

4. Make sure the kernel source is available and that an appropriate
compiler is installed. Using gcc 2.96 seems to be working well. A
good place to put the kernel source is under /usr/src/linux-2.4.29,
but it is not necessary. In the following text, this will be the
assumed location.

5. Apply patches to the kernel as described in
http://www.goosee.com/puppy/development/compilekernel.htm.

Note:
it seems like we also need to get a driver for the unionfs (file
system used by Puppy Linux). There should be two options for this:
either compile and install from source found at
http://www.fsl.cs.sunysb.edu/project-unionfs.html or use the module
already available in /mnt/tmp/lib/modules/2.4.29/fs/.

6. Make sure the kernel is 'clean' and insert the config file

cd /usr/src/linux-2.4.29/
make mrproper
cp /mnt/tmp/lib/modules/config-2july05-2.4.29-pup1.0.4 .config

7. Make sure all configurations are updates using make oldconfig

make oldconfig

8. Make the changes you wish to perform using, e.g., make menuconfig

make menuconfig

9. Run the regular compile sequence

make dep
make bzImage
make modules


10. The kernel should now be available under
/usr/src/linux-2.4.29/arch/i386/boot/bzImage. It can be copied to
~/puppyRemaster/isolinux-builds/ and replace vmlinuz.

cp /usr/src/linux-2.4.29/arch/i386/boot/bzImage ~/puppyRemaster/isolinux-builds/vmlinuz

11. Alternatively, it can be named differently, but then it is
necessary to edit the file isolinux.cfg found in the same
directory.

12. The modules are already compiled, but they have to be collected to
a proper place from where they can be copied to
/mnt/tmp/lib/modules. This is easiest done by running make
modules_install in the /usr/src/linux-2.4.29 directory and then
pick up the correct files from /lib/modules (not
/mnt/tmp/lib/modules!). This is the same place where your
currently running kernel is keeping its modules so if you are
running the kernel 2.4.29, make sure to create a backup of your
current modules!

cd /lib/modules
tar cf modules_backup_2.4.29.tar 2.4.29
cd /usr/src/linux-2.4.29/
make modules_install

13. Now move the relevant modules from /lib/modules/2.4.29 to a
temporary location before copying them to
/mnt/tmp/lib/modules. This is done using the script
updatemodules.sh, which moves the needed files to
~/puppyRemaster/final-modules/lib/modules. Note that if other
directories than the ones stated here are used, the script must be
edited. It should however suffice to modify the strings at the
start of the script. Before moving the modules, add the file
unionfs.o to ~/puppyRemaster/final-modules/lib/modules/2.4.29/fs
and then move the complete directory to /mnt/tmp/lib/modules.

If the modules for unionfs is to be built from source, now is a
good time to do that. With either module, it has to be copied into
the modules tree before collecting all modules. This order is
necessary since the script updatemodules.sh performs a depmod at
the end and then all files must be available.

Note: the files that are collected from /lib/modules are defined
in the script and they should be the same as the ones that are
found when running "find /mnt/tmp/lib/modules/ -type f -print".
However, the .gz must be removed from the name since they are not
compressed in /lib/modules (but they will be in
/mnt/tmp/lib/modules).

If additional modules should be added, just edit the script and
enter the location where they shall be _PUT_ in
/mnt/tmp/lib/modules, not where they currently are found in
/lib/modules.


// possibly compile unionfs.o and put it in ~/puppyRemaster/ //

cp ~/puppyRemaster/unionfs.o /lib/modules/2.4.29/kernel/fs/

// possibly edit updatemodules.sh here to include new modules //

updatemodules.sh
rm -fr /mnt/tmp/lib/modules/2.4.29 # <--- don't forget the /mnt/tmp!!!
cp -r ~/puppyRemaster/final-modules/lib/modules/2.4.29 /mnt/tmp/lib/modules/

14. The structure should now be complete for regenerating an
iso-image. If there are additional files to be added, e.g., to
/mnt/tmp/sbin or /mnt/tmp/bin, now is the time to do that. It is
also a convenient time to update isolinux.cfg to reflect any
changes. Finally, unmount the /mnt/tmp and compress the file "image".

//
cp whatever-file /mnt/tmp/sbin (or /mnt/tmp/bin)
//

umount /mnt/tmp
gzip ~/puppyRemaster/isolinux-builds/image

15. Create an iso-image using mkisofs

cd ~/puppyRemaster
mkisofs -o cd-puppy.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table ./isolinux-builds/

16. The iso image is available. If you have an emulator like VMWare,
it is possible to test it directly. Otherwise, just burn a CD.


GOOD LUCK!
updatemodules.sh.gz
Description  Script for collecting the correct set of modules
gz

 Download 
Filename  updatemodules.sh.gz 
Filesize  2.45 KB 
Downloaded  606 Time(s) 
unionfs.o.gz
Description  The unionfs module found in PuppyLinux-1.0.4
gz

 Download 
Filename  unionfs.o.gz 
Filesize  55.84 KB 
Downloaded  514 Time(s) 
unionfs-1.0.11.tar.gz
Description  source for unionfs if you want to build it
gz

 Download 
Filename  unionfs-1.0.11.tar.gz 
Filesize  107.08 KB 
Downloaded  510 Time(s) 
Back to top
View user's profile Send_private_message 
Staffan

Joined: 14 Sep 2005
Posts: 12
Location: Sweden

PostPosted: Fri 30 Sep 2005, 11:34    Post_subject:  

Hello,

just noticed that the link in step 5 accidentally includes a dot at the end. This should be omitted or you won't find the correct page.
I was also not able to include the HOWTO as a file earlier, I'm trying again.

Regards,
Staffan
HOWTO.gz
Description 
gz

 Download 
Filename  HOWTO.gz 
Filesize  2.42 KB 
Downloaded  569 Time(s) 
Back to top
View user's profile Send_private_message 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Fri 30 Sep 2005, 12:16    Post_subject:  

Many Thanks for this detailed Howto, I will try it in the next days to get the cpufreq-patch running Smile

Mark
Back to top
View user's profile Send_private_message Visit_website 
bombayrockers


Joined: 24 Sep 2005
Posts: 427
Location: Mumbai, India

PostPosted: Thu 10 Nov 2005, 04:55    Post_subject: custom kernel  

staffan can you make a custom kernel for me patched with performance patches mentioned at http://www.plumlocosoft.com/kernel/ plus the patches required to run puppy

These performance patches for kernel 2.4.29 can be downloaded for from http://www.plumlocosoft.com/kernel/patches/2.4/2.4.29/2.4.29-lck1/components/
Back to top
View user's profile Send_private_message YIM 
bombayrockers


Joined: 24 Sep 2005
Posts: 427
Location: Mumbai, India

PostPosted: Sun 13 Nov 2005, 15:27    Post_subject:  

Thanks Staffan for the HOW-TO above.
_________________
Boosted Puppy Kernel (2.4.29) available
Download Here
KDE for testers available
Download Here
Back to top
View user's profile Send_private_message YIM 
bombayrockers


Joined: 24 Sep 2005
Posts: 427
Location: Mumbai, India

PostPosted: Sun 13 Nov 2005, 15:31    Post_subject:  

One little thing i would like to add.

Compiling unionfs using the default makefile we get a module ~2000kb.
This size can be reduced by disabling debug imformation. To disable debug imformation read the INSTALL file in the unionfs source folder. Once debug is disabled size of unionfs module reduces to 207 Kb.

The ntfs and squashfs patches available at www.goosee.com/puppy/development/compilekernel.htm are .gz packages and BarryK says to gunzip them before installation. However they are not actually .gz but
.patch files renamed .patch.gz. So to use them remove the .gz by renaming.
Back to top
View user's profile Send_private_message YIM 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » HOWTO ( Solutions )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


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