Welcome! Log In Create A New Profile

Advanced

Kirkwood U-boot - Getting all supported Kirkwoods on-board

Posted by WarheadsSE 
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board
January 14, 2015 07:03AM
Gareth,

Yes. I should have said "Debian kernel" :) Arch is smaller with no initrd. That's made some difference in how soon the watchdog can be killed.

And it is done during kernel init.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board
January 14, 2015 08:06AM
So I'm loading the initrd at loadaddr + 16meg which is 0x20..... (cant remember how many zeros) and then using bootm (loadaddr) initrdaddress. It's getting well past initrd in any case right up to launching the sshd daemon which is one of the last devices. If it's done in kernel init then I suspect that's long before initrd or the init scripts are started.

So it looks like it's getting past that point but failing to disable it for some reason - are we certain that this kernel has the watchdog disable in it?

Best
Gareth
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board
January 14, 2015 11:14PM
Gareth,

> So it looks like it's getting past that point but
> failing to disable it for some reason - are we
> certain that this kernel has the watchdog disable
> in it?

Yes it does. Do you have serial console log when it failed to boot?

I think it's time to move your booting problem to this thread: http://forum.doozan.com/read.php?2,14351.

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



Edited 1 time(s). Last edit at 01/14/2015 11:16PM by bodhi.
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board
January 16, 2015 09:58AM
Thanks for your help. I noticed today that the HDD leds dont come on either with the debian kernel so I wonder if this might be a config problem. I've pasted by bootvars below, where bootcmd_debian is for the debian kernel and bootcmd_linux is for the arch kernel. I've appended the dtb to the kernel before converting it to a uImage.

Any help appreciated :-)

bootdelay=2
baudrate=115200
loads_echo=0
ipaddr=10.4.52.165
serverip=10.4.52.7
rootpath=/srv/ubuntu
netmask=255.255.255.0
nandEcc=1bit
MODEL_ID=AA03
PRODUCT_NAME=NSA-325
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=MitraStar Technology Corp.
run_diag=yes
ethaddr=EC:43:F6:48:AE:88
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
ethprime=egiga0
bootargs_root=root=/dev/nfs rw
bootargs_end=:::orion: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;
lcd0_enable=0
lcd0_params=640x480-16@60
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev[0]:fxs,dev[1]:fxo
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
image_multi=yes
ethact=egiga0
bootargs=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/sda2 rw rootwait loglevel=8
arcNumber=4495
bootargs_stock=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
bootargs_linux=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/sda2 rw rootwait loglevel=8
bootcmd_linux=setenv bootargs $(bootargs_linux); ide reset; ext2load ide 0:1 $(loadaddr) /uImage; bootm $(loadaddr)
bootcmd_stock=setenv bootargs $(bootargs_stock); nand read.e $(loadaddr) $(kernel_addr) 0xA00000; bootm $(loadadr)
to_stock=setenv mainlineLinux no; setenv bootcmd \'run bootcmd_stock\'; saveenv; reset
to_linux=setenv mainlineLinux yes; setenv bootcmd \'run bootcmd_linux\'; saveenv; reset
bootcmd_debian=setenv bootargs $(bootargs_linux); ide reset; ext2load ide 0:1 $(loadaddr) /uImageDeb; ext2load ide 0:1 0x03000000 /uInitRdDeb; bootm $(loadaddr) 0x03000000
stdin=serial
stdout=serial
stderr=serial
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
enaAutoRecovery=yes
kernel_addr=0xc80000
pcieTune=no
pcieTune1=no
mainlineLinux=yes
bootcmd=run bootcmd_debian

Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board
January 16, 2015 10:19AM
drdevil44 Wrote:
-------------------------------------------------------
> Thanks for your help. I noticed today that the
> HDD leds dont come on either with the debian
> kernel so I wonder if this might be a config
> problem. I've pasted by bootvars below, where
> bootcmd_debian is for the debian kernel and
> bootcmd_linux is for the arch kernel. I've
> appended the dtb to the kernel before converting
> it to a uImage.
>
> Any help appreciated :-)
>
>
> bootdelay=2
> baudrate=115200
> loads_echo=0
> ipaddr=10.4.52.165
> serverip=10.4.52.7
> rootpath=/srv/ubuntu
> netmask=255.255.255.0
> nandEcc=1bit
> MODEL_ID=AA03
> PRODUCT_NAME=NSA-325
> FEATURE_BIT=00
> CONTRY_TYPE=FF
> VENDOR_NAME=MitraStar Technology Corp.
> run_diag=yes
> ethaddr=EC:43:F6:48:AE:88
> console=console=ttyS0,115200
> mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x1
> 00000(root)
> ethprime=egiga0
> bootargs_root=root=/dev/nfs rw
> bootargs_end=:::orion: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;
> lcd0_enable=0
> lcd0_params=640x480-16@60
> ethmtu=1500
> mvPhoneConfig=mv_phone_config=dev[0]:fxs,dev[1]:fx
> o
> 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
> image_multi=yes
> ethact=egiga0
> bootargs=console=ttyS0,115200
> mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_en
> v),0x80000(key_store),0x80000(info),0xA00000(etc),
> 0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(ker
> nel_2),0x2FC0000(rootfs2) root=/dev/sda2 rw
> rootwait loglevel=8
> arcNumber=4495
> bootargs_stock=console=ttyS0,115200
> mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_en
> v),0x80000(key_store),0x80000(info),0xA00000(etc),
> 0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(ker
> nel_2),0x2FC0000(rootfs2) root=/dev/nfs rw
> init=/init
> bootargs_linux=console=ttyS0,115200
> mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_en
> v),0x80000(key_store),0x80000(info),0xA00000(etc),
> 0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(ker
> nel_2),0x2FC0000(rootfs2) root=/dev/sda2 rw
> rootwait loglevel=8
> bootcmd_linux=setenv bootargs $(bootargs_linux);
> ide reset; ext2load ide 0:1 $(loadaddr) /uImage;
> bootm $(loadaddr)
> bootcmd_stock=setenv bootargs $(bootargs_stock);
> nand read.e $(loadaddr) $(kernel_addr) 0xA00000;
> bootm $(loadadr)
> to_stock=setenv mainlineLinux no; setenv bootcmd
> \'run bootcmd_stock\'; saveenv; reset
> to_linux=setenv mainlineLinux yes; setenv bootcmd
> \'run bootcmd_linux\'; saveenv; reset
> bootcmd_debian=setenv bootargs $(bootargs_linux);
> ide reset; ext2load ide 0:1 $(loadaddr)
> /uImageDeb; ext2load ide 0:1 0x03000000
> /uInitRdDeb; bootm $(loadaddr) 0x03000000
> stdin=serial
> stdout=serial
> stderr=serial
> 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
> enaAutoRecovery=yes
> kernel_addr=0xc80000
> pcieTune=no
> pcieTune1=no
> mainlineLinux=yes
> bootcmd=run bootcmd_debian
> 
>

To solve the watchdog problem with your current installation, we need serial console boot log.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board
January 16, 2015 11:04AM
There is actually a command that can be scripted into the stock u-boot that will disable the watchdog. I'll have to go digging, but it should ONLY be used with the Debian kernel, since the ALARM kernel still trips the watchdog off.
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board
January 16, 2015 12:50PM
WarheadsSE - that'd be great thanks. I presume the GPIOs are memory mapped but I don't have the datasheet.

Bodhi, thanks, I've uploaded the boot log here:

http://pastebin.com/7bfcDcaX
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board
January 17, 2015 06:43AM
drdevil44 Wrote:
-------------------------------------------------------
> WarheadsSE - that'd be great thanks. I presume
> the GPIOs are memory mapped but I don't have the
> datasheet.
>
> Bodhi, thanks, I've uploaded the boot log here:
>
> http://pastebin.com/7bfcDcaX

Looks like the serial boot log did not give any clue as why the watchdog still active. So my suggestion is to install new u-boot if you dont want to waste time chasing this.

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



Edited 1 time(s). Last edit at 01/17/2015 06:46AM by bodhi.
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board
January 20, 2015 03:41AM
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board
February 20, 2015 08:38PM
Yes.
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board
February 21, 2015 12:20PM
WarheadsSE Wrote:
-------------------------------------------------------
> Yes.

Thanks! I will get to work on this.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board
February 24, 2015 09:34PM
I currently have 2 Kirkwood based systems not covered by the latest Kirkwood builds.

1. Cisco ON100-K9 Marvell 88F6282 @ 1.6 GHz, 512MB Flash, 512MB RAM, stock U-Boot 1.1.4
2. D-Link DNS-320 Marvell 88F6281 @ 800 Mhz, 128MB Flash, 128MB RAM, stock U-Boot 1.1.4

The D-Link appears to have a Device Tree available in the latest kernels, but I don't believe the Cisco has one. What additional information do I need in order to make the necessary changes to the u-boot-kirkwood code at github? Also would appreciate some pointers on where to start looking for necessary modifications. I have serial access to both systems.

I also have a Netgear Stora, so will be providing feedback on it soon. Currently having difficulty getting root access to the stock installation. The telenetenable script doesn't appear to work with my unit.

Thanks,
Ray
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board
February 24, 2015 10:20PM
rayknight Wrote:
-------------------------------------------------------
> I currently have 2 Kirkwood based systems not
> covered by the latest Kirkwood builds.
>
> 1. Cisco ON100-K9 Marvell 88F6282 @ 1.6 GHz,
> 512MB Flash, 512MB RAM, stock U-Boot 1.1.4
> 2. D-Link DNS-320 Marvell 88F6281 @ 800 Mhz,
> 128MB Flash, 128MB RAM, stock U-Boot 1.1.4
>
> The D-Link appears to have a Device Tree available
> in the latest kernels, but I don't believe the
> Cisco has one. What additional information do I
> need in order to make the necessary changes to the
> u-boot-kirkwood code at github? Also would
> appreciate some pointers on where to start looking
> for necessary modifications. I have serial access
> to both systems.
>
> I also have a Netgear Stora, so will be providing
> feedback on it soon. Currently having difficulty
> getting root access to the stock installation.
> The telenetenable script doesn't appear to work
> with my unit.
>
> Thanks,
> Ray

I would make sure that UART booting is working with these. You can use a referenced board u-boot such as Sheevaplug and try booting with UART.

It is not simple to create a new board for u-boot. But if you have the DTS, you could compare it with the Sheevaplug to see the differences. It might not be enough, but it is a start. Also having the GPL source would be best.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board
February 24, 2015 10:49PM
bodhi Wrote:
-------------------------------------------------------
> rayknight Wrote:
> --------------------------------------------------
> -----
> > I currently have 2 Kirkwood based systems not
> > covered by the latest Kirkwood builds.
<SNIP>
>
> I would make sure that UART booting is working
> with these. You can use a referenced board u-boot
> such as Sheevaplug and try booting with UART.
>
> It is not simple to create a new board for u-boot.
> But if you have the DTS, you could compare it with
> the Sheevaplug to see the differences. It might
> not be enough, but it is a start. Also having the
> GPL source would be best.

What do you mean by UART booting? Is this different then booting from the serial console? I do have GPL source release for both the Cisco and D-Link systems which do have the source for u-boot. I need to get familiar with the u-boot build system and how the source is structured. I didn't expect this to be an easy task. Was just hoping to get some pointers before I jump in.

PS: I have a few more Kirkwood systems I'd like to tackle after success with these two as well (HP t5325, D-Link DIR-665).

Ray
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board
February 24, 2015 11:03PM
rayknight,

> What do you mean by UART booting? Is this
> different then booting from the serial console?

See this thread:
http://forum.doozan.com/read.php?3,7852,7852

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Kirkwood U-boot - Getting all supported Kirkwoods on-board
March 16, 2015 12:36AM
@WarheadsSE,

I've pushed out to u-boot-kirkwood GitHub all the changes I have for NSA325 and NSA320. Please make modification to anything that you see fit.

commit bb8ac0e067f6f42d8832c11c9266707bcba419f9
branch 2014.07.c-kirkwood

Also included in this commit, for all supported Kirkwood u-boots: uEnv.txt loading capability, better default envs, and miscellaneous editorial changes.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
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: