Compiling the new 2.6.26 Kernel for puppy

Using applications, configuring, problems
Message
Author
User avatar
shroomy_bee
Posts: 536
Joined: Sat 28 Jun 2008, 16:54
Contact:

#41 Post by shroomy_bee »

Alcy:

a remaster? I don't follow you. As far as I know, 'remaster' means the same thing as 'recompile' - but don't quote me on that, cause the first time I heard 'remaster' used in this context was yesterday, when I was searching a security forum elsewhere for posts on recompiles.

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#42 Post by ttuuxxx »

shroomy_bee wrote:Alcy:

a remaster? I don't follow you. As far as I know, 'remaster' means the same thing as 'recompile' - but don't quote me on that, cause the first time I heard 'remaster' used in this context was yesterday, when I was searching a security forum elsewhere for posts on recompiles.
A lot of puppy derivatives are remaster, basically it takes a image of what you have while running live and makes a iso out of it, or you could also use puppy unleashed script which is different. The reason why he is asking to remaster, is because he made some really big changes and wanted to see if they actually worked after reboot, and if so he could upload his new iso and share it with us.
Or a simpler way to understand is
a remaster is everything you've done from a pristine state and builds a iso image of the end result.
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

John Doe
Posts: 1681
Joined: Mon 01 Aug 2005, 04:46
Location: Michigan, US

#43 Post by John Doe »

kirk wrote:I'm using 2.6.26.3 right now with aufs and squashfs-lzma on a frugal install .
Sounds cool. I'm trying to jump a full install up to 2.6.26.5 right now.

Only two of the patches for the latest puppy don't work. The others give a few "offset" messages, but they seem to work ok.

I fixed one and attached it (ti_usb_3410_5052-2.6.26.5.diff). Don't even know what this is for, but I figured it's in there now I should fix it for whoever. I only had to fix 3 hunks and it was mainly line issue problems. Should work ok.

Kirk, where did you find LZMA patch that works with 2.6.26x?
When it's done you'll find your compressed kernel in arch/x86/boot/bzimage.
Can anyone think of a reason why my bzimage is not correct?

I've compiled the kernel before and had no problems so I'm at a loss right now.

Using DOTconfig-K2.6.25.16-26AUG08-STANDARD and BK's patched source my bzimage ends up at 16K and ROX says:

"Linux kernel x86 boot executable RO-rootFS, root_dev 0x802, Normal VGA"

The kernel in Puppy is 1590K and ROX says:

"Linux kernel x86 boot executable RO-rootFS, root_dev 0x1601, swap_dev 0x1, Normal VGA"

Obviously something is wrong. I've done all manner of 'make', 'make modules', 'make bzImage' and it's there but doesn't work and the previous problems are there.
Attachments
ti_usb_3410_5052-2.6.26.5.diff.gz
ti_usb_3410_5052.dff for kernel 2.6.26.5 (probably 1-4 also)
(1.93 KiB) Downloaded 443 times

kirk
Posts: 1553
Joined: Fri 11 Nov 2005, 19:04
Location: florida

#44 Post by kirk »

For squashfs-lzma the normal patches are here: http://www.squashfs-lzma.org/

Use Barry's 4300_squashfs-3.3.patch kernel patch instead of the one included in the squashfs-3.3 package. And use Barry's instructions for patching Puppy 2.17 found in patches-required.txt.

Kernel 2.6.26 won't load a tainted module (previous kernels would just post a message and load it) I've attached a patch for 2.6.26.3 to make it load tainted modules as in the past. You might have to edit it for a newer kernel. Change into you kernel source directory and do a patch -p1 < ../linux*.diff

I didn't use all the patches that Barry did. Some are known not to work with 2.6.26 and some I had no interest in. I used these patches:

Loglevel
Squashfs-lzma (like in 2.17)
splice-2.6.23.patch
fsync_super-2.6.19.patch
deny_write_access.patch

I didn't use the linux-lzma patch, don't really see the need unless your doing a unipup, or the gprs patches or unionfs.

I don't know why your kernel isn't working. I've never had to do "make bzimage" I'll attach my config file for 2.6.26.3. Note that I've changed a few options like Pentium3, SMP, tickless. That off the top of my head.

Also, the squashfs-lzma modules are compiled separate from the kernel, so they can be compiled for the stock kernel if someone wants.
Attachments
dot.config.gz
(18.67 KiB) Downloaded 440 times
linux-2.6.26-kernel-module.c.diff.gz
(364 Bytes) Downloaded 400 times

alcy
Posts: 143
Joined: Sun 04 May 2008, 18:24

#45 Post by alcy »

kirk wrote:
Then you'll need to replace the modules in initrd with your new ones, extract the initrd:

# gunzip initrd.gz
# mkdir puppy-init
# cd puppy-init
# cat ../initrd | cpio -d -i

Replace the modules. Then you'll need to depmod the initrd. You can do this if your currently running your new kernel:

# depmod -b <path to extracted initrd>

And then zip your initrd back up:

# cd puppy-init
# find . | cpio -o -H newc | gzip -9 > ../initrd.gz

Again depmod will only work if you are running your new kernel. That can be a problem if your running a frugal install. I don't have a spare partition for a full hard drive install, so I do it with a frugal. You'll need to add depmod to your initrd, the one included in Puppy at /sbin is static so just copy that one into your new initrd and zip it up.

You'll also want to get your main sfs file ready. Extract your sfs file to a folder. If you're running Puppy 4.1 you'll want to rename the file /etc/ modules/firmware.dep.<kernel version> to your new kernel version and replace the modules in /lib/modules

Then boot your new kernel and initrd with pfix=rdsh. Here's a sample grub entry:

title Puppy fatdog-rdsh (on /dev/sda4)
rootnoverify(hd0,3)
kernel /20fd/vmlinuz loglevel=7 psubdir=20fd pfix=rdsh
initrd /20fd/initrd.gz

Once it boots to a prompt, mount the drive that has your extracted initrd (must be a kernel built-in FS type, ext2/3 and drive type, no usb drives) . Then do:

# depmod -b <path to extracted initrd>
# depmod -b <path to extracted sfs file>

Reboot into normal Puppy, remove depmod from your initrd and zip it up again. Mksquashfs your new main sfs file and try it out.
Hey kirk, I don't really know the significance of this part of the procedure you've posted, about the initrd.gz. Is it something specific to the frugal install, and if not, why have I been able to get away without doing any of it, and still be running the new kernel (which works fine) ? Please help ! (I have a full install Puppy 4)

User avatar
shroomy_bee
Posts: 536
Joined: Sat 28 Jun 2008, 16:54
Contact:

#46 Post by shroomy_bee »

ttuuxxx,

Do you mean the remaster method is for a standard Pup that has had things like applications added and configs setup - like the liveCD session saving (ie - it amends the existing boot CD image so it boots to whatever you changed it to)?

I was asking, the other questions, because I wondered if the USB CD was able to boot. It was said that the recompile had been done already, so would you really have to remaster a recompile, if it is already booting into the recompile?

kirk
Posts: 1553
Joined: Fri 11 Nov 2005, 19:04
Location: florida

#47 Post by kirk »

Hey kirk, I don't really know the significance of this part of the procedure you've posted, about the initrd.gz. Is it something specific to the frugal install...
Full installs don't use the initrd.gz.

User avatar
ttuuxxx
Posts: 11171
Joined: Sat 05 May 2007, 10:00
Location: Ontario Canada,Sydney Australia
Contact:

#48 Post by ttuuxxx »

shroomy_bee wrote:ttuuxxx,

Do you mean the remaster method is for a standard Pup that has had things like applications added and configs setup - like the liveCD session saving (ie - it amends the existing boot CD image so it boots to whatever you changed it to)?

I was asking, the other questions, because I wondered if the USB CD was able to boot. It was said that the recompile had been done already, so would you really have to remaster a recompile, if it is already booting into the recompile?
Yes it builds an iso image of everything you installed/removed etc and builds you a bootable working release :)
Menu/setup/remaster puppy live-cd
Heres a tip about remastering
when the script tells you to look in tmp/root
delete that root folder and copy the real root folder into /tmp/
that way you get a perfect image.
make sure you don't have any passwords etc save on the web browser, or that gets remastered also and basically you could give you email accounts away,lol
ttuuxxx
http://audio.online-convert.com/ <-- excellent site
http://samples.mplayerhq.hu/A-codecs/ <-- Codec Test Files
http://html5games.com/ <-- excellent HTML5 games :)

John Doe
Posts: 1681
Joined: Mon 01 Aug 2005, 04:46
Location: Michigan, US

#49 Post by John Doe »

re: config file

Kirk, thanks for the config file. I checked it out and removed all the excellent fine tuning you did for your processor (dropped it back to be 'PC' with Puppy). Looks like we have the same idea of what new config options would be best for this newer kernel. I kept oplc, eeepc, laptop hibernate and the new NTFS w/write options (maybe a few random other wifi light things).

Also added a tcpip option to guard against syn floods (IP: TCP syncookie support (disabled per default) SYN_COOKIES). It needs a '1' at /proc/sys/net/ipv4/tcp_syncookies to start up, athough untested by me yet, but thought it would be a good option to have.

file is attached below.

re: lzma for kernel

Found the correct patch for the 2.6.26x kernel series and attached it. Spent two days trying to rewrite the old one only to get to the point where I could compile it fine, but when I booted the machine just catastrophically shutdown when trying to decompress the kernel. Looks like there is some new logic in the latest patch that makes it all work ok now.

Built after installing lzma utils ver 4.32.7 (btw, that's what that 16k problem was. I need to read error messages more fully when frustrated). Built a kernel with each of gzip, bzip2 and lzma today for testing. I'm running 2.6.26.5 on a full install right now.

re: squashfs-lzma


great info. I'm going to play around with Squash/LZMA and AUFS next.
...tainted module (previous kernels would just post a message and load it) I've attached a patch for 2.6.26.3 to make it load tainted modules as in the past.
thanks for the insight. dropped the patch into a my patch directory. neat logic to have around but I'll probably shoot for leaving it out as I'm one of those 'tinfoil hat wearing' types.

###

@all
, the config attached doesn't have lzma or bzip2 enable. one would need to do that manually. my personal favorite (i don't believe yet spoken of in this thread) is 'make gconfig'. it's the gtk version.
Attachments
DOTconfig-K2.6.26.5-28SEP08-STANDARD.gz
(18.69 KiB) Downloaded 355 times
linux-lzma-2.6.26.3.u.gz
(19.7 KiB) Downloaded 366 times

Bruce B

#50 Post by Bruce B »

John Doe,

Please explain exactly what the above post is about. Is the distributor not providing you with access the complete kernel source code? Is this something you cooked up, in spite of having access to the complete source code? Please explain.

Bruce

John Doe
Posts: 1681
Joined: Mon 01 Aug 2005, 04:46
Location: Michigan, US

#51 Post by John Doe »

Bruce B wrote:Please explain exactly what the above post is about.
OP asked about 2.6.26 kernel:
http://www.murga-linux.com/puppy/viewto ... 974#231974

kirk gave great info:
http://www.murga-linux.com/puppy/viewto ... 637#234637

my reply:
http://www.murga-linux.com/puppy/viewto ... 810#234810

kirk reply with great info again:
http://www.murga-linux.com/puppy/viewto ... 824#234824

then I posted the above.
Bruce B wrote:Is the distributor not providing you with access the complete kernel source code?
no. it's all there and further more, it's not just the code but configuration notes also. In my opinion, Barry has gone way above and beyond the requirements of the licensing agreements.

please don't forget the lastest Puppy4.1rc1 is compiled with a 2.6.25 kernel and that is not the kernel version we are talking about here.

perhaps lzma utils is missing, but one can just grab it off their site. any of the 'weird binaries' are sourced well at the links given.
Bruce B wrote:Is this something you cooked up, in spite of having access to the complete source code?
remove 'in spite of' and i'll agree.
Bruce B wrote:Please explain.
did my best.

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#52 Post by MU »

I wrote a summary to recompile the Kernel in Puppy 4.1 using a frugal installation:
http://www.murga-linux.com/puppy/viewto ... 056#239056
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
clarf
Posts: 613
Joined: Wed 13 Jun 2007, 19:22
Location: The old Lone Wolf

#53 Post by clarf »

I updated my Puppy 214X full installation from kernel 2.6.18.1 to 2.6.18.8 (not a big change, it was a learning task). After I updated the vmlinuz file and copied the /lib/modules/modules.*.new_kernel_version I could boot without problems.

Now I want to replace the modules in initrd with the new ones to create a remaster ISO, after I made a module list for 214X initrd I found there is no an aufs module (I cant´remember but I´m sure that aufs was incorporated in 2.16 an latter Puppies, although unionfs is working fine in 214X) and there are lees modules than later initrd that come with newers Puppys (like the nls_cp* modules).

214X initrd module list (kernel_ver = 2.6.18.1):
/modules/kernel_ver/aes.ko.gz
/modules/kernel_ver/cdrom.ko.gz
/modules/kernel_ver/cryptoloop.ko.gz
/modules/kernel_ver/fuse.ko.gz #for ntfs-3g driver
/modules/kernel_ver/ide-cd.ko.gz
/modules/kernel_ver/ide-floppy.ko.gz
/modules/kernel_ver/nls_cp437.ko.gz #needed by windows filesystems.
/modules/kernel_ver/nls_iso8859-1.ko.gz #needed by linux filesystems.
/modules/kernel_ver/sg.ko.gz
/modules/kernel_ver/sr_mod.ko.gz #SCSI CDROM module
/modules/kernel_ver/unionfs.ko.gz
/modules/kernel_ver/fs/befs.ko.gz
/modules/kernel_ver/fs/freevxfs.ko.gz
/modules/kernel_ver/fs/hfs.ko.gz #Mac FileSystem
/modules/kernel_ver/fs/sysv.ko.gz
/modules/kernel_ver/fs/ufs.ko.gz
/modules/kernel_ver/pcmcia/rsrc_nonstatic.ko.gz
/modules/kernel_ver/pcmcia/yenta_socket.ko.gz
/modules/kernel_ver/usb/ehci-hcd.ko.gz
/modules/kernel_ver/usb/ohci-hcd.ko.gz
/modules/kernel_ver/usb/uhci-hcd.ko.gz
/modules/kernel_ver/usb/usbcore.ko.gz
/modules/kernel_ver/usb/usbhid.ko.gz
/modules/kernel_ver/usb/usb-storage
4.3.1 initrd module list (kernel_ver = 2.6.30.5):
/lib/modules/kernel_ver/crypto/aes_generic.ko.gz
/lib/modules/kernel_ver/crypto/cbc.ko.gz
/lib/modules/kernel_ver/fs/aufs/aufs.ko.gz
/lib/modules/kernel_ver/fs/fuse/fuse.ko.gz
/lib/modules/kernel_ver/fs/nls/nls_cp437.ko.gz
/lib/modules/kernel_ver/fs/nls/nls_cp850.ko.gz #default for FAT in 2.6.29.2 but not loaded by init
/lib/modules/kernel_ver/fs/nls/nls_cp852.ko.gz
/lib/modules/kernel_ver/fs/nls/nls_iso8859-1.ko.gz
/lib/modules/kernel_ver/fs/nls/nls_iso8859-2.ko.gz
/lib/modules/kernel_ver/fs/nls/nls_utf8.ko.gz #not loaded by init script
/lib/modules/kernel_ver/fs/squashfs/squashfs.ko.gz
/lib/modules/kernel_ver/drivers/block/cryptoloop.ko.gz
/lib/modules/kernel_ver/drivers/parport/parport.ko.gz
/lib/modules/kernel_ver/drivers/pcmcia/yenta_socket.ko.gz
/lib/modules/kernel_ver/drivers/pcmcia/rsrc_nonstatic.ko.gz
/lib/modules/kernel_ver/drivers/scsi/scsi_wait_scan.ko.gz
/lib/modules/kernel_ver/drivers/ssb/ssb.ko.gz
/lib/modules/kernel_ver/drivers/usb/core/usbcore.ko.gz
/lib/modules/kernel_ver/drivers/usb/host/ehci-hcd.ko.gz
/lib/modules/kernel_ver/drivers/usb/host/ohci-hcd.ko.gz
/lib/modules/kernel_ver/drivers/usb/host/uhci-hcd.ko.gz
/lib/modules/kernel_ver/drivers/usb/storage/usb-storage.ko.gz
/lib/moudels/kernel_ver/drivers/hid/usbhid/usbhid
/lib/moudels/kernel_ver/drivers/hid/usbhid/hid-*
...
Note in 4.3.1 there are some modules not loaded in init scripts but present in initram, also note squashfs module is included (seems that the embed squashfs supported in kernel is not used). I suppose the module list is short cause many modules were already included in the kernel.

kirk, MU, Bruce B and other developers, could you give me please, some recommendations about what should be included or excluded in the initrd, based in your experience and thinking in Puppy 2 series need, for example what do the partport.ko and freevxfs.ko modules enable?, Is there any advantage having so many nls_cp* modules?.

I recently found that, the nls_cp* modules are used for compatibility with DOS codepages. If you mount an msdos or vfat filesystem and you see strange characters in the filenames, you might need to mount with the "codepage=" option. For example, cp437 is the default IBM PC character set, cp850 is commonly used for Western European languages. But I still don´t know what the others nls_cp modules do.

Any information is welcome

clarf

Post Reply