Welcome! Log In Create A New Profile

Advanced

New uBoot for KD20 (OXNAS PLX 7821) [Dev]

Posted by Peacemaker 
New uBoot for KD20 (OXNAS PLX 7821) [Dev]
February 01, 2015 11:33AM
This topic is for developing for a new / better uBoot for the Suttle KD20 NAS.

Maingoals:
- Upgrade Uboot to 2014.10 newer
- Full SATA boot (stage1, uBoot, kernel, rootfs) -> Important to make a serial/UART connection not nessesary
- Boot from USB (kernel, rootfs)
(- Boot from SD/MMC)

Status Quo:
- vendors uBoot can be booted form sata but did not load the disk.
- other uboots (bodhi, kref's) can boot from Sata but only load one disk.
- 2014.10 uBoot from openwrt can be loaded from vendors uboot
- usb did not working with any uBoot

Data:

Vendors Uboot source (there are 2?!)
uBoot+spl
uBoot
---------------------------------------------------------------------------------------------------------------------------
As my primary objectiv is to make a full sata boot my first attempt was just copy vendors spl + newer uBoot (2014.10) to a harddisk with oxnas_sata_boot script from warhead.

uBoot is 562 kB big (vendors 120-170Kb)

Stage-1 Bootloader 2015-01.21-21:48:56
Attempting to set PLLA to 800MHz ...
  plla_ctrl0 : 0x0000030A
  plla_ctrl1 : 0x00400000
  plla_ctrl2 : 0x007F0068
  plla_ctrl3 : 0x00000193
PLLA Set

Setup memory, testing
Reading disk 00
  Sector : 0x0000009A
  Hdr len: 0x0008935C
  Hdr CRC: 0x16FD462A
 too big
Reading disk 01
  Sector : 0x0000DF78
  Hdr len: 0x00000000
  Hdr CRC: 0x00000000
 length 0
Reading disk 10
  Sector : 0x0000009A
  Hdr len: 0xA1A2A3A4
  Hdr CRC: 0xB1B2B3B4
 read failed
Reading disk 11
  Sector : 0x0000DF78

So I in my opinon it looks like uBoot 2014.10 is to big to load from sata sectors.

If I boot the vendors uBoot to load kernel from disk -> sata disk won't inital and i don't know why.

So I like either to modify the spl (vendor) to enable fat,ext2 or ext4 uBoot or modify Kref's spl to enable the second disk. An other try would be to shrink down a newer uBoot to get it in disk sector.

But I have no idea how to do one of these things, so I hope someone can help me out here with some ideas :-)



Edited 1 time(s). Last edit at 02/01/2015 01:37PM by Peacemaker.
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
February 01, 2015 12:44PM
Peacemaker,

> - other uboots (bodhi, kref's) can boot from Sata
> but only load one disk.

This make senses. Because this u-boot code only deals with one SATA.

> - usb did not working with any uBoot
>

This is really odd. Because my/kref u-boot build handles USB, and it is the easiest thing to get working.

What do you see if

- Have USB rootfs attached
- Boot with serial console, interrupt u-boot, at the prompt, start USB:
usb start

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
February 01, 2015 01:07PM
bodhi Wrote:
-------------------------------------------------------
> Peacemaker,
>
> > - other uboots (bodhi, kref's) can boot from
> Sata
> > but only load one disk.
>
> This make senses. Because this u-boot code only
> deals with one SATA.

The uBoot (stage2) is I think not the problem. the problem is the uBoot as if i load the openwrt uBoot via tftp I can use both disk.

USB in vendors uBoot did not work at all:

Shuttle>> usb reset
(Re)start USB...
USB:   scanning bus for devices... 1 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
0 Storage Device(s) found

If I load the openwrt uBoot I get

OX820 # usb reset
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
OX820 # usbboot 6400000 0:0

Loading from usb device 0, partition 0: Name: Whole Disk  Type: U-Boot
EHCI timed out on TD - token=0xd8d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x1f8c80
EHCI timed out on TD - token=0x128d80
EHCI timed out on TD - token=0xd8d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x1f8c80
EHCI timed out on TD - token=0x2008d80
EHCI timed out on TD - token=0xd8d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x1f8c80
EHCI timed out on TD - token=0x128d80
EHCI timed out on TD - token=0xd8d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x1f8c80
EHCI timed out on TD - token=0x2008d80
EHCI timed out on TD - token=0xd8d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x1f8c80
EHCI timed out on TD - token=0x128d80
EHCI timed out on TD - token=0xd8d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
EHCI timed out on TD - token=0x80008d80
** Read error on 0:0

And as I remember I get the same errors with your uBoot, but usbboot is not so important :-|
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
February 01, 2015 01:13PM
> OX820 # usbboot 6400000 0:0

I see. It is true that not necessary to boot it this way. We just need to boot it as a normal USB rootf with bootargs and boot command.

BTW, when you boot with my u-boot binary, did "ide reset" return with only one HDD even though there are 2 HDDs?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
February 01, 2015 01:25PM
Quote
BTW, when you boot with my u-boot binary, did "ide reset" return with only one HDD even though there are 2 HDDs?
-bodhi


How to boot? Directly with spl or only stage2 over vendor uBoot?
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
February 01, 2015 02:02PM
> How to boot? Directly with spl or only stage2 over
> vendor uBoot?

Directly with SPL.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
February 01, 2015 02:10PM
Without any code changes I got only 128mb RAM and as you mentiont only one disk activated
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
February 01, 2015 02:19PM
I remember now. WarheadsSE and I commented on the OXNAS SATA driver code that handles ports. Did you try any of what we were discussing?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
February 01, 2015 02:35PM
Yes, I tryed everything and it did not worked out. With the work from the openwrt dev's, I was able to generate a uBoot thats working while loading from vendors uBoot, but the problem is the spl.
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
February 02, 2015 01:43AM
Peacemaker Wrote:
-------------------------------------------------------
> Yes, I tryed everything and it did not worked out.
> With the work from the openwrt dev's, I was able
> to generate a uBoot thats working while loading
> from vendors uBoot, but the problem is the spl.

You dont really need SPL to initialize SATA (unless you want to boot from SATA), u-boot does that. If you flash my binaries for NAND, u-boot does init SATA. And then you can figure out how to activate the 2nd SATA port.

Or if you build SPL w/o IDE, then build u-boot base on kref source, modify it to bring up 2 ports.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 02/02/2015 01:50AM by bodhi.
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
February 02, 2015 11:29AM
Bodhi Wrote:

> You dont really need SPL to initialize SATA
> (unless you want to boot from SATA), u-boot does
> that. If you flash my binaries for NAND, u-boot
> does init SATA. And then you can figure out how to
> activate the 2nd SATA port.
>
> Or if you build SPL w/o IDE, then build u-boot
> base on kref source, modify it to bring up 2
> ports.

One of my main goals are boot from sata :-)

Are you guessing that uBoot initial sata or do you know it, in my opinon the sata has to be preinit by spl

If I chainload a modified version of your uBoot sata works perfect.

  Sector : 0x0000009AStage-1 Bootloader 2012-06.13-13:06:32
Attempting to set PLLA to 750MHz ...
  plla_ctrl0 : 0x0000000A
  plla_ctrl1 : 0x000F0000
  plla_ctrl2 : 0x001D01A0
  plla_ctrl3 : 0x00000017
PLLA Set

Setup memory, testing, Image 0
  Hdr len: 0x00028594
  Hdr CRC: 0x0BA1B9D0
 OK

     _           _   _   _
    | |         | | | | | |
 ___| |__  _   _| |_| |_| | ___
/ __| '_ \| | | | __| __| |/ _ \
\__ \ | | | |_| | |_| |_| |  __/
|___/_| |_|\__,_|\__|\__|_|\___|
          _   _     ____              _
         | | | |   | __ )  ___   ___ | |_
         | | | |___|  _ \ / _ \ / _ \| __|
         | |_| |___| |_) | (_) | (_) | |_
          \___/    |____/ \___/ \___/ \__|

U-Boot 1.1.2 (Oct 22 2012 - 10:55:50)

U-Boot code: 60D00000 -> 60D28594  BSS: -> 60D3B2C0
IRQ Stack: 60cddf7c
FIQ Stack: 60cdcf7c
RAM Configuration:
        Bank #0: 60000000 256 MB
SRAM Configuration:
        64KB at 0x50000000
NAND:128 MiB
In:    serial
Out:   serial
Err:   serial
time=1
time=2
time=3
time=4
time=5
time=6
time=7
time=8
time=9
time=10
Initialising disks
OX820 SATA Init...
Detecting SATA busses:
Bus 0: Found first device OK
  Device 0: Model: WDC WD5000AAKS-22V1A0  Firm: 05.01D05 Ser#: WD-WCAWF8614536
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
  Device 1: Model: SAMSUNG HD502IJ  Firm: 1AA01118 Ser#: S13TJ90Z112563
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
Setting Linux mem= boot arg value
Hit any key to stop autoboot:  0

                              Boot Menu
==============================================================================
0: Enter Command Line Interface             1: Reboot
2: Start the Kernel Code                    T: GPIO Test Function

=> Select:
                              Boot Menu
==============================================================================
0: Enter Command Line Interface             1: Reboot
2: Start the Kernel Code                    T: GPIO Test Function

=> Select:
Shuttle>> tftp 64000000 u-boot.bin
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 100M
TFTP from server 192.168.0.112; our IP address is 192.168.0.180
Filename 'u-boot.bin'.
Load address: 0x64000000
Loading: #################################################################
         ########################################
done
Bytes transferred = 533576 (82448 hex)
Shuttle>> go 64000000
## Starting application at 0x64000000 ...


U-Boot 2013.10-g3a0f380-dirty (Feb 02 2015 - 18:04:05) for OXNAS

DRAM:  256 MiB
NAND:  128 MiB
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI error: ubi_read_volume_table: the layout volume was not found
UBI error: ubi_init: cannot attach mtd1
UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
UBI init error 22

** Cannot find mtd partition "ubi"
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:
Led:    GREEN
mii0
Warning: failed to set MAC address

IDE:   Bus 0: OK
  Device 0: Model: WDC WD5000AAKS-22V1A0  Firm: 05.01D05 Ser#:  WD-WCAWF8614536
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
  Device 1: Model: SAMSUNG HD502IJ  Firm: 1AA01118 Ser#: S13TJ90Z112563
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)
Main Loop
Hit any key to stop autoboot:  0
Wrong Image Format for bootm command

Led:    ORANGE (Failed)
ERROR: can't get kernel image!
Saving Environment to UBI...
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI error: ubi_read_volume_table: the layout volume was not found
UBI error: ubi_init: cannot attach mtd1
UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
UBI init error 22

** Cannot find mtd partition "ubi"
Error, no UBI device/partition selected!

NAND read: device 0 offset 0x4e0000, size 0x400000
 4194304 bytes read: OK
Wrong Image Format for bootm command

Led:    ORANGE (Failed)
ERROR: can't get kernel image!
ENET Speed is 0 Mbps - FULL duplex connection
*** ERROR: `ethaddr' not set

Led:    ORANGE (Failed)
OX820 #

And the problem is I'm some how not able to convert your uBoot to the right format to boot it from nand with vendors spl.


If I boot this exact uBoot via fat and spl from sata I get:
U-Boot SPL 2013.10-ga72eb8f-dirty (Feb 02 2015 - 20:40:37)
  Boot device: SATA
Attempting to set PLLA to 800 MHz ...
  plla_ctrl0 : 0000030a
  plla_ctrl1 : 00400000
  plla_ctrl2 : 007f0068
  plla_ctrl3 : 00000193

PLLA Set
SATA PHY not ready for device 1
Bus 0: OK
  Device 0:
  Device 1:
reading bootargs.bin
reading u-boot.img
reading u-boot.img


U-Boot 2013.10-g3a0f380-dirty (Feb 02 2015 - 18:04:05) for OXNAS

DRAM:  256 MiB
NAND:  128 MiB
UBI: attaching mtd1 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    129024 bytes
UBI: smallest flash I/O unit:    2048
UBI: sub-page size:              512
UBI: VID header offset:          512 (aligned 512)
UBI: data offset:                2048
UBI error: ubi_read_volume_table: the layout volume was not found
UBI error: ubi_init: cannot attach mtd1
UBI error: ubi_init: UBI error: cannot initialize UBI, error -22
UBI init error 22

** Cannot find mtd partition "ubi"
Using default environment

an here it stops :-/



Edited 4 time(s). Last edit at 02/02/2015 02:43PM by Peacemaker.
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
February 07, 2015 01:32PM
Peacemaker,

> Are you guessing that uBoot initial sata or do you
> know it, in my opinon the sata has to be preinit
> by spl

You dont need spl to init SATA if you boot from NAND.That's what I meant.

> If I boot this exact uBoot via fat and spl from
> sata I get:
>
> U-Boot SPL 2013.10-ga72eb8f-dirty (Feb 02 2015 -
> 20:40:37)
>   Boot device: SATA
> Attempting to set PLLA to 800 MHz ...
>   plla_ctrl0 : 0000030a
>   plla_ctrl1 : 00400000
>   plla_ctrl2 : 007f0068
>   plla_ctrl3 : 00000193
> 
> PLLA Set
> SATA PHY not ready for device 1

This is not important, since you are going to boot from the 1st SATA (device 0).


> Bus 0: OK
>   Device 0:
>   Device 1:
> reading bootargs.bin
> reading u-boot.img
> reading u-boot.img
> 
> 
> U-Boot 2013.10-g3a0f380-dirty (Feb 02 2015 -
> 18:04:05) for OXNAS
> 
> DRAM:  256 MiB
> NAND:  128 MiB
> UBI: attaching mtd1 to ubi0
> UBI: physical eraseblock size:   131072 bytes (128
> KiB)
> UBI: logical eraseblock size:    129024 bytes
> UBI: smallest flash I/O unit:    2048
> UBI: sub-page size:              512
> UBI: VID header offset:          512 (aligned
> 512)
> UBI: data offset:                2048
> UBI error: ubi_read_volume_table: the layout
> volume was not found
> UBI error: ubi_init: cannot attach mtd1
> UBI error: ubi_init: UBI error: cannot initialize
> UBI, error -22
> UBI init error 22
> 
> ** Cannot find mtd partition "ubi"
> Using default environment
> 
>
>
> an here it stops :-/

I think probably your u-boot envs need more work. Pls post them.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
February 08, 2016 01:30PM
It is possible to have both SATA up with 2013.10 stage1 and u-boot. At least this works with Akitio mycloud mini having OX820 and two sata connections too.

Do you need the files?

My problem is the serial driver needed for rtc. There is still some strange reset problem. Rtc works with first boot, but not any more with second (or other) boot time.
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
February 08, 2016 02:17PM
tilator,

> My problem is the serial driver needed for rtc.
> There is still some strange reset problem. Rtc
> works with first boot, but not any more with
> second (or other) boot time.

Which RTC does the Akitio uses? I forgot all about this subject! It would be helpful to post the serial console log of what you meant (if you need help troubleshooting it).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
February 08, 2016 02:44PM
> Which RTC does the Akitio uses? I forgot all about
> this subject!

It has Dallas ds1307. There is some "bitbangind" serial driver in front of it.

> It would be helpful to post the
> serial console log of what you meant (if you need
> help troubleshooting it).

I would like to have help here. Akitio original kernel must do some kind of reset to the serial controller. It boot's OK and any newer kernel does find this RTC if the device has been booted previously with the original kernel.

But - when ever it has been booted with newer kernel -> powered down and booted again with this newer kernel, the RTC can not be accessed. It does not help if power cord has been away for a while. Well - there is a battery for RTC and it might keep some bytes somewhere.

I'll put kernel log here in a while.
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
February 08, 2016 02:59PM
tilator,

> I would like to have help here. Akitio original
> kernel must do some kind of reset to the serial
> controller. It boot's OK and any newer kernel does
> find this RTC if the device has been booted
> previously with the original kernel.
>
> But - when ever it has been booted with newer
> kernel -> powered down and booted again with this
> newer kernel, the RTC can not be accessed.

We've seen similar problems with stock kernels form various vendors. Sometime they have problem in their kernels and kludge it in the start up script. That's why reboot keeps the correct settings, but cold start with new kernel does not have the correct settings. If you have the serial console boot log for stock kernel (the entire log from u-boot up until the Linux login prompt), we might see which extra commands were executed and get a really good hint.

BTW, does your new kernel have special Atikio DTS? which should show the Dallas RTC defined in there.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
February 10, 2016 02:33AM
tilator Wrote:
-------------------------------------------------------
> It is possible to have both SATA up with 2013.10
> stage1 and u-boot. At least this works with Akitio
> mycloud mini having OX820 and two sata connections
> too.
>
> Do you need the files?
>
> My problem is the serial driver needed for rtc.
> There is still some strange reset problem. Rtc
> works with first boot, but not any more with
> second (or other) boot time.

Would be nice, even if I some how stopped working on this nas.
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
February 10, 2016 12:09PM
> Would be nice, even if I some how stopped working
> on this nas.

So - here is OX820_boot.zip attached. It has SPL file and u-boot.

Just use DD to put the SPL file on your disk. Then put u-boot in first partition and /boot folder. Name it as u-boot.img.

B.T.W I just tested this 2013.10 SPL + U-boot. Both SATA ports and both USB ports find device as expected.



Edited 2 time(s). Last edit at 02/10/2016 12:29PM by tilator.
Attachments:
open | download - OX820_boot.zip (269.7 KB)
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
February 20, 2016 08:39AM
Hey tilator,
as I tried today your files: It's not working :-/
Is the partition needed in a special format (fat,ext2,3,4)? and may be you can share your sources as well?

Cheers Carl
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
March 16, 2016 03:22PM
Hi all,

I'll be getting a new KD20 to tinker with, before I had a NSA310 which I thought I'd never would want to use again.

Anyway, does the oxnas code address arm11 features in the kernel,encryption engine, and MMU?
Has anyone succeed in getting a full debian install in the 1Gb flash?
What toolchains do you use for kernels 4.x?
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
March 16, 2016 03:47PM
Thats nice, besides the KD20 is a sh*thole :-)
Besides arm11, I have now idea(no idea to test) and the flashsize is only 128mb (I know the secs said 1Gb).
As a toolchain I used armel and armhf from debian.

So to sum up all thinks:
+Debian is working from SATA & USB 2.0
-USB3.0 and SD is not working
-only Vendor Uboot is working good -> no kernel loading from USB
-overall nas performance poor

maybe you can solve some problems:-)
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
March 18, 2016 03:27PM
1Gb(it) = 128MB x8 :)

If it's that bad I won't have any second thoughts on opening it
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
March 22, 2016 03:04PM
tilator Wrote:
-------------------------------------------------------
> ...
> It has Dallas ds1307. There is some "bitbangind"
> serial driver in front of it.
>
The driver i2c-oxnas-bitbash configures the GPIO and inits the RTC.

Edit: you yourself (tilator) discovered this exactly in 2012???!?!?!?
https://archlinuxarm.org/forum/viewtopic.php?f=55&t=6193&start=200#p40472



Edited 1 time(s). Last edit at 03/22/2016 03:41PM by xander.
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
March 23, 2016 03:25AM
xander Wrote:
-------------------------------------------------------
> 1Gb(it) = 128MB x8 :)
>
> If it's that bad I won't have any second thoughts
> on opening it

I know, but let's say so: 1Gb is not realy much and the nand is not very fast as well -> put your root on a Disk or USB and this should be no problem.

My favor option was original to put rootfs on a SD-Card, but as I wrote SD + USB3.0 is not workingb (and I think both is on the usb3.0 bus)

Cheers
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
March 27, 2016 09:25AM
Peacemaker Wrote:
-------------------------------------------------------
> Hey tilator,
> as I tried today your files: It's not working :-/
> Is the partition needed in a special format
> (fat,ext2,3,4)? and may be you can share your
> sources as well?

Sorry, my SPL works only with device having 256MB RAM. I see you did try it with KD20 and I suppose there is 128MB RAM.

SPL should be compiled with correct settings to make it boot. Otherwise there should not be any trouble.
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
March 27, 2016 05:03PM
Nope KD20 has 256MiB RAM.
I got the original kernel sources, it doesn't compile out of the box (chokes on extern inline).

Also, when trying to diff the tree against vanilla 2.6.31.14 it seems patches have
been made throughout the entire tree OMG

Haven't gotten around to opening the package itself yet, but I got this bad feeling.
Is the pogoplug this hacky too?
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
March 28, 2016 02:27AM
xander Wrote:
-------------------------------------------------------
> Nope KD20 has 256MiB RAM.
> I got the original kernel sources, it doesn't
> compile out of the box (chokes on extern inline).

Xander: Kernel is no big deal for the KD20, besides usb3.0 and sd everything is working so far. And usb3.0 and SD is not fully not working but generates a kernelpanic.
You can just use the openwrt KD20 Patches for 4.1.18 or just use my kernel :-)

And this is more the thread for the Uboot :-), what is makes "more" problems but there are too easy option to handel with it:
1. just uses the vendor uboot, if you don't need ext4 oder usb kernel loading
2. stageload a newer one

> Also, when trying to diff the tree against vanilla
> 2.6.31.14 it seems patches have
> been made throughout the entire tree OMG

the KD20 Kernel is just full of propritary stuff and a big ****hole. Besides 2.6 is so old I see no point in deeper investigation.

> Haven't gotten around to opening the package
> itself yet, but I got this bad feeling.
> Is the pogoplug this hacky too?

The pogoplugs are real handsom, so no.
But for everything what is working its a pogo V3 with more ram and 2 sata

But maybe you can tell us your plans with the KD20, then I can give you an "adviese" if its worth it.

small application server: a bit slow -> a new pi2/3 or banana would be better
small nas: If you can live with 25-40 mb/s - go for it
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
March 28, 2016 02:31AM
tilator Wrote:

> Sorry, my SPL works only with device having 256MB
> RAM. I see you did try it with KD20 and I suppose
> there is 128MB RAM.
>
> SPL should be compiled with correct settings to
> make it boot. Otherwise there should not be any
> trouble.

I remembert that yo uhave to switch these lines in the ddr.c to get all the ram working:

//Config Parameters                                         R  D  C  8  M  Z   D CMD_MODE
//static const T_DDR_CONFIG_PARAMETERS C_CP_DDR2_25E_CL5  = { 2,16, 1, 0, 1, 32,25,0x80200A53}; // 64 MByte
static const T_DDR_CONFIG_PARAMETERS C_CP_DDR2_25E_CL5 = { 2, 16, 1, 1, 1, 64,
	25, 0x80200A53 }; // 128 MByte
static const T_DDR_CONFIG_PARAMETERS C_CP_DDR2_25_CL6 = { 2, 16, 1, 1, 1, 128,
	25, 0x80200A63 }; // 256 MByte
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
March 28, 2016 11:27AM
So I tried the ext4 boot with the 13.10 uboot again, but with the same results:

+ recognizes only 1 SATA
+ uboot freezes

Ubootlog:

SATA PHY not ready for device 1
Bus 0: OK Bus 1: not available
  Device 0:
** File not found /boot/bootargs.bin **


U-Boot 2013.10 (Mar 28 2016 - 18:11:27) for OXNAS

DRAM:  256 MiB
IDE:   SATA PHY not ready for device 1
Bus 0: OK
  Device 0: Model: HITACHI HTS723232A7A364  Firm: EC2ZB70B Ser#: E3834563JXKRRN
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)
  Device 1: not available
NAND:  128 MiB
** File not found /boot/u-boot.env **

** Unable to read "/boot/u-boot.env" from ide0:1 **
Using default environment

In:    serial
Out:   serial
Err:   serial
Net:   mii0
switch to net console

If someone is interesed in the sources just ask, then I'll upload them
Re: New uBoot for KD20 (OXNAS PLX 7821) [Dev]
March 29, 2016 03:01PM
ok, perhaps I do not understand correctly; the rootfs is loaded by the kernel, not uboot,
so why not flash a card-reader-working kernel to nand and keep the vendor u-boot.

wrt the card reader: did you try and disable Etron USB 3 in the kernel (or as module)? Card reader
seems to be connected to the Genesys IC, not the Etron
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: