View Full Version : Custom Kernels
Jamie
03-28-2007, 01:19 PM
These are custom kernels built from the TiVo provided linux sources.
Why would you want to use a custom built kernel? Because you can. Perhaps it will give you a sense of superiority over the HR20 users.
For additional capabilities not included in the stock kernels, e.g. a journaled file system.
For improved performance. In particular, turning CONFIG_NETFILTER off and turning CONFIG_NET_FAST_TCP on seems to help network performance.
kernel-build.tar.bz2 holds the script, patches and kernel config files for building 8.1 and 8.1.1 TiVo linux kernels. You'll also a need a toolchain if you want to build kernels yourself. This (http://www.dealdatabase.com/forum/showthread.php?t=46361) is the one I use.
All kernels have no initrd and are, obviously, not signed with the TiVo signing key. That means they are suitable for use on a PROM mod'd tivo, or as a monte target kernel. They won't boot directly on unmodified hardware.
All kernels are compiled with ext3 built in, CONFIG_NETFILTER off, and CONFIG_NET_FAST_TCP on. You will want to replace /sbin/iptables, as described here (http://www.dealdatabase.com/forum/showthread.php?p=204669#post204669) if you use these kernels. Otherwise, you might see crashes when the tivo software tries to load iptable rules.
Note that on the TGC01 (SA DT) and Gen05 (Series3) platforms, if you use the built in ethernet, you'll need to use the included drivers with these kernels. The factory stock drivers are not compatible with a kernel compiled with CONFIG_NETFILTER off.
Series2: traditional Series2 platforms
Gen04: "Series 2.5" -- 5xx modesl
TGC01: StandAlone DualTuner
Gen05: Series3
Gen06: TiVoHD -- see this (http://www.dealdatabase.com/forum/showthread.php?p=289685#post289685)
tsanga
07-31-2007, 03:53 PM
Jamie,
What's the difference between the Series 2 kernel in the above post, and the one here (http://www.dealdatabase.com/forum/showpost.php?p=244219&postcount=32)?
Jamie
07-31-2007, 04:18 PM
Jamie,
What's the difference between the Series 2 kernel in the above post, and the one here (http://www.dealdatabase.com/forum/showpost.php?p=244219&postcount=32)?The former was built from the 8.1 tivo linux kernel sources, while the later was built from 7.2 sources. There may be some slight differences in kernel options used too.
Functionally, they are probably pretty close to the same, but if you are running 8.x, I guess I'd choose the 8.x kernel over a 7.x kernel. I run these 8.x kernels myself.
tsanga
07-31-2007, 09:07 PM
Can I monte into any kernel version? In other words, do I have to correspond software version to corresponding kernel? I was under the impression that 6.x has to be matched with either a 3.1.5 or 7.2.2 kernel. Or maybe with a monte, it doesn't matter.
Jamie
07-31-2007, 09:16 PM
Can I monte into any kernel version? In other words, do I have to correspond software version to corresponding kernel? I was under the impression that 6.x has to be matched with either a 3.1.5 or 7.2.2 kernel. Or maybe with a monte, it doesn't matter.The main constraint is that linux kernel version matches (e.g. 2.4.20) and that the platform is compatible (e.g. not use a Gen04 kernel on a Series2, and vice versa).
The only killhdinitrd 2.4.20 kernels are 3.1.5 and 7.2.2-oth.K1, which might be where you got the idea.
Everything since 5.x has used a 2.4.20 kernel. Even the new TiVoHD is still running a 2.4.20 kernel.
tsanga
07-31-2007, 09:31 PM
Got it. Thank you much.
Edit: Found out the hard way which one works. Heh....
Numbski
09-10-2007, 08:39 AM
Since I'm not seeing a "support" thread for this Jamie, I'll ask in here -
My Tivo died. Again. So I'm starting over (third time in 5 years...yuck). When I ran killhdinitrd on the AlphaWolf 62small.mfs restore image, I had two kernels - one that the killhdinitrd program didn't recognize, and a 3.1.1c that identified itself and kernel 2.4.4.
So the question is basically thus - I am pretty sure I can monte to this with impunity, but with the filesystems I have in place, is there any simple way to convert to ext3? I spend my life on FreeBSD and OSX anymore, so my impression is that I'd have to tar up the existing ext2 tivo filesystem (I'm booted from the MFS Tools CD atm) ie tar -z --create --file /nfs/share/elsewhere/tivo.tar.gz /mnt/tivo, store it elsewhere, then do a new mkfs /dev/hda7 (which is the root of my tivo's filesystem) for this to be really useful.
Am I right about this? For extra credit, is there a one-stop shopping link for drivers that work with these kernels? ie - USB2 supported NICs, and umass? Seeing as you're saying these are 2.4.2, and my tivo claims to be 2.4.4, I have concerns about existing kernel drivers not working, and I have a set of usb drivers sitting here, and I'm not 100% confident now that they are 2.4.4 or 2.4.2.
(I've since confirmed that the drivers I have are for 2.4.2 - so presuming you give me the "yes sir!", I'll monte from 2.4.4 to 2.4.2, and load the drivers from here:
http://www.dealdatabase.com/forum/showthread.php?t=38167 <- Jamie USB2 Backport Drivers
)
Hopefully this saves questions from other onlookers! Also need to confirm that this kernel is "okay" for 6.2. It's the only restore image I have handy, and it's for a DirecTivo.
Jamie
09-10-2007, 08:53 AM
Since I'm not seeing a "support" thread for this Jamie, I'll ask in here -
My Tivo died. Again. So I'm starting over (third time in 5 years...yuck). When I ran killhdinitrd on the AlphaWolf 62small.mfs restore image, I had two kernels - one that the killhdinitrd program didn't recognize, and a 3.1.1c that identified itself and kernel 2.4.4.
So the question is basically thus - I am pretty sure I can monte to this with impunity, but with the filesystems I have in place, is there any simple way to convert to ext3? I spend my life on FreeBSD and OSX anymore, so my impression is that I'd have to tar up the existing ext2 tivo filesystem (I'm booted from the MFS Tools CD atm) ie tar -z --create --file /nfs/share/elsewhere/tivo.tar.gz /mnt/tivo, store it elsewhere, then do a new mkfs /dev/hda7 (which is the root of my tivo's filesystem) for this to be really useful.
Am I right about this? For extra credit, is there a one-stop shopping link for drivers that work with these kernels? ie - USB2 supported NICs, and umass? Seeing as you're saying these are 2.4.2, and my tivo claims to be 2.4.4, I have concerns about existing kernel drivers not working, and I have a set of usb drivers sitting here, and I'm not 100% confident now that they are 2.4.4 or 2.4.2.
(I've since confirmed that the drivers I have are for 2.4.2 - so presuming you give me the "yes sir!", I'll monte from 2.4.4 to 2.4.2, and load the drivers from here:
http://www.dealdatabase.com/forum/showthread.php?t=38167 <- Jamie USB2 Backport Drivers
)
Hopefully this saves questions from other onlookers!It's 2.4.20, not 2.4.2.
You can convert an ext2 file system to ext3 in place with tune2fs. It's fast and easy. tune2fs is part of e2fsprogs. A mips build can be found here (http://www.dealdatabase.com/forum/showthread.php?p=247138#post247138).
You don't want root to be ext3 if your initial boot kernel (pre monte) doesn't have ext3 support though. It won't be able to mount the root file system to do the monte.
Numbski
09-10-2007, 03:54 PM
Well shoot. I was hoping to fix things up so that if the power failed, the thing would be back up right quick because it didn't need to fsck the root filesystem. oops. So there is really precious little benefit to ext3 on the tivo. :( Oops.
Jamie
09-10-2007, 04:20 PM
Well shoot. I was hoping to fix things up so that if the power failed, the thing would be back up right quick because it didn't need to fsck the root filesystem. oops. So there is really precious little benefit to ext3 on the tivo. :( Oops.Leave root ro then and make a separate file system, running ext3, for your hacks. The tivo software never runs e2fsck on the root file system IIRC, since it is always suppose to be readonly. Ext3 can also be handy for /var, prevent it from getting rebuilt due to corruption and e2fsck failures after a hard powerdown.
Numbski
09-10-2007, 07:23 PM
Ah, that's good to know. Thanks Jamie!
katiebear00
10-19-2007, 10:33 AM
The Gen04 custom kernel doesn't work with my prom-modded 540 and 9.1 software, and reboots just after the "almost there" splash. The relevant console output seems to be:iptables v1.2.6a: can't initialize iptables table `filter': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
assert: Tmk Assertion Failure:
assert: TmkServer, line 379 ()
Tmk Fatal Error: Activity TvBusProxy <100> strayed!Full console output is attached. This kernel worked great before I upgraded to 9.1. When I used a 9.1 kernel with initrd replaced, it worked fine. I thought I read elsewhere that the custom TGC01 kernel was working with 9.1 software, but wanted to give you a data point for the 540.
Jamie
10-19-2007, 10:48 AM
The Gen04 custom kernel doesn't work with my prom-modded 540 and 9.1 software, and reboots just after the "almost there" splash. The relevant console output seems to be:iptables v1.2.6a: can't initialize iptables table `filter': iptables who? (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
assert: Tmk Assertion Failure:
assert: TmkServer, line 379 ()
Tmk Fatal Error: Activity TvBusProxy <100> strayed!Full console output is attached. This kernel worked great before I upgraded to 9.1. When I used a 9.1 kernel with initrd replaced, it worked fine. I thought I read elsewhere that the custom TGC01 kernel was working with 9.1 software, but wanted to give you a data point for the 540.Works fine, if you stub out iptables. These kernels have netfilter turned off, to gain a little more speed, and since 7.x, tivo's will crash with such kernels unless you replace iptables, as described here (http://www.dealdatabase.com/forum/showthread.php?p=204669#post204669).
I added a note about this to the first post of the thread to help out the next person who might run into this.
jkozee
10-25-2007, 10:31 PM
Is the S3 kernel compatible with the TiVoHD, or is a Gen06 build required? I tried the S3 on my TiVoHD and didn't make it to the AlmostThere screen. I'm gonna go back and double check my prom patch and dig out my linux box (been a while since I built a kernel), but I thought I'd post here first.
Edit: I think my prom patch is correct. My patched MD5 is 65897F032305885B62A5FC48E682A62F, using a standard gzip.
Jamie
10-25-2007, 11:47 PM
Here's the Gen06 kernel built from the 8.1.7 sources with an updated build script.
jkozee
10-26-2007, 12:04 AM
Thanks! I was just going through my kernel building notes. I would much rather start tinkering with my new unit than mucking around with kernels.
Soapm
10-26-2007, 01:20 AM
Did the kernel change on a S2 DT from OS 8.1 to 9.1? Will you be releasing 9.1 kernels?
Jamie
10-26-2007, 08:45 AM
Did the kernel change on a S2 DT from OS 8.1 to 9.1? Will you be releasing 9.1 kernels?The 8.x kernels work fine with 9.1.
crashHD
11-27-2007, 07:32 PM
Should the Gen04 kernel run on an R10?
Has anyone tried it?
crashHD
12-01-2007, 01:13 AM
tried it. reboot loop. This is on an R10 with 6.1a, and I'm pretty sure I stubbed out iptables correctly.
Jamie
12-01-2007, 10:20 AM
tried it. reboot loop. This is on an R10 with 6.1a, and I'm pretty sure I stubbed out iptables correctly.An 8.x kernel requires 8.x network drivers too. You took care of that as well?
crashHD
12-01-2007, 10:26 AM
I must have screwed something up. I'm getting a reboot loop even after putting the original kernel back in.
I was using the same backport drivers I was using with the original kernel. That probably didn't help. If it makes a diagnostic difference, it rebooted without even a network card connected.
Jamie
12-01-2007, 10:59 AM
I must have screwed something up. I'm getting a reboot loop even after putting the original kernel back in.
I was using the same backport drivers I was using with the original kernel. That probably didn't help. If it makes a diagnostic difference, it rebooted without even a network card connected.You'll probably want to look at the serial console output to debug this.
lrhorer
01-31-2008, 03:05 AM
Here's the Gen06 kernel built from the 8.1.7 sources with an updated build script.
OK, so I obtained a copy of MFS_Live which understands SATA drives, and I used it to build an upgrade CD using a utility I can't mention here, but it doesn't work, so I'm stuck for the moment. I can boot and mount the partitions from the TiVo HD drive, and I have a file called vmlinux-Gen06.px in one of the directories. What, exactly, do I need to do to replace the kernel on my TiVo HD? How can I back up the existing kernel so if I goof or something goes wrong I can return to the working kernel? I've read through the forum extensively, but it's really difficult to tell what procedures will and won't work on the TiVo HD and which ones would work but better ways have been created since their inception. What's worst, it hard to know which might potentially brick the TiVo HD.
I really want to get this working by this weekend, because there are several great programs on this weekend I'll lose if I don't have the mods complete.
psxboy
01-31-2008, 11:12 AM
To backup your existing kernel:
dd if=/dev/hda3 of=92kernel-orig
To replace kernel:
dd if=vmlinux-Gen06.px of=/dev/hda3
This assumes a) your tivo drive is hda, b) your active kernel partition is 3, and that you're in the directory you want to save your backed-up kernel in and/or your replacement kernel file is located in.
Other possibilities include:
Tivo drive is sda or sdb... etc. (if not performing this on the Tivo itself)
Active kernel partition could be 3 or 6 - check with bootpage -b
psxboy
lrhorer
02-02-2008, 06:50 AM
Well, that didn't work. It starts to boot, but then quits with a fatal error in the tverr log and reboots. I went back to the source, as it were, and downloaded Jamie's Gen06.tar.bz2 which has the same vmlinux-Gen06.px file (diff reports them to be identical) as in the mangled CD, but it also has a bcmenet.o file, with which I think I need to do something, but I don't know what. I'm sorry, I've read through the forum for several weeks now, but I still don't have a handle on hacking the Series III, and time has run out on me.
lrhorer
02-02-2008, 08:22 AM
Never mind. It goes in /platform/lib/modules
Neosum
03-05-2008, 12:55 AM
Just for clarification. Is the TGC01.tar.bz2 download kernal for the TCD649? Also, can I just replace this kernal on my tivo hd using "dd" or will I still need to use replace_initird?
Jamie
03-05-2008, 02:05 AM
Yes, the TGC01 kernel is for the SA SD dual tuner platform (649). These kernels have no initrd, so there is no need to neuter them.
lrhorer
04-07-2008, 11:13 PM
Jamie,
have you had a chance to look at the 9.3 release? Has its kernel changed?
Jamie
04-07-2008, 11:43 PM
Jamie,
have you had a chance to look at the 9.3 release? Has its kernel changed?Source hasn't been posted yet for the tivo 9.3 linux kernel. 9.1 and 9.2 were little changed from 8.x.
budrecki
04-12-2008, 10:57 PM
I recently had my TivoHD PROM'd and then I used the Gen06 Custom 8.1.7 Kernel to setup my customizations. I've applied the superpatch and somewhere along the way I lost the ability to see my TTCB Service.
Is this to be expected ?
Is there a problem with TTCB and Hack'd Tivos ?
jt1134
04-12-2008, 11:19 PM
http://tivocommunity.com/tivo-vb/showthread.php?t=390216
lrhorer
04-13-2008, 06:59 PM
http://tivocommunity.com/tivo-vb/showthread.php?t=390216
I don't see what the discussion at the link you provided has to do with the OPs problems.
Jamie
04-13-2008, 07:05 PM
I don't see what the discussion at the link you provided has to do with the OPs problems.The OP couldn't transfer from PC to tivo (TTCB). The referenced link discusses how the certificate used for TTCB has expired, and the feature will stop working unless you upgrade to the newer version of TiVoDesktop. Since the OP was having trouble with TTCB, it seems possible he's just run into this issue.
In any case, this is a FILES forum thread and discussion really doesn't belong here. I guess I never should have responded to any posts in this thread. Let's move discussion elsewhere.
swinokur
07-21-2008, 09:55 PM
I was having a look around the other day, and I notice that dynamic.tivo.com/linux is different from www.tivo.com/linux. For one thing www.tivo.com/linux has 9.3 kernel source listed.
I will probably have a go at building my own 9.3 kernel when i recover from work this week.
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.