Author Topic: Linux on CRTU-RU (o;  (Read 11744 times)

0 Members and 1 Guest are viewing this topic.

Offline davorinTopic starter

  • Supporter
  • ****
  • Posts: 922
  • Country: ch
Linux on CRTU-RU (o;
« on: October 31, 2015, 07:22:11 pm »
Now had a Little time to preinstall latest Debian 8 on a 2.5 IDE drive and put it into my CRTU-RU...
Of course it boots...but fails starting XWin (o;

Output of lspci:


Code: [Select]
root@crtu:~# lspci
00:00.0 Host bridge: Intel Corporation 82815 815 Chipset Host Bridge and Memory Controller Hub (rev 04)
00:02.0 VGA compatible controller: Intel Corporation 82815 Chipset Graphics Controller (CGC) (rev 04)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev 12)
00:1f.0 ISA bridge: Intel Corporation 82801BA ISA Bridge (LPC) (rev 12)
00:1f.1 IDE interface: Intel Corporation 82801BA IDE U100 Controller (rev 12)
00:1f.2 USB controller: Intel Corporation 82801BA/BAM USB Controller #1 (rev 12)
00:1f.3 SMBus: Intel Corporation 82801BA/BAM SMBus Controller (rev 12)
00:1f.4 USB controller: Intel Corporation 82801BA/BAM USB Controller #1 (rev 12)
01:08.0 Ethernet controller: Intel Corporation 82801BA/BAM/CA/CAM Ethernet Controller (rev 03)
01:0a.0 Ethernet controller: Intel Corporation 82541GI Gigabit Ethernet Controller

 

Offline ivaylo

  • Frequent Contributor
  • **
  • Posts: 661
  • Country: us
Re: Linux on CRTU-RU (o;
« Reply #1 on: November 01, 2015, 05:56:40 am »
What's the plan? You think you can use it under Linux?
 

Offline davorinTopic starter

  • Supporter
  • ****
  • Posts: 922
  • Country: ch
Re: Linux on CRTU-RU (o;
« Reply #2 on: November 01, 2015, 08:29:30 am »
Exactly..that's the plan....probably be finished by 2025 (o;
 

Offline briselec

  • Regular Contributor
  • *
  • Posts: 94
  • Country: au
Re: Linux on CRTU-RU (o;
« Reply #3 on: November 01, 2015, 10:54:00 am »
XWin?
 

Offline davorinTopic starter

  • Supporter
  • ****
  • Posts: 922
  • Country: ch
Re: Linux on CRTU-RU (o;
« Reply #4 on: November 01, 2015, 10:59:25 am »
Not planned...problem is currently that X11 is unusable due to i815 driver errors....

Someone remember the internal IP address of the PowerPC board? Was it 10.4.4.4 or something?

 

Offline dom0

  • Super Contributor
  • ***
  • Posts: 1483
  • Country: 00
Re: Linux on CRTU-RU (o;
« Reply #5 on: November 01, 2015, 11:47:02 am »
Someone remember the internal IP address of the PowerPC board? Was it 10.4.4.4 or something?

nmap is your friend. Put the main machine in the 10.0.0.0/8 net and scan the entire net. Scan while take a while (16M hosts), but it'll show up eventually.
,
 

Offline Wuerstchenhund

  • Super Contributor
  • ***
  • Posts: 3088
  • Country: gb
  • Able to drop by occasionally only
Re: Linux on CRTU-RU (o;
« Reply #6 on: November 01, 2015, 04:25:37 pm »
Exactly..that's the plan....probably be finished by 2025 (o;

If you want to control the CRTU under Linux then the first steps should be to find out what the DOS software does, i.e. which firmware binaries are loaded into what module, what commands does it use to control the modules, how does the software get the data from the modules, what are the software interfaces and so on. You'd need a debugger and disassembler and other utilities but they should be freely available.

Only after you've done that you can start building a new front end under Linux. Just installing Linux and dabbling in the dark is unlikely to get any useful results on an instrument that complex.

Quote
Not planned...problem is currently that X11 is unusable due to i815 driver errors....

The i815 should work just fine under Linux but may need some manual changes to the X11 config as the LVDS display in CRTU/CMU200 doesn't provide EDID information and the driver might therefore be unable to set the correct video settings for the LCD.
« Last Edit: November 01, 2015, 04:36:00 pm by Wuerstchenhund »
 

Offline davorinTopic starter

  • Supporter
  • ****
  • Posts: 922
  • Country: ch
Re: Linux on CRTU-RU (o;
« Reply #7 on: November 01, 2015, 05:48:34 pm »
Well..i815 support was dropped in recent Mesa implementations...

But first of all I need to find a Linux distro and kernel where /dev/fb0 is supported...next try will be Gentoo and Archlinux...after Debian 6/7/8 (o;
I don't se the need for X11 at all....
 

Offline Wuerstchenhund

  • Super Contributor
  • ***
  • Posts: 3088
  • Country: gb
  • Able to drop by occasionally only
Re: Linux on CRTU-RU (o;
« Reply #8 on: November 01, 2015, 06:19:22 pm »
Well..i815 support was dropped in recent Mesa implementations...

Maybe, but what for do you need Mesa 3D (OpenGL) on a test instrument? Basic X11 should be just fine.

Quote
But first of all I need to find a Linux distro and kernel where /dev/fb0 is supported...next try will be Gentoo and Archlinux...after Debian 6/7/8 (o;
I don't se the need for X11 at all....

So how do you want to do the UI then? I hope you're not considering some text mode cludge because that will most likely end up looking like shit (and if it looks like shit and isn't better then the current DOS software then you're unlikely to attract many supporters for your project).

You'd most certainly need X11 (not necessarily MESA) for the UI, plus it provides an easy way for remote control. And the i815 graphics shouldn't be any hindrance.

But as I said before, all that is pretty irrelevant if you haven't found out how to control the CRTU's hardware modules first.
 

Offline davorinTopic starter

  • Supporter
  • ****
  • Posts: 922
  • Country: ch
Re: Linux on CRTU-RU (o;
« Reply #9 on: November 01, 2015, 06:57:21 pm »
I install osx86 on it *lol

No seriously....X11 might be useful as it would enable to use it remotely just like on the HP 16702A and others...

BTW: Which role plays the LPT dongle at the back? Is it for both DOS and Windows part?

 

Offline Wuerstchenhund

  • Super Contributor
  • ***
  • Posts: 3088
  • Country: gb
  • Able to drop by occasionally only
Re: Linux on CRTU-RU (o;
« Reply #10 on: November 01, 2015, 07:09:21 pm »
No seriously....X11 might be useful as it would enable to use it remotely just like on the HP 16702A and others...

Exactly.

Quote
BTW: Which role plays the LPT dongle at the back? Is it for both DOS and Windows part?

The dongle is for certain parts of the Windows software, it shouldn't be required for the DOS software.
 

Offline briselec

  • Regular Contributor
  • *
  • Posts: 94
  • Country: au
Re: Linux on CRTU-RU (o;
« Reply #11 on: November 01, 2015, 08:42:55 pm »
I don't think a different distro will make any difference. It's not creating a framebuffer device because it can't detect what monitor you are using. See if it's got an i810fb module and try loading that.
 

Offline davorinTopic starter

  • Supporter
  • ****
  • Posts: 922
  • Country: ch
Re: Linux on CRTU-RU (o;
« Reply #12 on: November 01, 2015, 09:09:05 pm »
Well it doesn't...though it's compiled into the kernel...nothing to see in the "dmesg" output....

Some "mtrr" errors are seen though on X11 startup...

Well speaking of Linux distros....there are huge differences...that's why I never use Linux for a server...especially not for internet services...that's why we used always FreeBSD at internet companies here in Switzerland...and I still use FreeBSD (o;

But I don't wanna start a Linux/BSD war here (o;

 

Offline Wuerstchenhund

  • Super Contributor
  • ***
  • Posts: 3088
  • Country: gb
  • Able to drop by occasionally only
Re: Linux on CRTU-RU (o;
« Reply #13 on: November 01, 2015, 10:29:54 pm »
Well it doesn't...though it's compiled into the kernel...nothing to see in the "dmesg" output....

Some "mtrr" errors are seen though on X11 startup...

Maybe you should stick with some older Linux distro anyways as the CRTU/CMU200 is based on ISA, and I'm not sure how much of the ISA support has been kicked out in newer kernels.

I'd give some older openSUSE a try.
 

Offline davorinTopic starter

  • Supporter
  • ****
  • Posts: 922
  • Country: ch
Re: Linux on CRTU-RU (o;
« Reply #14 on: November 06, 2015, 05:08:20 pm »
Finally some more time after spedning few days in sunny "Sauerland" (o;

Seems Gentoo Linux is currently the best distro....at least I could boot a compiled kernel...now doing a reinstall of gentoo on a CF Card which then goes with an IDE/CF Adapter inside the CRTU-RU (o;

This is what the WinNT device Manager tells about the R&S Drivers/boards:

Code: [Select]
R&S Digital Board Driver

I/O 0100 - 010F
I/O 0140 - 016F
I/O 0178 - 01BF

Code: [Select]
R&S IQIF Board Driver

I/O 11E0 - 11EE
I/O 21E0 - 21EE
I/O 31E0 - 31EE
I/O 41E0 - 41EE
I/O 51E0 - 51EE
I/O 15E0 - 15EE
I/O 25E0 - 25EE
I/O 35E0 - 35EE
I/O 45E0 - 45EE
I/O 55E0 - 45EE
I/O 01E0 - 01EF
I/O 05E0 - 05EA

Code: [Select]
R&S Link Handler Driver

I/O 01C0 - 01C7
I/O 01C8 - 01CF
I/O 0290 - 029F
I/O 02B0 - 02BF
I/O 0320 - 032F
I/O 0340 - 034F
I/O 03A0 - 03AF
I/O 05C0 - 05C7
I/O 05C8 - 05CF
I/O 0690 - 069F
I/O 06B0 - 06BF
I/O 07A0 - 07AF
I/O 0B20 - 0B2F
I/O 0B40 - 0B4F
I/O 0BA0 - 0BAF
I/O 0FA0 - 0FAF
Memory 000D6000 - 000D6FFF
Memory 000D7000 - 000D7FFF

Code: [Select]
R&S Mac Speech Board Driver

I/O 0330 - 033F
I/O 0350 - 035F
I/O 0730 - 073F
I/O 0740 - 074F
I/O 0A90 - 0A9F

Code: [Select]
R&S MC 2000 Driver
IRQ 11

Code: [Select]
R&S Rx Tx Board Driver

Memory 000D4000 - 000D4FFF
Memory 000D5000 - 000D5FFF
 
The following users thanked this post: snickers

Offline davorinTopic starter

  • Supporter
  • ****
  • Posts: 922
  • Country: ch
Re: Linux on CRTU-RU (o;
« Reply #15 on: November 08, 2015, 12:33:21 pm »
Well...remote launching of X programs works now (o;

But still no LCD Screen or out-of-sync Messages on external VGA Monitor....

 

Offline fisafisa

  • Regular Contributor
  • *
  • Posts: 105
  • Country: es
Re: Linux on CRTU-RU (o;
« Reply #16 on: November 08, 2015, 04:56:52 pm »
...
For all the memory mapped boards, it would be very good to be able to read back the memory....after initialisation.

I wonder if there are ways to intercept the IO calls and log them too.

Also useful, under linux, would be a way to map these addresses to user-space, so that one can test things without need to write drivers.

Just some ideas.

Filippo
 

Online nctnico

  • Super Contributor
  • ***
  • Posts: 27193
  • Country: nl
    • NCT Developments
Re: Linux on CRTU-RU (o;
« Reply #17 on: November 08, 2015, 07:49:22 pm »
Perhaps you can run some kind of DOS mode VM which can capture/log all the memory transactions. This may actually be easier using Windows and a debugger.
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 

Offline Wuerstchenhund

  • Super Contributor
  • ***
  • Posts: 3088
  • Country: gb
  • Able to drop by occasionally only
Re: Linux on CRTU-RU (o;
« Reply #18 on: November 08, 2015, 09:23:38 pm »
...
For all the memory mapped boards, it would be very good to be able to read back the memory....after initialisation.

I wonder if there are ways to intercept the IO calls and log them too.

Well, there's still debug:
http://thestarman.pcministry.com/asm/debug/debug.htm
 

Offline fisafisa

  • Regular Contributor
  • *
  • Posts: 105
  • Country: es
Re: Linux on CRTU-RU (o;
« Reply #19 on: November 08, 2015, 10:24:46 pm »
Dosemu seems promising.
It has the ability to pass-through IOs apparently.
And look and behold what the author writes in the plugin section:
"
For what can plug-ins be used?
------------------------------

The main reason I implemented 'plugin' was the need to write a DOS driver for
some (very) special selfmade Hardware, which nobody else would profit from
except my employer ... and because I was too lazy to patch in the changes to
every new released dosemu version;-) This way DOSEMU atleast profits from the
interface.

Having it now, I see some more usage such as

  - DOS drivers using 32-bit written by contributors
    and distributed separately.

  - special debugging code to reverse engineer (DOS) drivers for special
    hardware, if the manufacturer does not cooperate in writing
    a Linux driver. Also with this, distributing separately can avoid
    copyright conflicts.


  - Replacements for DOS system commands, which (via inte6) then run
    faster in 32-bit or can do things which aren't possible otherwise.

  - Drivers for video chips we currently do not support.

We even may consider to move more of our current code into plugin
(as we just did with the keyboard code), this would make it possible to
distribute them separately. It may be necessary to add some more hooks
(plugin_*.h), but for this we wait what happens;-)

"
 

Offline davorinTopic starter

  • Supporter
  • ****
  • Posts: 922
  • Country: ch
Re: Linux on CRTU-RU (o;
« Reply #20 on: November 09, 2015, 07:27:17 pm »
Hmm...cvt tool doesn't help get an X display on the built-in LCD or external VGA....

Guess some DSO hookup to the VGA signals and calculate the ModeLine values by hand...well if the LCD and VGA signals share the same timing...
 

Offline kfitch42

  • Frequent Contributor
  • **
  • Posts: 300
  • Country: us
Re: Linux on CRTU-RU (o;
« Reply #21 on: November 09, 2015, 08:01:42 pm »
Also useful, under linux, would be a way to map these addresses to user-space, so that one can test things without need to write drivers.

/dev/mem will do that. Something like:

int fd = open("/dev/mem",O_RDWR|O_SYNC);
unsigned char* RxTxMem1 = (unsigned char *) mmap(0, getpagesize(), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0x000D4000);
unsigned char* RxTxMem2 = (unsigned char *) mmap(0, getpagesize(), PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0x000D5000);

Also, accessing I/O ports from user space is pretty simple:

#include <sys/io.h>
//...
ioperm(0x0100, 0x10, 1);
ioperm(0x0140, 0x30, 1);
//...
uint8_t val8 = inb(0x100); // 8-bit wide read
uint16_t val16 = inw(0x100); // 16-bit wide read
uint32_t val32 = inl(0x100); // 32-bit wide read
outb(val8, 0x100); // 8-bit wide write
outw(val16, 0x100); // 16-bit wide write
outl(val32, 0x100); // 32-bit wide write

Dealing with interrupts from userspace is not as simple. But, writing a very simple driver that can block a userspace process that does a read (or ioctl) on a special file until the interrupt fires isn't that hard. I did it once years ago. The "Linux Device Drivers" O'Reily book is a pretty good resource for these things.
 

Offline davorinTopic starter

  • Supporter
  • ****
  • Posts: 922
  • Country: ch
Re: Linux on CRTU-RU (o;
« Reply #22 on: November 09, 2015, 08:04:59 pm »
Ah nice...

Long time I wrote kernel drivers...back then in good old 2.0.x/2.4.x times with uClinux and a few MBytes RAM (o;

 

Offline fisafisa

  • Regular Contributor
  • *
  • Posts: 105
  • Country: es
Re: Linux on CRTU-RU (o;
« Reply #23 on: November 09, 2015, 08:40:06 pm »
My idea was to see whether we can run the dos apps in linux....
and even better if we can record the traffic between the application and the hardware...

Ciao
 

Offline davorinTopic starter

  • Supporter
  • ****
  • Posts: 922
  • Country: ch
Re: Linux on CRTU-RU (o;
« Reply #24 on: November 09, 2015, 08:45:24 pm »
Never used "dosbox" nor "dosemu"....and if they support some sort of "hardware hooks"...
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf