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 » Thu May 10, 2018 4:47 pm

I'd do the fw_printenv with the new values just to check its ok, and think of wring the ethaddr to flash.

But otherwise it looks good, and like it worked!
summers
 
Posts: 984
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:55 pm

I don't want to smile yet if not confirmed
$this->bbcode_second_pass_code('', '[rtorrent@alarm ~]$ sudo fw_setenv ethaddr=CC:5D:4E:C9:F5:XX
[sudo] password for rtorrent:
[rtorrent@alarm ~]$ sudo fw_printenv
bootcmd=run startboot;run bootubi
bootdir=/boot
bootfilem=uImage
bootfilez=zImage
bootubi=echo Trying to boot from NAND ...;if run mountubi; then ubifsload ${loadaddr} /boot/zImage;ubifsload ${fdtaddr} /boot/dtbs/${fdtfile};ubifsumount; setenv bootargs console=${console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs rootwait ${mtdparts};bootz ${loadaddr} - ${fdtaddr};fi
console=ttyS0,115200
ethact=egiga0
fdtaddr=0x800000
fdtdir=/boot/dtbs
fdtfile=kirkwood-nsa310.dtb
ipaddr=10.10.10.3
loadaddr=0x810000
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile}
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilez} || load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem}
loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}
mainargs=setenv bootargs console=${console} ${mtdparts} root=${root} rw rootwait ${optargs} ${ncargs}
mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs)
ncip=10.10.10.5
ncipk=10.10.10.4
netconsole=on
preboot=if env exists netconsole && test ${netconsole} = on; then if ping ${ncip}; then setenv stdin nc; setenv stdout nc; setenv stderr nc; version; if env exists ncargsusr; then echo ncargs has been defined by user; setenv ncargs ${ncargsusr}; else setenv ncargs ignore_loglevel netconsole=6665@${ipaddr}/eth0,6666@${ncipk}/; fi; fi; else echo Netconsole has been turned off.; echo To turn it on, set netconsole variable to on.; setenv stdin; setenv stdout; setenv stderr; setenv ncargs; fi
rdaddr=0x1100000
rdfile=initramfs-linux.img
startboot=usb start; ide reset; for devtype in usb ide; do setenv devnum 0; while ${devtype} dev ${devnum}; do echo ${devtype} found on device ${devnum}; setenv bootpart ${devnum}:1; echo Checking for: ${bootdir}/uEnv.txt ...; if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt; env import -t ${loadaddr} ${filesize}; echo Loaded environment from ${bootdir}/uEnv.txt; echo Checking if uenvcmd is set ...; if test -n ${uenvcmd}; then echo Running uenvcmd ...; run uenvcmd; fi; fi; if run loadimage; then if env exists root; then echo root has been defined by user; else part uuid ${devtype} ${bootpart} uuid; setenv root PARTUUID=${uuid}; fi; run mainargs; if run loadfdt; then if run loadrd; then bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else bootz ${loadaddr} - ${fdtaddr}; fi; else if run loadrd; then echo Booting uImage with initrd; bootm ${loadaddr} ${rdaddr}:${filesize}; else bootm ${loadaddr}; fi; fi; else echo No kernel found; fi; setexpr devnum ${devnum} + 1; done; done;')
I don't see the ethernet mac in the printenv after I set it?

EDIT - after reboot - something's wrong:
$this->bbcode_second_pass_code('', 'U-Boot 2016.09.01-1 (Oct 10 2016 - 23:14:18 -0600) Arch Linux ARM
Zyxel NSA310

SoC: Kirkwood 88F6281_A1
DRAM: 256 MiB
WARNING: Caches not enabled
NAND: 128 MiB
In: serial
Out: serial
Err: serial
Net: egiga0
Error: egiga0 address not set.

PHY reset timed out
MV88E1318 PHY initialized on egiga0
IDE: Bus 0: OK Bus 1: not available
Device 0: Model: SAMSUNG HD753LJ Firm: 1AA01110 Ser#: S13UJ1DQ400383
Type: Hard Disk
Supports 48-bit addressing
Capacity: 715404.8 MB = 698.6 GB (1465149168 x 512)
*** ERROR: `ethaddr' not set
ping failed; host 10.10.10.5 is not alive
Hit any key to stop autoboot: 0
starting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: Bus 0: OK Bus 1: not available
Device 0: Model: SAMSUNG HD753LJ Firm: 1AA01110 Ser#: S13UJ1DQ400383
Type: Hard Disk
Supports 48-bit addressing
Capacity: 715404.8 MB = 698.6 GB (1465149168 x 512)

USB device 0: unknown device

Device 0: Model: SAMSUNG HD753LJ Firm: 1AA01110 Ser#: S13UJ1DQ400383
Type: Hard Disk
Supports 48-bit addressing
Capacity: 715404.8 MB = 698.6 GB (1465149168 x 512)
... is now current device
ide found on device 0
Checking for: /boot/uEnv.txt ...
** File not found /boot/zImage **
** File not found /boot/uImage **
No kernel found

Device 1: not available
Trying to boot from NAND ...
ubi0: attaching mtd1
ubi0: scanning is finished
UBI init error 22
Error reading superblock on volume 'ubi0:rootfs' errno=-19!
ubifsmount - mount UBIFS volume

Usage:
ubifsmount <volume-name>
- mount 'volume-name' volume
NSA310>')
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 5:22 pm

I'd start typing commands by hand:
$this->bbcode_second_pass_code('', 'ide reset
ext4ls ide 0:2 /
ext4ls ide 0:2 /boot')
See if you can see /boot/uEnv.txt, can you see the zImage etc.

Then we can pass these terms by hand to get it to boot, and try and see what went wrong ...

maybe also try
$this->bbcode_second_pass_code('', 'ext4ls ide 0:1 /')
to see if files went into the old /boot ....
Last edited by summers on Thu May 10, 2018 5:34 pm, edited 1 time in total.
summers
 
Posts: 984
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 5:34 pm

$this->bbcode_second_pass_code('', 'NSA310> ide reset

Reset IDE: Bus 0: OK Bus 1: not available
Device 0: Model: SAMSUNG HD753LJ Firm: 1AA01110 Ser#: S13UJ1DQ400383
Type: Hard Disk
Supports 48-bit addressing
Capacity: 715404.8 MB = 698.6 GB (1465149168 x 512)
NSA310> ext4ls ide 0:2 /
Unsupported feature found (64bit, possibly metadata_csum), not mounting
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **')
Then I tried with 0:1
$this->bbcode_second_pass_code('', 'NSA310> ide reset

Reset IDE: Bus 0: OK Bus 1: not available
Device 0: Model: SAMSUNG HD753LJ Firm: 1AA01110 Ser#: S13UJ1DQ400383
Type: Hard Disk
Supports 48-bit addressing
Capacity: 715404.8 MB = 698.6 GB (1465149168 x 512)
NSA310> ext4ls ide 0:1 /
<DIR> 1024 .
<DIR> 1024 ..
5530551 initramfs-linux.img
5155808 uImage')
No boot?
$this->bbcode_second_pass_code('', 'NSA310> ext4ls ide 0:1 /boot
** Can not find directory. **
NSA310> ext4ls ide 0:2 /boot
Unsupported feature found (64bit, possibly metadata_csum), not mounting
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
')
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 5:40 pm

On some systems there was a problem with some metadata on ext when creating partitions, sounds like it could be that. let me see if I can find the instructions ...

oh yes also
$this->bbcode_second_pass_code('', 'ext2ls ide 0:1 /')
may work - so you can boot from the uImage in old boot if necessary till we fix ...
Last edited by summers on Thu May 10, 2018 5:42 pm, edited 1 time in total.
summers
 
Posts: 984
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 5:42 pm

OK, thank you
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 5:45 pm

suspect its becuase your ext4 partition should have been made with
$this->bbcode_second_pass_code('', 'mkfs.ext4 -O ^metadata_csum,^64bit /dev/sdX1')
Don't know if we can change the ext4 to this after its created ...

Probably at worst we can pull the HDD, tar all the file of the second partition, remake with the right ext4 options, and tar all the data back again. Better is if we could change the options on the partition without taking everything off, can't see how to do that right now ...
Last edited by summers on Thu May 10, 2018 5:55 pm, edited 1 time in total.
summers
 
Posts: 984
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 5:53 pm

Maybe it would be possible to just make the ext4 fs like that on a fresh hdd and then copy somehow the system from the the current drive?
I don't have problem with pulling this hdd out and connect as an external drive to my laptop - done it multiple times..
$this->bbcode_second_pass_quote('', 'r')emake with the right ext3 options

I have ext4 on my root
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 5:59 pm

$this->bbcode_second_pass_code('', 'tune2fs -O')
Seems to do the job, just use to switch off those bits ...

and whilst in uboot boot - you might as well set the ethaddr and save the variables ...
summers
 
Posts: 984
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 6:04 pm

I can just guess that it can be done on a different computer only, the rest is a mystery to me - what features to turn off, with which command?
$this->bbcode_second_pass_code('', 'NSA310> setenv ethaddr=CC:5D:4E...
## Error: illegal character '='in variable name "ethaddr=CC:5D:4E...')
EDIT: without "=" it is good

And these were the commands I used to create the filesystems:
$this->bbcode_second_pass_code('', '# ext2 makes u-boot happy.
mkfs.ext2 -L "boot" /dev/sda1
# stock does not know how to make ext4!
mkfs.ext4 -L "rootfs" /dev/sda2')
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 5 guests