Tuesday, October 19, 2004

NFS is working

Finally got NFS working. I can't use locking over nfs, as I don't have the portmapper on the winterm. But this isn't really a problem, as I only want to use NFS for read-only.
I've created a busybox initrd which does the following on startup:

mount nfs share from fileserver
run setup script from nfs share, it its there. This allows me to make mods to the system without reflashing the PCMCIA card.
run telnetd
run httpd

I now have the basis of a working system. Next step is to try and extract the data from the other flash ROMS. To do this, I need to understand more about how the ROMS are mapped into the address space

Sunday, October 17, 2004

Network is up!

Ok, it turned out that my assembler code was wrong for the external chip selects.
(why do we have at&T and Intel mnemonics with the args in different orders?)
Anyway, I fixed the code and now the external devices work.
I have 2 serial ports + network.
Switched over to using a busybox initrd so that I can fit more in.
Can't get the sound card to work yet, but at least the network is up :)

Friday, October 15, 2004

Enabling external IO devices

Contacted Vincent Crabtree about his project to port Linux. He told me about IDA which is a great interactive dissasembler. he also sent me his partially disassembled ROM.
From this, I see that alios is missing loads of CSC configuration, so I implemented this and tried again.
What I now have is:

Internal UART as com2
Enable GP_CSA and GP_CSB - external ISA chip selects
This required mods to the linux kernel and the initrd image and now I have the kernel booting again, but still no external devices :(

Booting Linux

After sorting the memory check in alios, Linux now boots off the flash card!
This is encouraging. Since the winterm uses fairly standard pc components, the network drivers should be available...
But I can't get the network drivers to work. For some reason, the network card does not appear to be responding correctly at port 0x300

Wednesday, October 06, 2004

Links

Similar project, on 3315 here

First Boot

Having programmed the card, I need to get the winterm to boot from it rather than internal ROM.
The docs say that you need to set CFG2 to 1 to disable internal ROM and map the PCMCIA slot to ROMCS0. A bit of hunting around the ciruit board, and it looks like this CFG2 is wired to one of 2 jumpers near the PCMCIA slot. Time for a bit of trial and error:
  • No flash inserted, short jumper xx - no boot :)
  • No flash inserted, short jumper yy - no boot :)
  • Insert flash, short jumper yy - no boot :(
  • Insert flash, short jumper xx - Alios Boots! :-)
So, alios boots, and starts displaying data on serial 1. Linux boots, but the RAM size is wrong. Alios shows 10MB, whereas WinCE reports 24MB!
The mem report shows 16 bit wide DRAM, which seems a bit odd. So, a quick look at the alios code reveals that it is set for matrix keyboard enabled, which limits dram width to 16bit.
Disabling matrix keyboard, and re-trying reports 24MB 32 bit RAM, plus a small amount in bank 3. This causes Linux to fail, as There isn't really RAM in bank 3.
Back to the docs...
Here I see that bank 3 may be set to an illegal configuration, during the RAM check. If this is the case, then bank 3 must be ignored.
The Alios code does not make this check (as far as I can see), so I need to add this in.

Flash Card problems (and solutions)

Ok, so I managed to buy 4 linear flash cards from ebay. They are Centennial 2MB devices. The alios site gives brief details of how to load alios onto a card, so I thought this would be easy!
I have a hp omnibook 6000,with redhat 7.3 so I tried to use this to program the cards - no luck! Kept getting lots of 'cannot allocate memory' errors and segmentation faults when writing!
After lots of messing around, I got it to work as follows:
  • Rebuild the 2.4.18 kernel, with PCMCIA support disabled
  • Get the stand-alone PCMCIA package from sourceforge.
  • Build this, then modify the /etc/sysconfig/pcmcia file to use the standalone PCIC controller, rather than yenta_socket
After all this, It works! I can now program the cards sucessfully.
One note: I could not use the method specified with the alios source. Instead, I generate a 2MB image on disk, then write the whole image to flash, using a 128Kb block size. This works fine.


Initial Work

Built an interface to read/program the ATMEL flash. I believe that this stores the BIOS.
Interface uses a 8255 board and needs an ISA bus machine. My only Linux machine with ISA is on it's last legs!
Interface doesn't seem to be too reliable, but I have managed to dump the ATMEL image to disk.

Found the AMD docs for the SC400 at here .
Looked at things to replace the ROM. Netboot? Then found alios. This seems to do exaclty what I need - i.e. boot Linux on an SC400. but it needs a linear flash card.

Aims

My aim is to get Linux running on a wyse 2315SE Winterm.
I have 3 of these devices. They have:

AMD Elan SC400 Microcontroller
24MB DRAM
Flash ROM(1 intel part, 1 ATMEL part)
PCMCIA socket
Graphics Controller
Ethernet
2xSerial
1xParallel
Keyboard and Mouse Ports

I would like to get the linux running, with the ethernet card.
Applications:
X-Term
Audio Player (mp3/wav)
Portable wireless Audio player (using WiFi card in the PCMCIA socket)