Welcome! Log In Create A New Profile

Advanced

Debian on NSA320s - possible?

Posted by pengu 
Debian on NSA320s - possible?
July 24, 2015 04:36AM
Debian is running successful on my NSA310s, so I decided to do this on the NSA320s too but ther were some trouble:

None of my usb sticks were recognized at U-Boot stage including the SanDisk Cruizer Blade.


         __  __                      _ _                                                                                            
        |  \/  | __ _ _ ____   _____| | |                                                                                           
        | |\/| |/ _` | '__\ \ / / _ \ | |                                                                                           
        | |  | | (_| | |   \ V /  __/ | |                                                                                           
        |_|  |_|\__,_|_|    \_/ \___|_|_|                                                                                           
 _   _     ____              _                                                                                                      
| | | |   | __ )  ___   ___ | |_                                                                                                    
| | | |___|  _ \ / _ \ / _ \| __|                                                                                                   
| |_| |___| |_) | (_) | (_) | |_                                                                                                    
 \___/    |____/ \___/ \___/ \__|                                                                                                   
 ** MARVELL BOARD: DB6702A-GMtech LE                                                                                                
                                                                                                                                    
U-Boot 1.1.4 (Sep  3 2013 - 16:27:22) Marvell version: 3.6.0                                                                        
                                                                                                                                    
U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00                                                                                 
                                                                                                                                    
Soc: 88F6702 A1 CPU running @ 1000Mhz L2 running @ 500Mhz                                                                           
SysClock = 400Mhz , TClock = 166Mhz                                                                                                 
                                                                                                                                    
DRAM (DDR2) CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6                                                                                
DRAM CS[0] base 0x00000000   size 256MB                                                                                             
DRAM Total size 256MB  16bit width                                                                                                  
Addresses 10M - 0M are saved for the U-Boot usage.                                                                                  
Mem malloc Initialization (10M - 7M): Done                                                                                          
NAND:128 MB                                                                                                                         
Flash:  0 kB                                                                                                                        
                                                                                                                                    
CPU : Marvell Feroceon (Rev 1)                                                                                                      
Kernel address is 0xc80000.                                                                                                         
                                                                                                                                    
Streaming disabled                                                                                                                  
Write allocate disabled                                                                                                             
                                                                                                                                    
                                                                                                                                    
USB 0: host mode                                                                                                                    
PEX 0: interface detected no Link.                                                                                                  
Net:   egiga0 [PRIME]                                                                                                               
Hit any key to stop autoboot:  0

Now let's start the USB:


Marvell>> usb start                                                                                                                 
(Re)start USB...                                                                                                                    
USB:   scanning bus for devices... 2 USB Device(s) found                                                                            
Waiting for storage device(s) to settle before scanning...                                                                          
0 Storage Device(s) found
Marvell>> usb tree                                                                                                                  
                                                                                                                                    
Device Tree:                                                                                                                        
  1  Hub (480MBit/s, 0mA)                                                                                                           
  |  Marvell EHCI                                                                                                                   
  |                                                                                                                                 
  +-2  Hub (480MBit/s, 100mA)                                                                                                       
        USB2.0 Hub

Now let's (re) start the USB

Marvell>> usb start                                                                                                            
(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

or
Marvell>> 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



Marvell>> usb tree                                                                                                                  
                                                                                                                                    
Device Tree:                                                                                                                        
  1  Hub (12MBit/s, 0mA)                                                                                                            
     Marvell EHCI
all usb sticks were recongnized when ZyXEL OS is up and running.

The other Thing is:

I've updated the stock ZyXEL OS to 4.70, changed the U-Boot environment to boot debian (the default env is the same es on NSA310s) but now every second boot, the older ZyXEL OS is up.
On serial console I can't see why.

The third thing is, that the NSA320s will go on shortly If I connect the power supply.
when it's off after a half second I can power it on and it will stay on.
changing the power supply doesn't "help"

my kirkwood kernel builds
my oxnas kernel builds
Tvheadend Kirkwood Debian packages

my kirkwood devices:
- 1x hp t5325 (1,2 GHz, 88F6281 / 512 MB / 4x USB)

my oxnas devices
- 2x pogoplug

my dove devices
- 2x Chip PC LXD8541 (800 MHz, 88F510 / 1024 MB / 6x USB)
- 1x Wyse T50 (1,0 GHz, 88F510 / 1024 MB / 4x USB)

my amlogic devices
- several s905x / s912 devices

my x86 devices
Dell Optiplex 3020 (3,4 GHz, 2C/4T / Haswell / 4096 MB 2x Intel I210 / PicoPSU)
PC 1: (ASRock Z390 itx/ac / i3-8100, 3,6 GHZ, 2C / 4T / 32 GB RAM / Nanum SE-P180Q
PC 2: (ASRock Fatal1ty X470 Gaming-ITX/ac / Ryzen 5 2600, 3,4 GHz, 6C 12T / 32 GB RAM / Radeon RX550 2 GB / Be Quiet! BN229



Edited 4 time(s). Last edit at 07/30/2015 09:46AM by pengu.
Re: Debian on NSA320s - possible?
July 24, 2015 05:12AM
pengu,

1. Have you tried the port closest to the Ethernet port? When you see this, it is stock u-boot limitation with a very short time out when it scans for USB drives (in the new u-boot, I alleviated this by adding the env usb_ready_retry).

I've seen this a few times on the NSA325v2, the work around is instead of one "usb start" command, add multiple "usb restart" or "usb start" commands.

2. You could post the serial log for the 2nd problem

3. I guess this is the initial watchdog. It really does not cause problem. But when we start using new u-boot, it will need to be taken cared of the same way that the NSA325v2 was.

Btw, to check UART booting capability, you could use the NSA325 small u-boot to start it. It will not run, but you will be able to see if the image is loaded by the boot ROM or not.

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



Edited 1 time(s). Last edit at 07/24/2015 05:16AM by bodhi.
Re: Debian on NSA320s - possible?
July 24, 2015 05:25AM
bodhi Wrote:
-------------------------------------------------------
> pengu,
>
> 1. Have you tried the port closest to the Ethernet
> port? When you see this, it is stock u-boot
> limitation with a very short time out when it
> scans for USB drives (in the new u-boot, I
> alleviated this by adding the env
> usb_ready_retry).

>Yes, I have and also changed the usb_rootdelay --> NSA310s thread, no luck
>
> I've seen this a few times on the NSA325v2, the
> work around is instead of one "usb start" command,
> add multiple "usb restart" or "usb start"
> commands.

"usb start" "usb resat" gives the same result
no usb stick is recognized and after the second usb start / usb reset .. only one usb port is "left"


some more deteils about the NSA320s

the pcb:

http://postimg.org/image/3nn34gs0b/
http://postimg.org/image/3nn34gs0b/full/

the lan chip:
http://abload.de/img/nsa320s_lank1sdr.jpg


default U-Boot env
http://pastebin.com/0zMkGRs7

modified U-Boot env to boot debian:
http://pastebin.com/U3GxdnZs

>
> 2. You could post the serial log for the 2nd
> problem

here comes the bootlogs:

NSA320s with firmware V4.61(AANV.0)
http://pastebin.com/raw.php?i=3jf02iai

NAND read: device 0 offset 0xc80000, size 0xa00000 
Bad block at 0xc80000 in erase block from 0xc80000 will be skipped

NSA320s with firmware V4.70(AANV.1)
http://pastebin.com/raw.php?i=DTnexwKS

Erasing Nand...Writing to Nand... done�!�}� __                      _ _

after resetting, it tries to boot up again but this isn't successful
NAND read: device 0 offset 0x4640000, size 0xa00000                                                                                 
                                                                                                                                    
Reading data from 0x503f800 -- 100% complete.                                                                                       
 10485760 bytes read: OK                                                                                                            
## Booting image at 02000000 ...                                                                                                    
   Image Name:   Linux-2.6.31.8                                                                                                     
   Created:      2014-04-07   3:26:07 UTC                                                                                           
   Image Type:   ARM Linux Kernel Image (uncompressed)                                                                              
   Data Size:    5910836 Bytes =  5.6 MB                                                                                            
   Load Address: 00008000                                                                                                           
   Entry Point:  00008000                                                                                                           
   Verifying Checksum ... OK                                                                                                        


Uncompressing Linux.................................................................................................................

the third boot is successful and the V4.70 is up and running.
seems that it tries to boot from different offsetz but why?

Device 0 bad blocks:                                                                                                                
  00c80000                                                                                                                          
  01900000



Edited 7 time(s). Last edit at 07/24/2015 09:10AM by pengu.
Re: Debian on NSA320s - possible?
July 24, 2015 04:13PM
Hi pengu,

The NAND bad blocks are OK since they are managed by the filesystem on top in the case of stock OS booting.

Your env for USB booting could be improved so that it will short circuit the USB booting sequence if uImage is not found (note that the below is a quick fix, it should be a little more refined):
setenv usb_boot 'mw 0x800000 0 1; if run usb_load_uimage; then run usb_load_uinitrd; bootm 0x800000 0x1100000; fi'

The issue with USB needs a little bit more set up to work around with stock u-boot. I recall WarheadsSE or somebody did something for that, but I can't find the posts.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA320s - possible?
July 24, 2015 06:01PM
yes, there were only one reset now after the nand write
but it boots sometimes the first and sometimes the second kernel and os as described
I could overwrite the older one (kernel, rootfs) so it doesn't matter.

an other option is to write the uImage to nand and boot it from there but this could be the same as above
sometimes debian is up and running, sometimes Zyxel OS

working usb is the better solution
Re: Debian on NSA320s - possible?
July 24, 2015 07:25PM
pengu.

> working usb is the better solution

Did you do anything differently on the NSA310S?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA320s - possible?
July 25, 2015 01:38AM
bodhi Wrote:
-------------------------------------------------------
> pengu.

> Did you do anything differently on the NSA310S?

No
NSA320s - kwboot - success?
July 26, 2015 06:27AM
I tried kwboot on NSA320s again
first powered on the device, than it goes off (watchdog?)
right after powering on egain, kwboot is loading the image but this does not complete several times

./kwboot -t -B 115200 /dev/ttyUSB0 -b /data/uboot.2013.10-tld-1-test.nsa325.uart.kwb
Sending boot message. Please reboot the target...-
Sending boot image...
  0 % [......................................................................]
  3 % [......................................................................]
  5 % [......................................................................]
  8 % [......................................................................]
 11 % [......................................................................]
 14 % [......................................................................]
 17 % [......................................................................]
 20 % [......................................................................]
 23 % [......................................................................]
 26 % [......................................................................]
 29 % [......................................................................]
 32 % [......................................................................]
 35 % [......................................................................]
 38 % [......................................................................]
 41 % [......................................................................]
 44 % [......................................................................]
 47 % [......................................................................]
 50 % [......................................................................]
 53 % [......................................................................]
 56 % [......................................................................]
 59 % [......................................................................]
 62 % [......................................................................]
 65 % [......................................................................]
 68 % [......................................................................]
 71 % [......................................................................]
 74 % [......................................................................]
 77 % [......................................................................]
 80 % [......................................................................]
 83 % [......................................................................]
 85 % [......................................................................]
 88 % [......................................................................]
 91 % [......................................................................]
 94 % [......................................................................]
 97 % [.....................................................]
[Type Ctrl-\ + c to quit]



Edited 3 time(s). Last edit at 07/27/2015 04:39AM by pengu.
Re: NSA320s - kwboot - success?
July 26, 2015 01:31PM
pengu,

> I tried kwboot on NSA320s again
> first powered on the device, than it goes off
> (watchdog?)

Yes, it seems likely to be the watchdog.

> right after powering on egain, kwboot is loading
> the image but this does not complete several
> times

It did complete loading the image when you see
[Type Ctrl-\ + c to quit]
Sometime if your network is noisy, it could effect the loading time. It should help if the terminal session (where you run kwboot) is on a box that is connected to the same switch/router that the target (i.e. NSA320s) is connected to.

This u-boot image is for the NSA325, so I expected that it will not execute. We need to build new u-boot to run it properly on this SoC. Next week when I have some time I will attempt building one!

However, this test proved that the NSA320S has UART booting capability. So it's encouraging because it is most likely an available rescue path.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NSA320s - kwboot - success?
July 26, 2015 05:51PM
bodhi Wrote:
-------------------------------------------------------

> It did complete loading the image when you see
>
> [Type Ctrl-\ + c to quit]
>

but it doesn't start

> Sometime if your network is noisy, it could effect
> the loading time. It should help if the terminal
> session (where you run kwboot) is on a box that is
> connected to the same switch/router that the
> target (i.e. NSA320s) is connected to.

all devices are connected to the same switch

> However, this test proved that the NSA320S has
> UART booting capability. So it's encouraging
> because it is most likely an available rescue
> path.

the NSA310s too, I'll see later
Re: NSA320s - kwboot - success?
July 26, 2015 06:31PM
pengu,

> but it doesn't start

Of course, it will not. I hope I'm making sense above :)

Quote

This u-boot image is for the NSA325, so I expected that it will not execute. We need to build new u-boot to run it properly on this SoC. Next week when I have some time I will attempt building one!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA320s - uart boot stock nsa310s u-boot
July 30, 2015 08:04AM
./kwboot -t -B 115200 /dev/ttyUSB0 -b u-boot-1.1.4-bodhi.nsa310s.uart.bin 
Sending boot message. Please reboot the target...\
Sending boot image...
  0 % [......................................................................]
  1 % [......................................................................]
  3 % [......................................................................]
  5 % [......................................................................]
  7 % [......................................................................]
  9 % [......................................................................]
 11 % [......................................................................]
 13 % [......................................................................]
 15 % [......................................................................]
 16 % [......................................................................]
 18 % [......................................................................]
 20 % [......................................................................]
 22 % [......................................................................]
 24 % [......................................................................]
 26 % [......................................................................]
 28 % [......................................................................]
 30 % [......................................................................]
 32 % [......................................................................]
 33 % [......................................................................]
 35 % [......................................................................]
 37 % [......................................................................]
 39 % [......................................................................]
 41 % [......................................................................]
 43 % [......................................................................]
 45 % [......................................................................]
 47 % [......................................................................]
 49 % [......................................................................]
 50 % [......................................................................]
 52 % [......................................................................]
 54 % [......................................................................]
 56 % [......................................................................]
 58 % [......................................................................]
 60 % [......................................................................]
 62 % [......................................................................]
 64 % [......................................................................]
 65 % [......................................................................]
 67 % [......................................................................]
 69 % [......................................................................]
 71 % [......................................................................]
 73 % [......................................................................]
 75 % [......................................................................]
 77 % [......................................................................]
 79 % [......................................................................]
 81 % [......................................................................]
 82 % [......................................................................]
 84 % [......................................................................]
 86 % [......................................................................]
 88 % [......................................................................]
 90 % [......................................................................]
 92 % [......................................................................]
 94 % [......................................................................]
 96 % [......................................................................]
 97 % [......................................................................]
 99 % [.......]
[Type Ctrl-\ + c to quit]

         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__| 
 ** MARVELL BOARD: DB6702A-GMtech LE 

U-Boot 1.1.4 (Jul 28 2015 - 21:10:06) Marvell version: 3.6.0

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00

Soc: 88F6702 A1 CPU running @ 1000Mhz L2 running @ 500Mhz
SysClock = 400Mhz , TClock = 166Mhz 

DRAM (DDR2) CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB 
DRAM Total size 256MB  16bit width
Addresses 10M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (10M - 7M): Done
NAND:128 MB
Flash:  0 kB

CPU : Marvell Feroceon (Rev 1)
Kernel address is 0x4640000.

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0

Marvell>> setenv setenv' - try 'help'
Marvell>> setenv serverip 192.168.1.112
Marvell>> setenv ipaddr 192.168.1.200
Marvell>> ping 192.168.1.112
Using egiga0 device
host 192.168.1.112 is alive



Edited 2 time(s). Last edit at 07/30/2015 08:28AM by pengu.
Re: Debian on NSA320s - uart boot stock nsa310s u-boot
July 30, 2015 09:41AM
now let's boot via TFTP
Marvell>> setenv bootargs 'console=ttyS0,115200 root=LABEL=rootfs rootfstype=ext4'

Marvell>> tftp 0x800000 nsa320s/uImage
Using egiga0 device
TFTP from server 192.168.1.112; our IP address is 192.168.1.200

Filename 'nsa320s/uImage'.
Load address: 0x800000
Loading: #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #############
done
Bytes transferred = 3061593 (2eb759 hex)

Marvell>> tftp 0x1100000 nsa320s/uInitrd
Using egiga0 device
TFTP from server 192.168.1.112; our IP address is 192.168.1.200
Filename 'nsa320s/uInitrd'.
Load address: 0x1100000
Loading: #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ##########################
done
Bytes transferred = 7119407 (6ca22f hex)

Marvell>> bootm 0x800000 0x1100000

the bootlog:
http://pastebin.com/UNYVYn7p
Re: Debian on NSA320s - uart boot stock nsa310s u-boot
July 30, 2015 02:51PM
pengu,

Thanks for confirming UART booting works!

I saw you've responded on the other thread about the "no link" problem with the 320S.

So to make sure I understood what you've tested:

- Boot with NAND stock u-boot, and Zyxel OS.
- Reboot into NAND stock u-boot, Debian 4.1
- shutdown -h now
- Start with Power button, let it boot all the ways into Debian 4.1

And at this point the link is up and at 1000Mbs?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA320s - uart boot stock nsa310s u-boot
July 30, 2015 03:25PM
bodhi Wrote:
-------------------------------------------------------
> pengu,
>
> Thanks for confirming UART booting works!
>
> I saw you've responded on the other thread about
> the "no link" problem with the 320S.

yes ;-)

> So to make sure I understood what you've tested:

> - Boot with NAND stock u-boot, and Zyxel OS.
> - Reboot into NAND stock u-boot, Debian 4.1
> - shutdown -h now
> - Start with Power button, let it boot all the
> ways into Debian 4.1

with stock U-Boot it's as described in the other thread.
Booting debian via USB and TFTP isn't posible with it, I have do flash the kernel stuff into NAND.
with your NSA310s uart U-Boot, the link is up with 1000 baseT-FD in and I can boot via TFTP as I did.
Re: Debian on NSA320s - uart boot stock nsa310s u-boot
July 30, 2015 03:41PM
pengu,

> Booting debian via USB and TFTP isn't posible with
> it, I have do flash the kernel stuff into NAND.
> with your NSA310s uart U-Boot, the link is up with
> 1000 baseT-FD in and I can boot via TFTP as I did.

Did you do the same sequence with my built NSA310s uart U-Boot? meaning starting kwboot so it spinning and waiting, and then press the power button. The link is still dead when I did on the NSA310S. I expected it because nothing was changed from their GPL source.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA320s - uart boot stock nsa310s u-boot
July 31, 2015 01:43AM
it's quite different:
I'm starting kwboot first, then powering on the device and it loads.
this seems to interrupt the thing mentioned earler
The NSA320s doesn't go off again as without kwboot and I don't have to manually power it on again.
Re: Debian on NSA320s - uart boot stock nsa310s u-boot
July 31, 2015 01:53AM
pengu Wrote:
-------------------------------------------------------
> it's quite different:
> I'm starting kwboot first, then powering on the
> device and it loads.
> this seems to interrupt the thing mentioned
> earler
> The NSA320s doesn't go off again as without kwboot
> and I don't have to manually power it on again.

Sorry I don't quite understand what you meant! but I guess the bottom line is that it does not have the same "no link problem" as with the NSA310S?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA320s - uart boot stock nsa310s u-boot
July 31, 2015 02:05AM
no problems when starting debian from the uart NSA310s U-Boot
To try this with stock U-Boot I have to flash the kernel stuff into nand or boot from HDD
Re: Debian on NSA320s - possible?
July 31, 2015 04:46AM
shootdown isn't working

[ ok ] Unmounting temporary filesystems...done.
[ ok ] Deactivating swap...done.
[ ok ] Unmounting local filesystems...done.
[  747.031241] EXT4-fs (sda3): re-mounted. Opts: (null)
[info] Will now halt.
logger: Will halt - now
[  749.222476] sd 2:0:0:0: [sda] Synchronizing SCSI cache
[  749.229184] reboot: Power down
[  752.418423] ------------[ cut here ]------------
[  752.423036] WARNING: CPU: 0 PID: 4244 at drivers/power/reset/gpio-poweroff.c:45 SyS_reboot+0x14c/0x1f8()
[  752.432473] Modules linked in: nls_utf8 nls_cp437 vfat fat ipv6 adt7475 hwmon_vid evdev orion_wdt hmac mv_cesa uio_pdrv_genirq uio gpio_keys sg sd_mod uas usb_storage sata_mv libata fixed scsi_mod
[  752.450061] CPU: 0 PID: 4244 Comm: halt Not tainted 4.0.0-kirkwood-tld-2 #1
[  752.456985] Hardware name: Marvell Kirkwood (Flattened Device Tree)
[  752.463248] [<c0014fcc>] (unwind_backtrace) from [<c00114dc>] (show_stack+0x10/0x14)
[  752.470973] [<c00114dc>] (show_stack) from [<c001dec4>] (warn_slowpath_common+0x88/0xb0)
[  752.479037] [<c001dec4>] (warn_slowpath_common) from [<c001df7c>] (warn_slowpath_null+0x18/0x20)
[  752.487788] [<c001df7c>] (warn_slowpath_null) from [<c003851c>] (SyS_reboot+0x14c/0x1f8)
[  752.495849] [<c003851c>] (SyS_reboot) from [<c000e060>] (ret_fast_syscall+0x0/0x30)
[  752.503470] ---[ end trace 1b39e37839214d26 ]---

Re: Debian on NSA320s - possible?
July 31, 2015 07:44AM
pengu Wrote:
-------------------------------------------------------
> shootdown isn't working
>
>
> [ ok ] Unmounting temporary filesystems...done.
> [ ok ] Deactivating swap...done.
> [ ok ] Unmounting local filesystems...done.
> [  747.031241] EXT4-fs (sda3): re-mounted. Opts:
> (null)
> [info] Will now halt.
> logger: Will halt - now
> [  749.222476] sd 2:0:0:0: [sda] Synchronizing
> SCSI cache
> [  749.229184] reboot: Power down
> [  752.418423] ------------[ cut here
> ]------------
> [  752.423036] WARNING: CPU: 0 PID: 4244 at
> drivers/power/reset/gpio-poweroff.c:45
> SyS_reboot+0x14c/0x1f8()
> [  752.432473] Modules linked in: nls_utf8
> nls_cp437 vfat fat ipv6 adt7475 hwmon_vid evdev
> orion_wdt hmac mv_cesa uio_pdrv_genirq uio
> gpio_keys sg sd_mod uas usb_storage sata_mv libata
> fixed scsi_mod
> [  752.450061] CPU: 0 PID: 4244 Comm: halt Not
> tainted 4.0.0-kirkwood-tld-2 #1
> [  752.456985] Hardware name: Marvell Kirkwood
> (Flattened Device Tree)
> [  752.463248] [<c0014fcc>] (unwind_backtrace)
> from [<c00114dc>] (show_stack+0x10/0x14)
> [  752.470973] [<c00114dc>] (show_stack) from
> [<c001dec4>] (warn_slowpath_common+0x88/0xb0)
> [  752.479037] [<c001dec4>] (warn_slowpath_common)
> from [<c001df7c>] (warn_slowpath_null+0x18/0x20)
> [  752.487788] [<c001df7c>] (warn_slowpath_null)
> from [<c003851c>] (SyS_reboot+0x14c/0x1f8)
> [  752.495849] [<c003851c>] (SyS_reboot) from
> [<c000e060>] (ret_fast_syscall+0x0/0x30)
> [  752.503470] ---[ end trace 1b39e37839214d26
> ]---
> 
>

That's strange. It works on the 310S then it should work on the 320S. The error indicates that it might have taken too long for the box to power off.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA320s - possible?
August 11, 2015 08:18AM
tried to move further on but no luck
I have put uImage and uInitrd into NAND but it can't boot.
the uImage gets loadet (with errors) but not the initrd.

I also tried loading some U-Boot files but most of them didn't start.

only the cloud engines U-Boot seems to work but don't have USB support


U-Boot 1.1.4 (Jul 16 2009 - 21:02:16) Cloud Engines (3.4.16)

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 00690D60

Soc: MV88F6192 Rev 3 (DDR2)
CPU running @ 1000Mhz L2 running @ 500Mhz
SysClock = 0Mhz , TClock = 166Mhz 

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 128MB 
DRAM Total size 128MB  16bit width
Flash:  0 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:128 MB
*** Warning - bad CRC or NAND, using default environment


CPU : Marvell Feroceon (Rev 1)
CLOUD ENGINES BOARD (GUESSED): REDSTONE:0.1

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0

another one tries to init USB but sane es the stock NSA320s/NSA310s U-Boot


	 -- NAS EXPLORER --
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__| 
 ** QSI BOARD: NAS-PLUG LE 

U-Boot 1.1.4 (Jun 10 2010 - 08:28:13) Marvell version: 3.4.27
QSI NAS version: 1.0.4

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00

Soc: 88F6192 A1 (DDR2)
CPU running @ 1000Mhz L2 running @ 500Mhz
SysClock = 0Mhz , TClock = 166Mhz 

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 128MB 
DRAM Total size 128MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:128 MB
*** Warning - bad CRC or NAND, using default environment

Flash:  0 kB

CPU : Marvell Feroceon (Rev 1)

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME]
<Explorer> Enter USB firmware instllation by RESET IO.
USB:   scanning bus for devices... 2 USB Device(s) found
0 Storage Device(s) found
<Explorer> Firmware installation error(2)!
<Explorer> Please power off system retry again!
Re: Debian on NSA320s - possible?
August 11, 2015 03:05PM
@pengu,

I thought you were successful booting UART with rebuilt stock 310s u-boot here:
http://forum.doozan.com/read.php?2,22847,22966#msg-22966

Did this image load the kernel from USB? how was rootfs mounting? did it boot all the way to Debian?

Please post entire serial console boot log in this test to recap how far you've got, and what is the remaining problem. TBH, I have a difficult time keeping track of your trend of thoughts :) you're trying too many things at once. Don't bother trying other u-boots, ones you've just tried would never work because different SoC, different timing.

Update:

I'm guessing the remaining problem is stock u-boot on NSA320s does not load kernel from USB? so the behavior is different between stock NSA310s u-boot in NAND and stock NSA320s u-boot in NAND?

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



Edited 1 time(s). Last edit at 08/11/2015 03:18PM by bodhi.
Re: Debian on NSA320s - possible?
August 11, 2015 04:18PM
bodhi Wrote:
-------------------------------------------------------
> @pengu,

> http://forum.doozan.com/read.php?2,22847,22966#msg
> -22966
let's see if this changes something.
with stock U-Boot usb booting isn't possible, the same with stock NSA310s U-Boot via uart

TBH, I have a difficult time
> keeping track of your trend of thoughts :) you're
> trying too many things at once. Don't bother
> trying other u-boots, ones you've just tried would
> never work because different SoC, different
> timing.


> I'm guessing the remaining problem is stock u-boot
> on NSA320s does not load kernel from USB? so the
> behavior is different between stock NSA310s u-boot
> in NAND and stock NSA320s u-boot in NAND?


stock NSA320s and NSA310s U-Boot behave the same un NSA320s


Don't bother
> trying other u-boots, ones you've just tried would
> never work because different SoC, different
> timing.

I know ;-)


TBH, I have a difficult time
> keeping track of your trend of thoughts :) you're
> trying too many things at once.

you'll see what's next.
I hope that the meintioned U-Boot would solve the USB thing
sometimes I need some success so if one way is closed I try another
Re: Debian on NSA320s - possible?
August 11, 2015 04:30PM
Quote

> I'm guessing the remaining problem is stock u-boot
> on NSA320s does not load kernel from USB? so the
> behavior is different between stock NSA310s u-boot
> in NAND and stock NSA320s u-boot in NAND?


stock NSA320s and NSA310s U-Boot behave the same un NSA320s

OK. Here I don't understand the problem. Stock 310s u-boot boots USB kernel/rootfs fine. Does stock 320S u-boot?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA320s - possible?
August 11, 2015 04:47PM
sorry for confusing.
the NSA310s U-Boot behave the same.
no USB boot is possible

wen plugging a usb stick wich LED and powering up the device it lights up
but goes off when U-Boot starts up
it stays off when starting USB.

It's the same via kwboot (loading the NSA310s U-Boot)

./kwboot -t -B 115200 /dev/ttyUSB0 -b u-boot-1.1.4-bodhi.nsa310s.uart.bin -p  
Sending boot message. Please reboot the target...\
Sending boot image...
  0 % [......................................................................]
  1 % [......................................................................]
  3 % [......................................................................]
  5 % [......................................................................]
  7 % [......................................................................]
  9 % [......................................................................]
 11 % [......................................................................]
 13 % [......................................................................]
 15 % [......................................................................]
 16 % [......................................................................]
 18 % [......................................................................]
 20 % [......................................................................]
 22 % [......................................................................]
 24 % [......................................................................]
 26 % [......................................................................]
 28 % [......................................................................]
 30 % [......................................................................]
 32 % [......................................................................]
 33 % [......................................................................]
 35 % [......................................................................]
 37 % [......................................................................]
 39 % [......................................................................]
 41 % [......................................................................]
 43 % [......................................................................]
 45 % [......................................................................]
 47 % [......................................................................]
 49 % [......................................................................]
 50 % [......................................................................]
 52 % [......................................................................]
 54 % [......................................................................]
 56 % [......................................................................]
 58 % [......................................................................]
 60 % [......................................................................]
 62 % [......................................................................]
 64 % [......................................................................]
 65 % [......................................................................]
 67 % [......................................................................]
 69 % [......................................................................]
 71 % [......................................................................]
 73 % [......................................................................]
 75 % [......................................................................]
 77 % [......................................................................]
 79 % [......................................................................]
 81 % [......................................................................]
 82 % [......................................................................]
 84 % [......................................................................]
 86 % [......................................................................]
 88 % [......................................................................]
 90 % [......................................................................]
 92 % [......................................................................]
 94 % [......................................................................]
 96 % [......................................................................]
 97 % [......................................................................]
 99 % [.......]
[Type Ctrl-\ + c to quit]

         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__| 
 ** MARVELL BOARD: DB6702A-GMtech LE 

U-Boot 1.1.4 (Jul 28 2015 - 21:10:06) Marvell version: 3.6.0

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00

Soc: 88F6702 A1 CPU running @ 1000Mhz L2 running @ 500Mhz
SysClock = 400Mhz , TClock = 166Mhz 

DRAM (DDR2) CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB 
DRAM Total size 256MB  16bit width
Addresses 10M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (10M - 7M): Done
NAND:128 MB
Flash:  0 kB

CPU : Marvell Feroceon (Rev 1)
Kernel address is 0xc80000.

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0 
Marvell>> 
Marvell>> 
Marvell>> 
Marvell>> usb start
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
0 Storage Device(s) found
Marvell>> usb tree

Device Tree:
  1  Hub (480MBit/s, 0mA)
  |  Marvell EHCI 
  |
  +-2  Hub (480MBit/s, 100mA)
        USB2.0 Hub 
     
Marvell>> 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
Marvell>> usb tree

Device Tree:
  1  Hub (12MBit/s, 0mA)
     Marvell EHCI 
   
Marvell>> 



Edited 1 time(s). Last edit at 08/11/2015 05:08PM by pengu.
Re: Debian on NSA320s - possible?
August 11, 2015 05:25PM
pengu,

> the NSA310s U-Boot behave the same.
> no USB boot is possible

So your problem is not with u-boot! because I am booting my NSA310s with USB.

Perhaps you should try with a different USB stick. If you do "usb start" when the stick is plugged in, and you see this
Marvell>> usb start
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
0 Storage Device(s) found
Do
> reset

And try again

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA320s - possible?
August 11, 2015 05:49PM
bodhi Wrote:
-------------------------------------------------------
> pengu,
>
> > the NSA310s U-Boot behave the same.
> > no USB boot is possible
>
> So your problem is not with u-boot! because I am
> booting my NSA310s with USB.

yes, USB boot is no problem on NSA310s


> Perhaps you should try with a different USB stick.
> If you do "usb start" when the stick is plugged
> in, and you see this
>
> Marvell>> usb start
> (Re)start USB...
> USB:   scanning bus for devices... 2 USB Device(s)
> found
> Waiting for storage device(s) to settle before
> scanning...
> 0 Storage Device(s) found
>
> Do
>
> > reset
>
>
> And try again

no matter wich stick I use, it isn't recognized.
(same on NSA325v2 with stock U-Boot)

on both devices, the following is also the same:

the first "usb start" shows no usb storage even if I plug one in every usb port
second: when issuing "usb start" again .. _or_ "usb reset" the usb subsystem breaks down
you'll see one device, not two or three

this could only be fixed by resetting the box
Re: Debian on NSA320s - possible?
August 11, 2015 06:18PM
pengu,

Quote

> yes, USB boot is no problem on NSA310s

Checked.

Quote

> no matter wich stick I use, it isn't recognized.
> (same on NSA325v2 with stock U-Boot)
>
> on both devices, the following is also the same:
>
> the first "usb start" shows no usb storage even if
> I plug one in every usb port
> second: when issuing "usb start" again .. _or_
> "usb reset" the usb subsystem breaks down
> you'll see one device, not two or three
>
> this could only be fixed by resetting the box

OK. Now I understood the problem clearly. I recalled this problem was reported long ago. IIRC, the USB power needs to be activated by a memory poke. Let's see if I can find it.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on NSA320s - possible?
August 11, 2015 06:32PM
pengu,

Try this on NSA325v2 stock u-boot:

mw.l f1010100 0020c000
usb start

It should be the same in NSA320s. However, please make sure you do this on NSA320s while no other device is attached to the box, only the USB stick, as a precaution (I have not checked the source code to see if there is any differences in the 320s vs 325 at this memory location).

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



Edited 1 time(s). Last edit at 08/11/2015 06:33PM by bodhi.
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: