4.4.97-1-ARCH wrong NAND chip timing in the DTS? NSA310 NAS

Problems with packages? Post here, using [tags] of the package name.

Re: 4.4.97-1-ARCH wrong NAND chip timing in the DTS? NSA310

Postby summers » Wed May 09, 2018 9:30 pm

Thats interesting, it read you bootargs and set chosen equal to that as I didn't set root. You have and "=" before mdtparts, it is meant to be a space.
Last edited by summers on Thu May 10, 2018 8:26 am, edited 3 times in total.
summers
 
Posts: 923
Joined: Sat Sep 06, 2014 12:56 pm

Re: 4.4.97-1-ARCH wrong NAND chip timing in the DTS? NSA310

Postby arti74 » Wed May 09, 2018 9:42 pm

Should I change something? Could you be more specific?
I don't want to keep you awake late, here's almost midnight, and I myself will soon going to bed.
arti74
 
Posts: 75
Joined: Tue Apr 17, 2018 10:33 am

Re: 4.4.97-1-ARCH wrong NAND chip timing in the DTS? NSA310

Postby summers » Thu May 10, 2018 8:21 am

You can see the problem in the uboot env variables you posted on doozan:

Code: Select all
bootargs_linux=console=ttyS0,115200 mtdparts=orion_nand: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)
MALLOC_len=3
bootcmd=run bootcmd_linux
bootargs=console=ttyS0,115200=mtdparts=orion_nand: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


Which wasn't at the beginning of the thread. you have "bootargs=console=ttyS0,115200=mtdparts=...", it should be "bootargs=console=ttyS0,115200 mtdparts=..."

Oddly enough its correct in bootargs_linux, so who knows what went wrong. Can't say if its causing the problem you are having, but it may well be ...
summers
 
Posts: 923
Joined: Sat Sep 06, 2014 12:56 pm

Re: 4.4.97-1-ARCH wrong NAND chip timing in the DTS? NSA310

Postby arti74 » Thu May 10, 2018 9:43 am

What's odd to me also, I can't change it via setenv in console:
Code: Select all
NSA310>> setenv bootargs=console=ttyS0,115200 mtdparts=orion_nand: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
NSA310>> saveenv
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done
NSA310>> reset

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

U-Boot 1.1.4 (Jun  8 2011 - 18:48:37) 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

Code: Select all
NSA310>> printenv
bootdelay=2
baudrate=115200
loads_echo=0
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=A203
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=4402
bootargs_linux=console=ttyS0,115200 mtdparts=orion_nand: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)
MALLOC_len=3
bootcmd=run bootcmd_linux
ethaddr=CC:5D:4E:C9:F5:4A
bootargs=console=ttyS0,115200=mtdparts=orion_nand: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
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: 1940/131068 bytes

Only the bootargs_linux line is successfully changed (I did it earlier)

EDIT:
Tried the same with the fw_setenv on Arch - I changed it and fw_printenv displayed the changed line. I tried to run fw_saveenv command, but got
Code: Select all
command not found

After reboot no changes are shown...
arti74
 
Posts: 75
Joined: Tue Apr 17, 2018 10:33 am

Re: 4.4.97-1-ARCH wrong NAND chip timing in the DTS? NSA310

Postby summers » Thu May 10, 2018 2:27 pm

If I remember the old uboot language correctly you should be able to change the env variable then:
Code: Select all
run bootcmd_linux

And this should work totally in memory with using flash.
summers
 
Posts: 923
Joined: Sat Sep 06, 2014 12:56 pm

Re: 4.4.97-1-ARCH wrong NAND chip timing in the DTS? NSA310

Postby arti74 » Thu May 10, 2018 3:19 pm

You are a genius! I run the bootcmd_linux and now I have:
Code: Select all
mtdinfo /dev/mtd0
mtd0
Name:                           uboot
Type:                           nand
Eraseblock size:                131072 bytes, 128.0 KiB
Amount of eraseblocks:          8 (1048576 bytes, 1024.0 KiB)
Minimum input/output unit size: 2048 bytes
Sub-page size:                  512 bytes
OOB size:                       64 bytes
Character device major/minor:   90:0
Bad blocks are allowed:         true
Device is writable:             true

Could you verify my uEnv file if it seems ok to you?
Code: Select all
root=PARTUUID=ab197877-02
mtdparts=mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}; fdt addr ${fdtaddr}; fdt set /mbus@f1000000/nand@12f chip-delay <35>
ethaddr=CC:5D:4E:XX:XX:XX

The chip-delay <35> works too, so I leave it like this
arti74
 
Posts: 75
Joined: Tue Apr 17, 2018 10:33 am

Re: 4.4.97-1-ARCH wrong NAND chip timing in the DTS? NSA310

Postby summers » Thu May 10, 2018 3:47 pm

Looks about right - only thing thats usually done differently, is once the new boot has been flashed, you change the location of the env variables, and then write ethaddr to the new location in flash.

Now I think this is needed, because new uboot, first thing it does is connect to the network and try and set a console up to something like 10.10.10.4. Now it does this before reading uEnv.txt, so at that stage will only have the environment variables saved to flash. hence why ethaddr tends to be saved to flash.

Now what happens if you don't do this, and set ethaddr in uEnv.txt, I don't know - I've never done that ...
Last edited by summers on Thu May 10, 2018 4:03 pm, edited 1 time in total.
summers
 
Posts: 923
Joined: Sat Sep 06, 2014 12:56 pm

Re: 4.4.97-1-ARCH wrong NAND chip timing in the DTS? NSA310

Postby arti74 » Thu May 10, 2018 3:59 pm

you change the location of the env variables, and then write ethaddr to the new location.

What that exactly mean? How to change this location, and where it will be?
Now what happens if you don't do this

Can I do something now, or just wait after uboot update and see what happens?

Sorry for the lame questions, but I'm new to this, you know. I want prepare to the update the best as possible.
Or just go for it now
arti74
 
Posts: 75
Joined: Tue Apr 17, 2018 10:33 am

Re: 4.4.97-1-ARCH wrong NAND chip timing in the DTS? NSA310

Postby summers » Thu May 10, 2018 4:34 pm

After flashing new uboot, and changing /etc/fw_env.config to:
Code: Select all
/dev/mtd0 0xc0000 0x20000 0x20000

the fw_printenv should work, and you can fw_setenv the ethaddr
summers
 
Posts: 923
Joined: Sat Sep 06, 2014 12:56 pm

Re: 4.4.97-1-ARCH wrong NAND chip timing in the DTS? NSA310

Postby arti74 » Thu May 10, 2018 4:38 pm

Code: Select all
A new U-Boot version needs to be flashed to NAND.
Do you want to do this now? [y|N]
y
Warning: Bad CRC, using default environment
Erasing 128 Kibyte @ 60000 -- 100 % complete
Erasing 128 Kibyte @ c0000 -- 100 % complete
Writing data to block 0 at offset 0x0
Writing data to block 1 at offset 0x20000
Writing data to block 2 at offset 0x40000
Writing data to block 3 at offset 0x60000
Writing data to block 6 at offset 0xc0000

Is it safe to reboot or not...
Code: Select all
cat /etc/fw_env.config
/dev/mtd0 0xc0000 0x20000 0x20000
arti74
 
Posts: 75
Joined: Tue Apr 17, 2018 10:33 am

PreviousNext

Return to Packages

Who is online

Users browsing this forum: No registered users and 6 guests