Relieved of the primary FATE maintenance duties, I decided to dust off my MIPS-based Belco Alpha-400 and try to get it doing FATE cycles. And just as I was about to get FATE running, I saw that Mans already got his MIPS-based Popcorn Hour device to run FATE. But here are my notes anyway.
Getting A Prompt
For my own benefit, I made a PDF to remind me precisely how to get a root prompt on the Alpha-400. The ‘jailbreak’ expression seems a little juvenile to me, but it seems to be in vogue right now.
Toolchain
When I last tinkered with the Alpha-400, I was trying to build a toolchain that could build binaries to run on the unit’s MIPS chip, to no avail. Sometime last year, MichaelK put together x86_32-hosted toolchains that are able to build mipsel 32-bit binaries for Linux 2.4 and 2.6. The Alpha-400 uses a 2.4 kernel and the corresponding toolchain works famously for building current FFmpeg (--disable-devices
is necessary for building).
FATE Samples
Next problem: Making the FATE suite available to the Alpha-400. I copied all of the FATE suite samples onto a VFAT-formatted SD card. The filename case is not preserved for all files which confounds me since it is preserved in other cases. I tried formatting the card for ext3 but the Alpha-400 would not mount it, even though /proc/filesystems lists ext3 (supporting an older version of ext3?).
Alternative: Copy all of the FATE samples to the device’s rootfs. Space will be a little tight, though. Then again, there is over 600 MB of space free; I misread earlier and thought there were only 300 MB free.
Remote Execution
To perform FATE cycles on a remote device, it helps to be able to SSH into that remote device. I don’t even want to know how complicated it would be to build OpenSSH for the device. However, the last time I brought up this topic, I learned about a lighter weight SSH replacement called Dropbear. It turns out that Dropbear runs great on this MIPS computer.
Running FATE Remotely
I thought all the pieces would be in place to run FATE at this point. However, there is one more issue: Running FATE on a remote system requires that the host and the target are sharing a filesystem somehow. My personal favorite remote filesystem method is sshfs which is supposed to work wherever there is an SSH server. That’s not entirely true, though– sshfs also requires sftp-server to be installed on the server side, a program that Dropbear does not currently provide.
I’m not even going to think about getting Samba or NFS server software installed on the Alpha-400. According to the unit’s /proc/filesystems file, nfs is a supported filesystem. I hate setting up NFS but may see if I can get that working anyway.
Residual Weirdness
The unit comes with the venerable Busybox program (BusyBox v1.4.1 (2007-06-01 20:37:18 CST) multi-call binary
) for most of its standard command line utilities. I noticed a quirk where BusyBox’s md5sum gives weird hex characters. This might be a known/fixed issue.
Another item is that the Alpha-400’s /dev/null file only has rwxr-xr-x per default. This caused trouble when I first tried to scp using Dropbear using a newly-created, unprivileged user.
You can easily workaround the md5sum issue using the following command for evaluating it:
ffmpeg -f s8 -i file -acodec copy -f md5 –
There is no need to run md5sum on the target system. There is also no need for exporting a filesystem _from_ the target. The target should mount the build tree exported by the host system.
Indeed, my comment about the md5sum command line weirdness was completely unconnected to FFmpeg or testing of the same. I just thought it was interesting.
Anyway, openssh-client would be not enough for sshfs, since the latter requires FUSE which isn’t supported by the stock kernel.
@MichaelK: True, but I was thinking about having the host mount a filesystem exported by the target. (sshfs on the host) -> (ssh server on the target). No go.
Btw, if you need more free space on /, fate-suite can be mounted over the network too.
That’s assuming I can make the NFS mounting work. But I will try.
If not, you’ll have to compile a new kernel.
Back to SD, try ext2 (mount -t ext2 -o noatime) or even minix, it is hard to believe that nothing will work.
I’ve had mine for a year. Wifi is spotty, but that may well be due to physical abuse.
Debian packages work, once you get some VTs. I’ve got gcc etc., but there’s a quirk in the linking step, so I just use it to look at how such-and-such would assemble on the MIPS.
Anyone know how to get into U-Boot? I want to write a stand-alone Forth-like critter for the thing. If I can’t U-boot I guess I can bang on /dev/mem or rig up a kernel module to grab the thing. rick_hohensee@email.com