RCA RM4100:Howto coreboot and Linux
NOTE: THE TV-OUT IS NOT WORKING YET You can use VGA or Serial Console.
Howto install coreboot & Linux on the RM4100
Let it be known, this is from my own experience and I take no responsibility if you kill your system.
- LVTTL to RS-232 Serial Converter
- Host PC with a Linux OS
- USB Compact Flash reader
Setting up the Serial Interface
Parts of this step were borrowed from Toc2rta, thanks Niacin. Logic levels on the inputs and outputs of the UART in the SuperIO chip are LVTTL (0/3.3V). The standard serial port connectors have RS-232 levels (-12/+12V). Most PCs that have a serial port have a LVTTL to RS-232 level translator built in, however since the serial port is not a nominally user-accessible feature on the RM4100, the chip has not been designed in to lower the cost. So you will need a serial ttl chip something like the max3232cpe chip will work. You can find the schematics for such a device here. This was designed with the PSP in mind, but will work fine with the RM4100.
Other users, including myself prefer the easy method, a serial cell phone cable. I use a Siemens C55 Data Cable. If you are able to use a cable from another phone, please let me know so I can add it to this list.
The Serial pins on the RM4100 are located at the front left of the board (It looks like the power to a floppy drive).
The pin outs are:
4 - 3.3v
3 - GND
2 - RX
1 - TX
Thanks codeman, for this discovery.
Once you have the serial setup, you can test it to make sure it is working properly. Open your favorite terminal console program (minicom, cutecom, gtkterm) on the host linux PC, set the baud rate to 115200 and power the RM4100 on. The RM4100 will send a # to the screen, once this happens reply with $ and you will see something like this:
OK M$NTV Service Menu BoxID: xxxxxxxxxxxxxxxxxxxx (Box Serial) Version: 1 Build: 387 M$NTV CRC: 758646167 MD5: FEC7884E 15CB25B6 8C59A9FA 4A6D0195 POST: 00
Flashing the Bios
Choose a bios image
Decide which pre-built coreboot image you want to use. You can find them here. There is a description of where they boot too and what Linux OS they were tested on. The pre-built coreboot images are all the same, they just contain different payloads (like a bootloader), and boot to different locations. You will have to rename it bios.bin.
$mv Bios69.bin bios.bin
If you decide to build an image from source, and want to add the tested image to the wiki, just let me know and I would be glad to add it for everyone to use. If you need a special coreboot image built for your RM4100, let me know and I will see if I can help you. If you need a copy of the vbios (vga.rom) you can find it here.
Get it ready to flash
Now that you have your new bios image (bios.bin), you have to get it ready to flash. Plug in the CF card from the RM4100 into the USB Compact Flash reader on your host Linux PC. Some Linux OS's try to auto mount the flash drive (it does for me on FC8). You do not want to do this, or Linux will try to mount the drive as vfat and not msdos, click "cancel". Open a Linux console and type
$ su $ mount -t msdos /dev/sda1 /mnt
It is important to mount the drive as msdos and not vfat or everything you copy to it will not be readable by the RM4100 bios. sda1 depends on which drive it is, this could be sdb1, sdc1, etc. Then copy your new bios.bin to it.
$ cp bios.bin /mnt
It is important not to use the -a attribute option when copying to the drive. You can verify it copied sucessfully by
$ ls /mnt
Lastly, you can un-mount the drive
$ umount /mnt
and put the CF card back in the RM4100.
Flash the bios
To flash the bios from the proprietary to coreboot you have a great little program rmflash written by mistraid, thanks mistraid. You can find the pre-built binary, source code, and cmds.txt here. If the pre-built binary doesn't work out of the box you will have to build it from source with:
$gcc rmflash.c -o rmflash
Before running rmflash make sure you don't have any terminal console programs (minicom, cutecom, gtkterm) running, if so close them. Make sure you have the cmds.txt file in the same directory as rmflash. Make sure your RM4100 is turned off, ok, you ready?
you will get a message
You are about to flash the bios on your RM4100. Please make sure your device is connected and the power is off. Please enter your Null Modem serial device. (Example: /dev/ttyS0 or /dev/ttyUSB0)
Enter the serial device on your host linux PC, then you will get another message
After you answer this message, power your device on. Would you like to proceed? (y/n)
Enter y and turn on your RM4100, after a minute or two you will get another message
This is your last chance to exit before flashing. Are you sure you would you like to proceed? (y/n)
Enter y, you will see everything from cmds.txt flash on the screen, then you will get another message
The bios is now being flashed. WARNING: Do not cycle the power until the green and blue lights stop blinking.
After the lights stop blinking wait another minute or two just to be safe. Now you can turn off the RM4100.
Congratulations, you now have coreboot on your RM4100.
Putting Linux on your RM4100
NOTE: Booting from USB (UHCI) with filo is not currently working.
Depending on which payload (like a bootloader), you are using (most commonly filo) the first time you boot it will bring you to a command line. Depending on where your CD or DVD rom drive is connected (USB or IDE), you can use these examples to boot to the linux setup. To boot a CD-ROM or DVD you only need to specify the drive without a partition number. For example to boot to the primary drive on the secondary IDE channel you would use hdc and not hdc1 in filo.
filo's naming convention:
- hda - IDE1
- hdb - IDE2
- hdc - IDE3
- hdd - IDE4
- hde - SATA
- uda - USB1
- udb - USB2
- udc - USB3
- udd - USB4
If you are using filo with USE_GRUB = 1, and want to boot to your Linux install disk you have to do a mixture of grub and filo commands.
Like grub you have to append a kernel (and parameters), then an initrd, and give a boot command. Like filo you have to give absolute paths.
Example to boot to a GeeXboX install CD-ROM:
grub>kernel hdc:/GEEXBOX/boot/vmlinuz root=/dev/ram0 rw init=linuxrc boot=cdrom installator
Your system will now boot right into the Linux install.
If you want to install Linux over the serial console and your Linux distribution supports it, just add
to the end of the kernel line. The command line you want is usually on the Linux install cd in the isolinux.cfg file. Once you get the Linux install disk running, you can install Linux as normal. After you finish and reboot coreboot should autoboot right into grub. If you only have one boot entry in your grub.conf/menu.lst filo it will automaticly boot that command line. If you have two or more the grub menu comes up and you can choose which one to use.
Congratulations, you now have Linux on your RM4100.
At this point if you need to flash back or want to flash a different pre-built coreboot image you can use flashrom and flash it on the fly!
Please let me know if you have any questions, comments or corrections (post them in the forum), and I will do my best.
Well I hope you found this howto helpful in bring out the full potential of your system. Again, this is at you own risk; I take no responsibility if you kill your system. And as I always say....Don‘t settle for what you have. Hack it!