Small linux distro for my embedded box

Announce/Discuss projects you are working on for MiniMyth

Moderator: Pablo

juski
Contributor
Posts: 127
Joined: Sun Jun 26, 2005 10:14 pm
Location: Manchester, UK

Small linux distro for my embedded box

Post by juski »

Hiya.

I recently bought a nice little box (t-online s100) which I think will make a great frontend. It's got Intel i830 graphics, TV out (fs454, same as the xbox), LAN, 128MB RAM, digital audio output, USB etc...

I've got it running Gentoo at the moment, mythfrontend works, IR works, TV out works & so on, but it's BIG.

I know I can strip out all the unneeded libs & so on but having been a minimyth user for quite some time I've had an idea about hacking minimyth to run on the s100.

Obvious things I need to change are the graphics driver, kernel and xorg configs - very easy to do.. but

I know minimyth arrives in a cramfs archive and I think it's all downloaded with the bootloader & uncrammed into RAM. This wouldn't be acceptable for the s100 with its puny 128MB... so...

I'd have 2 options... bung it all on a USB stick with a readonly filesystem, or (as I've done with my Gentoo install) make it nfsrooted.

Will that stand any chance of working?
The words 'digital' and 'quality' are not synonymous
Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo »

If there are Linux drivers for the hardware, then getting the hardware working is possible The GAR MiniMyth build system already contains support for hardware other than the VIA EPIA boards, including the i830. Adding additional hardware support is relatively easy. Do you have a specific list of all the hardware in the s100?

Once you have the hardware support in the kernel and X, you would need to add support ot the init scripts for the specific hardware configuration. The hardest part here is initializing the audio and video. In particular, determining what settings need to be unmuted using amixer and what setting need to appear in xorg.conf.

MiniMyth has support for booting from a read-only NFS partition. I added it to make development easier. For it to work, the hardware's ethernet kernel module needs to be compiled into the kernel.

MiniMyth does not have support for running the read only fiile system from a local USB flash drive. Although it can boot from a local USB flash drive. it still loads the CRAMFS file system into memory. Adding support for running the read only file system from la local USB flash drive would require compiling the USB kernel modules into the kernel and modiffying the init scripts to recognize that it is using a local drive.

However, I am not sure that MiniMyth can be completely functional in 128MB of memory. the CRAMFS image is less than 64MB of memory, yet MiniMyth requires more than 256MB of memory when using some plugins. I suspect that you will need give up on some plugins in order to get it to run in 128MB of RAM.

One other thing that would decrease the in-memory footprint is to include minimyth.conf, extras, themecache and codecs as part of the filesystem on the USB key rather than loading them into memory after the fact. Also, sending syslog to a remote server rather than logging it locally would also reduce the memory needed.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
juski
Contributor
Posts: 127
Joined: Sun Jun 26, 2005 10:14 pm
Location: Manchester, UK

Post by juski »

I don't think I need the cramfs functionality, and I can certainly live without mythstreamtv.

At the moment, the gentoo nfsroot it runs from has X, evilwm, mythfrontend (& its deps), mythweather, mythmusic, mythvideo & xine. Everything runs just fine in 128MB RAM. It's surprisingly fast even without swap - certainly a lot faster than an xbox mythtv install ;)

For the gentoo install I built everything I could into the kernel apart from intel-agp. Everything apart from xvmc & DRI (which needs the kernel to be patched) just works.

If the hardest part is initialising the audio & video I don't forsee any major problems.

The only snag is that the TV out on the box needs the intel binary drivers to work - AFAIK there's no support for the fs454 port module in the open source driver. Configuring the TV out is easy though.

As far as hardware in the thing is concerned, I have put the output of lspci here: http://www.mythtvtalk.com/ProjectGrayhem/s100/lspci.txt

I'll have a go grabbing all the gar stuff & building this thing - heck it might even be easy enough to 'hack' my way around it & just copy the intel binary drivers to an uncrammed rootfs served by nfs & make the required alterations. A lot of what's in the conf rc script isn't needed - simply because the hardware in the box doesn't have any variations ;)

So I'll take a look at GAR & see how far I can get with it :-)

thanks Pablo!
The words 'digital' and 'quality' are not synonymous
juski
Contributor
Posts: 127
Joined: Sun Jun 26, 2005 10:14 pm
Location: Manchester, UK

Post by juski »

Oh there's one other thing.. the s100's remote control doesn't require lirc as such because it's actually decoded internally into PS2 keystrokes. To achieve the desired effect I remapped X's keys using xmodmap which basically makes remote button presses map to mythtv keyboard commands. I remapped xine's keys using a keymap.txt in ~/.xine/
The words 'digital' and 'quality' are not synonymous
juski
Contributor
Posts: 127
Joined: Sun Jun 26, 2005 10:14 pm
Location: Manchester, UK

Post by juski »

On further reflection it seems as though going down the nfsroot way will be the best for me since cramfs is going to use up too much ram.

I just remembered that the board doesn't have the capability to use PXE without pressing a key in the BIOS POST screen either - so what I've done is put a bootloader & nfsroot enabled kernel on a Disk-On_module inside the box. From what I've seen so far it's not going to make that much of a difference to how minimyth would build though (I hope).
The words 'digital' and 'quality' are not synonymous
Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo »

MiniMyth support NFS mounting the root partition, so going the NFS route should not be a problem.

Looking at the output of lspci, it appears that GAR MiniMyth has kernel module and Xorg driver support for everything except the Ethernet driver and the i2c bus. I can easily add these and check in the changes. Once this is done, you should be able to NFS boot MiniMyth on the box.

Does the board have a sensor chip (temp, fan, etc)? If so, could you post the part number so that GAR MiniMyth can build the kernel module?

From where can the Focus FS454 driver downloaded?

The GAR MiniMyth build system has settings that control things such as target processor, version of MythTV built, version of Xorg built, and software included in the image. While GAR MiniMyth builds software for the VIA EPIA boards, some NVIDIA based boards and some Intel based boards, in only includes the files for the VIA EPIA boards by default. When you build it, you will want to build it to include the Intel support, but not the VIA or NVIDA support.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
juski
Contributor
Posts: 127
Joined: Sun Jun 26, 2005 10:14 pm
Location: Manchester, UK

Post by juski »

Hi Pablo.

Here's the output of sensors-detect:

sensors
adm1027-i2c-0-2e
Adapter: SMBus I801 adapter at e480
V1.5: +1.523 V (min = +1.42 V, max = +1.58 V)
VCore: +0.003 V (min = +1.48 V, max = +1.63 V)
V3.3: +0.009 V (min = +3.13 V, max = +3.47 V)
V5: +0.000 V (min = +4.74 V, max = +5.26 V)
V12: +0.031 V (min = +11.38 V, max = +12.62 V)
CPU_Fan: 0 RPM (min = 4000 RPM)
fan2: 0 RPM (min = 0 RPM)
fan3: 0 RPM (min = 0 RPM)
fan4: 0 RPM (min = 0 RPM)
CPU: +28.00
The words 'digital' and 'quality' are not synonymous
Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo »

I checked in the changes. To have the changes included in the MiniMyth image, you will need to build with 'intel' included in mm_CHIPSETS in your minimyth.conf.mk file. The init scripts are somewhat incomplete, especially when it comes to audio and video. At a mimimum, you will need to unmute the audio and provide an Xorg configuration file. In addition, nothing has been done to add the keyboard configuration files to make the remote work.

If you have working audio settings and an xorg.conf file, let me know and I can add them to the init script.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo »

By the way, if you do not end up using the T-Online S100 support in MiniMyth, then I would appreciate knowing. I would rather not carry support in MiniMyth for hardware that nobody is using, even when it is not included by default.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
juski
Contributor
Posts: 127
Joined: Sun Jun 26, 2005 10:14 pm
Location: Manchester, UK

Post by juski »

Right... thanks for all the help so far Pablo - I really appreciate it.

If you want to take the extra stuff out of the main build that's fine. I already have a kernel & stuff so if you want to keep cruft out of minimyth that's totally understandable.

The possible user base for a S100 minimyth build is still very small (ie. me and possible one or two other people), so again - don't feel obliged to keep things in that needn't be.

I went quiet because I've been busy with other stuff (preparing boxes for exhibiting MythTV at a linux show next month) but now I'm on the case again ;)

My plan is first to get minimyth to build okay using generic drivers - adding the intel IEGD binary will come later when I know it all works (should be a simple matter of just adding a script to copy files to the right places I think).

So - I started out on the long road of building minimyth and...

Following the README file in the gar tarball, I've done make clean, make garfiles then found a bunch of issues I'd overlooked...

I fixed the problem of using wrong build locations... got my minimyth.conf.mk file up to scratch (or so I thought)...

Code: Select all

mm_NFS_ROOT="/media/minimyth/rootfs"
mm_TFTP_ROOT="/media/minimyth"
mm_HOME=/media/gar-minimyth-0.19-13
mm_VERSION_EXTRA ?=s100
mm_INSTALL_CRAMFS=no
mm_INSTALL_NFS=yes
mm_CHIPSETS ?=intel
mm_GARCH ?=pentium-mmx

now I get the error "the directory specified by mm_NFS_ROOT="/media/minimyth/rootfs " does not exist" - when it clearly does. I'll do some more digging to try & fix this - I have a feeling that extra space character shouldn't be there

EDIT: oops!

it should not read mm_NFS_ROOT="/media/minimyth/rootfs"... it should be mm_NFS_ROOT ?=/media/minimyth/rootfs

d'oh! :oops:
The words 'digital' and 'quality' are not synonymous
Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo »

I have no problem keeping the support in MiniMyth. I have other hardware support in there that is used by very few people. For example, there are relatively few people using the ASUS support. Therefore, as long as you or someone else has use for it, I am happy to leave it in.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
juski
Contributor
Posts: 127
Joined: Sun Jun 26, 2005 10:14 pm
Location: Manchester, UK

Post by juski »

Me again...

It looks like you were right in the first place Pablo.

Minimyth, in its current incarnation at least, isn't suitable for this box with its tiny amount of RAM.

I could do a whole lot of tweaking & tuning but I don't know how far it'd get me. So, I regret to say that I'm giving up on it for now.

Thanks for all the guidance, and for your continuing releases - minimyth is the only distro I want for my epia system - and that's got a heck of a lot of life left in it yet ;)

Now my s100 is back to its trusty gentoo nfsroot. I might take up the challenge again, probably after upgrading the s100's ram - another 128MB should do the trick I reckon ;)
The words 'digital' and 'quality' are not synonymous
Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo »

You are welcome.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
juski
Contributor
Posts: 127
Joined: Sun Jun 26, 2005 10:14 pm
Location: Manchester, UK

S100 box - revisited

Post by juski »

Okay...

I've now got a happy little epia frontend again, my themes are ticking over nicely, there are no linux expos to prepare for so....

Time to once again play with my s100 box!

After the appalling failure to build minimyth on ubuntu & gentoo I'm now looking to use a virtual environment on my fastest box which happens to be running windows (boooo!) .. so I'm going with Fedora Core.

I've had a few goes at trying to customise & downsize other distros for this box but it seems silly when there's a perfectly suitable minimal distro builder here ;)

Or I could just crack on with another theme idea I've had... oh man.

Nah for the good of the communitae & general educational experience it's time the bullet was bitten! I may need lots of help - I thank you in advance ;)
The words 'digital' and 'quality' are not synonymous
Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo »

When was the last time you tried building on ubuntu or gentoo? In the past couple of months there have been changes to the build system that enabled gar-minimyth to build on systems that it would not build on in the past.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
Post Reply