User Tools

Site Tools


chumby

This is an old revision of the document!


Stuff you'll need

  1. Chumby One - faster than the classic chumby
  2. Other computer you can use as a terminal

What I did!

Chumbify

Bunnie visited and gave us 2 chumby ones. one had no working wifi. the other one seemed to be OK. Using the OK one

Activated it. works OK

Turn on SSHD

Turn on sshd

ssh in as root, and turn off the control panel (to free up some memory and cycles)

stop_control_panel

Then make the sshd 'permanent'

touch /psp/start_sshd

Install Dev

Download & install silvermoon dev environment. Chmod +x the shell script and run it. This will take a bit

Tried to install/port latest SDL

Download the latest SDL tarball (we used 1.2.14)

run:

./configure  --enable-video-fbcon --disable-video-x11 --disable-dga --disable-esd --disable-oss --disable-pulseaudio --disable-joystick --disable-cdrom --without-x
make
mount -oremount,rw /
make install

Ran the test programs. Nothing happened. Kinda disappointed. So now going to backtrack

Try ChumbyQuake SDL port

Download chumby_quake to /mnt/storage and uncompress.

Make my own 'bitops.h' file from kludged together stuff

Go into the SDL directory and run

./configure --enable-alsa --enable-static --disable-oss --disable-esd --disable-pulseaudio --disable-video-x11 --enable-video-fbcon --disable-alsa-shared
make
make install

run tests. Nothing happens on the display but it -says- it found stuff. Disappointed. backtrack some more

Try chumbyquake

Download chumby quake bins and stick on USB key. plug it in and run from command line. Had to use

export SDL_NOMOUSE=1 

to stop mouse complaints Audio is fine, pressing the top button makes the 'gun' fire. But no video. Disappointed. backtrack some more

WTF is the frame buffer

bunnie suggests maybe the framebuffers are swapped (seems there are two) so tried

dd if=/dev/zero of=/dev/fb0

This wipes the screen (yay) so at least we know that the framebuffer is writable and is at /dev/fb0

Now try to run quake again. Notice that the top line is the only thing that displays (easier to see this if you wipe the screen)

Look at old SDL tests - graywin, for example, 'works' but only displays top line. So its not the quake code and is something either in the library/driver/kernel

Why is FB broken?

OK so looking around some more, it looks like this has come up before - and the answer is the kernel is buggy (?)

So try to install new kernel with composite vid support (hey i might need it eventually) by running the script on the forums

Realise a little too late that this is going to cause the chumby to 'brick' due to the wifi driver having incompatibilities. eit.

Unbrick chumby

Follow the USB update instructions to get the kernel back. Hey its a good thing to know anyways!

Really fix the FB

So finally I use my reading comprehension to realize that really whats broken is just needing to poke the chip to tell it which FB to use. Following this helpful post I run

wget http://files.chumby.com/hacks/switch_output
chmod +x switch_output

stop_control_panel
./switch_output -l
switch_fb.sh 0

Try chumbyquake again

It runs! But it looks like some colorspace swappage is going on. I'll fix it later

Also tried the old SDL tests and they're working good now. yay.

Port SIemu

The 'easiest' emulator to port by far is SIemu. Its written in straight-up C, well documented and uses SDL as an underpinning.

  • Had problem with audio so commented out all the Audio procedures.
  • Complained about screen size so changes graphics.h to use 320x240 screen
  • Runs!

OK much success. Now to fix it so audio works. SDL doesnt seem to know about audio device - perhaps we need to install ALSA lib first?

Install ALSA

We configure/make'd ALSA

Build SDL with OSS

Trying to build SDL with ALSA (unpatched) didnt really work but then but then we realized that OSS is already in there so many we should just rebuild SDL?

Built SDL with following flags

./configure --disable-esd --disable-pulseaudio --disable-video-x11 --enable-video-fbcon --disable-alsa

compiled cleanly, ran test/loopwave and it worked! yay!

Rebuild SIemu

unpatched the audio and run it with new SDL that has audio. works! and keyboard works too! kpow kpow. much success.

(note used 'original' SDL not chumbyquake SDL!)

download stella & ./configure

Grab the source, try to build

chumby:/mnt/storage/stella/stella-3.0# ./configure
Running Stella configure...
./configure: line 341: printf: not found
g++
./configure: line 363: printf: not found
4.3.3, ok
./configure: line 493: printf: not found
linux-gnu
./configure: line 504: printf: not found
none found!

OK, grab an updated busybox and install it

Now printf exists, try again

 ./configure --disable-debugger --disable-cheats   
make

but gcc dies :(

g++ -Wp,-MMD,"src/emucore/.deps/PropsSet.d",-MQ,"src/emucore/PropsSet.o",-MP -O2 -Wall -Wno-multichar -Wunused -fno-rtti -fomit-frame-pointer  -DUNIX -DBSPF_UNIX -DHAVE_GETTIMEOFDAY -DHAVE_INTTYPES -DWINDOWED_SUPPORT -DSOUND_SUPPORT -DSNAPSHOT_SUPPORT -DJOYSTICK_SUPPORT  -Isrc/emucore -Isrc/emucore/m6502/src -Isrc/emucore/m6502/src/bspf/src -Isrc/common -Isrc/gui -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -Isrc/unix -c src/emucore/PropsSet.cxx -o src/emucore/PropsSet.o
g++: Internal error: Killed (program cc1plus)
Please submit a full bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.
make: *** [src/emucore/PropsSet.o] Error 1

stuck :(

try..

if [ ! -e /mnt/storage/swap ]
then
    echo "Making 256M swapfile"
    dd if=/dev/zero of=/mnt/storage/swap bs=1M count=256
    mkswap /mnt/storage/swap
fi
swapon /mnt/storage/swap
/home/ladyada/public_html/wiki/data/attic/chumby.1269299445.txt.gz · Last modified: 2016/01/28 18:05 (external edit)