Thecus User Group
« Debian on N5500 + open source ICH7 GPIO LED module »

Welcome Guest. Please Login or Register.
May 26, 2013, 2:14am




Thecus User Group :: N5500 :: Modifications :: Debian on N5500 + open source ICH7 GPIO LED module
   [Search This Thread] [Share Topic] [Print]
 AuthorTopic: Debian on N5500 + open source ICH7 GPIO LED module (Read 3,000 times)
jnc100
New Member
*
member is offline





Joined: Sept 2010
Gender: Male
Posts: 3
Karma: 0
 Debian on N5500 + open source ICH7 GPIO LED module
« Thread Started on Sept 3, 2010, 6:43pm »

I thought I would share my experiences of installing Debian on a N5500.

Essentially the N5500 is a standard x86 PC with a Celeron processor, intel ICH7 north + south bridges, twin intel e1000 gigabit ethernet adapters, 2x primary master/slave ide hard drives (actually the DOM flash) hooked up to a 44 pin ide connector on the board - plugged into the ICH7, 2x silicon image SiI3132 sata controllers, and an atmel atmega 168v microprocessor connected to various pins on the ICH7 and also via /dev/ttyS1 which controls the front panel LCD.

Steps:
1) back up all data on your raid. In my experience the raid transferred with all data intact with no problems but I cannot guarantee this.
2) back up the DOM. I used an inexpensive external USB <-> 44 pin IDE box to do this and dd to extract the entire filesystem.
3) decide where to install debian - you can use the provided flash but its probably a bit small. I obtained a 32GB transcend SSD device with a 44pin input, which perfectly mounts within the case on top of the hard drive bays. There are even 4 holes drilled there which are set out perfectly for a 2.5" drive. Connect up to the motherboard header with a 44pin IDE cable - difficult to get hold of - mine came from memoryc.com.
4) install debian on another computer - i used the latest squeeze alpha i386 netinstall CD with the SSD hooked up via the external USB box. If you use LVM then the system will find the root filesystem without problems despite the fact that you will be running it from a different adapter to which you installed it on. Install the ssh server task.

Issues - for some reason the ethernet adapters are eth1 and eth2 (not eth0). You need to edit the /etc/interfaces file to contain something like:

allow-hotplug eth1
iface eth1 inet dhcp
allow-hotplug eth2
iface eth2 inet dhcp

before trying to boot your new system to allow it to detect the network and be able to ssh in.

If you continue to have problems accessing the system via ssh you can use a vga monitor and usb keyboard. I took an old vga cable, cut the outer shield off a male end and hold it in the vga header towards the back of the board - if you hold it in the right place it works as a temporary measure. Otherwise you can solder a pcb-mount vga header in if you can find one (I couldn't).


If debian boots correctly you can then ssh into it and install anything else you need via aptitude.

The leds are in an unconfigured state at present. There is an open source driver for the ich4 on the n5200 but I couldn't find one for the ich7 on the n5500 so have written one and attached it to this thread.

Essentially what you need is a compilation environment:
'apt-get install binutils gcc linux-headers make'

then unzip the tarball and run:
make modules
make modules_install
make install

and add the following to your /etc/rc.local:
/sbin/modprobe ich7_gpio
/usr/local/ich7_gpio/sbin/scripts/init_n5500_leds.sh

and on next startup the orange 'system_led' will turn off when the system is ready and you will have new leds under /sys/class/leds

LCD display:
work in progress.
essentially you write packets to the /dev/ttyS1 interface. From some debugging, the packets consist of the following bytes in sequence:

0x02 0x01 0xaa 0xbb message 0x03

where all messages start 0x02 0x01 and end 0x03, the message length is contained in 0xaa, 0xbb in big-endian (e.g. a two byte message is represented as 0x00 0x02), the message is what to send: display string messages seem to be 0x21 followed by the string which is null terminated. Unfortunately despite seeing what the thecus tools send to the lcd, making my own messages doesn't seem reliable (yet).

Regards,
John.
Link to Post - Back to Top  IP: Logged
fryppy
New Member
*
member is offline





Joined: Nov 2010
Gender: Male
Posts: 1
Karma: 0
 Re: Debian on N5500 + open source ICH7 GPIO LED mo
« Reply #1 on Nov 16, 2010, 2:43am »


Sept 3, 2010, 6:43pm, jnc100 wrote:
The leds are in an unconfigured state at present. There is an open source driver for the ich4 on the n5200 but I couldn't find one for the ich7 on the n5500 so have written one and attached it to this thread.

I can't see your ich7 module.
Google finds some modules for IBM nas SS4200 wich present in modern kernels...

I have troubles with LCD too...

(on N8800)
Link to Post - Back to Top  IP: Logged
jnc100
New Member
*
member is offline





Joined: Sept 2010
Gender: Male
Posts: 3
Karma: 0
 Re: Debian on N5500 + open source ICH7 GPIO LED mo
« Reply #2 on Nov 19, 2010, 10:55pm »

Apologies, problems attaching the files.

See https://github.com/jncronin for the current status of this project and all available source.

Regards,
John.
Link to Post - Back to Top  IP: Logged
aldcug
New Member
*
member is offline





Joined: Nov 2011
Gender: Male
Posts: 1
Karma: 0
 Re: Debian on N5500 + open source ICH7 GPIO LED mo
« Reply #3 on Nov 29, 2011, 12:32pm »

ich7_gpio is tested on N7700(pro):
- It's nedded to add the line to source to use it with N7700:
Code:
{ PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ICH7_31) },

- 3 LEDs are work: orange:Busy+red:Fail, blue:USBcopy. It works via /proc/ich7_gpio as well as via /sys/class/led.
- 2 LEDs unavailable: blue:Power, (purple?):"(e)" (probably this is SD_Copy)
- 2 LEDs also unavailable but not needed at all: eth1 & eth2

SATA 7xorange "Fail" LED unavailable, but it is probably a part of proprietary sata_mv patch.

So, basically, it works. Thank you!

***
Do you have any progress with LCD?

(I was able only call 'SETLOGO' to out "Gentoo NAS" so far...)

upd
slightly patched ich7_gpio + /etc srcipts for N7700pro:
http://async-emerge.googlecode.com/svn/d....N7700PRO.tar.gz
« Last Edit: Nov 29, 2011, 1:20pm by aldcug »Link to Post - Back to Top  IP: Logged
jnc100
New Member
*
member is offline





Joined: Sept 2010
Gender: Male
Posts: 3
Karma: 0
 Re: Debian on N5500 + open source ICH7 GPIO LED mo
« Reply #4 on Jan 14, 2012, 1:57pm »

As regards to LCD output (at least on n5500) see the python script at https://github.com/jncronin/pymonitor/blob/master/send_thecus.py (part of my pymonitor application which currently outputs raid status, ups status and smart status to the lcd screen).

Basically either call write_message(line1, line2) from within python or from a command line run python3 send_thecus.py 'line 1' 'line 2'

I don't know how to respond to pushes of the buttons under the lcd yet (and haven't been working on it for some time). As I understand it, there is an AVR chip to which the lcd and buttons are connected which communicates with /dev/ttyS1 via some proprietary interface.

Regards,
John.
Link to Post - Back to Top  IP: Logged
snahl
New Member
*
member is offline





Joined: Dec 2012
Gender: Male
Posts: 2
Karma: 0
 Re: Debian on N5500 + open source ICH7 GPIO LED mo
« Reply #5 on Dec 29, 2012, 7:12am »

@jnc100, Thanks a ton for this great information.

One question, where is the VGA header located on the Mobo N5500 ver 1.01.

Quote:
...you can use a vga monitor and usb keyboard. I took an old vga cable, cut the outer shield off a male end and hold it in the vga header towards the back of the board

As of today I was not able to find anything on the net.
Advice is appreciated.
Thanks.

Edit:
Just found that VGA header.
It sits among the external device connectors between the serial port and the USB port.

This problem is solved!
« Last Edit: Dec 29, 2012, 7:23am by snahl »Link to Post - Back to Top  IP: Logged
   [Search This Thread] [Share Topic] [Print]

Click Here To Make This Board Ad-Free


This Board Hosted For FREE By ProBoards
Get Your Own Free Message Boards & Free Forums!
Terms of Service | Privacy Policy | Notice | FTC Disclosure | Report Abuse | Mobile