Linux auf die MSNTV Box

evilp

Neuer User
Mitglied seit
11 Apr 2006
Beiträge
57
Punkte für Reaktionen
0
Punkte
0
Hi,

da die Box ja Baugleich mit unserer Thomson ist sollte das doch gehen, oder?Ist alles dabei was man brauch (FIls ect.)

Jemand ne Idee?!?!

Installing Linux on the MSN TV2

So, here is my small contribution to this (so far) small community. This little howto will (hopefully) get you from an MSN TV2 box with Windows CE on it to an MSN TV2 box with Debian on it.

Things you will need:
- A Phillips head screwdriver.
- Something that contains a max3232cpe chip. *
- A compact flash card reader/writer.
- A computer with Linux already installed on it. (For some of the tools used in this howto.)
- A computer with Windows installed.
- A computer with a serial port. *1
- An MSN TV2 RM4100 [hopefully ]

* (by this I mean, something that you have purchased that already contains this chip, a la eBay [link]http://cgi.ebay.ca/ws/eBayISAPI.dll?ViewItem&item=7595437368&ssPageName=MERC_VIC_RSCC_Pr4_PcY_BIN_Stores_IT[/link], or something that you have created yourself [link]http://nil.rpc1.org/psp/files/PSP%20Serial%20Converter.pdf[/link]. I will not go into a howto on soldering and creating hardware and the such.)

*1 (I'm not sure if this will work with a USB->Serial connector, but I don't see why it wouldn't, in this howto I will not allude to using one of these, but feel free to try!)

Shall we begin?

First things first: before we can start anything we'll need to get the unit itself open. I would recommend you do this all on a nice open flat surface, as with any computer work that you would be doing. Place the unit top down in your working area so that the little rubber feet are facing upwards. In order to get to the screws, you'll need to remove those little rubber feet from the unit. They come off reasonably easily, I got them off with my fingers. Once you have those off you will need to unscrew the four screws that you see there. The bottom of the unit should come off pretty easily now. There's a little sticker on the back of the unit that will hold the top and the bottom of the unit together, you can remove this if you want, it doesn't do anything other than warn you about the evils that Microsoft will put on you if you open their magic box. Once you've got the bottom of the unit off, there are five more screws on the underside that you will need to remove that hold the top of the unit on. These screws are a bit longer, but they're all there on the underside. Once those FIVE screws are removed (please remember that there are five screws there [I didn't :S]) it should be quite easy to take the top of the unit off. So, remove it and put the unit bottom side down, or right side up, whichever you prefer. There's a cage covering the top of the unit now, but this should just come off. Yay! We have it open!

We'll now prepare the files that need to be put onto that lovely little CF card that you see in there. Some of this needs to be done in Windows, and some of it will need to be done in linux. There are some people that are going to jump up and down and say "But you can do it with Cygwin!!!", and I'm quite certain that they would be right. I did one of the things that should be done in linux in Windows using Cygwin, but I couldn't get the dd that came with Cygwin, nor another that I downloaded separately to work properly. If you can get this all done in Windows, then kudos to you, but if you want to compile your own kernel, then you're going to have to get linux up and running somewhere along the line. Alternatively, I would imagine you could get this all up and going using a virtual machine as well. Entirely up to you.

In any event, now that I've gone far off the path, we can get to the files that we need. I would recommend starting with a pre-built kernel from PanicOpticon if you don't know how to compile your own kernel, and if you're adventurous enough to compile your own kernel right off the hop, at least have a look at his config file before you jump headfirst into compiling mode. You can get these files here: http://firelife.dyn.dhs.org/~panicopticon/msntv/kernel/ . You're also going to need the bios, and the video bios patch. As Niacin said on the wiki, he cannot host the copyrighted Microsoft code, but it is available on rapidshare.de at http://rapidshare.de/files/13112002/msntv-anon.zip.html . Along with that you'll need the patch, stage2, and cmdline files as well as the BIOS patch which can be found here: http://toc2rta.com/msntv-video-r1.tar.bz2 . The patch is what will append/replace code to the Microsoft BIOS in order to facilitate loading the kernel. In addition to these, you will either need to download Niacin's original kernel zip to get the cmdline file, or you can just manually create the cmdline file on the CF card. I'll put the instructions to do that later. Finally, you'll need to get the root file system. This can be found here: http://mirror.toc2rta.com/rootfs.tar.gz . OK. So now the Windows bit.

Take the CF card out of the machine, and put it into the CF reader/writer, and plug the CF reader/writer into the Windows machine where you put these files. The kernel that you got from PanicOpticon, if in fact that is the way you chose to go, is compressed. Uncompress it. If you don't know how to do that, I would recommend you sell your unit on eBay before you muck it up. They're going for pretty good prices now, you might just make a quick buck! Copy the kernel and the stage2 file that you got to the root directory of the CF card. For the cmdline file, you can either copy the file from the kernel zip of Niacin's original kernel, or you can just create a new textfile called cmdline (note: no file extension!) and put the following into it without the quotes: "root=/dev/hda3 init=/sbin/init console=ttyS0,115200". Open the properties dialog for each of these files and ensure that the "Archive" is NOT set for these files, it will probably cause the kernel to not boot. That's it for Windows. Again, you might be able to perform the next couple of steps in Windows using Cygwin. I managed the BIOS patch using Cygwin, but I couldn't get dd working. It's up to you whether or not you want to continue using linux or Windows with Cygwin.

OK. Linux. You will need the rootfs file (rootfs.img), the bios (bios.bin; I think? It might be the other bios file in the zip... we'll find out shortly..), and the make-staged script. First, unzip/tar/etc. the files. We'll patch the bios first. Put bios.bin and the make-staged script in the same directory. Make sure that make-staged is executable, and run ./make-staged bios.bin. This will either output success, or failure. If it outputs failure, you will need to use the binary file in that zip archive. You can now either put this new file onto your Windows machine to put onto the CF card, or you can just move it to the first partition of the CF card in linux. I chose, mostly to be safe, to put that file on the Windows machine and copy it to the CF card from there. Again, ensure that the "Archive" attribute is NOT set. The last thing you'll need to do in linux is to dd the rootfs onto the third partition of the CF card. Navigate to the folder where you put rootfs.img, and execute the following statement: 'dd if=rootfs.img of=/dev/sda3'. It is assumed here that you don't have any other USB or SCSI devices installed on the linux system at the time. If you have, you should change sda to sdb, or sdc, etc, just ensure that you are dd'ing to the third partition of whatever device the CF reader/writer happens to be. Once that's all done, that's it for manipulating the CF with linux.

As a side note, if you want to compile your own kernel, I would recommend that you use PanicOpticon's kernel config as a basis config. It makes life a whole lot easier than going through everything manually and trying to figure out what you do and don't need. I will just assume that if you want to compile your own kernel, you already know how. If you don't, well, this probably isn't the project for you, but 'make xconfig' is pretty handy .

Now we'll need the serial adapter that you have (sheepishly) bought, or made yourself. At the front of the unit on the far right hand side there is a small connector that looks like a floppy connector.

This is what we will be using to interface with the unit. So, when you look at the unit from the left side, as in the photo, you will be placing the pins from left to right as follows:

1-TX
2-RX
3-GND
4-3.3v

You may actually have to reverse the placing of the TX and RX pins from your connection device, I had to do this when I wasn't getting any messages from the unit at first in my console, so after reading some logs from the IRC channel, I found out that these need to be reversed. If you, like me, took the easy (and expensive) way out and bought the serial connection unit from eBay, the connections that are labelled TX and RX need to be reversed (ie: 1-RX, 2-TX, 3-GND, 4-3.3v).

This bit can either be done in linux or Windows. I did it in linux using 'minicom', but I've heard that TeraTerm for Windows is also pretty good. The only real prerequisite to help you choose which machine you should do this on is that it needs a serial port. Again, you can by all means try to do this with a serial->usb adapter, but I don't know if it would work. I've never used one before. In any event, I'm going to be assuming that you are using minicom in linux to do this because that's what I used.

If you've never used minicom before, it's not terribly difficult, it may look daunting at first, but be rest assured, once you're done with this step, you won't necessarily HAVE to use it again, but that's up to you. So, you'll probably have to run 'minicom -s' as root first to set everything up. You'll want to set the baud rate to 115200, and you'll want to be using something like /dev/ttys0. The serial connections on the back of your PC are usually top=ttys0, one lower=ttys1, and on and on. Ultimately, you could just keep trying until you get something, but it's probably safe to assume that if you put the serial connector into the top serial port, you're going to be using ttys0. So yes, use whichever tty is applicable to you whenever I make reference to ttys0.

Once minicom is set up, you can run it as root, or regular user. If you're going to run it as a regular user, you'll probably have to use your root account to set the proper permissions on the ttys0 file in /dev. You'll need at least rw permissions for your user. Once everything is set up, run minicom using whichever user you chose to run it with. It's probably a good idea to turn local echo on, so press CTRL+A and then press E.

Read the following carefully before you plug the power into your MSN TV2 unit!

Now, make sure all of your serial connections are plugged in to where you want them to be, put the CF card back into the unit and plug the power into the unit. If you set everything up right, you should see a '#' show up in minicom, so reply with '$'. You'll need to do this reasonably quickly, the window of opportunity is rather short. If you miss it, just power off the unit and try again. If you are successful, you'll see something similar to the following:

Quote: OK

MSNTV Service Menu
BoxID: xxxxxxxxxxxxxxxxxxxx (Box Serial)
Version: 1 Build: 387 MSNTV CRC: 758646167 MD5: FEC7884E 15CB25B6 8C59A9FA 4A6D0195
POST: 00

You can stop reading ahead now and go to it!

This will be followed by the service menu, which is what we'll be using to flash the BIOS. We'll actually need to change the contents of memory while the unit is powered on in order to get the BIOS to be flashed with the new BIOS we created earlier. At the service menu, press 'x' to E'x'amine the memory, and copy and paste the commands from Niacin's website: http://mirror.toc2rta.com/cmds.txt

I would strongly recommend that you only paste one line of that at a time. It doesn't take as long as you think it would, believe me.

Once you've pasted all of the lines in, press 'q' to get back to the service menu, and then press 'v' to run the graphics test. What we did when we changed the contents of memory back there was hack the graphics test to load and write bios.bin to the unit's BIOS. Provided everything up until now was done properly, you'll see the following show up in your terminal:

Quote: >vRunning test graphics ...
HW_TestGraphics
hi there
starting flash...
flashing successful, you can reboot
Memory test from 0xf0000000 to 0xf01e0000 level 10

passed.
Displaying video test pattern.
Press any key to continue.

This won't show up all at once. It can take a little while to flash the BIOS. The lights on the front of the unit should be flashing when the BIOS is being written, give it a little bit of time to finish and all will be well.

Once it's finished writing to the bios, reboot the machine by unplugging the power and plugging it back in again. What you should see is the kernel booting in your minicom session. Lovely.

Now that you're here, it's up to you to decide where to go. If you want to see this flashy terminal on your television, power everything off, take the CF card out of the unit again, and plug it into the Windows machine. Open the file called cmdline with wordpad/notepad, and delete the bit where it says 'console=ttys0,115200' (This bit is mostly optional. You can continue working with that console if you want, but if you want to see stuff on your television, you just have to remove that line. It is, in fact, probably recommended that you continue working with the console until you're done setting up debian [if you choose to go that route] and stuff the way you want, I found that the text was pretty hard to read on my television.). Then put the CF back into the unit and boot it up again. You should see it on your tv now!

Where you go from here is up to you. I plan on using this is as a MythTV frontend because it's nice and quiet. Other people are using these as a cheap source of hardware for cluster computing. What you do with it now is entirely up to your imagination.

Installing the Debian rootfs
Now, should you please it, you can stop here, or you can go on and install/configure a distribution of your pleasure. I chose debian because I like it's package management, but it's up to you which you would like. I can do nothing but assume that you are going to use debian, as these are the instructions which I lay out, but you can choose what you wish. In addition to this, the medium on which you store this distribution is also up to you. I've chosen to put it onto a USB memory stick for the sake that it was something that I had lying around that had enough storage space, and the fact that it was silent. This is something that is important to me. If you're adventurous with a soldering iron, there's talk in the IRC channel of soldering an IDE header to the motherboard. With this, you can do everything you need on the unit itself. I'll outline the basic steps to getting something a bit more interesting than a busybox set up.

Again, I used debian because of the package management, feel free to use whatever you would like though. You're really quite free to use any distribution you like, provided you know where init is stored. I used the minimal install of debian because of size restrictions. As of this writing, the current version is "Sarge" or 3.1. You can find the minimal install cds here: http://www.debian.org/CD/netinst/. I used the "Official businesscard images for the 'stable' release". What we're effectively going to do here is use the installer to install debian to a USB key (or USB whatever), but we won't install a bootloader, and we won't use the kernel that comes with debian.

I don't want this to turn into a howto on installing debian, so I'll assume that you know what you're doing. I'll expect that you have partitioned everything that you want properly. The only thing that you really must take note of is which parition you've chosen to mount / on. This will be a kernel parameter that you need to insert into the cmdline file later on.

The first difference to installing this distribution is going to be that when it tells you about having another operating system installed, you will choose to NOT install grub. The installer is going to yell at you, but don't worry, it's ok. The installation shouldn't take much longer to go now, it should pretty much just show a couple of more things, then kick out your cd and restart.

At this point, you can remove your USB drive (or whatever). We're going to need to change some of the values in the cmds.txt file again in order to get things booting properly. So, I imagine you know how to take the CF card out and plug it into something else that can edit text by now, so go ahead and do that. Open up cmdline, and this is what you would see with a Debian install:
root=/dev/sda2 init=/sbin/init rootdelay=10 console=ttys0,115200
where /dev/sda2 would be replaced with whatever partition you chose to mount / onto. Save it, and return the CF card to your unit.

Now we're almost there! Plug your USB key (or whatever) into the unit, and power it on. You should see the kernel booting as you did before, and eventually it will say something to the effect of "Waiting 10 secs before mounting root device...". This is expected. During the following 10 seconds, you should see some information about the kernel setting up SCSI/USB drives. It should mount your device (hopefully) to /dev/sda, and then with the kernel parameters you've put into the cmdline file it should begin booting Debian. Now that you've gotten this far, it will prompt you with how you would like to set up Debian. I chose manual set up so I could remove a bunch of packages that weren't needed because of size restrictions. You can either choose to do this, or if size isn't really an issue, you can probably be pretty safe allowing it to set up as a desktop environment or something of the sort.

If you've chosen to use an external hard drive, an issue I could see with this is that it might not be receiving enough power from the unit if it's one of those host powered external drives. If you have access to one with an external power supply, I would strongly recommend trying that before you start pulling your hair out.

It's here that I'm going to stop, because at this point it's entirely uncertain to me what you want to do with your unit. My personal preference is going to be using it as a MythTV frontend for my server. But that's an entirely different story!
 
bitte geb doch einfach den link an oder setz es in
-tags. außerdem ist die MSNTV2 box nicht baugleich mit der thomson IP1101. die msnbox hat z.B. 733MHz RAM. Ich habe letztens ein link hier im forum gesehen, wo beschrieben wurde wie ein typ sich 20 von den dingern für 200$ gekafut hat, linux drauf und die zu nem cluster gebunden hat. ich finde den link aber auf die schnelle gerade nicht.
 
ich glaube ja nicht dass das bios gleich ist. bekomme erst morgen meinen max3232cpe.
hat das jemand schon verglichen ?
 
Ganz gleich sind die auch nicht. Soweit ich gelesen habe sind die MSN Boxen ja auch von Thomsen und heißen dort RCA IP1000 und in EUropa IP1000. Dann sollte es doch von der Bez. her die IP 1101 eine weiterentwicklung sein.
Mann müsste halt mal das BIOS von unserer Box sehen. Wenn es passen würde wäre schon viel Arbeit geschafft.
 
hast du schon mal das mstv bios und das gepatchte ,disassembled, geDIFFt und verglichen ?

nur so´n denkanstoss. warte immer noch auf die hardware von reichelt :)
 
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.