General NAS-Central Forums

Welcome to the NAS community
It is currently Sun Jul 23, 2017 10:35 am

All times are UTC




Post new topic Reply to topic  [ 75 posts ]  Go to page 1, 2, 3, 4, 5  Next
Author Message
PostPosted: Wed Jun 18, 2014 10:00 pm 
Offline

Joined: Wed Jun 18, 2014 9:38 pm
Posts: 35
note: The thread below is a daily report of my activities ti achieves to get a full debian running and optionnaly running a mainline Linux kernel (3.15+), I'll probably formalized a final post or wiki page once done, until then reading the full thread is the best way to know where am I on this.

-------------

Hi every one, I previously own a NSA 325 from zyxel and I've found lots of information on your forum, I just bought a ix4-300d from lenovo iomega emc2. My goal is to install full debian like I did with NSA325, but it seem like there are not a lot of information for this has. SO I though I could contribute here if other are interested in this NAS.

Why I selected this has:
- first it's a cheap 4 bay has (you can get it for <200euros delivered in europe)
- second it has 4 real data port handled by a marvel chip (yes it's an old SATA II 88SX7042) but at least there 4 independent data connector, not like most of the cheap 4 bay has using port multiplier ...
- it features a quite descent CPU dual core armada-xp, and from what I was able to achieve with the single core kirkwood it should be ok)
- it has a nice front panel lcd (which I hope I would be able to use from bar debian)
- at last lenovo seems to partially play fair and provide kernel and u-boot patch as part of GPL license terms

What I've found so far:
- I was able to compile a linux 3.0.29 patched with lenovo patch
- I was able to enable SSH to backup firmware and root partition (go to lenovoip/manage/diagnostics.html enable ssh, type password, save, then the trick is that the password you entered is appended with "soho" so 123 becomes "soho123"
- Lenovo firmware binary from their website is salted/encrypted gzip (question is can we get the password from the has update procedure?)
- there is support for armada-xp-db and very similar netgear 2120 has in the mainline kernel, I was able to compil a kernel merging the 3.0.29 config file with one of the default configfile from mainline, yet it is too early to know if lenovo boot support device tree, which one to use, write a ix4-300 version etc... I'll need serial / u-boot access for this (work in progress)

some information from ssh access:

Code:
root@ix4-300d:/# cat /proc/cpuinfo
Processor   : Marvell PJ4Bv7 Processor rev 2 (v7l)
processor   : 0
BogoMIPS   : 1332.01

processor   : 1
BogoMIPS   : 1332.01

Features   : swp half thumb fastmult vfp edsp vfpv3
CPU implementer   : 0x56
CPU architecture: 7
CPU variant   : 0x2
CPU part   : 0x584
CPU revision   : 2

Hardware   : Marvell Armada XP Development Board
Revision   : 0000
Serial      : 0000000000000000


uboot original env (anonymized serial numbers...):
Code:
root@ix4-300d:/# fw_printenv
baudrate=115200
loads_echo=0
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
console=console=ttyS0,115200
mtdids=nand0=armada-nand
CASset=min
sata_delay_reset=0
MALLOC_len=5
ethprime=egiga0
bootargs_root=root=/dev/ram rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
serverip=192.168.1.100
ipaddr=192.168.1.2
bootdelay=7
loadpath=initrd.img
ramdisk_size=4194304
ramdisk_size_f=12582912
ramdisk_name=initrd.img
uver=v2.3.2.6
mfgmodel=IX4-300D
autoload=yes
ubin=0301
env_off=0xe0000
env1_off=0x100000
kernel_start=0x120000
initrd_start=0x520000
kernel_size=0x400000
initrd_size=0x400000
mtdparts=mtdparts=armada-nand:0xe0000@0x0(uboot),0x20000@0xe0000(env),0x20000@0x100000(env2),0x400000@0x120000(zImage),0x400000@0x520000(initrd),0x3F200000@0xE00000(boot),0x40000000@0x0(flash)
standalone=fsload 0x2000000 $image_name;setenv bootargs $console $mtdparts root=/dev/mtdblock0 rw ip=$ipaddr:$serverip$bootargs_end; bootm 0x2000000;
eth2addr=00:50:43:00:00:02
eth3addr=00:50:43:02:00:00
mv_pon_addr=00:50:43:02:00:00
ethmtu=1500
eth1mtu=1500
eth2mtu=1500
eth3mtu=1500
mvNetConfig=mv_net_config=2,(00:50:43:11:11:11,0:1),mtu=1500
usb0Mode=host
usb1Mode=host
usb2Mode=device
usbActive=0
yuk_ethaddr=00:00:00:EE:51:81
nandEcc=1bit
netretry=yes
rcvrip=169.254.100.100
loadaddr=0x02000000
eeeEnable=no
lcd0_enable=0
lcd0_params=640x480-16@60
lcd_panel=0
ethact=egiga0
stdin=serial
stdout=serial
stderr=serial
enaMonExt=no
enaCpuStream=no
enaClockGating=no
enaWrAllo=no
pexMode=RC
disL2Cache=yes
MPmode=SMP
cacheShare=no
setL2CacheWT=no
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
enaFPU=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
amp_enable=no
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no
serial_number=xxxxxxxxxxxx
opid=xxxxxxxxxx
ethaddr=00:D0:B8:25:38:4D
serialNo=EUE040VJA1
eth1addr=00:D0:B8:25:38:4E
modelname=32042301
serialno=xxxxxxxxxxx
mfgtest_state=final_tested_ok
runintime=14400
ftp_serverip=192.168.32.4
ftp_log_user=runinlog
ftp_log_password=123
ftp_log_dir=storagelogs/soclogs/partlogs/IX4-300D/runin
ftp_pass_user=qrypass
ftp_pass_password=123
ftp_pass_dir=socquery
ftp_qry_user=qrypass
ftp_qry_password=123
ftp_qry_dir=socquery


Last edited by benoitm974 on Wed Jul 02, 2014 12:48 am, edited 3 times in total.

Top
 Profile  
 
PostPosted: Wed Jun 18, 2014 10:59 pm 
Offline

Joined: Wed Jun 18, 2014 9:38 pm
Posts: 35
I figured out the serial pin for accessing the UART, see picture below, it is a standard 115200 8N1


You do not have the required permissions to view the files attached to this post.


Top
 Profile  
 
PostPosted: Wed Jun 18, 2014 11:08 pm 
Offline

Joined: Wed Jun 18, 2014 9:38 pm
Posts: 35
The u-boot boot message from hart:

Code:
BootROM 1.15

Booting from NAND flash

DDR3 Training Sequence - Ver 2.3.4

DDR3 Training Sequence - Ended Successfully

BootROM: Image checksum verification PASSED


 __   __                      _ _
|  \/  | __ _ _ ____   _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| |  | | (_| | |   \ V /  __/ | |
|_|  |_|\__,_|_|    \_/ \___|_|_|
         _   _     ____              _
        | | | |   | __ )  ___   ___ | |_
        | | | |___|  _ \ / _ \ / _ \| __|
        | |_| |___| |_) | (_) | (_) | |_
         \___/    |____/ \___/ \___/ \__|
 ** LOADER 2.3.2.6  **


U-Boot 2009.08 (Mar 04 2013 - 11:13:04) Marvell version:  2.3.2 PQ
U-Boot Addressing:
       Code:..00600000:006BFFF0
       BSS:..00708EC0
       Stack:..0x5fff70
       PageTable:.0x8e0000
       Heap address:.0x900000:0xe00000
Board: DB-78230-BP rev 2.0 Wistron
SoC:   MV78230 A0
       running 2 CPUs
       Custom configuration
CPU:   Marvell PJ4B (584) v7 (Rev 2) LE
       CPU # 0
       CPU @ 1333Mhz, L2 @ 667Mhz
       DDR @ 667Mhz, TClock @ 250Mhz
       DDR 32Bit Width, FastPath Memory Access
       DDR ECC Disabled
PEX 0.0(0): Root Complex Interface, Detected Link X4, GEN 1.1
PEX 1.0(1): Root Complex Interface, Detected Link X1, GEN 2.0
DRAM:  512 MB
       CS 0: base 0x00000000 size 512 MB
       Addresses 14M - 0M are saved for the U-Boot usage.
NAND:  1024 MiB
Bad block table found at page 524224, version 0x01
Bad block table found at page 524160, version 0x01
nand_read_bbt: Bad block at 0x00003ca60000
FPU initialized to Run Fast Mode.
USB 0: Host Mode
USB 1: Host Mode
USB 2: Device Mode
Modules Detected:
MMC:   MRVL_MMC: 0
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  3 ... 0


Top
 Profile  
 
PostPosted: Wed Jun 18, 2014 11:50 pm 
Offline

Joined: Wed Jun 18, 2014 9:38 pm
Posts: 35
Making good progress.

My first attempt is to get the device to boot from USB to avoid any nand/sata access issue.

Good news is USB2 1 port (the rear upper one) is powered and supported by u-boot.

now I needed a kernel and a debian bootstrap.

So what I did:
- I first booted the lenovo with a data drive in there, letting it uncompressing the original lenovo system.
- Then I've activated the ssh access, and log onto it.
- I made a full copy of the system to the data disk and transfered it for backup
- exploring this backup from another system I saw that lenovo did left the /boot/zImage and /boot/initrd files
- then on a linux system I formatted a USB key with 2 partition 1 fat where I copied the zImage & initrd file and 1 ext2 where I've created an arm debian multistrap.
- you can also copy the kernel module tot he ext2 from the system backup, but the lenovo kernel as a lot as part of the kernel already.
- then I connected the serial cable as per image shared previously and power the device on
- I stop the boot sequence, and use this line to boot from USB key:
"usb reset;fatload usb 0:1 $loadaddr zImage;setenv bootargs $console $mtdparts root=/dev/sdb2 rw; bootm $loadaddr;"

BINGO the device boots up the kernel and start the multistrap arm debian.

note: I booted an armel debian since I had it already, but since armada-xp has VFP I'd multistrap a amrhf version later on.


Top
 Profile  
 
PostPosted: Thu Jun 19, 2014 12:47 am 
Offline

Joined: Wed Jun 18, 2014 9:38 pm
Posts: 35
Last post of the day:

As mentioned before lenovo play fair with GPL and you can find full patch list for building your own 3.0.29 kernel and module from the GPL download section of lenovo.

what I did:
- download a mainline 3.0.29 from linux git
- apply all patch found in "LenovoEMC-FOSSKit/LenovoEMCLifeline-FOSSKit/kernel/linux-3.0.29/h4c/"
- then copy the config from the same folder to my .config (adding one or two module I needed) and run a arm armhf cross compilation

-> the produced kernel and modules are usable, I was able to boot them and use the modules I compiled from the USB procedure describe above.

funny part Lenovo call it kernel 3.0.29-dirty ... not very enthusiastic naming for a live product...

B. good night.


Top
 Profile  
 
PostPosted: Fri Jun 20, 2014 8:11 am 
Offline

Joined: Wed Jun 18, 2014 9:38 pm
Posts: 35
For those intesresting in what they could get without reinstalling the whole OS, just note that with simple acess to ssh you get a pretty descent Debian 5.0 stable install with following packages:

Code:
acl_2.2.47-2.diff.gz
acl_2.2.47-2.dsc
acl_2.2.47.orig.tar.gz
antiword_0.37-3.diff.gz
antiword_0.37-3.dsc
antiword_0.37.orig.tar.gz
aptitude_0.4.11.11-1~lenny2.diff.gz
aptitude_0.4.11.11-1~lenny2.dsc
aptitude_0.4.11.11.orig.tar.gz
arping_2.07~pre1-2.diff.gz
arping_2.07~pre1-2.dsc
arping_2.07~pre1.orig.tar.gz
atftp_0.7.dfsg-6.diff.gz
atftp_0.7.dfsg-6.dsc
atftp_0.7.dfsg.orig.tar.gz
bind9_9.6.ESV.R4+dfsg-0+lenny4.diff.gz
bind9_9.6.ESV.R4+dfsg-0+lenny4.dsc
bind9_9.6.ESV.R4+dfsg.orig.tar.gz
bluez-libs_3.36-1.diff.gz
bluez-libs_3.36-1.dsc
bluez-libs_3.36.orig.tar.gz
bluez-utils_3.36-3.diff.gz
bluez-utils_3.36-3.dsc
bluez-utils_3.36.orig.tar.gz
bridge-utils_1.4-5.diff.gz
bridge-utils_1.4-5.dsc
bridge-utils_1.4.orig.tar.gz
catdoc_0.94.2-1.diff.gz
catdoc_0.94.2-1.dsc
catdoc_0.94.2.orig.tar.gz
curl_7.18.2-8lenny6.diff.gz
curl_7.18.2-8lenny6.dsc
curl_7.18.2.orig.tar.gz
cyrus-sasl2_2.1.22.dfsg1-23+lenny1.diff.gz
cyrus-sasl2_2.1.22.dfsg1-23+lenny1.dsc
cyrus-sasl2_2.1.22.dfsg1.orig.tar.gz
db4.6_4.6.21-11.diff.gz
db4.6_4.6.21-11.dsc
db4.6_4.6.21.orig.tar.gz
devmapper_1.02.27-4.diff.gz
devmapper_1.02.27-4.dsc
devmapper_1.02.27.orig.tar.gz
dnsmasq_2.45-1+lenny1.diff.gz
dnsmasq_2.45-1+lenny1.dsc
dnsmasq_2.45.orig.tar.gz
e2fsprogs_1.41.3-1.diff.gz
e2fsprogs_1.41.3-1.dsc
e2fsprogs_1.41.3.orig.tar.gz
eject_2.1.5+deb1-4.diff.gz
eject_2.1.5+deb1-4.dsc
eject_2.1.5+deb1.orig.tar.gz
ethtool_6+20080913-1.diff.gz
ethtool_6+20080913-1.dsc
ethtool_6+20080913.orig.tar.gz
exif_0.6.15-5.diff.gz
exif_0.6.15-5.dsc
exif_0.6.15.orig.tar.gz
expat_2.0.1-4+lenny3.diff.gz
expat_2.0.1-4+lenny3.dsc
expat_2.0.1.orig.tar.gz
file_4.26-1.diff.gz
file_4.26-1.dsc
file_4.26.orig.tar.gz
freetype_2.3.7-2+lenny8.diff.gz
freetype_2.3.7-2+lenny8.dsc
freetype_2.3.7.orig.tar.gz
gawk_3.1.5.dfsg-4.1.diff.gz
gawk_3.1.5.dfsg-4.1.dsc
gawk_3.1.5.dfsg.orig.tar.gz
gcc-4.3_4.3.2-1.1.diff.gz
gcc-4.3_4.3.2-1.1.dsc
gcc-4.3_4.3.2.orig.tar.gz
gdb_6.8-3.diff.gz
gdb_6.8-3.dsc
gdb_6.8.orig.tar.gz
gdbm_1.8.3-3.diff.gz
gdbm_1.8.3-3.dsc
gdbm_1.8.3.orig.tar.gz
glib2.0_2.16.6-3.diff.gz
glib2.0_2.16.6-3.dsc
glib2.0_2.16.6.orig.tar.gz
glibc_2.7-18lenny7.diff.gz
glibc_2.7-18lenny7.dsc
glibc_2.7.orig.tar.gz
gnutls26_2.4.2-6+lenny2.diff.gz
gnutls26_2.4.2-6+lenny2.dsc
gnutls26_2.4.2.orig.tar.gz
grub2_1.96+20080724-16.diff.gz
grub2_1.96+20080724-16.dsc
grub2_1.96+20080724.orig.tar.gz
gstreamer0.10_0.10.19-3.diff.gz
gstreamer0.10_0.10.19-3.dsc
gstreamer0.10_0.10.19.orig.tar.gz
hashalot_0.3-5.diff.gz
hashalot_0.3-5.dsc
hashalot_0.3.orig.tar.gz
hdparm_8.9-3.diff.gz
hdparm_8.9-3.dsc
hdparm_8.9.orig.tar.gz
icu_3.8.1-3+lenny3.diff.gz
icu_3.8.1-3+lenny3.dsc
icu_3.8.1.orig.tar.gz
ifenslave-2.6_1.1.0-10.diff.gz
ifenslave-2.6_1.1.0-10.dsc
ifenslave-2.6_1.1.0.orig.tar.gz
inotify-tools_3.12-1.diff.gz
inotify-tools_3.12-1.dsc
inotify-tools_3.12.orig.tar.gz
iptables_1.4.2-6.diff.gz
iptables_1.4.2-6.dsc
iptables_1.4.2.orig.tar.gz
kbd_1.14.1-4_i386.deb
krb5_1.6.dfsg.4~beta1-5lenny7.diff.gz
krb5_1.6.dfsg.4~beta1-5lenny7.dsc
krb5_1.6.dfsg.4~beta1.orig.tar.gz
libexif_0.6.16-2.1.diff.gz
libexif_0.6.16-2.1.dsc
libexif_0.6.16.orig.tar.gz
libgcrypt11_1.4.1-1.diff.gz
libgcrypt11_1.4.1-1.dsc
libgcrypt11_1.4.1.orig.tar.gz
libgd2_2.0.36~rc1~dfsg-3+lenny1.diff.gz
libgd2_2.0.36~rc1~dfsg-3+lenny1.dsc
libgd2_2.0.36~rc1~dfsg.orig.tar.gz
libgdchart-gd2_0.11.5-6.diff.gz
libgdchart-gd2_0.11.5-6.dsc
libgdchart-gd2_0.11.5.orig.tar.gz
libid3tag_0.15.1b-10.diff.gz
libid3tag_0.15.1b-10.dsc
libid3tag_0.15.1b.orig.tar.gz
libjpeg6b_6b-14.diff.gz
libjpeg6b_6b-14.dsc
libjpeg6b_6b.orig.tar.gz
liblivemedia_2007.02.20-2.diff.gz
liblivemedia_2007.02.20-2.dsc
liblivemedia_2007.02.20.orig.tar.gz
libmad_0.15.1b-4.diff.gz
libmad_0.15.1b-4.dsc
libmad_0.15.1b.orig.tar.gz
libnl_1.1-2.diff.gz
libnl_1.1-2.dsc
libnl_1.1.orig.tar.gz
libopenobex_1.3+cvs20070425-2.diff.gz
libopenobex_1.3+cvs20070425-2.dsc
libopenobex_1.3+cvs20070425.orig.tar.gz
libpng_1.2.27-2+lenny5.diff.gz
libpng_1.2.27-2+lenny5.dsc
libpng_1.2.27.orig.tar.gz
libsigc++-2.0_2.0.18-2.diff.gz
libsigc++-2.0_2.0.18-2.dsc
libsigc++-2.0_2.0.18.orig.tar.gz
libstatgrab_0.16-0.1.diff.gz
libstatgrab_0.16-0.1.dsc
libstatgrab_0.16.orig.tar.gz
libusb_0.1.12-13.diff.gz
libusb_0.1.12-13.dsc
libusb_0.1.12.orig.tar.gz
libxml2_2.6.32.dfsg-5+lenny5.diff.gz
libxml2_2.6.32.dfsg-5+lenny5.dsc
libxml2_2.6.32.dfsg.orig.tar.gz
linux-2.6_2.6.26-29.diff.gz
linux-2.6_2.6.26-29.dsc
linux-2.6_2.6.26.orig.tar.gz
log4c_1.2.1-2.diff.gz
log4c_1.2.1-2.dsc
log4c_1.2.1.orig.tar.gz
lua-filesystem_1.4.1-1.diff.gz
lua-filesystem_1.4.1-1.dsc
lua-filesystem_1.4.1.orig.tar.gz
lua5.1_5.1.3-1.diff.gz
lua5.1_5.1.3-1.dsc
lua5.1_5.1.3.orig.tar.gz
luasocket_2.0.2-3.diff.gz
luasocket_2.0.2-3.dsc
luasocket_2.0.2.orig.tar.gz
lvm2_2.02.39-8.diff.gz
lvm2_2.02.39-8.dsc
lvm2_2.02.39.orig.tar.gz
lzo2_2.03-1.diff.gz
lzo2_2.03-1.dsc
lzo2_2.03.orig.tar.gz
mdadm_2.6.7.2-3.diff.gz
mdadm_2.6.7.2-3.dsc
mdadm_2.6.7.2.orig.tar.gz
net-snmp_5.4.1~dfsg-12.diff.gz
net-snmp_5.4.1~dfsg-12.dsc
net-snmp_5.4.1~dfsg.orig.tar.gz
nfs-utils_1.1.2-6lenny2.diff.gz
nfs-utils_1.1.2-6lenny2.dsc
nfs-utils_1.1.2.orig.tar.gz
ntp_4.2.4p4+dfsg-8lenny3.diff.gz
ntp_4.2.4p4+dfsg-8lenny3.dsc
ntp_4.2.4p4+dfsg.orig.tar.gz
openbsd-inetd_0.20080125-2.diff.gz
openbsd-inetd_0.20080125-2.dsc
openbsd-inetd_0.20080125.orig.tar.gz
openldap_2.4.11-1+lenny2.1.diff.gz
openldap_2.4.11-1+lenny2.1.dsc
openldap_2.4.11.orig.tar.gz
openssh_5.1p1-5.diff.gz
openssh_5.1p1-5.dsc
openssh_5.1p1.orig.tar.gz
openssl_0.9.8g-15+lenny16.diff.gz
openssl_0.9.8g-15+lenny16.dsc
openssl_0.9.8g.orig.tar.gz
pam_1.0.1-5+lenny1.diff.gz
pam_1.0.1-5+lenny1.dsc
pam_1.0.1.orig.tar.gz
parted_1.8.8.git.2008.03.24-11.1.diff.gz
parted_1.8.8.git.2008.03.24-11.1.dsc
parted_1.8.8.git.2008.03.24.orig.tar.gz
perl_5.10.0-19lenny5.diff.gz
perl_5.10.0-19lenny5.dsc
perl_5.10.0.orig.tar.gz
pkg-config_0.22-1.diff.gz
pkg-config_0.22-1.dsc
pkg-config_0.22.orig.tar.gz
popt_1.14-4.diff.gz
popt_1.14-4.dsc
popt_1.14.orig.tar.gz
portmap_6.0-9.diff.gz
portmap_6.0-9.dsc
portmap_6.0.orig.tar.gz
psmisc_22.6-1.diff.gz
psmisc_22.6-1.dsc
psmisc_22.6.orig.tar.gz
pyopenssl_0.7-2.diff.gz
pyopenssl_0.7-2.dsc
pyopenssl_0.7.orig.tar.gz
python-defaults_2.5.2-3.dsc
python-defaults_2.5.2-3.tar.gz
python-django_1.0.2-1+lenny3.diff.gz
python-django_1.0.2-1+lenny3.dsc
python-django_1.0.2.orig.tar.gz
python-imaging_1.1.6-3.dsc
python-imaging_1.1.6-3.tar.gz
python-memcache_1.40-1.diff.gz
python-memcache_1.40-1.dsc
python-memcache_1.40.orig.tar.gz
python-pysqlite2_2.4.1-1.diff.gz
python-pysqlite2_2.4.1-1.dsc
python-pysqlite2_2.4.1.orig.tar.gz
pyxmpp_1.0.0-4.diff.gz
pyxmpp_1.0.0-4.dsc
pyxmpp_1.0.0.orig.tar.gz
rsync_3.0.3-2.diff.gz
rsync_3.0.3-2.dsc
rsync_3.0.3.orig.tar.gz
sdparm_1.02-1.diff.gz
sdparm_1.02-1.dsc
sdparm_1.02.orig.tar.gz
simplejson_1.9.2-1.diff.gz
simplejson_1.9.2-1.dsc
simplejson_1.9.2.orig.tar.gz
smartmontools_5.38-2+lenny1.diff.gz
smartmontools_5.38-2+lenny1.dsc
smartmontools_5.38.orig.tar.gz
strace_4.5.17+cvs080723-2.diff.gz
strace_4.5.17+cvs080723-2.dsc
strace_4.5.17+cvs080723.orig.tar.gz
sysfsutils_2.1.0-5.diff.gz
sysfsutils_2.1.0-5.dsc
sysfsutils_2.1.0.orig.tar.gz
taglib_1.5-3.diff.gz
taglib_1.5-3.dsc
taglib_1.5.orig.tar.gz
twisted_8.1.0-4.diff.gz
twisted_8.1.0-4.dsc
twisted_8.1.0.orig.tar.gz
urlgrabber_3.1.0-4.diff.gz
urlgrabber_3.1.0-4.dsc
urlgrabber_3.1.0.orig.tar.gz
usbutils_0.73-10lenny2.diff.gz
usbutils_0.73-10lenny2.dsc
usbutils_0.73.orig.tar.gz
vlan_1.9-3.diff.gz
vlan_1.9-3.dsc
vlan_1.9.orig.tar.gz
xpdf_3.02-1.4+lenny4.diff.gz
xpdf_3.02-1.4+lenny4.dsc
xpdf_3.02.orig.tar.gz


Top
 Profile  
 
PostPosted: Sat Jun 21, 2014 10:26 pm 
Offline

Joined: Wed Jun 18, 2014 9:38 pm
Posts: 35
For fan & pwm everything is i2c controlled, the 3.0.29 kernel has it enabled. the nas only uses fan1 & pwm1.

You can set auto pwm based on temp and control pwm min & max throttle !

Code:
# ls /sys/class/i2c-dev/i2c-0/device/0-002e
driver       fan4_alarm   in2_max          pwm1_freq        pwm3_auto_point2_pwm         temp1_fault         temp2_input         temp3_input
fan1_alarm  fan4_input   in2_min          pwm2           pwm3_enable            temp1_input         temp2_max            temp3_max
fan1_input  fan4_min   modalias       pwm2_auto_channels_temp  pwm3_freq            temp1_max            temp2_min            temp3_min
fan1_min    hwmon   name          pwm2_auto_point1_pwm     pwm_use_point2_pwm_at_crit  temp1_min            temp2_offset         temp3_offset
fan2_alarm  in1_alarm   power          pwm2_auto_point2_pwm     subsystem            temp1_offset         temp3_alarm         uevent
fan2_input  in1_input   pwm1          pwm2_enable        temp1_alarm            temp2_alarm         temp3_auto_point1_temp
fan2_min    in1_max   pwm1_auto_channels_temp  pwm2_freq        temp1_auto_point1_temp      temp2_auto_point1_temp  temp3_auto_point2_temp
fan3_alarm  in1_min   pwm1_auto_point1_pwm    pwm3           temp1_auto_point2_temp      temp2_auto_point2_temp  temp3_crit
fan3_input  in2_alarm   pwm1_auto_point2_pwm    pwm3_auto_channels_temp  temp1_crit            temp2_crit         temp3_crit_hyst
fan3_min    in2_input   pwm1_enable       pwm3_auto_point1_pwm     temp1_crit_hyst         temp2_crit_hyst         temp3_fault


Top
 Profile  
 
PostPosted: Sun Jun 22, 2014 9:23 pm 
Offline

Joined: Wed Jun 18, 2014 9:38 pm
Posts: 35
For those interested in booting other distribution without serial uart access, powering up the device while pushing the reset booton, will try to load images/zImage on USB key, then if it fails will try to load zImage on TFTP on 192.168.1.1 (not sure wether it's hardcoded or if it default to this while my lan DHCP the ix4 to 192.168.1.x address).

Benoit


Top
 Profile  
 
PostPosted: Wed Jun 25, 2014 10:15 am 
Offline

Joined: Wed Jun 18, 2014 9:38 pm
Posts: 35
News from today (or late last night)

I was able to boot a mainline 3.15 kernel ! writting a lenovo dts. (and little change on the mevbu armv7 defconfig)

so far what works:
- booting armv7 in SMP mode 2 cores
- all MV kernel (CESA, watchdog, RTC, XOR, PCIe, EHCI USB 2 ports)
- PCI1 lan is connected on the SATA 4x working full speed
- PCI5 connected to USB3 XHCI working full speed

work in progress:
- I2C is detected and both the RTC1 and PWM/Tempe sensor are detected but I have a I2C lock error that is acting wired
- pinctrl I need to mapp all the GPIO for led, button etc ... I need more detailed documentation so far what I have is https://github.com/MISL-EBU-System-SW/m ... inctrl.txt and the netgear 2120 dts file ...


Top
 Profile  
 
PostPosted: Wed Jun 25, 2014 11:27 pm 
Offline

Joined: Wed Jun 18, 2014 9:38 pm
Posts: 35
I2C is now working the lenovo is affected by a silicium bug and need a specific dts configuration .. done !


Top
 Profile  
 
PostPosted: Sun Jun 29, 2014 12:53 am 
Offline

Joined: Wed Jun 18, 2014 9:38 pm
Posts: 35
pinctrl is ok now I've mapped all the buttons reset, power scroll ans select (the one next to the LCD screen)
device tree allows to map them to gpio-keys, and therefore are seen as a keyboard, the POWER_KEY is correctly handled by acpi daemon on debian for instance

led! I've spend quite some time on this one :(:
in fact 1 led is simple and can be defined in the device tree : the blue hdd led, it sits on GPIO 26 and is handle by gpio-led supporting all trigger.
The 4 other leds are drived by a 8 bit 74HC164 shift register connected to GPIO. I've seen a 74x164 module in the kernel that could handle this as a SPI device, to be tested. in the meantime I managed to pilot thos 4 leds with simple GPIO bash script for testing. clock is GPIO 25, DATA is GPIO47, and GPIO27 is use fo init but not sure what it does ... Therefore those led are not led-gpio compiant, and can't be define in device tree, nor can be used by led-triggers :( .. Even the blinking effect from the orfinal firmware is done by a kernel 0.5s timer :( ...
UPDATE -> The 74x164 idea was the good one, by using combinaison of gpio-spi, then 74x164 act as a gpio extender on a third gpio interface, where you can declare our 4 leds as gpio-led -> then you get standard linux leds managment !

still working on:

power off, on original firmware a poweroff -f does turn the device off, I've noticed it is done by GPIO24. unfortunatly there must be something I do wrong since when I set 1 to GPIO24 the device reboot, but doesn't halt :(. Maybe another GPIO define the halt/reboot behavior of this GPIO.... to be tested...further, in the meantime I've added the GPIO24 as gpio-poweroff and it does get activated on kernel shutdown.

lcd -> it's going to be tricky for me I'm missing skill and source code to understand how this LCD is working ... the preliminary observation show that the wide 20 pin connector does go to the LCD panel, knowing there are 2 wire for the 2 buttons it leaves us with 18 wires which let me think we could be in front of a 16 wire LCD connected to the armada XP lcd ... to be continued.
UPDATE the lcd is gpio driven by 8 data DS gpio, and R/W, E, RS, A0, control gpios. The code can be seen through th wixlcm.c from the gpl iomega code. I'll look into existing 8 bit lcd driver to see if on could match.

Benoit


Top
 Profile  
 
PostPosted: Mon Jun 30, 2014 3:03 am 
Offline

Joined: Wed Jun 18, 2014 9:38 pm
Posts: 35
I was able to re-write a small module copying/adapting the wixlcm from iomega GPL source and was able to drive the LCD, I can draw on it. There seems to have no driver for this in mainline linux. So I'll probably finalize my testing module.


Top
 Profile  
 
PostPosted: Wed Jul 02, 2014 1:09 am 
Offline

Joined: Wed Jun 18, 2014 9:38 pm
Posts: 35
Hi All,

I think this is it for now. I'll move on installing this NAS now, attached are all element I compiled for getting a mainline kernel 3.16 running on the machine with LCD driver for simple text/hexbmp interaction.

What you get:
Full mainline kernel with support for all devices of the nas: fulll marvel armada XP support (SMP, XOR, RTC, watchdog), i2cRTC, 4x SATA, GB ethx2, USB2x2 & 3x1, all buttons (power, reset, scroll, select as keyboard), sensors, pwm & lcd (through small custom module).

fails:
-I'm still having issue with the PIN 24 reboot/halt where I can't find why the original firmware halt by setting UP the pin24 while mainline kernel just reboot.
-cesa seems not recognized for mv_cesa driver maybe a DTS config error ... I get no debug or info to find right settings ...
-hdd led activity doesn't work with mainline mv_sata driver :(

not tested:
- WOL
- NAND (I'm no big fan of touching NAND partition on devices ...)

For leds, just use the /sys/class/led

For LCD, compile the wixlcm.c module and insmod/modprobe it, the you can cat /dev/lcm to get syntax and echo "Tmytext" > /dev/lcm to display text, not the LCD module is alpha stage, still is doesn't crash the kernel.

For PWM & sensors, they are detected as standard i2c de vice in /sys/class/i2c

For RTC both the internal aramda & the i2c RTC are detected, kernel default to the marvell, kernel config to be change if you need it.

For building a kernel, download a mainline (3.15 or 3.16), apply the config attached, then apply DTS (copy it to arch/arm/boot/dts & edit the makefile to include this dts file as part of the dtbs make pahse) definition and do
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -j7 dtbs
cat arch/arm/boot/zImage arch/arm/boot/dts/armada-xp-lenovo-ix4300d.dtb > zud
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n lenovo-ix4-300d-02 -d zud /tftpboot/uImage

The /tftpboot/uImage is fully suported kernel for the original u-boot on the device.

Please note the current .config is almost all non-module, for testing, feel free to modularize things if needed.

dts file for ix4-300d : https://www.dropbox.com/s/wpxtrhi95oc59 ... x4300d.dts
kernel mainline 3.15, 3.16 config file: https://www.dropbox.com/s/461ehorbuexs2 ... g_ix4-300d
lcd driver alpah : https://www.dropbox.com/s/id2odxlnervioon/wixlcm.tgz


Last edited by benoitm974 on Sun Jul 06, 2014 11:46 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Wed Jul 02, 2014 1:41 am 
Offline

Joined: Wed Jun 18, 2014 9:38 pm
Posts: 35
From a noise perspective the original fan is clearly not the best option, even if you can play with pwm3 to lower the fan speed it is not the most silence ever, I did switch it for a Noctua NF-B9 that has pwm support and I'm very happy with the noise of nas in the living room.


Top
 Profile  
 
PostPosted: Wed Jul 02, 2014 9:57 pm 
Offline

Joined: Wed Jun 18, 2014 9:38 pm
Posts: 35
For power-off the device i found out the reason why it kept rebooting is the watchdog ! disabling watchdog in the kernel config is powering the device down properly with shutdown -h now.

I'll look into watchdog settings or power-off option to stop watchdog

-> EDIT : WRONG ASSUMPTION seem not related to watchdog, there must be something set by the default kernel that allow GPIO24 to shutdown instead of rebooting...

B


Last edited by benoitm974 on Sun Jul 06, 2014 11:44 pm, edited 1 time in total.

Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 75 posts ]  Go to page 1, 2, 3, 4, 5  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group