Welcome! Log In Create A New Profile

Advanced

Debian on Shuttle KD20 (PLX OXNAS 7821)

Posted by Peacemaker 
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
December 15, 2014 11:09AM
Okay, I compiled an 3.18 Kernel for my Debian Initrd and did some short tests:

uImage3.18_2
Initrd_w

What is working:

- Booting with original uBoot
- Ethernet
- Both HDD and Raid

Whats not working:
- Cardreader
- USB3.0 is buggy

Everything else I'd tested yet.

The next I'll do some more test and hope to fix the usb3.0 & find out the kernel module for the cardreader :-)
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
December 18, 2014 12:35PM
Sounds nice.

I have not had enough time yet to try this with my Akitio Mycloud Mini and Silverstone DC01 devices.

Maybe some day at christmas.

BTW, did you use directly OpenWRT kernel or just patch original with the few patches?



Edited 1 time(s). Last edit at 12/18/2014 12:37PM by tilator.
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
December 19, 2014 03:34AM
I just patched 3.18.0 Kernel
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
December 19, 2014 10:37AM
Peacemaker Wrote:
-------------------------------------------------------
> I just patched 3.18.0 Kernel

OpenWRT kernel seems to have lots of generic patches. Maybe there is something necessary.
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
December 21, 2014 09:57AM
I uesd the additional files & all kernel patches from the openwrt trunk.

For now I compiled the released 3.18.1

There's not much changed to a prior version.

# SATA+Raid's working well ( ok a bit slow 80mb/s r/w)

What's not working, buggy, or not well:

# USB 3.0 & Cardreader: SD card / USB-Stick is recognized, but If you try access the storage, I got Errors.

Error for USB 3.0 if I try to mount the volume:

[10175.302950] usb 2-2: new SuperSpeed USB device number 2 using xhci_hcd
[10175.327321] usb 2-2: New USB device found, idVendor=0781, idProduct=5583
[10175.334033] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[10175.341132] usb 2-2: Product: Ultra Fit
[10175.344983] usb 2-2: Manufacturer: SanDisk
[10175.349068] usb 2-2: SerialNumber: 4C530123240729103534
[10175.355845] usb-storage 2-2:1.0: USB Mass Storage device detected
[10175.364267] scsi host4: usb-storage 2-2:1.0
[10176.363292] scsi 4:0:0:0: Direct-Access     SanDisk  Ultra Fit        1.00 PQ            : 0 ANSI: 6
[10176.375859] sd 4:0:0:0: [sdb] 31266816 512-byte logical blocks: (16.0 GB/14.9             GiB)
[10176.384660] sd 4:0:0:0: [sdb] Write Protect is off
[10176.392517] sd 4:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[10176.424995]  sdb: sdb1
[10176.433397] sd 4:0:0:0: [sdb] Attached SCSI removable disk
[10201.783930] EXT4-fs (sdb1): mounting ext3 file system using the ext4 subsystem
[10237.033382] xhci_hcd 0000:00:00.0: Assuming host is dying, halting host.
[10237.040279] xhci_hcd 0000:00:00.0: HC died; cleaning up
[10237.045754] usb 2-2: USB disconnect, device number 2
[10237.065679] sd 4:0:0:0: [sdb]
[10237.068812] Result: hostbyte=0x01 driverbyte=0x00
[10237.073528] sd 4:0:0:0: [sdb] CDB:
[10237.077009] cdb[0]=0x2a: 2a 00 00 00 00 20 00 00 10 00
[10237.082124] blk_update_request: I/O error, dev sdb, sector 32
[10237.087866] Buffer I/O error on dev sdb1, logical block 0, lost async page write
[10237.095275] Buffer I/O error on dev sdb1, logical block 1, lost async page write
[10237.103720] sd 4:0:0:0: [sdb]
[10237.106851] Result: hostbyte=0x01 driverbyte=0x00
[10237.111531] sd 4:0:0:0: [sdb] CDB:
[10237.115046] cdb[0]=0x2a: 2a 00 00 20 00 28 00 00 10 00
[10237.120176] blk_update_request: I/O error, dev sdb, sector 2097192
[10237.126359] Buffer I/O error on dev sdb1, logical block 262145, lost async page write
[10237.134205] Buffer I/O error on dev sdb1, logical block 262146, lost async page write
[10237.142072] JBD2: recovery failed
[10237.145402] EXT4-fs (sdb1): error loading journal

I've not much looked into fixing this, but If someone have an idea, I'm happy for help ?!

What I have not looked into is:

# All GPIO: LED's, Fan, Buttons


For now on I try to focus on USB 3.0 & the Performace tweaks on Samba / SSH,...
Jacq
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
January 05, 2015 05:59AM
Anybody solved problem with USB 3.0 and Cardreader?
Jacq
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
January 05, 2015 07:53AM
@Peacemaker
Can you reupload uImage3.18_2 file or newer?
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
January 05, 2015 08:27AM
Okay, USB 3.0 and Cardreader is still buggy, so I left it out of the Kernel.

uImage3.18.1_7 the 3.18.1_7 is my current Kernel

One other think is that the samba performace is quite bad, even with some tweaks:

read ~30mb/s
write ~22-25mb/s
Kluch
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
January 07, 2015 02:32PM
Samba even in original kd20 (firm.2.38) is not fast. I use vsftpd to get files from KD20 and have 70-75MB/sek while on samba only 35 (raid1).
Jacq
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
January 08, 2015 04:07AM
@Peacemaker
Can you explain how to make installation - step by step? Is the console conection is require - how to dismantle this device?
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
January 08, 2015 05:13AM
@Kluch: Okay I thought you can reach ~40mb/s wright and 80mb/s read. with the original FW

Sure, I can do that the next days step by step.

But for now:

For dismantle the device you can thank Crosser for his pictures:
Dissemble KD20
With them you can easy open up the device.

For Installation there are 2 ways :-):

1. (what I did): You access vendors U-Boot via UART and configure it and go from there via TFTP

2. You boot Uboot direct from SATA1:
+ The advantage there is you can leave the nand and the case totaly untouched. and boot up everything via sata or usb (later maybe sd), and you don't need an TFTP
- The disadvantage: You need a special Uboot for this, and I've not compiled the right Uboot yet, so no: netconsole and no access to any storage so far.


On the USB 3.0 front:
USB 3.0 and Cardreader are both connected to a Etron EJ168A chip. And there are a few bugs reported for this chip, but I have to look into the reports.
Jacq
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
January 08, 2015 10:39AM
@Peacemaker
If I choose first solution. How can i back to original firmware ?

This two files uImage3.18.1_7 and Initrd_w i should pun on disk with witch file system?
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
January 08, 2015 11:39AM
If you "hacked" into your device you can just backup the nand with nanddumper, if not you can do this from debian or from just ask me for my nand backup :-)

Befor you start:
+Connect to the UART and see if you can access vedors uboot
+Make bootdisk (sata or usb) a rootfs partition (ext2 o. ext3) and extract my wheezy_rootfs or bodhi's oxnas rootfs (both will work)
Rrecommended:
+ Prepare a TFTP server with uImage (Kernel), Initrd_w, and rootfs
+ Make familiar with uboot commands

Process to debian:
1 Boot into vendors Uboot and interrupt the boot via UART

(1.5 Backup the bootargs (simply printenv -> copy&past to file) or it's backup within the nand)

2. Change the bootargs:
 setenv bootargs root=/dev/sdb1 console=ttyS0,115200 mem=256M poweroutage=yes

To make this permanet:
saveenv

Here your rootfs is sdb1, a better why here would be use labels or uuid but I had sometimes problems with that. But the sdx are not given strait forward, so just have a try.
It makes no difference if it is usb or sata here.

3. Load your uImage and Initrd, maybe you can load these files form sata(ext2) via ext2load but I never tried.
Here for tftp:
If your tftp ip is given by dhcp, you can skip 3.1

3.1 Set up IP's:
 setenv ipaddr *IP of KD20* ;setenv gatewayip *router ip*;setenv serverip *tftp-server ip*;setenv ethaddr 00:25:b1:ff:ff:00

3.2 Load files:

tftp 64000000 uImage3.18.1_7; tftp 60500000 uInitrd_w;

4. Boot it:
bootm 64000000 60500000

Now you Debian should boot up.

If it you get a Kernel Panic and it cant find rootfs, go back to step 2 and change rootfs location


For now you have not touched the nand (besides the bootargs)

If you like to write the kernel & initrd to nand you ca do this via:

Initrd

tftp 64000000 uInitrd_w
nand erase 240000 600000
nand write 64000000 240000 600000

kernel

tftp 64000000 uImage3.18.1_7
nand erase 840000 7C0000
nand write 64000000 840000 7C0000

Then you need to modify your load & loadr script

setenv load  nand  read.e 0x60500000 840000 350000
setenv loadr nand  read.e 0x64000000 240000 280000
setenv boot bootm 60500000 64000000 

To save everything

saveenv

If you have additonal question, feel free to ask!



Edited 10 time(s). Last edit at 01/25/2015 08:43AM by Peacemaker.
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
January 08, 2015 11:43AM
Peacemaker,

> If you "hacked" into your device you can just
> backup the nand with dd, if not you can do this
> from debian or from just ask me for my nand backup
> :-)

Shouldn't backup NAND with dd, always use nanddump (safer).

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
January 08, 2015 11:51AM
On the mainboard of Omninas i do not have any pin to connect uart cable(console).
Do I have to solder this pins for console ?
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
January 08, 2015 12:17PM
Jacq Wrote:
-------------------------------------------------------
> On the mainboard of Omninas i do not have any pin
> to connect uart cable(console).
> Do I have to solder this pins for console ?

YES, you have to solder them or just pin the conectors:

https://gitorious.org/openwrt-oxnas/pages/omninas-kd20-board.jpg
https://gitorious.org/openwrt-oxnas/pages/omninas-kd20-serial.jpg
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
January 08, 2015 12:35PM
Where are the screws? I found only two near hinges..
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
January 08, 2015 12:59PM
Look at the pictures from crosser @ Google+ i linked it.
DeDenker
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
January 09, 2015 12:43PM
Hi Guys,

Very nice work.
I look forward hacking my K20.
But I would like to do it would out soldering.
Is there a way I just replace the system partition?

If no choice I would like to find a more detailed step by step (instructibles for example) on how to replace the Uboot.

But again, very nice work!
:D
Grt DeDenker
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
January 11, 2015 03:54AM
Hey,
@DeDenker:
You don't have to replace the uboot. I work with stock Uboot.
But you need a way to access it, and there for a serial connection via UART is simply the best. The soldering is not a too hard task and by the way there are "ways" to do such a connection without soldering. Just a thought here: https://hackingecibfocusv2fubirevb.wordpress.com/2012/08/13/a-solder-free-uart-connection/

You might can go without UART, if you have ssh access to the vendors system you can change uboot settings form vendors linux system.
BUT: If something in the uboot is not right configured you need the serial connection, to fix this.

@all
I opend the KD20 month ago, and have not colsed it again. So I can't remember every step, but I used crossers pictures to see a way to open it, and it was not too hard.

As I see you have some issues with opening and uart I try to get a full SATA boot (uboot, kernel, uimage, rootfs from disk), and set the usb3.0 / cardreader issue back.



Edited 2 time(s). Last edit at 01/11/2015 05:38AM by Peacemaker.
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
January 11, 2015 04:51AM
:)) cool HW hack with the clothes pin.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
January 13, 2015 11:54AM
Tftp generate a lot of problems..
How to upload uImage3.18.1_7, uInitrd_w from e.g. usb memory?
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
January 13, 2015 01:45PM
I uploaded everything via tftp and it is working most of the time quote good.
What kind of error do you get? Maybe wie can fix.
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
January 13, 2015 02:10PM
It's look like:
Shuttle>> setenv gatewayip 192.168.1.1;
Shuttle> tftp 64000000 uImage3.18.1_7; tftp 60500000 uInitrd_w;
Wait GMAC to reset
Wait for PHY reset
PHY is IC+ IP1001LF
Wait for link to come up..........Link up
Wait for auto-negotiation to complete
Link is 1000M
TFTP from server 213.xx.xx.xx; our IP address is 192.168.1.20; sending through gateway 192.168.1.1
Filename 'uImage3.18.1_7'.
Load address: 0x64000000
Loading: *
ARP Resend request
T invalid RARP header
####T T ########T #T T #T #T ###T T ##T T ###T #######T T #T #T #T #T ######T T #T ###T ##T #T ##T T T T ###T #T #T T ##T #T T T T ##T #T T T T #T #T T #T T ##T T #T T T T T #
         #T T T T ###T
Retry count exceeded; starting again
TFTP from server 213.xx.xx.xx; our IP address is 192.168.1.20; sending through gateway 192.168.1.1
Filename 'uImage3.18.1_7'.
Load address: 0x64000000
Loading: ##T T #T T ##T ##T T #T T #



Edited 1 time(s). Last edit at 01/13/2015 02:11PM by Jacq.
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
January 13, 2015 02:47PM
Okay, load things from usb will not work, from sata you can load data.

These errors comes most of the time from bad network settings.

As your server has really the IP 213.x.x.x, this might not to be right.
The tftp server should be in the same network so 192.168.1.x so check your tftp server settings, and the dhcp server.
May be its easyer to set the ip static :-)
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
January 13, 2015 03:05PM
Peacemaker Wrote:
-------------------------------------------------------
> Okay, load things from usb will not work, from
> sata you can load data.
How can i load this file from sata?

Tftp in the same network like omninas(have still static IP) and gw has similar problem...



Edited 1 time(s). Last edit at 01/14/2015 02:26AM by Jacq.
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
January 13, 2015 03:31PM
Or perhaps try to direct connect the kd20 to the tftpserver (without any switch, router or so in between), I have read that these errors comes often from half/full duplex or routing problems.

I tried to load files from sata but tftp, was more suitible for me.

You need to active IDE via ide reset if its not done allready, then you can load from ext2 via ext2load.
I don't remember the actual syntax, but I think google might help.
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
January 17, 2015 12:30PM
@Peacemaker

Ok, this device has a problem with full support 1Gbps speed and when the server tftp serve file with full speed omninas drop packet.. After change interface speed to 100M FD everything works fine :)

I had booted from usb flash drive debian from your sources but i did not saved nand parameters permanently.
Unfortunately after restart i cannot communicate via console... Restart does not solve problem..
Anybody knows what was the problem??



Edited 2 time(s). Last edit at 01/17/2015 01:07PM by Jacq.
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
January 18, 2015 06:13AM
Okay, didn't know this with 1Gbit problem, with my Netgear switch + TFTP on PogoE02 both Gbit, its working most of the time, but I have seen sometimes these errors as well.

Okay, what console do you talking about, SSH, Serial/UART? I have seen that sometimes after rebooting Uboot did not activate the Ethernet. But I've not figured out so far, as debian loads it.

As I hadn't much time last wek & focused on a full SATA Boot, USB 3.0 & Cardreader didn't make any progress execpt, Cardreader might connect to USB 3.0 or I2C, but I haven't figured out yet.

For full SATA boot I'm a bit stucked as well, but may be I'll open for this a ne topic in the Uboot section here.
Re: Debian on Shuttle KD20 (PLX OXNAS 7821)
January 18, 2015 08:36AM
I wrote about Serial/UART. After connecting serial cable between UART converter and omninas conector on the console i do not see any boot information...
It's looks like failure port in omninas...:/ I tried to use another serial converter, but is not working too..:/

Any idea?



Edited 1 time(s). Last edit at 01/19/2015 08:22AM by Jacq.
Author:

Your Email:


Subject:


Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 17 plus 15?
Message: