# ebox 2300sx the Gentoo way

## Taki

Hi,

I just purchased an  ebox 2300sx and to my surprise, it has no coprocessor. all the other small foot print OS (DSL, Puupy) throw a kernel panic. I have the kernel patch and would like to install gentoo on it.

The default live cd doesn't work (also kernel panics).

Any ideas?

----------

## NeddySeagoon

Taki,

The LiveCD needs an i686 CPU. Your CPU is a SiS Vortex86 CPU, which is not i686 compatible.

The minimal x86 CD (not the i686 one) should boot.

The best way to install Gentoo on this device is to do the build in a chroot on a more capable system, then move the binaries over.

There are lots of ways of moving the binaries.

----------

## Taki

Gonna give it a shot right now.

thanks for the speedy response

----------

## Taki

I tried both x86 2008.0 and 2007.0 installation CD. no luck   :Crying or Very sad: 

----------

## NeddySeagoon

Taki,

What were the symptoms ?

Error messages ...

Illegal Instruction Exception ?

----------

## Taki

Just a blank screen after selecting my boot options. is there a way to make it verbose?

----------

## NeddySeagoon

Taki,

What do you  mean by "installation CD" ?

Your CPU is a 486SX with mmx instructions. None of the installers will work on that, they all need an i686 CPU.

However, the x86 minimal CD is made to be 486 compatible. It does not have math emulation in its kernel but that will be ok, unless the boot sequence tries to use floating point. It should not do that.

Try booting with 

```
gentoo-nofb nodetect 
```

It will be up to you to load kernel modules and start services by hand, if it gets to the boot prompt.

If you cannot make the network go, you will need to use Sneakernet to move code across. You really don't want to be doing any building on that CPU, hence my suggestion to build elsewhere and move it over.

If it will boot from USB, you can make a bootable install on another machine, then boot from USB

----------

## Taki

I am using the x86 minimal installation CD.

using:

```
gentoo-nofb nodetect
```

Show the fellowing error:

```
 <0>Kernel panic - not syncing: Attempted to kill the idle task!
```

Might this have anything to do with the fact that this PC doesn't Have a coprocessor?

----------

## NeddySeagoon

Taki,

The kernel does not need the coprocessor.

I have an old red hat CD set ... RH 6.1 (kernel 2.2.12) and some later ones that should boot.

To install Gentoo you need a 2.6 kernel but if you do the build elsewhere, package it as a stage 4, you only need a few tools.

Send me a PM to remind me and I will dig around to see whats the latest I have for i386, as that has no FPU either.

----------

## swirling_vortex

It could be an issue with the 2.6 kernel just not liking the CPU. Just out of curiosity, try booting this small businesscard Debian iso and see if it boots. You don't have to install it, just see if it loads. (it uses 2.6.18) http://cdimage.debian.org/debian-cd/4.0_r3/i386/iso-cd/debian-40r3-i386-businesscard.iso

If that also fails, try booting Damn Small Linux, which still uses a 2.4 kernel. http://distro.ibiblio.org/pub/linux/distributions/damnsmall/current/dsl-4.4.3.iso

----------

## andrewstonie

Any luck guys? i'm thinking of buying one of these units? 

http://www.compactpc.com.tw/ebox-2300SX.htm

Cheers,

Stonie.

----------

## andrewstonie

OK, so I have my 2300sx box.   :Wink: 

The docs for kernel config are here: http://www.compactpc.com.tw/drivers/ebox-2300SX/Vortex86SX_Linux_HowTo.pdf

The main issue is that there is not a suitable network driver, you have to patch the kernel for that too: http://www.compactpc.com.tw/drivers/ebox-2300SX/r6040.tar.gz

Therefore it appears an install in place in not practical? Is it as simple as building the patched kernel on another x86 box with the correct CFLAGS, and copying it over? (I have always built on the host so i’m clueless to the pitfalls?)

Any pointers much appreciated. 

Cheers,

Stonie.

----------

## NeddySeagoon

andrewstonie,

Using another Gentoo box, make the gentoo install you need in a chroot in a file.

The symbol ~ means the current users home directory 

```

dd if=/dev/zero of=~/2300sx bs=1048576 count=5120
```

will make you an empty 5G file to be used for the chroot

```
mke2fs ~/2300sx
```

puts an e2fs in the file. Do not use a journalled filesystem.

```
mkdir /mnt/embedded 
```

gives you somewhere to mount your new chroot.

```
mount -o loop,rw -t ext2 ~/2300sx /mnt/embedded
```

allows you to treat the file as if it were a partition.

Add loopback filesystem support to your kernel if you don't have it.

Follow the Gentoo Handbook for an x86 stage 3 install.

You have already partitioned, made and mounted your filesystems.

In place of 5.c. Installing Portage you can use your existing portage tree and distfiles by making them available inside the chroot with

```
mount -o bind /usr/portage /mnt/embedded/usr/portage 
```

Be aware that this shares a single tree with both your main install and the 2300sx chroot. If you keep a /usr/portage/packages folder with binaries for your main system, you should move it out of /usr/portage to avoid accidents.

Continue the Gentoo install in /mnt/embedded but set up everything for the Vortext86 CPU.

Apply your kernel patches to its /usr/src/linux

Skip installing your bootloader to the MBR until you are on the target.

Exit the chroot and unmount, its /proc, /dev and /usr/portage.

Whats left is your Gentoo for the 2300sx. Make a copy of it and strip out things that the target will not need (docs, gcc etc) so it fits.

Move it to the target using Sneakernet, install the boot loader and reboot.

Keep the ~/2003sx chroot in a file so you can easily do updates

----------

## andrewstonie

Thanks Neddy!! I will start on my quest.

Cheers,

Stonie.

----------

## Taki

I blew mine up   :Sad: 

----------

## NeddySeagoon

Taki,

Blew it up or 'bricked' it?

The first means you let the magic smoke out that makes it work.

The latter means something horrible happened to the BIOS, so the electronics are perfectly serviceable but it has bo code to boot.

This can be fixed using JTAG to reprogram the BIOS.

As well as a JTAG interface for your main PC, you need to know where to connect it on the 2300sx and you need a copy of the BIOS.

The PC end is a parallel port and some resistors.

'Bricking' embedded devices is a routine hazard of playing with them.

----------

## Taki

First I bricked  :Arrow:  then when I was trying to unbrick, i blew  :Arrow:   then magical smoke came out.  :Sad: 

----------

