Topic: DSL on the Chumby?

I was thinking of trying to run Damn Small Linux on the Chumby.
It should be able to handle it spec-wise, I just don't know if I will be able to boot from a thumb drive.

Mines currently lost, or I'd check myself.

Obviously I'm not running it to use Linux, I wanted to try a GUI of some type out tongue

Re: DSL on the Chumby?

Well, if you want to run a GUI, you don't need to replace the Linux - in fact, I'd highly recommend against it, since our Linux was built and tailored to this device and its hardware.

It's a pretty straightforward process to get something like Nano-XQt/Embedded and/or GTK+ running on the chumby.  At that point you can cross compile many applications and they'll work on the chumby.

Re: DSL on the Chumby?

I'm not trying to replace linux, maybe I mis-worded.
I wanted to run it Live.
I'm very weary of bricking my Chumby tongue

Re: DSL on the Chumby?

What are you doing that's bricking your chumby?

I run all sorts of stuff from a dongle and haven't really found any need to tamper with the built-in file system.  You can get away with a lot of stuff by being clever with environment variables.

Re: DSL on the Chumby?

I was referring to you thinking that I was replacing Linux -- I wouldn't do that because it sounds too risky.
Yeah, I use a dongle for most things, although I do download right onto the chumby for testing flash.

So I might try Nano-X, once I find my dongle. Thanks, and sorry I'm not making any sense!

Re: DSL on the Chumby?

Well, if you get NanoX or these other systems working, please post the build instructions on the wiki to some page linked to the "Development tools" page, so others can benefit.  I'll host the source and binaries for you, too.

Re: DSL on the Chumby?

Thanks. I was planning on doing the write up anyway.

I'm no Linux guru, but I'm not an idiot. I'm not sure if I'll be able to, but I'll see whtat I can do smile

Re: DSL on the Chumby?

What kind of Linux is the Chumby? Here are the options I have:
LINUX-NATIVE
LINUX-TCC
LINUX-ARM
LINUX-MIPS
LINUX-POWERPC (BIGENDIAN=Y)
LINUX-SPARC (BIGENDIAN=Y)
LINUX-SH
FREEBSD-X86
SOLARIS (BIGENDIAN=Y)
TRIMEDIA
RTEMS
DJGPP
ELKS
I couldn't find it on the site, so I'm assuming "LINUX-NATIVE".

Re: DSL on the Chumby?

The chumby runs Linux on a FreeScale MX21 ARM9 processor - so that makes it LINUX-ARM

Re: DSL on the Chumby?

I can't figure out how to solve some of the errors I'm getting:

collect2: ld returned 1 exit status
make[2]: *** [/home/zach/Desktop/src/bin/mdemo] Error 1
make[1]: *** [subdir-/home/zach/Desktop/src/demos/mwin] Error 2

I had something similar, before each of the 2 errors has that " ld returned 1 exit status", so I think it has something to do with it. Do you have any idea how I might be able to fix this? I'm compiling with the Chumby Toolchain.

Re: DSL on the Chumby?

This might be a problem with their Makefile - it should be using 'arm-linux-ld', not the regular 'ld'.

12 (edited by zachninme 2007-04-16 06:11:09)

Re: DSL on the Chumby?

Hmmm...
Thanks. I may try to correct this.
It even had me put in a prefix in the config, I wonder why its not "kicking in".

I found LD defined in Makefile.rules, but it looked right:
LD = $(TOOLSPREFIX)$(LINKER)

I replaced it with:
LD = arm-linux-ld

but it still doesn't work, same error sad

It seems to be a really common error, not for nanox, but most problems with ld happen on ARM systems. Are you sure its arm-linux-ld, and its not named something else?
But wait, I've used "ld" on my Chumby before, so that probably isn't it.

Re: DSL on the Chumby?

I found this, which seems to sum up the problem.  Since I'm cross-compiling, there might be a way around it.

14 (edited by zachninme 2007-04-16 16:03:27)

Re: DSL on the Chumby?

I've been trying all day, and I can't get nano-X to compile.
I quickly tried, but was unable to get GTK+ running. I'm downloading Qt and trying that.

Similar problem with Qt, I get another ld error!

Re: DSL on the Chumby?

For these errors, it might be helpful if you posted a few lines *before* the error - ld doesn't just error out for no reason.  It's typically due to a missing library or something.

Re: DSL on the Chumby?

Sorry.
Linking nano-X ...
/home/zach/microwin/src/obj/drivers/mou_touchscreen.o(.data+0x4): multiple definition of `mousedev'
/home/zach/microwin/src/obj/drivers/mou_gpm.o(.data+0x0): first defined here
/home/zach/microwin/src/obj/engine/devfont.o(.text+0xe8): In function `GdCreateFont':
: undefined reference to `strcmpi'
/home/zach/microwin/src/obj/engine/devfont.o(.text+0x128): In function `GdCreateFont':
: undefined reference to `strcmpi'
/home/zach/microwin/src/obj/drivers/vgaplan4.o(.text+0x110): In function `ega_drawpixel':
: undefined reference to `RMW_FP'
/home/zach/microwin/src/obj/drivers/vgaplan4.o(.text+0x1ac): In function `ega_readpixel':
: undefined reference to `GETBYTE_FP'
/home/zach/microwin/src/obj/drivers/vgaplan4.o(.text+0x334): In function `ega_drawhorzline':
: undefined reference to `RMW_FP'
/home/zach/microwin/src/obj/drivers/vgaplan4.o(.text+0x36c): In function `ega_drawhorzline':
: undefined reference to `PUTBYTE_FP'
/home/zach/microwin/src/obj/drivers/vgaplan4.o(.text+0x398): In function `ega_drawhorzline':
: undefined reference to `RMW_FP'
/home/zach/microwin/src/obj/drivers/vgaplan4.o(.text+0x3e4): In function `ega_drawhorzline':
: undefined reference to `RMW_FP'
/home/zach/microwin/src/obj/drivers/vgaplan4.o(.text+0x52c): In function `ega_drawvertline':
: undefined reference to `RMW_FP'
/home/zach/microwin/src/obj/drivers/memplan4.o(.text+0xa08): In function `$a':
: undefined reference to `GETBYTE_FP'
/home/zach/microwin/src/obj/drivers/memplan4.o(.text+0xa40): In function `$a':
: undefined reference to `GETBYTE_FP'
/home/zach/microwin/src/obj/drivers/memplan4.o(.text+0xa54): In function `$a':
: undefined reference to `PUTBYTE_FP'
/home/zach/microwin/src/obj/drivers/memplan4.o(.text+0xa7c): In function `$a':
: undefined reference to `GETBYTE_FP'
/home/zach/microwin/src/obj/drivers/memplan4.o(.text+0xa90): In function `$a':
: undefined reference to `PUTBYTE_FP'
/home/zach/microwin/src/obj/drivers/memplan4.o(.text+0xab8): In function `$a':
: undefined reference to `GETBYTE_FP'
/home/zach/microwin/src/obj/drivers/memplan4.o(.text+0xac8): In function `$a':
: undefined reference to `PUTBYTE_FP'
/home/zach/microwin/src/obj/drivers/memplan4.o(.text+0xddc): In function `$a':
: undefined reference to `RMW_FP'
/home/zach/microwin/src/obj/drivers/memplan4.o(.text+0x10ac): In function `$a':
: undefined reference to `GETBYTE_FP'
/home/zach/microwin/src/obj/nanox/srvmain.o(.text+0x2cc): In function `main':
: undefined reference to `GsSelect'
collect2: ld returned 1 exit status
make[1]: *** [/home/zach/microwin/src/bin/nano-X] Error 1
make: *** [subdir-/home/zach/microwin/src/nanox] Error 2

Re: DSL on the Chumby?

OK, acording to that log, you've got *two* mouse drivers included, which conflict with each other - you need to pick one, either "mou_touchscreen" or "mou_gpm".

The missing "strcmpi" is interesting, since I think it's deprecated - it really should be using strcasecmp() at best, although there's no standard POSIX function for case-insensitive string matching.
Here's a *crude* approximation:

#include <ctype.h>

int strcmpi(const char *s1, const char *s2)
{
for (; *s1 && *s2 && (toupper(*s1) == toupper(*s2)); ++s1, ++s2);

return toupper(*s1) - toupper(*s2);
}

I'm not sure why an EGA driver is being linked - you don't have an EGA device.

All in all, your problem is one of improper configuration.

Re: DSL on the Chumby?

After the mouse drivers, however, I've gotten even when I only choose 1.
I would fix the  strcmpi issue, but I don't know how to open .o files sad
Heres the output when theres only one mouse:
Linking nano-X ...
/home/zach/microwin/src/obj/engine/devfont.o(.text+0xe8): In function `GdCreateFont':
: undefined reference to `strcmpi'
/home/zach/microwin/src/obj/engine/devfont.o(.text+0x128): In function `GdCreateFont':
: undefined reference to `strcmpi'
/home/zach/microwin/src/obj/drivers/vgaplan4.o(.text+0x110): In function `ega_drawpixel':
: undefined reference to `RMW_FP'
/home/zach/microwin/src/obj/drivers/vgaplan4.o(.text+0x1ac): In function `ega_readpixel':
: undefined reference to `GETBYTE_FP'
/home/zach/microwin/src/obj/drivers/vgaplan4.o(.text+0x334): In function `ega_drawhorzline':
: undefined reference to `RMW_FP'
/home/zach/microwin/src/obj/drivers/vgaplan4.o(.text+0x36c): In function `ega_drawhorzline':
: undefined reference to `PUTBYTE_FP'
/home/zach/microwin/src/obj/drivers/vgaplan4.o(.text+0x398): In function `ega_drawhorzline':
: undefined reference to `RMW_FP'
/home/zach/microwin/src/obj/drivers/vgaplan4.o(.text+0x3e4): In function `ega_drawhorzline':
: undefined reference to `RMW_FP'
/home/zach/microwin/src/obj/drivers/vgaplan4.o(.text+0x52c): In function `ega_drawvertline':
: undefined reference to `RMW_FP'
/home/zach/microwin/src/obj/drivers/memplan4.o(.text+0xa08): In function `$a':
: undefined reference to `GETBYTE_FP'
/home/zach/microwin/src/obj/drivers/memplan4.o(.text+0xa40): In function `$a':
: undefined reference to `GETBYTE_FP'
/home/zach/microwin/src/obj/drivers/memplan4.o(.text+0xa54): In function `$a':
: undefined reference to `PUTBYTE_FP'
/home/zach/microwin/src/obj/drivers/memplan4.o(.text+0xa7c): In function `$a':
: undefined reference to `GETBYTE_FP'
/home/zach/microwin/src/obj/drivers/memplan4.o(.text+0xa90): In function `$a':
: undefined reference to `PUTBYTE_FP'
/home/zach/microwin/src/obj/drivers/memplan4.o(.text+0xab8): In function `$a':
: undefined reference to `GETBYTE_FP'
/home/zach/microwin/src/obj/drivers/memplan4.o(.text+0xac8): In function `$a':
: undefined reference to `PUTBYTE_FP'
/home/zach/microwin/src/obj/drivers/memplan4.o(.text+0xddc): In function `$a':
: undefined reference to `RMW_FP'
/home/zach/microwin/src/obj/drivers/memplan4.o(.text+0x10ac): In function `$a':
: undefined reference to `GETBYTE_FP'
/home/zach/microwin/src/obj/nanox/srvmain.o(.text+0x2cc): In function `main':
: undefined reference to `GsSelect'
collect2: ld returned 1 exit status
make[1]: *** [/home/zach/microwin/src/bin/nano-X] Error 1
make: *** [subdir-/home/zach/microwin/src/nanox] Error 2

Re: DSL on the Chumby?

I came back to this today and I was able to get Nano-X to compile without any errors!
I don't know if it works, but I should know shortly. however, seeing it compile with minimal error is good tongue

I think I figured out some of the problems I was having.
I thought the touch screen was TuxScreen due to there being a /dev/ts file, when its a MicroTouch Serial, (/dev/ttyS1)
I also misunderstood some of the image/font support settings.
I hope it worked!

Re: DSL on the Chumby?

Perhaps someone can help me.
I got it to run and such, but theres something wrong with the screen.
I can touch it, and it gives me an error, saying that theres something wrong with the touchscreen, so its at least 1/2 way there.
Is it an ADS mouse? (Applied Data Systems), because thats what I've been using...

Re: DSL on the Chumby?

Have you guys been able to get it to work? I'd love some help here.
I am able to run nano-x/nanowm and applications (the VNC viewer is helpful)

Re: DSL on the Chumby?

Ok, I recently built nano-X and got it working pretty well.

You need to specify the ADS mouse, however, you need to change the structure for the event to:

struct ts_event {
    unsigned short pressure;
    unsigned short x;
    unsigned short y;
    unsigned short pad;
};

You'll need to run nxcal to get the calibration right.

23 (edited by zachninme 2007-08-08 07:21:15)

Re: DSL on the Chumby?

Thanks sooo much big_smile
I'm glad I was at least half-right this time tongue

Found it! /drivers/touchscreen_ads.h if anyone's curious

Re: DSL on the Chumby?

Well, I fixed it and compiled it, but I've run in to vairous problems:
First, the chumby wouldn't mount my usb drive. I tried running usb, but it wasn't working. (umount got an invalid argument)
I eventually got it working. I ran ./nano-X & ./nanowm & ./nxcal , and I calibrated it, but now when I touch it, it would hide all the windows.
Now, when I try to run ./nano-X, or anything, it just says "SIGSEGV" in the terminal and quits.
Did you run into any of this? Mind sharing your config file?

Re: DSL on the Chumby?

I'm probably going to put up a wiki page on how to build it.

I got it to the point where I could launch an nxterm and nxkbd and enter commands to the shell have have them execute.  I also hacked the ADS driver to include the default chumby calibration built-in.

I've also got nxlib compiled, but I haven't tested it yet.

I got nxdoom to compile but it's dying while reading the WAD file due to ARM compiler optimization issues.

Also, keep in mind, I doing all this on the production units, so it's possible that the alpha units have issues that cause your SIGSEGV.