installing debian on nsa310?
September 01, 2015 07:20AM
Hi all,

The last couple of days I have been trying to install debian to my little box.
However it seems the guides arround the net uses an kernel that is no longer supported by mirrors.

Sep 1 11:46:38 anna[1906]: WARNING **: no packages matching running kernel 3.5.1 in archive

I have tried uimage-3.2 and uimage-3.5.1
building my own kernel is too complicated for me.

Is there some place I can find a working uImage and initrd.gz?

Thank you
Jakob Vejlbjerg



Edited 1 time(s). Last edit at 09/01/2015 07:22AM by Fotex.
Re: installing debian on nsa310?
September 01, 2015 12:15PM
Fotex Wrote:
-------------------------------------------------------
> Hi all,
>
> The last couple of days I have been trying to
> install debian to my little box.
> However it seems the guides arround the net uses
> an kernel that is no longer supported by mirrors.
>
> Sep 1 11:46:38 anna[1906]: WARNING **: no
> packages matching running kernel 3.5.1 in archive
>
>
> I have tried uimage-3.2 and uimage-3.5.1
> building my own kernel is too complicated for me.
>
> Is there some place I can find a working uImage
> and initrd.gz?
>
> Thank you
> Jakob Vejlbjerg

This kernel should work fine (I forgot to edit the list of supported boxes):
http://forum.doozan.com/read.php?2,12096

And it is best to use the 3.16 rootfs initially to install on your box. And upgrade later.

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



Edited 1 time(s). Last edit at 09/01/2015 12:18PM by bodhi.
Re: installing debian on nsa310?
September 01, 2015 12:54PM
Hey
Thanks for your reply
Im not quite sure, but if I get this right I have to make the uimage and initrd
from linux-3.16.0-kirkwood-tld-3-bodhi.tar.bz2?
Can I do that when my nsa cant boot standard firmware? (I have usb>ttl access to the box)

Jakob Vejlbjerg
Re: installing debian on nsa310?
September 01, 2015 05:04PM
Best to take the Debian rootfs 3.16-kirkwood-tld-2 (scroll down to Sept 2, 2014 section). Put it on USB drive following the instruction. And boot with it (some u-boot envs adjustment needed if you have not done so to boot with USB).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: installing debian on nsa310?
September 02, 2015 03:26PM
Hey
Can I make your script do the config of uboot, im not sure how to adjust it myself.
(and if it can, do I need more than one usbstick?).
I only got one 16gb containing the rootfs 3.16-kirkwood-tld-2
The box is a A203 running U-Boot 1.1.4 (Feb 22 2011 - 10:31:35) Marvell version: 3.4.19

Or is it simple to set the u-boot envs?
I did set this

setenv mainlineLinux yes
setenv arcNumber 4022
saveenv


Thanks again.
Re: installing debian on nsa310?
September 02, 2015 04:06PM
I've made a script to do this
but sometimes the U-Boot env gets hosed so I do this within U-Boot
Re: installing debian on nsa310?
September 02, 2015 04:47PM
Fotex Wrote:
-------------------------------------------------------
> Hey
> Can I make your script do the config of uboot, im
> not sure how to adjust it myself.
> (and if it can, do I need more than one
> usbstick?).
> I only got one 16gb containing the rootfs
> 3.16-kirkwood-tld-2
> The box is a A203 running U-Boot 1.1.4 (Feb 22
> 2011 - 10:31:35) Marvell version: 3.4.19
>
> Or is it simple to set the u-boot envs?
> I did set this
>
> setenv mainlineLinux yes
> setenv arcNumber 4022
> saveenv
>
>
> Thanks again.

If you meant modifyng Jeff's script (I dont have any script), then it does make sense (it is robust and poweful). But otherwise, dont flash u-boot from a simple script, because if something goes wrong it is easier to recover if you just executing each command by copy/paste, following instruction.

So read the u-boot instruction first, if you are not sure about something , post the quesions.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: installing debian on nsa310?
September 02, 2015 11:44PM
Fotex,


Perhaps I've misunderstood your question.

> Or is it simple to set the u-boot envs?
> I did set this
>
> setenv mainlineLinux yes
> setenv arcNumber 4022
> saveenv
>

There are more to be done. Interrupt serial console and list your envs here:
printenv

And tell us if you have created the 3.16 rootfs on a USB drive following instruction exactly?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: installing debian on nsa310?
September 03, 2015 10:51AM
Hey Yes I followed the instruction from 2 september 14 to make the usb containing rootfs from 3.16-kirkwood-tld-2

But Im unsure how to set the env for uboot.
This is the printenv:

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

U-Boot 1.1.4 (Feb 22 2011 - 10:31:35) Marvell version: 3.4.19

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

Soc: 88F6281 A1 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz , TClock = 200Mhz

DRAM 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

Module 0 is RGMII
Module 1 is TDM

USB 0: host mode
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
Net: egiga0, egiga1 [PRIME]
Hit any key to stop autoboot: 0
NSA310>> printenv
bootcmd=nand read.e 0x2000000 $(kernel_addr) 0xA00000; bootm 0x2000000
bootdelay=2
baudrate=115200
loads_echo=0
ethaddr=00:19:CB:00:51:81
eth1addr=00:19:CB:00:51:82
ipaddr=10.4.50.165
serverip=10.4.50.5
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
nandEcc=1bit
MODEL_ID=DA01
PRODUCT_NAME=NSA-310
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=ZyXEL Communications Corp.
run_diag=yes
console=100000
=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
CASset=min
ethprime=egiga1
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
ethmtu=1500
eth1mtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
arcNumber=4022
MALLOC_len=3
usb_init="usb start
usb_root=LABEL=rootfs"
usb_load_uimage=ext2load=usb 0:1 0x800000 /boot/uImage
usb_load_uinitrd=ext2load=usb 0:1 0x1100000 /boot/uInitrd
bootargs=console=ttyS0,115200=mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_enbaudrate=115200
stdin=serial
stdout=serial
stderr=serial
nandEnvBase=100000
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
disaMvPnp=no
hddPowerCtrl=no
enaAutoRecovery=yes
kernel_addr=0xc80000
pcieTune=no
ethact=egiga1

Environment size: 1623/131068 bytes
NSA310>>
Re: installing debian on nsa310?
September 03, 2015 11:14AM
It seems its running now :D

Linux debian 4.1.0-kirkwood-tld-2 #1 PREEMPT Sat Aug 8 14:44:53 PDT 2015 armv5tel GNU/Linux

Thanks guys



Edited 1 time(s). Last edit at 09/03/2015 12:45PM by Fotex.
Re: installing debian on nsa310?
September 03, 2015 03:01PM
Fotex Wrote:
-------------------------------------------------------
> It seems its running now :D
>
> Linux debian 4.1.0-kirkwood-tld-2 #1 PREEMPT Sat
> Aug 8 14:44:53 PDT 2015 armv5tel GNU/Linux
>
> Thanks guys

Cool!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: installing debian on nsa310?
September 14, 2015 02:34PM
Fotex Wrote:
-------------------------------------------------------
> It seems its running now :D
>
> Linux debian 4.1.0-kirkwood-tld-2 #1 PREEMPT Sat
> Aug 8 14:44:53 PDT 2015 armv5tel GNU/Linux
>
> Thanks guys

How did you do that? :-)

I have downloaded Debian-3.16.0-kirkwood-tld-2-rootfs-bodhi and extracted it to ext3 formatted pendrive. What I need to do next? How to boot NSA310 from USB with Debian?

Second question: do I need upgrade U-Boot for update OS to Debian Jessie and newer kernel?
Bodhi you are great, excellent work!
Re: installing debian on nsa310?
September 14, 2015 02:47PM
you don't have to update to newer U-Boot.
for this to work, you need to enbed the DTB es seen in chapter 4b
Re: installing debian on nsa310?
September 14, 2015 02:47PM
I Didn't upgrade the uboot: U-Boot 1.1.4 (Feb 22 2011 - 10:31:35) Marvell version: 3.4.19

used the usb > ttl converter.
stopped the autoboot

setenv mainlineLinux yes
setenv arcNumber 4022
saveenv
reset

After reboot I set the env. like pengu did:

setenv bootcmd 'run bootcmd_usb; run bootcmd_nand; reset'
setenv bootcmd_usb 'usb start; run set_bootargs_usb; run usb_boot'
setenv set_bootargs_usb 'setenv bootargs console=ttyS0,115200 root=$(usb_root) rootdelay=$(usb_rootdelay) rootfstype=$(usb_rootfstype) mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env)'
setenv console 'ttyS0,115200'
setenv usb_root 'LABEL=rootfs'
setenv usb_rootdelay 6
setenv usb_rootfstype ext4
setenv usb_boot 'run usb_load_uimage; run usb_load_uinitrd; bootm 0x800000 0x1100000'
setenv usb_load_uimage 'fatload usb 0:1 0x800000 /uImage'
setenv usb_load_uinitrd 'fatload usb 0:1 0x1100000 /uInitrd'
setenv bootcmd_nand 'run set_bootargs_nand; run nand_load_kernel; bootm 0x2000000'
setenv set_bootargs_nand 'setenv bootargs console=$(console) mtdparts=$(mtdparts_zyxel) root=/dev/nfs rw init=/init'
setenv mtdparts_zyxel 'nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)'
setenv nand_load_kernel 'nand read.e 0x2000000 $(kernel_addr) 0xA00000'
setenv bootdelay 5

saveenv
reset

I dont know if there is a way to do it easier, but this worked for me.
Just make sure your usb is labeled rootfs
Re: installing debian on nsa310?
September 14, 2015 03:45PM
Pengu and fotex - thanks for fast and helpful answers :-)
I will try it later and give you feedback.

Ok, I have problem with boot it :-(
Here is booting log: https://gist.github.com/Avatat/9c835a6c8a5d6592ff64
printenv: https://gist.github.com/Avatat/41a6fbbec061901694ff
USB content: https://gist.github.com/Avatat/1d98b1ce8959e94e0ece
Partition info:
/dev/sdb1: LABEL="rootfs" UUID="fd30aea3-831c-47b5-807e-14ca90f00f25" TYPE="ext4" PARTUUID="0018995d-01"

I can't boot NSA to default Zyxel OS too :-(

What can I do now?

It's working now!!! :-)
root@debian:~# uname -a
Linux debian 3.16.0-kirkwood-tld-2 #2 PREEMPT Sun Aug 31 18:56:01 PDT 2014 armv5tel GNU/Linux

I used ext3 partition and little modified U-Boot variables:
setenv usb_rootfstype ext3
setenv usb_load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
setenv usb_load_uinitrd 'ext2load usb 0:1 0x1100000 /boot/uInitrd'

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

I will write complete tutorial soon:
root@debian:~# uname -a
Linux debian 4.2.0-kirkwood-tld-1 #1 PREEMPT Mon Aug 31 23:12:00 PDT 2015 armv5tel GNU/Linux
root@debian:~# cat /etc/debian_version 
8.2
root@debian:~# cat /proc/cpuinfo 
processor	: 0
model name	: Feroceon 88FR131 rev 1 (v5l)
BogoMIPS	: 1196.85
Features	: swp half thumb fastmult edsp 
CPU implementer	: 0x56
CPU architecture: 5TE
CPU variant	: 0x2
CPU part	: 0x131
CPU revision	: 1

Hardware	: Marvell Kirkwood (Flattened Device Tree)
Revision	: 0000
Serial		: 0000000000000000
root@debian:~# free -m
             total       used       free     shared    buffers     cached
Mem:           244         61        183          4          3         32
-/+ buffers/cache:         25        219
Swap:            0          0          0



Edited 4 time(s). Last edit at 09/15/2015 05:11AM by avatat.
Re: installing debian on nsa310?
October 15, 2015 05:00PM
Hope to see the tutorial soon, cannot wait to try on my 310.
Re: installing debian on nsa310?
October 16, 2015 06:28AM
All you need is almost written here on the forum :)
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: