Skip to contentSkip to conversation

Running Linux on an NCD HMX X-Terminal

DISCUSSION Adam Nielsen 2 participants 3 messages Jan 10, 2004 – Jan 11, 2004 MIPS

lore
Share & tools
lore
#0 lore raw

Hi,

I've got a few old NCD HMX X-Terminals and I'd like to see if I could get Linux running on them. The reason I ask is that the units boot an ELF image over the network, and when running readelf on the image it appears than the terminals have an R3000 processor:

$ readelf -h Xncdhmx 
ELF Header:
  Magic:   7f 45 4c 46 01 02 01 00 00 00 00 00 00 00 00 00 
  Class:                             ELF32
  Data:                              2's complement, big endian
  Version:                           1 (current)
  OS/ABI:                            UNIX - System V
  ABI Version:                       0
  Type:                              EXEC (Executable file)
  Machine:                           MIPS R3000
  Version:                           0x1
  Entry point address:               0x40020000
  Start of program headers:          52 (bytes into file)
  Start of section headers:          2625644 (bytes into file)
  Flags:                             0x0
  Size of this header:               52 (bytes)
  Size of program headers:           32 (bytes)
  Number of program headers:         1
  Size of section headers:           40 (bytes)
  Number of section headers:         7
  Section header string table index: 6

Does anyone know what my chances would be of getting a Linux kernel on it? I found a couple of precompiled MIPS kernel images (one was ELF32 but the other was ELF64), however when I tried to boot them the terminal simply said "Load address out of range" and aborted. I was using the precompiled images because I really want to know whether it'll work before I go to the trouble of installing all the cross-compilation tools.

Any info would be greatly appreciated!

Thanks,
Adam.

#1 lore raw

Adam Nielsen wrote:
...

Quoted 6 lines

Does anyone know what my chances would be of getting a Linux kernel on it? I found a couple of precompiled MIPS kernel images (one was ELF32 but the other was ELF64), however when I tried to boot them the terminal simply said "Load address out of range" and aborted. I was using the precompiled images because I really want to know whether it'll work before I go to the trouble of installing all the cross-compilation tools.

I brought up linux on the PPC403 version of an NCD x-terminal. As I recall I had to write program to hack the elf header to get kernels to load.

The project is at http://sourceforge.net/projects/explora-linux/

And the program to hack the kernel elf file is

http://cvs.sourceforge.net/viewcvs.py/explora-linux/ncdhack/ncdhack.c

You may get lucky and find they used the same format for MIPS...

-brad

#2 lore raw
Quoted 3 lines

I brought up linux on the PPC403 version of an NCD x-terminal. As I recall I had to write program to hack the elf header to get kernels to load. The project is at http://sourceforge.net/projects/explora-linux/

Hmm...this looks interesting!

Quoted 1 line

You may get lucky and find they used the same format for MIPS...

Well I am hopeful, given that they use the same manual for the HMX and the Explora, but running ncdhack on the kernel didn't seem to have any effect :-(

I did try some fiddling with the ELF files, just to see what would happen (but not having any experience with this, I was just guessing ;-)) The load address for the proper boot image is 0x40020000 but the kernel is 0x88002000 which I think is partly why it doesn't work. If I shrink the ELF file a little by removing a couple of the sections (by telling objcopy to ignore them) *and* I change the load address to 0x40020000 then the xterm actually downloads the image but then gives a "File corrupted CRC error" just as it goes to boot it.

I'm not sure why that happens, because manipulating the file properly with objcopy should adjust any CRC checksums accordingly. I wonder whether the xterm is checking that the image is 'official'?

Cheers,
Adam.