Fedora Core 6 on an Xbox

It's been well over a year since the last stable release of XFedora. In fact, XFedora5 never made it out the door because of technical problems with the Anaconda installer. (Sadly, that bad boy was just too huge to run on an Xbox). I've spent much of the past year enjoying my recent relocation back to my hometown in Honolulu, Hawaii, and haven't really had much free time to hack on personal projects. From the looks of things, it seems that much of the steam in the Xbox-Linux effort is focused on the Xbox-360, or on the 2.4.x series Linux Kernel. Indeed, the last Xbox-Linux Kernel Patch was targeted against 2.6.16 -- a whole 3 levels behind the bleeding edge.

Current Status

2006-Dec-28 - I have Fedora Core 6 running on my Xbox, using a 2.6.18 Kernel (after much patching by hand to freshen up the 2.6.16 Xbox-Linux patches). All "out-of-box" services, with the exception of the Avahi (mDNS) service are working in my most recent XFedora6 Kernel build. I'm still trying to figure out what's missing that prevents Avahi from starting up. *Grr*.

There are no plans for an XFedora Installer-CD like what was done in XFedora4. The Fedora Team is pretty much focused on high-end machines, and are abandoning the low-end -- so I really doubt the Anaconda Installer was slimmed down since FC5. The only other way I can think of to build an Installer-CD is with the Slinky Installer, which would be a huge time-sink for me to hack up at the moment. (Holiday Season and all that...)

In sum, to get Fedora Core 6 running on your Xbox, you'll probably need to do one of two things:

  • Perform a "cross-install" using a real PC, then install the XFedora Kernel, and then boot from an XFedora Boot CD.
  • Install the XFedora 2.6.18 Kernel (not yet released) on an existing XFedora4 system (which could be installed with the XFedora4 Installer-CD), and then do the "yum upgrade" hack. I've not personally tried this, so I don't know if this method works.

Recent Updates

2007-July-11 - A 2.6.22 Patch that includes oz_paul partition support and fixes i2c issues was recently emailed to me. It is available in the new Not404.com forums area. I will probably update the Xbox-Linux CVS on SourceForge site with this patch in a few days.

@foo, with any luck, this patch may include the i2c fixes that your system needs. *Crossing Fingers* :-)

'2007-July-10 - a Complete Server Rebuild (Refreshing the Operating System version) is in progress. Some attachments may be offline until the backups are fully restored. Sorry for the inconvenience . . .

2007-July-8 - A copy of my Xbox-Linux 2.6.21 kernel-config file has been attached to the XFedora6 Wiki. I have also uploaded a pre-compiled 2.6.21 kernel and corresponding initrd that works with XFedora6. YMMV. Note that this version was compiled on June 10, and does not include the i2c patch from Albert Herranz posted below.

2007-June-22 - An i2c Patch (click to download)has been submitted by Albert Herranz which fixes a Kernel OOPS from happening when you issue i2c commands. (Presumably eject, LED colorings, and all the cool stuff that ShaLLaX's i2c utilities do).

2007-June-11 - A FATX Patch (click to download) has been made, which allows the FATX code to compile on 2.6.21, and probably down to 2.6.19 or 2.6.18. Aside from being compile-tested, it hasn't been tested on any of my Xboxes or out in the wild yet. I'm making this patch available in case anyone wants to audit my work, or give it a try on their own Xboxes (at their own risk, of course).

I'm not planning on pushing this out to Xbox-Linux CVS until this patch has been tested and verified to function OK. While I don't anticipate problems, it's probably better to err on the side of caution and have an "uncompilable" FATX driver in CVS, than flawed code that can really mess a lot of people up. Thanks!

2007-June-10 - Kernel patch updates were refreshed, taking it from 2.6.16 (the last known kernel revision that the Xbox-Linux CVS patches can work against), up to 2.6.21. If you're a kernel developer, please feel free to audit my work -- particularly at the 2.6.18 level where a LOT of changes happened. FATX, Video, etc. Additional scrutinizing eyes are always helpful. :-)

My original patches are attached to this document below. I have also submitted them to the Xbox-Linux CVS repository after verifying my Xbox is running the 2.6.21 kernel for Fedora Core 6. Hopefully, having the patches readily available in CVS will give the real Xbox-Linux Kernel Developers the opportunity to audit and repair any bugs I may have introduced.

If you need to get a hold of me right away, please email me at lalee_net -at- yahoo.com.

2007-January-13 - Cross-Installation Method for FC6 is now documented. I will have the Kernel Attachment online (as an attachment to this wiki page) later today, or tomorrow.

2006-December-28 - My rough-cut of an Xbox-Linux patch (Xbox-linux-2.6.18.patch) is now available as an attachment to this article. I didn't retrofit the FATX or the Xpad support to compile cleanly, as these were lower-priority items. At this point, I really just wanted to get a functional 2.6.18 kernel to boot from, so my xbox would self-compile better kernels as I go along. I'll be cleaning it up (and doing a more thorough code review) when I move this forward to 2.6.19 (or 2.6.20 if it's released soon enough).

Actually, I'm hoping to submit this patch to the xbox-linux-devel list later on, so that a more Senior-level xbox-linux maintainer can examine it, extract the changes, and compensate for any problems I may have introduced through my hand-tweaked porting effort.

In case you're interested in what I did: Most of the porting effort was caused by coding-style change in the newer kernels - module parameters needed to be declared via a new(er) macro; and string module parameters needed to be declared static. Aside from than that, the only change that I recall was a file name change and some internal structure changes in the the mach-xbox include-files.

2006-December-06 - Reconfigured the 2.6.18 kernel, got all out-of-box startup services running, except for the Avahi Daemon. Reboot/Shutdown works properly (stock 2.6 Xbox-Linux patches would keep the machine on during a Halt). FATX is still not functional. I'm gonna refresh this with 2.6.19 kernel before fixing anything else that broke along the way.

Other Notes

As you all know, Fedora Core is a "complete" distribution, which means there's a lot of stuff consuming resources. If you want a slimmed down "task-specific" Linux to conserve resources, you might want to look at another Xbox-Linux distribution.

--Lalee

Cross-Installing Fedora Core

(See also the FC3 Cross Installation notes I have on xbox-linux.org)

In a nutshell, what you will need to do is

  • Take the hard-drive from the Xbox
  • install the hard-drive in an x86 PC
  • Install Fedora Core as usual, using the Fedora Core CD-ROM/DVD. Use a typical layout - at least something where "/boot" is in its own ext2/ext3 partition so XRomwell CD-ROMs can identify it.
  • Install an Xbox-Specific kernel and boot configuration-file
  • Replace the hard-drive in the Xbox
  • Boot from the XFedora4 boot/install disc, or any recent "XRomwell" boot disc.

Some important things to note during the cross-installation process:

  1. You must configure Fedora Core to boot in Text Mode. This is because when you first install Fedora, there is no Xbox-patched video driver for X.org to use. If you start the Xbox in Graphical (X-Windows) mode without this patched driver, your xbox will crash. I haven't (yet) created a patched X.org driver for FC6, and I'm not optimistic that the one created for FC4 will work. Feel free to try, though.
  1. The Xbox-Specific kernel will go into "/boot" of your new installation. I typically get the kernel installed by rebooting the PC in "Fedora Rescue" mode on the CD-ROM ("linux rescue" on the command-line), activate the Network adapter so I can use links to fetch web content, and then do the chroot /mnt/sysimage as suggested by the Rescue Mode. From there, I can navigate to this page in links, download the XFedora Kernel attachment from here, and install it. If that seems like too much work, feel free to download the XFedora Kernel attachment onto a USB flash drive, and connect the flash drive before rebooting in Fedora Rescue mode. Do a cat /proc/partitions to figure out where the USB disk is -- it's usually /dev/sda1 .
  1. The XFedora Kernel attachments are composed of a kernel RPM, an Initial RAMDisk (initrd), a sample configuration file that XRomwell (the xbox-linux equivalent of the Grub Boot-Loader) can understand, and installation instructions (see comments below) on how to copy the Kernel, Initrd, and XRomwell config-file to /boot. Obviously, this only works in Fedora Rescue mode, or if you've booted the installation natively.
  1. The XFedora kernel and config-file don't interfere with the normal Grub boot-loader. This makes life very convenient if you're tweaking things often -- The hard-drive that you've installed XFedora on will run on Xboxes, but can be installed and run on a PC, too. Having this "back door" option is comforting, and allows me to be a little more reckless if I choose: If I bork the XFedora kernel files so that it no longer boots on the Xbox, I can drop the hard drive onto a PC, boot it on the PC, and make repairs.
  1. I don't expect FATX or the Xpad to work in the supplied kernel, as I mentioned earlier about my Kernel hacking adventures.
  1. If you're going for an XFedora installation that can continue to play Xbox games, you're gonna have a mild headache. You must reserve the first 8 Gigs of the hard-drive (which correspond to the Xbox Gaming Area) so that XFedora doesn't clobber that area. See the "Partitioning" section in the FC3 HOWTO link above.

Comments / Feedback

Comment by dmmyq5@umr.edu on Tue Dec 19 08:48:29 2006

Hi! Great work, Is there any way I could take a look at your patches for 2.6.18? I'm trying to get it working. Thanks!

Comment by lalee on Tue Dec 26 13:04:06 2006

Hi, sorry for the late response. I'll have a set of patches up in the next 2 days of this reply. Thanks!

Comment by redaz on Wed Dec 27 10:43:31 2006

hi i'd try it also!!!! thanks

Comment by lalee on Thu Dec 28 17:07:17 2006

The patch is attached below. Let me know if it works for you, or if you have additional fixes to help us all out. Thanks! :-)

Comment by lalee on Thu Dec 28 21:42:29 2006

The file xbox-linux-2.6.16_to_2.6.18.patch should upgrade the Xbox-Linux files from CVS (currently at 2.6.16) to their 2.6.18 equivalents. Since it's small enough, the HTML-Preview actually shows a nice visual-diff that shows exactly what was changed. Sweet. Hope this helps.

Comment by lalee on Fri Dec 29 17:49:00 2006

Additional Patches, for my reference:

Comment by annerajb on Sat Jan 13 04:43:18 2007

hey can u elaborate more on the cross install method plzzz i downloading from fedora site fedora 6 with all 5 cds will then what from here on i am lost not sure if i have to install the nvidia patch that came with fedora core 4 or xorg patches. can u elaborate on that a bit more?

Comment by lalee on Mon Jan 15 21:33:18 2007

XFedora Kernel 2.6.18 attached. To install:

  • install the RPM in "Recovery Mode"; as described above - this will install the Kernel and the Kernel Modules in the correct place.
  • copy the initrd.img to /boot . This is a matching initrd.img for the kernel.
  • copy the linuxboot.cfg to /boot . You'll probably want edit out some entries I kept for debugging purposes.
  • cd to /boot in order to symbolic-link the kernel/initrd to match the file naming convention used in the XFedora linuxboot.cfg file. ln -s initrd-2.6.18-xbox.fc.img initrd.xb and ln -s vmlinuz-2.6.18-xbox.fc6 vmlinuz.xb will get it set up.

That should be it. Hope it works out for you all.

Comment by Sam on Tue Jan 16 11:23:23 2007

Heyy, Amazing job! =] I am unable to do a cross install as I only have a laptop and an xbox to work with currently. Is there any way you could get the installer working on the xbox? Also on xFedora4 I could only get it working with the default LVM partition settings, is this fixed in xFedora6?

Sorry bit of a n00b.

Comment by lalee on Tue Jan 16 12:20:34 2007

I'm not sure how much time I'll be spending on a native Xbox XFedora6 installer, but I do still have some options and ideas that are worth investigating. One is to simply hack the XFedora4 image to point to and use FC6 RPMs and resources; and the other is to use the Slinky Installer from the RULE Project.

I agree, doing a cross-install is a pain, and I do hope to have something workable on the Xbox for FC6 and beyond. It's just a matter of finding time right now. :-7

As for XFedora only working with the default LVM partitioning.. that can be fixed by editing the linuxboot.conf file in /boot. Change the root= parameter from kernel append line to suit your particular layout. Out of the box, the installer sets it up as append kbd-reset root=/dev/VolGroup00/LogVol00 quiet.

Comment by r-c-f-a-at-m-a-c-dot-c-o-m on Thu Jan 18 03:48:45 2007

I need to get a FC4 system running for Trixbox, which I want to turn into a triXBOX :)

The problem is, the FC4 kernel of XFC4 won't load some zaptel modules due to a bug in the kernel.

Can I run FC4 with a 2.6.18 kernel, or will that force me up to FC6, given that the latest FC4 kernel listed in the repositories seems to be 2.6.17? Even more ideal would be if someone had managed to Xbox-ize CentOS Enterprise Linux v.4

Seeing that I have no PC to cross-install from I must upgrade to a new kernel from working on the XBox. Is there somewhere some more detailed write up for this, because one bad step, and I can reinstall the base distribution for another day (waiting for all the downloads, etc.)

Can I yum all the kernel stuff without sawing off the branch on which I'm sitting?

Comment by lalee on Thu Jan 18 15:33:48 2007

I'm pretty confident that XFedora4 will run fine with an Xbox-Linux 2.6.18 kernel.

Install the Kernel-RPM, Initrd.img, and linuxboot.cfg to /boot (backup the old files, just in case), naming the 2.6.18 kernel to vmlinuz.xb and initrd to initrd.xb.. then reboot. The xbox should pick up the new kernel and continue booting. If the above fails, you can reboot from the XFedora4 CD-ROM, using a controller to make the Xbox launch "Run XFedora" from the CD-ROM instead of from the Hard-drive. (That's a known-good Kernel/Initrd pair on the CD-ROM)

Yum Installing the kernel wouldn't work, as the Yum repositories will install a PC-compatible kernel, not an Xbox-compatible one. You can Yum-install everything else, though.

Don't sweat the dup comments.. it's a quirk in my Trac/Lighttpd setup that I've gotta hunt down one of these days. Duplicates happen to me all the time. :o)

Comment by r-c-f-a-at-m-a-c-dot-c-o-m on Thu Jan 18 16:57:36 2007

Thanks for the help. I'm somewhat new to linux and even more so to Fedora (got a MACH/BSD background).

Anyway, the 2.6.18 kernel seems to boot reasonably happily, there are however two things that I need to figure out:

1) to configure zaptel (for asterisk) I need to compile, and load, kernel modules. Does the 2.6.18 kernel as configured support loading and unloading of kernel modules? Also, do you have a (way to fake) the corresponding kernel-devel rpm, such that things that require kernel build modules or sources can be built?

2) I know how to use yum to update the system w/o the kernel. However it seems, that a whole bunch of stuff in the most esoteric ways doesn't want to install itself thinking it depends on a specific kernel which I don't have, even stuff like gnucash, and other user level apps. I don't really need these now, but I wonder how does one teach yum/rpm to accept a non-standard kernel as one that satisfies certain dependencies. e.g. if they need a kernel above 2.6.16, then I have that, but they likely won't look for an Xbox kernel...

Ahh, soo close, yet so far.... (that seems to be my entire experience with trying to use the Xbox for more than a proof-of-concept Linux machine ;-)

PPS: why, given that Cromwell doesn't run games anyway, does it not just act like a standard PC BIOS, such that standard PC Linux distributions can be run. Never seen an answer to that anywhere, but likely I'm looking at the wrong places...

Comment by lalee on Thu Jan 18 18:32:26 2007

Actually, I probably have the kernel-devel RPM on my Kernel-Building Xbox -- I'll check, and if it's available I'll put online soon. Hopefully that'll let you build any missing modules.

For the Kernel-based dependencies, I usually Yum update the PC-compatible kernels just to get their RPM Signatures. So, they're on my Xbox even if I don't bother booting into them. Most times the Xbox-compatible kernel has enough to keep things humming along.

Comment by r-c-f-a-at-m-a-c-dot-c-o-m on Fri Jan 19 14:50:16 2007

Ah, so yum-updating the kernel doesn't screw up the entire boot settings? Good to know... I was afraid of running these updates because I didn't want the box to become unbootable or something... So now I'll happily run the update ;-)

Comment by anonymous on Sat Jan 20 04:05:25 2007

Just noticed: why is the kernel version 2.6.18xbox.fc6-1 and the intitrd is 2.6.18xbox.fc6 (w/o the "-1" ) ?

Comment by lalee on Sat Jan 20 13:39:04 2007

Yeah, the initrd was created by hand after the kernel rpm was installed.

When you do a "make rpm" in the Kernel.org Sources, the RPM doesn't include the necessary mkinitrd command.

Comment by anonymous on Sat Jan 20 14:30:41 2007

So the difference in version number has no significance?

Comment by lalee on Sat Jan 20 20:57:45 2007

No significance - it's just a RAMdisk image. The modules inside the image match the kernel RPM.

I also checked my kernel-build xbox -- there's no kernel-devel RPM, as it's a Kernel.org source, not a Fedora source. Fedora splits it up into kernel.rpm and kernel-devel.rpm; and it seems that the Kernel.org one combines both.

If you're still having trouble building extra modules, you might want to just grab the 2.6.18 sources from kernel.org, apply the xbox-linux-2.6.18.patch, and roll your own kernel. :-)

Comment by r-c-f-a-at-m-a-c-dot-c-o-m on Sun Jan 21 00:07:13 2007

Thanks for the hint about the kernel sources. One thing though: is there a way to fake the system into believing that there's a kernel-devel rpm installed, cause yum may check its presence when installing other stuff.

Or in other words, how does a noob like me turn the source into a rpm that contains more or less the proper files? Gosh, this all turns out to be much more of a learning experience than I had gambled for ;-)

Ideally, I'd still find a way to simply install a preconfigured ISO disc with the Trixbox distribution on the Xbox, somehow preventing from the XBOX related stuff from being replaced. No clue how I'd go about that w/o a PC to do a cross-install, though. Anyway, I'll try your first suggestion, first. If it works, it works, and there's no need to chase "ideal" scenarios. If it doesn't work, then trying to mod the Trixbox distribution is likely the next target...

How difficult would it be to hack your Core4 network install CD to use CentOS4 instead of FedoraCore 4? What would happen if I pointed anaconda to a CentOS server instead of mirrors.kernel.org/fedora/core/4/i386/os Could that work, or are there obvious problems with that approach?

Comment by lalee on Sun Jan 21 16:13:54 2007

I think you can yum-install Fedora's kernel-devel.rpm to get the signatures into the RPM repository.

When it comes time to build a 3rd-party module, the module's makefile will do a uname to get the running kernel's signature, and will search a known directory (/usr/src/linux or something along those lines) for the stuff you'll need to make a module for the running kernel.

CentOS isn't too far off from RedHat or Fedora. To be honest, I haven't yet made an attempt to hack the Boot/Install disc to use another distro's repository - but it's something on my lengthy todo list.

Hacking these CD images to run on an Xbox is no fun -- you need to unpack the stage1 image, insert the Xbox-compatible kernel with matching modules, then repack it and dink around with a few other files to get it all working. Once you've got the kernel and modules in the stage1 image, though, everything else should fall into place. Just hope that Anaconda doesn't barf in a mere 64Megs of RAM, though.

Comment by r-c-f-a-at-m-a-c-dot-c-o-m on Sun Jan 21 21:08:13 2007

CentOS 4.4 is just a de-branded RedHat Enterprise Linux, so minus trademarks and logos, it should be 100% compatible with RHEL 4.4. The advantage is, that RHEL4 is an older Linux (derived from Fedora Core3, hence not a-priori designed for resource hungry machines like a lot of the newer Fedora stuff), and it has a 7 year maintenance cycle, which means I'll be able to get bug fixes, security patches, etc. for years to come, which given that I want to turn the XBOX into a phone system appliance is a good thing. Fedora I have to play the upgrade game every few months, and who knows what breaks, etc. and then I'm not even sure if there's going to be patches later on. Hence my interest in CentOS. To make it even more interesting: the trixbox package (Asterisk + AMP based managment GUI for asterisk) is designed to work with CentOS 4.4, so instead of patching things all around, it should be just plug&play.

Can cromwell boot from a USB drive? Can your installer install to a USB drive? If so, I might just attempt to make a CentOS install to some USB drive attached to the XBOX. If that works, I can then wipe the Fedora install on the build in harddrive.

Otherwise, I'll need to find a fool-proof way of backing up my XBOX such that I can restore it later over the net (I have no PC into which I could stick the XBOX internal drive), and try a CentOS install directly onto the internal drive.

What sort of hacking would need to be done to make it work with another repository? (Or in other words, what sort of hacking did you do to make it work with Fedora's?)

A CentOS repository is at mirrors.kernel.org/centos/4.4/os/i386/

It really would be cool to get a triXBOX distribution going. At least tese xboxes would finally have something truly useful to do ;-)

PS: the moment I try to have a URL in the comment, i.e. h t t p : / / (without the spaces), the wiki will not accept the post...

Comment by lalee on Mon Jan 22 14:18:39 2007

Yeah, at the moment links aren't allowed -- I've been getting hammered with Comment-Spam over the last 2 months, so I put up a filter to eliminate some of that grief.

I'll have a look at CentOS 4.4 later this week, and see if I can cobble something together over the next weekend. I also get frustrated with the Upgrade Game with Fedora, but I do it on my PCs to try out the latest and greatest.

If CentOS's Anaconda installer is light-weight enough, then it makes sense to have something stable for the Xbox. It saves me from porting all the time, and it's also a good opportunity to document my processes for the next guy who wants to take a shot. I'll update this wiki once I've dissected CentOS a bit.

Comment by r-c-f-a-at-m-a-c-dot-c-o-m on Tue Jan 23 23:13:26 2007

Thanks, that's great news. The CentOS 4.4 installer should be light-weight enough, given that it's more or less on par with Fedora Core3/4 and not with Fedora Core5/6 which will be what CentOS5.x is going to be based on. Feel free to send me e-mail on how things are progressing, or if there's anything I can do to test something (that doesn't require a second PC). A fairly light-weight (single CD) installation of CentOS is part of the TrixBox install CD which is available from their site (trixbox.org). Since they don't install X11 for the PBX server, it might be an easier starting point, assuming that X11 requires additional Xbox hacks.

Comment by r-c-f-a-at-m-a-c-dot-c-o-m on Wed Jan 24 03:00:54 2007

There's one thing that would be very helpful: if you could include the precise sources you used to make the kernel along with the distribution, and ideally, a script that takes the sources, recompiles them, creates the initrd, etc. in /boot

It turns out part of the many problems I have getting TriXBOX going is that a couple of loadable kernel modules won't load because "...ko): Invalid module format" which may mean a different C compiler version or something like that was used when compiling the kernel or something.

In any case, there's some small difference that prevents me from compiling and successfully loading kernel modules, even though I have the kernel-2.6.12-1.1398_FC4.xbox.test3.i686.rpm and kernel-devel-2.6.12-1.1398_FC4.xbox.test3.i686.rpm installed and active.

In case that sounds familiar to you, and you happen to know the fix, pls let me know.

Comment by r-c-f-a-at-m-a-c-dot-c-o-m on Thu Jan 25 15:08:40 2007

CentOS 4.4 seems to use kernel 2.6.9. The closest to that is the FC3 kernel 2.6.10 which is on the Xbox sourceforge site, and even comes with a proper source rpm, not just the kernel. So that would seem like a good starting point, right?

Comment by lalee on Wed Feb 7 18:00:42 2007

I managed to get the trixbox iso, and on the surface, it looks very much like how FC3/FC4 was laid out. I'm booked solid for the upcoming weekend, but should be able to take a crack at it the weekend after (2/16 or so).

Basically, I'll see if I can inject a 2.6.20 x86 kernel to the trixbox installer, and add the xbox rpms to the kickstart file. If that works (and it should), then it should be feasible to cobble together an Xbox equivalent shortly after that. I imagine most of the time will be taken up by just getting the kernel recompiled with the same gcc version that is bundled with trixbox/CentOS4, as I can use the work done on XFedora4 as a guide.

One thing that concerns me is that the trixbox installer is auto-configured to totally wipe out the hard drive.. but that shouldn't be too hard to fix later on.

BTW, what type/brand of voip device did you plan to install?

Comment by r-c-f-a-at-m-a-c-dot-c-o-m on Thu Feb 8 15:07:52 2007

I have a couple of old ATAs from having been a Lingo customer. I quit there before they updated the firmware to a version that can't be accessed anymore. So I can reprogram the ATAs as extensions to an Asterisk server. On the phone service side I use GalaxyVoice, which allows local number portability, and at least in New England gives me a phone line for about $2/month (yes, thats TWO). After that it's between 2-3 cents per minute anywhere in the US, Canada, and Western Europe that I care to call. Should I ever talk so much, there's also a $20/month flat-fee calling plan, but I don't think I'll reliably be over that required usage. Further, I think of getting some WiFi SIP phone. Then, when I'm at any WiFi hot spot while traveling, etc. I can connect to my asterisk server (and vice versa) and essentially take my phone number anywhere I go. Also, in Europe, there are plenty of free/very cheap VoIP providers, so I can get local phone numbers, and people there can call me for next to nothing. All in all, pretty cool.

In the mean time I've patched the 2.6.9 kernel of CentOS 4.4 which contains a whole series of back-patches from more recent versions of the kernel. Right now I'm almost to the point where I can fully compile it (I'm working on getting rid of the last few bugs.) Once that's done, I'll have a vanilla Trixbox install on a partition on my girlfriend's laptop, plus source and kernel RPMs for an XBOX kernel of the same vintage (compiled with the same compiler and all). The challenge will then be how to move the installation from a partition on an internal laptop drive to the XBOX and get it to boot. I'll let you know when I have the kernel compiled...

Comment by r-c-f-a-at-m-a-c-dot-c-o-m on Thu Feb 8 19:01:59 2007

One thing... h t t p colon slash slash bugzilla dot redhat dot com slash bugzilla slash show_bug dot cgi questionMark id=185202 WIthout that patch you can't configure the kernel without high memory support. I don't think we need/want that with 64MB (or even 128MB if someone soldered in some more chips).

Comment by r-c-f-a-at-m-a-c-dot-c-o-m on Sat Feb 10 12:53:57 2007

Hi,

I've gotten fairly far (I hope) in the mean time: the 2.6.9 kernel approach I scrapped, because some parts have been changed so much and the number of compile time errors we so many that this could have been easily a multi-week research effort. So I figured I give 2.6.20 a try, always compiling on a standard Trixbox setup, so compilers and the rest of the environment remain a proper match. I applied various patches (which I collected in a single patch file), and now I get it to compile (make rpm) all the way through, until the last step where the kernel is being linked. There I get stuck with these messages:

LD .tmp_vmlinux1

arch/i386/kernel/built-in.o(.init.text+0x67b): In function `memory_setup': : undefined reference to `machine_specific_memory_setup' arch/i386/mach-xbox/built-in.o(.text+0x254): In function `extsmi_init': : undefined reference to `machine_is_xbox' arch/i386/mach-xbox/built-in.o(.text+0x34f): In function `extsmi_exit': : undefined reference to `machine_is_xbox' drivers/built-in.o(.text+0x6fd98): In function `cdrom_lockdoor': : undefined reference to `machine_is_xbox' drivers/built-in.o(.text+0x6fee1): In function `cdrom_eject': : undefined reference to `machine_is_xbox' drivers/built-in.o(.text+0x717ad): In function `ide_cdrom_setup': : undefined reference to `machine_is_xbox' make: *** .tmp_vmlinux1 Error 1

Does this look familiar? It somehow looks like some of the xbox related header files aren't included when they should be. This might have to do with the some config.h file no longer being present.

Send me an e-mail, and I can send you the patch and .config files I'm currently using, if you're interested.

Comment by anonymous on Sun Feb 11 14:54:14 2007

I had 2.6.16 working on my xbox using Debian unstable. In searching for a solution to my minor shutdown issue (halt wouldn't turn off my xbox completely), I stumbled onto your 2.6.18 patch. I applied your patch and compiled the new kernel without any issues. Your work has saved me a lot of time and effort. Thank you very much for your work on the 2.6.18 xbox patch. I look forward to your next release.

Comment by lalee on Wed Feb 14 13:18:28 2007

@rcfa,

The undefined reference to `machine_specific_memory_setup' is probably due to a missing or unpatched file in /arch/i386 -- either the Makefile or the Kconfig. There's some stuff in the Xbox patches that reference mach-directory files. I've run across that error message a few times, and it's almost always something in that directory.

You can mail attachments to me at yahoo.com, username is lalee . Sorry about the spam-filter doing a 404 on links within comments -- it's the only way to keep the spammers from wasting my outgoing bandwidth. (400 bytes for a 404-error, -vs- the size of the wiki page they're trying to spam really adds up)

@anon,

You're welcome. :-) I didn't originate the patch, though -- I found it on the xbox-linux-developer mailing list archives, and applied it. 'Not sure why it's not part of the mainstream xbox-linux patches though.

Comment by r-c-f-a-at-m-a-c-dot-c-o-m on Wed Feb 14 18:16:05 2007

Great. Patch for 2.6.20 and the .config file I'm using will be arriving shortly by e-mail. Here's what I did: a) install the Trixbox distribution on a PC b) update it c) install the various packages required to build a kernel properly as described at h t t p : / / wiki . centos . org / HowTos / Custom_Kernel d) did the second part more along the lines of h t t p : / / howtoforge . com / kernel_compilation_centos

So kernel is compiled, I got the rpm for both source and binary.

The next challenge is how to get all this over to the Xbox. The image of the full system should easily fit onto a DVD... I'll try if I can somehow boot a rescue CD and then ftp everything over from one system to the next...

Comment by r-c-f-a-at-m-a-c-dot-c-o-m on Thu Feb 15 10:21:52 2007

Hi, tried to send you the files, but it gets bounced by yahoo:

Diagnostic-Code: X-Postfix; host b.mx.mail.yahoo.com[66.196.97.250] said: 554

delivery error: dd This user doesn't have a yahoo.com account (lalee <at sign deleted to prevent address harvesting> yahoo.com) [-5] - mta144.mail.re3.yahoo.com (in reply to end of DATA command)

Sometimes they block an e-mail account if it hasn't been used for a while, so you may have to reactivate it, or get an AIM e-mail account, which is also free, and allows you to use IMAP to get at the mail, or GMAIL, where you can use POP3.

Anyway, source RPM, kernel RPM, diffs and .config files are ready as compiled on a PC for XBOX. I have not yet been able to transfer this to an XBOX and boot it from that kernel, so it may or may not work.

Comment by lalee on Thu Feb 15 15:58:00 2007

Agh, I'm really sorry, my mistake on the Yahoo account.. the username is lalee_net.

Comment by max@fresonke,com on Fri Apr 6 21:14:46 2007

Hi, I am just wondering, has anybody got this to boot into graphical mode? Does the Xfedora4 one work? Thanks,

Max

Comment by lalee on Mon Apr 9 14:36:22 2007

Graphical mode from a clean XFedora4 install works -- you just need to edit /etc/inittab and change the default runlevel from 3 to 5.

 id:5:initdefault:

More recent versions of Fedora or X aren't likely to work, as the X.org project made a lot of progress recently, and the patched driver from XFedora4 probably won't be compatible.

I'm working on getting most of XFedora4's work ported over to CentOS 4.4, which should be stable enough to keep around on an Xbox for a while. Without Fedora Legacy around anymore, any flavor of XFedora will be outdated within a year.

Comment by lalee on Mon Apr 9 14:36:53 2007

Graphical mode from a clean XFedora4 install works -- you just need to edit /etc/inittab and change the default runlevel from 3 to 5.

 id:5:initdefault:

More recent versions of Fedora or X aren't likely to work, as the X.org project made a lot of progress recently, and the patched driver from XFedora4 probably won't be compatible.

I'm working on getting most of XFedora4's work ported over to CentOS 4.4, which should be stable enough to keep around on an Xbox for a while. Without Fedora Legacy around anymore, any flavor of XFedora will be outdated within a year.

Comment by d.r. on Thu May 3 06:22:07 2007

I'd like to thank you too for your working at 2.6.18 patch: I tried and tried for about a week to make my 2.6.16 gentoo to shutdown properly! It is a pleasure to see someone in the world to work at the same kernel's problem I worked too! I feel less lonely :D

Comment by d.r. on Thu May 24 04:46:29 2007

Any planning to make a patch for 2.6.19 or 2.6.20?

Comment by lalee on Thu May 24 12:59:58 2007

Actually, I was planning on taking it up to 2.6.21 next weekend. From what I recall, rcfa applied the 2.6.18 patches against 2.6.20 with minimal issues, though.

I'll see if I can dig up my archives from the 2.6.15 through 2.6.18 port, and create patches for each major kernel level through 2.6.21.

Comment by Darren Wilkinson on Sun Jun 3 12:10:14 2007

Glad to see you're still working on this.

Are you tempted to submit your patches to xbox-linux yet?

Comment by lalee on Mon Jun 4 13:51:27 2007

Yep, that'll be next. Hopefully the big guns haven't left the xbl-developer's mailing list (it's been bombarded by spam recently).

Otherwise, I'll either send ShaLLaX the 2.6 patches, or drop my patches straight to the CVS repository. 'Seems kind of rude to drop a big patch-set like that, though, so I'd rather get it peer-reviewed first.

Comment by whome on Thu Jun 7 20:59:01 2007

I did a cross install of Clarkconnect Community Edition 4.1SP1 (based on CentOS I think) with your XFedora6 kernel and it pretty much worked out of the box. the only issues i had were:

1)nash-hotplug takes up all cpu resources so I killed it in the rc.sysinit file.

2)USB keyboard doesn't work after a reboot without being unplugged and plugged back in?

Thanks for sharing :)

Comment by anonymous on Sat Jul 7 05:59:22 2007

is there a patch to enable oz_paul partitioning support for 2.6 kernels?

Comment by anonymous on Sat Jul 7 10:34:31 2007

anyone gotten 2.6.21 to work? i get a frozen xromwell screen.

Comment by lalee on Sat Jul 7 13:16:47 2007

anon1 - If there is such a patch, it's probably buried deep in the xbox-linux-developer's mailing list. I remember there was some discussion about it about 18 months ago.

anon2 - Yes, I have 2.6.21 running on my xbox. I will post my kernel configuration file later today.

Comment by Darren Wilkinson on Sat Jul 7 13:44:59 2007

I don't know of any oz_paul partition patch but I can suggest a possible alternative way of looking at the problem with a native install. There is the kernel option "hda=remap" that shifts all sector numbers down by one. This means that with hda=remap on the append line in linuxboot.cfg the normal partition table will be stored in what is usually sector 1 which is blank on the xbox.

Use xboxpartitioner to get the sector numbers of some free space, convert them to decimal somehow, then use "fdisk -u /dev/hda" to make an extended partition in the free space. That leaves 3 possible primary partitions you could use to point to fatx partitions. Remember hda=remap shifts the sectors by one so the last sector number of a fatx partition would become the new first sector number for the linux partition assuming the linux partition is last.

Comment by foo on Sat Jul 7 19:31:23 2007

this is annon1/2 from earlier. regarding the 'freeze', it actually didn't freeze. after a while, the system did startup. but i do get a bunch of

i2c-xbox.o: Sending abort. i2c-xbox.o: Completion timeout!

I presume this is causing the stalls. This is a 1.6 ntsc-j xbox btw.

Comment by lalee on Sat Jul 7 21:18:26 2007

@foo - Have you tried applying the i2c-xbox.patch to see if that helps? I'm not sure why my system fires up without errors. Most likely I'm not using xbox-i2c commands like temperature monitoring.

I'll have to take another look into this in the next block of free time I have.

Comment by foo on Sat Jul 7 22:45:50 2007

yes, it's applied. and i'm not using any xbox i2c commands. not sure if it's a fluke, but when i append kbd-reset to the boot cmdline, the problem doesn't happen that frequently.

ps: i'm not sure what's causing the multiple posts.

Comment by foo on Mon Jul 9 03:04:55 2007

just tried your precompiled kernel. same thing.

Comment by lalee on Mon Jul 9 17:16:23 2007

@foo - Bummer, I'm not sure what's going on. I've standardized myself on original v1.0 hardware, and haven't run into your i2c timeout issue. I'll see if I can get my hands on a 1.6 machine to better test these kernels out. Maybe there was something more deep within the i2c code that I missed...

Comment by Bone on Tue Jul 10 22:15:06 2007

I am new at this, trying to patch the kernel source on xebian using the xbox-patches-cvs_2.6.18.tar file below, do I just copy all the files in the tar over the files in the kernel source file?

And then once thats done, and I run .config. Should that take me 30min to and 1hr to fill in all the options. This is my first attempt at compiling my own kernel.

I might as well ask, does anyone have a 2.6.18 kernel for xebian out there.

Comment by lalee on Wed Jul 11 13:23:37 2007

@Bone - yes, just copy the files from the tar onto the kernel source file. Then you can do a make menuconfig to configure the kernel to your liking. If you're running X-Windows on your machine, I think you could also do a make gconfig (Gnome) or make xconfig -- something along those lines.

Once that's done, I think for Xebian all you need to do is make and then make install -- but you probably should check with a Xebian-focused support forum to be sure of the recommended kernel installation procedure.

Good Luck! - Lalee

Comment by derchris on Thu Jul 19 17:50:48 2007

Nice work.

I have Xebian running on my Xbox with a 2.6.16.20-coresec kernel. Now I see you have kernel patches for a 2.6.21 kernel. On kernel.org, there are more then one 2.6.21 kernel (linux-2.6.21-x) Which one do I need to download?

Comment by lalee on Thu Jul 19 18:56:01 2007

The xbox-linux patches are coded against the base linux-2.6.21.tar.bz2 (no "-x" hotfix patches).

You could also try downloading the hotfixed linux-2.6.21.x.tar.bz2 and simply apply the xbox-linux patched files directly to that. This usually works, since the files that xbox-linux updates are generally stable.

In the event that it doesn't work, though, you'll need to manually apply the hotfix patch to the kernel, instead of just copying over the changed files. To do so:

Grab linux-2.6.21.tar.bz2 (the base Linux version), and patch-2.6.21.x.tar.bz2 (the hotfix patches). Apply the xbox-linux file updates to the base Linux version, and then apply the hotfix patch on top of the result. Check for any hotfix patches that didn't get applied due to conflicts, via find . -name "*.rej" in your patched kernel source directory.

Chances are good that everything was applied correctly (no "*.rej" reject files) but it's better to check to make sure. If you find a reject file, you'll need to repair the incorrectly patched file by hand, using the contents of the reject file as your guide.

Good luck.

Comment by derchris on Fri Jul 20 04:18:29 2007

Great, thanks. I have a 2.6.21.6 kernel, make was successful. Now I need to test it, but for that I have to plug the Xbox back to a TV.

Comment by anonymous on Mon Nov 19 20:54:20 2007

Hello their, I am doing research before I buy some x-boxes for Linux, all I want them to do is take over the cpu cycles of the cpu of a xp system, I will have 1 xbox for a server 2 for clients, 1 for mp3 files, so a total of 4. I will not be installing a mod chip

I know this has been done, so please help me with the files, so I can have some fun. I will be getting the original xboxes unmoded

Yes they will be networked

Comment by anonymous on Mon Nov 19 20:55:45 2007

oh I forgot I just installed linux on my ps3