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 arti74 » Fri May 04, 2018 11:32 pm

$this->bbcode_second_pass_quote('', 'i')f you manage to flash a uboot

I'm far from it yet, I'm afraid :(
I can't boot archlinux now - on the new disk I tried:
Setting boot environment:
$this->bbcode_second_pass_code('', 'NSA310>> setenv arcNumber 4402
NSA310>> setenv mainlineLinux yes
NSA310>> setenv bootargs_stock '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/nfs rw init=/init'
NSA310>> setenv 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'
NSA310>> setenv 'bootcmd_linux=setenv bootargs $(bootargs_linux); ide reset; ext2load ide 0:1 $(loadaddr) /uImage; bootm $(loadaddr)'
NSA310>> saveenv
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done
NSA310>> reset
')
After this it tries to load stock env from nand:
$this->bbcode_second_pass_code('', '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

NAND read: device 0 offset 0xc80000, size 0xa00000

Reading data from 0x167f800 -- 100% complete.
10485760 bytes read: OK
## Booting image at 02000000 ...
Image Name: Linux-2.6.31.8
Created: 2016-03-11 9:35:37 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 5696716 Bytes = 5.4 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux............................................................................................................................................................................................................................................................................ done, booting the kernel.')
And it freeze at this point.
Turned device off and on again, stopped boot and put this to load arch directly from hdd:
$this->bbcode_second_pass_code('', 'bootargs $(bootargs_linux); ide reset; ext2load ide 0:1 $(loadaddr) /uImage; bootm $(loadaddr)
Unknown command 'bootargs' - try 'help'

Reset IDE:
Marvell Serial ATA Adapter
Integrated Sata device found
[0 0 0]: Enable DMA mode (6)
Device 0 @ 0 0:
Model: WDC WD40PURX-64GVNY0 Firm: 80.00A80 Ser#: WD-WCC4E0SERLJD
Type: Hard Disk
Supports 48-bit addressing
Capacity: 1718295.8 MB = 1678.0 GB (-775897424 x 512)


4600064 bytes read
## Booting image at 02000000 ...
Image Name: Linux-4.4.97-1-ARCH
Created: 2017-11-11 4:51:55 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4600000 Bytes = 4.4 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK

Starting kernel ...

')
This is on the big 4tb hdd (but it stuck at the same point on a small hdd too)

For reference, this is how I set up the hybrid mbr using gdisk:
$this->bbcode_second_pass_code('', 'Command (? for help): r

Recovery/transformation command (? for help): h

WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,
just hit the Enter key at the below prompt and your MBR partition table will
be untouched.

Type from one to three GPT partition numbers, separated by spaces, to be
added to the hybrid MBR, in sequence: 1
Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): n

Creating entry for GPT partition #1 (MBR partition #1)
Enter an MBR hex code (default 83):
Set the bootable flag? (Y/N): y

Unused partition space(s) found. Use one to protect more partitions? (Y/N): n

Recovery/transformation command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): y
OK; writing new GUID partition table (GPT).
The operation has completed successfully.')

I've made the filesystem and extracted Archlinux files according to this:
$this->bbcode_second_pass_code('', '# make filesystems
echo "- make filesystems"
# 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

###
# make dirs & mount
echo "- mount destination"
mkdir -p /tmp/boot
mount -t ext2 /dev/sda1 /tmp/boot
mkdir -p /tmp/rootfs
mount -t ext4 /dev/sda2 /tmp/rootfs

###
# prepare the system
# extract the rootfs
echo "- extract rootfs"
tar xzf /mnt/parnerkey/rootfs.tgz -C /tmp/rootfs/

# copy the uImage to the boot partition
echo "- prepare boot partition"
cp -aR /tmp/rootfs/boot/* /tmp/boot/

# always make sure you're sync'd!
sync
')

As you see the disk is recognized as barely 2TB, but what's most important it won't boot the kernel.

The previous installation also doesn't boot, maybe because of the invalid .dts or something...
I'm getting tired of this already.
Tomorrow next try....
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 arti74 » Sat May 05, 2018 9:54 am

I tried on the original soft and it boots but does not recognizes hdd's partitions fully. The relevant parts from the log:
$this->bbcode_second_pass_code('', 'Integrated Sata device found
IRQ 21/mvSata: IRQF_DISABLED is not guaranteed on shared IRQs
Wake up disk0......
Wake up disk1......
scsi0 : Marvell SCSI to SATA adapter
scsi1 : Marvell SCSI to SATA adapter
scsi 0:0:0:0: Direct-Access WD40PURX-64GVNY0 80.0 PQ: 0 ANSI: 5
EnablePowerSaving
PowerSavingTime = 15
sd 0:0:0:0: [sda] Sector size 0 reported, assuming 512.
sd 0:0:0:0: [sda] 7814037168 512-byte logical blocks: (4.00 TB/3.63 TiB)
sd 0:0:0:0: [sda] 0-byte physical blocks
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 0:0:0:0: [sda] Write Protect is off
')
$this->bbcode_second_pass_code('', '*** Stage 2: Prepare the root file system ***
Mount system partition...
yaffs: dev is 32505862 name is "mtdblock6" ro
yaffs: passed flags ""
storage_gen_mntfw.sh: no internal volume available
1
WARNING: No valid partition on HDD or no HDD plugged!
WARNING: No valid partition on HDD or no HDD plugged
Boot from RAM disk
Mount system disk image ...
yaffs: dev is 32505860 name is "mtdblock4" rw
yaffs: passed flags ""
/etc/zyxel/conf exist..
Start rcS2 of ZyXEL style
*** Stage 3: Start services on HDD ***
NTFS driver 2.1.29 [Flags: R/O MODULE].
tntfs: module license 'Commercial. For support email ntfs-support@tuxera.com.' taints kernel.
Disabling lock debugging due to kernel taint
Tuxera NTFS driver 3011.12.23 [Flags: R/W MODULE].
PPP generic driver version 2.4.2
PPP MPPE Compression module registered
PPP Deflate Compression module registered
NET: Registered protocol family 24
PPP BSD Compression module registered
modprobe: module fuse not found in modules.dep
Starting PID Fan Control..
P:20, I:1, D:5, SampleRate:10 seconds, ST_CPU:46, ST_ADT7463:46, ST_DauBoard:46
Wt_CPU:0, Wt_ADT7463:0, Wt_DauBoard:1
Tolerance:1 MinPwm:0x40

sda
checking sda

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.


WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.

Trying to mount /dev/sda1
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

Fail to mount /dev/sda1
')
So it seems that I configured this disk wrong, since when I plugged identically prepared 160GB drive - I got the same errors.

The part with NAND looks promising:
$this->bbcode_second_pass_code('', 'NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 631 at 0x000004ee0000
9 cmdlinepart partitions found on MTD device nand_mtd
Using command line partition definition
Creating 9 MTD partitions on "nand_mtd":
0x000000000000-0x000000100000 : "uboot"
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA
sd 0:0:0:0: [sda] Sector size 0 reported, assuming 512.
0x000000100000-0x000000180000 : "uboot_env"
sda:
0x000000180000-0x000000200000 : "key_store"
0x000000200000-0x000000280000 : "info"
0x000000280000-0x000000c80000 : "etc"
0x000000c80000-0x000001680000 : "kernel_1"
0x000001680000-0x000004640000 : "rootfs1"
0x000004640000-0x000005040000 : "kernel_2"
0x000005040000-0x000008000000 : "rootfs2"
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci_marvell ehci_marvell.70059: Marvell Orion EHCI
ehci_marvell ehci_marvell.70059: new USB bus registered, assigned bus number 1
sda1 sda2
sd 0:0:0:0: [sda] Sector size 0 reported, assuming 512.
sd 0:0:0:0: [sda] Attached SCSI disk
ehci_marvell ehci_marvell.70059: irq 19, io base 0xf1050100
ehci_marvell ehci_marvell.70059: USB 2.0 started, EHCI 1.00
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
uhci_hcd: USB Universal Host Controller Interface driver
usbcore: registered new interface driver usblp
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
')
So only one bad block? Bad eraseblock 631 at 0x000004ee0000

Well, that's why I like my old uboot - I can go back to the original soft very easy. But... I want Arch on it.
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 » Sat May 05, 2018 1:28 pm

Lets see where we are. First off the uboot chip retiming can be done in /boot/uEnv.tx, I added:
$this->bbcode_second_pass_code('', 'loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile} ; fdt addr ${fdtaddr} ; fdt set /mbus@f1000000/nand@12f chip-delay <50>')
Then rebooted and:
$this->bbcode_second_pass_code('', 'od -tu1 /proc/device-tree/mbus\@f1000000/nand\@12f/chip-delay
0000000 0 0 0 50
0000004
')
So this suceeding in changing the chip timing. And its safer than doing it by rewriting the save environment variables in flash. This way if you do something wrong, you can always pull the hard disk, and access on a second system. This is far easier that cracking the box open and attaching a UART, and saves writing the the flash.

But of course this needs a uboot that understands device tree, and your original one doesn't.

Now by being able to save the env variables in uboot, you have shown that uboot can write to the flash. So that you can't write the flash in linux, and yes we must know its a problem, and chip timing does seem like the most likely reason. Now changing the chip timing, can be done in device tree without too much difficulty. Before the device tree it needed modifying the kernel. Now device tree kernels really need a modern uboot to boot well, but I think not impossible to boot with old uboot.

So possible ways forward
    We get a dt kernel to boot with current uboot - and it has revised chip timings
    Inside uboot, we load a new uboot to memory, and then flash it to nas
The second option should work in theory, but I've never tried it - and its scary as anything, as running uboot needs to rewrite the flash its run from. So i say only try if someone knows how to do it, and as a last resort.

We could try mixed aporach. Load a new uboot to memory, and then instruct old uboot to run it, that should then come up in new uboot, then we can load new boot from there. this will need the right commands in original uboot. So if you can post the results of:
$this->bbcode_second_pass_code('', 'help')
Then we can see what we have.

Now only whats been going wrong with your current set up. Your Friday 11:32pm post, and it looks like uboot found the uimage, and loaded it into memory, the impage packeting was read and it was called Linux-2.6.31.8, so an old image.

But when control was past to the kernel, it didn't get far enough into boot to set up the console, and so be able to report what was going on. Now there is an earlycon option for setting up the console early in boot - that may tell us more. But I only remember seeing it on newish kernels - and not back in 2.6 days.

Whats confusing, is that 2.6 is probably the stock kernel that you have already had booting, so its confusing why it doesn't boot. It seems strange that some of your disk boot, but not others. If you are using the first portion as the boot directory.

Oh yes, what may help, is you can type the boot commands directly into uboot. if you do this you can see what is working and what isn't.
summers
 
Posts: 995
Joined: Sat Sep 06, 2014 12:56 pm

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

Postby arti74 » Sat May 05, 2018 4:27 pm

$this->bbcode_second_pass_quote('', 't')he uboot chip retiming can be done in /boot/uEnv.tx

That seems easy.
$this->bbcode_second_pass_quote('', 'a')nd it was called Linux-2.6.31.8, so an old image

It was because of a wrong setenv - loading the new kernel results errors: either bad magic error or freeze at "Starting kernel ..."
Now I made resetenv and after it the stock os seems to load fine (no errors about hdd, but now the small one inside)
I'm such a noob. I can't install Arch on any disk.
I'm out of ideas, got the proper printenv (at least based on a last working Arch) and still no luck. It's so depressing... I don't know how to set up my disk properly and provide right setenv..
Maybe I should rest from it for a while - sitting to much on it without any effect.

Thanks for trying to help.
arti74
 
Posts: 75
Joined: Tue Apr 17, 2018 10:33 am
Top

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

Postby summers » Sat May 05, 2018 6:30 pm

Yes, I understand your frustration. The problem you have is very complex, but to me its quite interesting. But given your frustration, I can understand you not continuing try to update.

Me though, because its interesting, so in spare time I'll keep moving forward. I like the idea of getting uboot to boot a second uboot, as its risk free. As the mainline armarch is still on uboot 2016, I'm going to have a go at updating, via the uboot, uboot, method. Bohdi github has the uboot for nsa* devices, but it isn't mainlined on uboot. So am interested in getting a clean update way, and discuss with Bodhi about mainlining, as then it means updates are automatic.

But this plan of mine is longish term, no point in me putting in the effort unless it pushes things forward, which is what I'd like ...

Anyway I'll keep posting here if I make developments ...
summers
 
Posts: 995
Joined: Sat Sep 06, 2014 12:56 pm

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

Postby arti74 » Sat May 05, 2018 8:28 pm

$this->bbcode_second_pass_quote('', 'I') can understand you not continuing try to update

You're wrong here. I am very stubborn in these matters. I can't leave it like that. Yes it is very frustrating, bu I'll do it somehow, someday.
I tried your suggestion to run command step by step but I can't see nothing different..
$this->bbcode_second_pass_code('', 'NSA310>> ide reset

Reset IDE:
Marvell Serial ATA Adapter
Integrated Sata device found
[0 0 0]: Enable DMA mode (6)
Device 0 @ 0 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>> ext2load ide 0:1 $(loadaddr) /uImage

4600064 bytes read
NSA310>> bootm $(loadaddr)
## Booting image at 02000000 ...
Image Name: Linux-4.4.97-1-ARCH
Created: 2017-11-11 4:51:55 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4600000 Bytes = 4.4 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
OK

Starting kernel ...

')
It's stuck here, maybe you have some thoughts.

My printenv now:
$this->bbcode_second_pass_code('', 'NSA310>> printenv
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/nfs rw init=/init
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=A203
PRODUCT_NAME=NSA-310
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=ZyXEL Communications Corp.
run_diag=yes
arcNumber=4402
bootargs_stock=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/nfs rw init=/init
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)
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
stdin=serial
stdout=serial
stderr=serial
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
mainlineLinux=yes
CASset=min
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
ethprime=egiga1
netbsd_en=no
vxworks_en=no
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;
disaMvPnp=no
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
hddPowerCtrl=no
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
enaAutoRecovery=yes
kernel_addr=0xc80000
pcieTune=no
ethact=egiga1

Environment size: 2469/131068 bytes

')

Now I reset again to stock and I see this log (hdd part)
$this->bbcode_second_pass_code('', '*** Stage 2: Prepare the root file system ***
Mount system partition...
yaffs: dev is 32505862 name is "mtdblock6" ro
yaffs: passed flags ""
storage_gen_mntfw.sh: no internal volume available
1
WARNING: No valid partition on HDD or no HDD plugged!
WARNING: No valid partition on HDD or no HDD plugged
Boot from RAM disk
Mount system disk image ...
yaffs: dev is 32505860 name is "mtdblock4" rw
yaffs: passed flags ""
/etc/zyxel/conf exist..
Start rcS2 of ZyXEL style
*** Stage 3: Start services on HDD ***
NTFS driver 2.1.29 [Flags: R/O MODULE].
tntfs: module license 'Commercial. For support email ntfs-support@tuxera.com.' taints kernel.
Disabling lock debugging due to kernel taint
Tuxera NTFS driver 3011.12.23 [Flags: R/W MODULE].
PPP generic driver version 2.4.2
PPP MPPE Compression module registered
PPP Deflate Compression module registered
NET: Registered protocol family 24
PPP BSD Compression module registered
modprobe: module fuse not found in modules.dep
Starting PID Fan Control..
P:20, I:1, D:5, SampleRate:10 seconds, ST_CPU:46, ST_ADT7463:46, ST_DauBoard:46
Wt_CPU:0, Wt_ADT7463:0, Wt_DauBoard:1
Tolerance:1 MinPwm:0x40

sda
checking sda
Trying to mount /dev/sda1
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

Fail to mount /dev/sda1
')
I don't get it - this is the unmodified drive, on which everything was running fine... What happened now?
arti74
 
Posts: 75
Joined: Tue Apr 17, 2018 10:33 am
Top

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

Postby summers » Sun May 06, 2018 1:25 pm

OK, it isn't practical to use old uboot, to load new uboot. https://www.denx.de/wiki/view/DULG/CanUBootBeConfiguredSuchThatItCanBeStartedInRAM explains why.

So now to see if we can get dt kernel to boot in old uboot ....
summers
 
Posts: 995
Joined: Sat Sep 06, 2014 12:56 pm

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

Postby summers » Sun May 06, 2018 5:06 pm

Yeh ha! Have just managed to get uboot to boot a device tree kernel without setting the device tree in uboot!

So first create the uImage

$this->bbcode_second_pass_code('', 'cat zImage dtbs/kirkwood-nsa310.dtb > zImage_w_nsa310dtb
mkimage -A arm -O linux -T kernel -C none -n "Linux 4.16.7-1 with nsa310 dt" -a 0x810000 -e 0x810000 -d zImage_w_nsa310dtb uImage_w_nsa310dtb
')
Then reboot, and in uboot. First set up the "bootargs" in particular make sure that the root points to your root hard disk.

0x810000 is good on a nsa325 - I'll check if its good for the nsa310.

Then
$this->bbcode_second_pass_code('', 'ide reset
load ide 0:1 0x850000 /boot/uImage_w_nsa310dtb
setenv bootargs console=ttyS0,115200 mtdparts=orion_nand:0xC0000(uboot),0x40000(uboot_env),0x80000(old_uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=PARTUUID=94a2dc27-01 rw rootwait
bootm 0x850000')
And the machine boots into a dt kernel.

Note I stated that you load from the 0th ide device, partition 1. For me thats my root. You can check its right with "ext4ls ide 0:1". Make sure you change the bootargs to ones suitable for you - this is just what I need.

I've done you a uImage that has the nsa310 device tree with the nand chip time already changed, I'll see if I can upload it for you.

Anyway once in a dt kernel with chip time changed, hopefully you can write to your nand!

Doah, can't uplaod it. Guess a problem as it 5MB. Could email it (if you can take big emails), or I'll see if I can upload to a web site.

OK you should be able to download the uImage from http://davidjohnsummers.uk/uImage_w_nsa310dtb it has md5sum:

$this->bbcode_second_pass_code('', '9aa98e9a91f016f245ccd65aa5bd5f7b uImage_w_nsa310dtb')

And problems with your current set up, only thing I can see that may cause an issue is do you want your root on /dev/nfs ? Usually it would be a hard disk inside the nas ....

And if I had to guess why you get no output when the kernel is uncompressed, maybe the bootargs is set wrong, do you set the console=ttyS0,115200 so linux knows where to send output? From the variables looks liek you need to type something like:
$this->bbcode_second_pass_code('', 'run bootcmd_linux')
To boot into arch ...
summers
 
Posts: 995
Joined: Sat Sep 06, 2014 12:56 pm

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

Postby arti74 » Sun May 06, 2018 9:51 pm

Thank you summers. Today I'm not in shape to check all of this (have big heat and tooth ache), hopefully I'll get better soon....
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 arti74 » Mon May 07, 2018 10:19 am

This is what I did, and results from it:
$this->bbcode_second_pass_code('', 'NSA310>> setenv arcNumber 4402
NSA310>> setenv mainlineLinux yes
NSA310>> setenv 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'
NSA310>> setenv 'bootcmd_linux=setenv bootargs $(bootargs_linux); ide reset; ext2load ide 0:1 $(loadaddr) /uImage; bootm $(loadaddr)'
NSA310>> saveenv
Saving Environment to NAND...
Erasing Nand...Writing to Nand... done
NSA310>> run bootcmd_linux
Unknown command 'setenv=bootargs' - try 'help'

Reset IDE:
Marvell Serial ATA Adapter
Integrated Sata device found
[0 0 0]: Enable DMA mode (6)
Device 0 @ 0 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)


5155808 bytes read
## Booting image at 02000000 ...
Image Name: Linux 4.16.7-1 with nsa310 dt
Created: 2018-05-06 17:04:24 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 5155744 Bytes = 4.9 MB
Load Address: 00810000
Entry Point: 00810000
Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.16.7-1-ARCH (builduser@leming) (gcc version 7.3.1 20180406 (GCC)) #1 PREEMPT Thu May 3 00:35:40 UTC 2018
[ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] OF: fdt: Machine model: ZyXEL NSA310
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] random: get_random_bytes called from start_kernel+0x80/0x424 with crng_init=0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 64960
[ 0.000000] Kernel command line: 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
[ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[ 0.000000] Memory: 248444K/262144K available (7543K kernel code, 599K rwdata, 1692K rodata, 356K init, 681K bss, 13700K reserved, 0K cma-reserved)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xd0800000 - 0xff800000 ( 752 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB)
[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[ 0.000000] .text : 0x(ptrval) - 0x(ptrval) (7544 kB)
[ 0.000000] .init : 0x(ptrval) - 0x(ptrval) ( 356 kB)
[ 0.000000] .data : 0x(ptrval) - 0x(ptrval) ( 600 kB)
[ 0.000000] .bss : 0x(ptrval) - 0x(ptrval) ( 682 kB)
[ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[ 0.000007] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[ 0.000038] Switching to timer-based delay loop, resolution 5ns
[ 0.000239] Console: colour dummy device 80x30
[ 0.000269] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[ 0.000291] pid_max: default: 32768 minimum: 301
[ 0.000631] Security Framework initialized
[ 0.000796] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.000816] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.001736] CPU: Testing write buffer coherency: ok
[ 0.002712] Setting up static identity map for 0x8200 - 0x8258
[ 0.002965] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[ 0.003177] Hierarchical SRCU implementation.
[ 0.004369] devtmpfs: initialized
[ 0.009136] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.009160] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.009515] pinctrl core: initialized pinctrl subsystem
[ 0.010725] NET: Registered protocol family 16
[ 0.011160] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.012521] cpuidle: using governor ladder
[ 0.012581] cpuidle: using governor menu
[ 0.013025] Feroceon L2: Enabling L2
[ 0.013067] Feroceon L2: Cache support initialised.
[ 0.017962] No ATAGs?
[ 0.027434] vgaarb: loaded
[ 0.027731] SCSI subsystem initialized
[ 0.028147] usbcore: registered new interface driver usbfs
[ 0.028203] usbcore: registered new interface driver hub
[ 0.028287] usbcore: registered new device driver usb
[ 0.028392] pps_core: LinuxPPS API ver. 1 registered
[ 0.028401] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[ 0.028429] PTP clock support registered
[ 0.029358] clocksource: Switched to clocksource orion_clocksource
[ 0.094295] VFS: Disk quotas dquot_6.6.0
[ 0.094390] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.094598] FS-Cache: Loaded
[ 0.104058] NET: Registered protocol family 2
[ 0.104790] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[ 0.104828] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.104861] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[ 0.104891] TCP: Hash tables configured (established 2048 bind 2048)
[ 0.104989] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.105012] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.105248] NET: Registered protocol family 1
[ 0.105742] RPC: Registered named UNIX socket transport module.
[ 0.105754] RPC: Registered udp transport module.
[ 0.105760] RPC: Registered tcp transport module.
[ 0.105767] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.107745] Initialise system trusted keyrings
[ 0.107943] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[ 0.117491] FS-Cache: Netfs 'nfs' registered for caching
[ 0.118166] NFS: Registering the id_resolver key type
[ 0.118195] Key type id_resolver registered
[ 0.118204] Key type id_legacy registered
[ 0.118246] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[ 0.118854] fuse init (API version 7.26)
[ 0.125923] Key type asymmetric registered
[ 0.125938] Asymmetric key parser 'x509' registered
[ 0.126020] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 0.126033] io scheduler noop registered
[ 0.126041] io scheduler deadline registered
[ 0.126388] io scheduler cfq registered (default)
[ 0.126400] io scheduler mq-deadline registered
[ 0.126408] io scheduler kyber registered
[ 0.126703] io scheduler bfq registered
[ 0.128227] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[ 0.130282] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[ 0.130300] pci_bus 0000:00: root bus resource [io 0x1000-0xfffff]
[ 0.130311] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[ 0.130323] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 0.130601] PCI: bus0: Fast back to back transfers disabled
[ 0.130617] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 0.131159] PCI: bus1: Fast back to back transfers disabled
[ 0.131210] pci 0000:00:01.0: BAR 8: assigned [mem 0xe0000000-0xe00fffff]
[ 0.131225] pci 0000:00:01.0: BAR 7: assigned [io 0x10000-0x10fff]
[ 0.131242] pci 0000:01:00.0: BAR 6: assigned [mem 0xe0000000-0xe000ffff pref]
[ 0.131257] pci 0000:01:00.0: BAR 4: assigned [mem 0xe0010000-0xe0013fff 64bit pref]
[ 0.131278] pci 0000:01:00.0: BAR 2: assigned [mem 0xe0014000-0xe0014fff 64bit pref]
[ 0.131297] pci 0000:01:00.0: BAR 0: assigned [io 0x10000-0x100ff]
[ 0.131311] pci 0000:00:01.0: PCI bridge to [bus 01]
[ 0.131322] pci 0000:00:01.0: bridge window [io 0x10000-0x10fff]
[ 0.131336] pci 0000:00:01.0: bridge window [mem 0xe0000000-0xe00fffff]
[ 0.131799] mv_xor f1060800.xor: Marvell shared XOR driver
[ 0.190497] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[ 0.190733] mv_xor f1060900.xor: Marvell shared XOR driver
[ 0.250490] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[ 0.254589] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 0.255773] console [ttyS0] disabled
[ 0.255836] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[ 0.942370] console [ttyS0] enabled
[ 0.956643] brd: module loaded
[ 0.967105] loop: module loaded
[ 0.970934] sata_mv f1080000.sata: slots 32 ports 2
[ 0.978502] scsi host0: sata_mv
[ 0.982293] scsi host1: sata_mv
[ 0.985651] ata1: SATA max UDMA/133 irq 32
[ 0.989827] ata2: SATA max UDMA/133 irq 32
[ 0.994757] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[ 1.001245] nand: Samsung NAND 128MiB 3,3V 8-bit
[ 1.005886] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[ 1.013522] Scanning device for bad blocks
[ 1.084455] Bad eraseblock 631 at 0x000004ee0000
[ 1.130652] 9 ofpart partitions found on MTD device orion_nand
[ 1.136509] Creating 9 MTD partitions on "orion_nand":
[ 1.141700] 0x000000000000-0x000000100000 : "uboot"
[ 1.146994] 0x000000100000-0x000000180000 : "uboot_env"
[ 1.152600] 0x000000180000-0x000000200000 : "key_store"
[ 1.158182] 0x000000200000-0x000000280000 : "info"
[ 1.163335] 0x000000280000-0x000000c80000 : "etc"
[ 1.168424] 0x000000c80000-0x000001680000 : "kernel_1"
[ 1.173995] 0x000001680000-0x000004640000 : "rootfs1"
[ 1.179690] 0x000004640000-0x000005040000 : "kernel_2"
[ 1.185228] 0x000005040000-0x000008000000 : "rootfs2"
[ 1.191387] libphy: Fixed MDIO Bus: probed
[ 1.196218] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[ 1.201885] pci 0000:00:01.0: enabling device (0140 -> 0143)
[ 1.208255] r8169 0000:01:00.0 eth0: RTL8168d/8111d at 0x(ptrval), 00:00:00:00:00:30, XID 083000c0 IRQ 35
[ 1.217912] r8169 0000:01:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[ 1.226638] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.233243] ehci-pci: EHCI PCI platform driver
[ 1.237756] ehci-orion: EHCI orion driver
[ 1.242009] orion-ehci f1050000.ehci: EHCI Host Controller
[ 1.247581] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[ 1.255468] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[ 1.289382] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[ 1.296203] hub 1-0:1.0: USB hub found
[ 1.300072] hub 1-0:1.0: 1 port detected
[ 1.304634] usbcore: registered new interface driver uas
[ 1.310129] usbcore: registered new interface driver usb-storage
[ 1.316223] usbcore: registered new interface driver ums-alauda
[ 1.322260] usbcore: registered new interface driver ums-cypress
[ 1.328358] usbcore: registered new interface driver ums-datafab
[ 1.334529] usbcore: registered new interface driver ums_eneub6250
[ 1.340798] usbcore: registered new interface driver ums-freecom
[ 1.346859] usbcore: registered new interface driver ums-isd200
[ 1.352856] usbcore: registered new interface driver ums-jumpshot
[ 1.359005] usbcore: registered new interface driver ums-karma
[ 1.364915] usbcore: registered new interface driver ums-onetouch
[ 1.371103] usbcore: registered new interface driver ums-realtek
[ 1.377170] usbcore: registered new interface driver ums-sddr09
[ 1.383168] usbcore: registered new interface driver ums-sddr55
[ 1.389149] usbcore: registered new interface driver ums-usbat
[ 1.395341] mousedev: PS/2 mouse device common for all mice
[ 1.401395] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[ 1.408382] i2c /dev entries driver
[ 1.412917] orion_wdt: Initial timeout 21 sec
[ 1.418131] sdhci: Secure Digital Host Controller Interface driver
[ 1.424406] sdhci: Copyright(c) Pierre Ossman
[ 1.428876] sdhci-pltfm: SDHCI platform and OF driver helper
[ 1.436167] ledtrig-cpu: registered to indicate activity on CPUs
[ 1.442331] usbcore: registered new interface driver r8712u
[ 1.448153] gre: GRE over IPv4 demultiplexor driver
[ 1.453131] NET: Registered protocol family 17
[ 1.457683] Key type dns_resolver registered
[ 1.462798] registered taskstats version 1
[ 1.466909] Loading compiled-in X.509 certificates
[ 1.473133] Key type encrypted registered
[ 1.478992] console [netcon0] enabled
[ 1.482774] netconsole: network logging started
[ 1.488072] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[ 1.495184] rtc-mv f1010300.rtc: setting system clock to 2018-05-07 10:15:45 UTC (1525688145)
[ 1.503862] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[ 1.539827] ata1.00: ATA-7: SAMSUNG HD753LJ, 1AA01110, max UDMA7
[ 1.545886] ata1.00: 1465149168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[ 1.579726] ata1.00: configured for UDMA/133
[ 1.594890] scsi 0:0:0:0: Direct-Access ATA SAMSUNG HD753LJ 1110 PQ: 0 ANSI: 5
[ 1.604305] sd 0:0:0:0: [sda] 1465149168 512-byte logical blocks: (750 GB/699 GiB)
[ 1.612250] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 1.617825] sd 0:0:0:0: [sda] Write Protect is off
[ 1.623011] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 1.639118] sda: sda1 sda2
[ 1.643435] sd 0:0:0:0: [sda] Attached SCSI disk
[ 1.669411] usb 1-1: new high-speed USB device number 2 using orion-ehci
[ 1.872734] hub 1-1:1.0: USB hub found
[ 1.877019] hub 1-1:1.0: 4 ports detected
[ 1.963101] ata2: SATA link down (SStatus 0 SControl F300)
[ 1.979053] Root-NFS: no NFS server address
[ 1.983381] VFS: Unable to mount root fs via NFS, trying floppy.
[ 1.989987] VFS: Cannot open root device "nfs" or unknown-block(2,0): error -6
[ 1.997268] Please append a correct "root=" boot option; here are the available partitions:
[ 2.005762] 0100 8192 ram0
[ 2.005767] (driver?)
[ 2.012027] 0101 8192 ram1
[ 2.012032] (driver?)
[ 2.018223] 0102 8192 ram2
[ 2.018228] (driver?)
[ 2.024508] 0103 8192 ram3
[ 2.024513] (driver?)
[ 2.030696] random: fast init done
[ 2.034177] 0104 8192 ram4
[ 2.034181] (driver?)
[ 2.040411] 0105 8192 ram5
[ 2.040416] (driver?)
[ 2.046603] 0106 8192 ram6
[ 2.046607] (driver?)
[ 2.052815] 0107 8192 ram7
[ 2.052820] (driver?)
[ 2.059004] 0108 8192 ram8
[ 2.059008] (driver?)
[ 2.065251] 0109 8192 ram9
[ 2.065255] (driver?)
[ 2.071421] 010a 8192 ram10
[ 2.071424] (driver?)
[ 2.077645] 010b 8192 ram11
[ 2.077648] (driver?)
[ 2.083904] 010c 8192 ram12
[ 2.083907] (driver?)
[ 2.090317] 010d 8192 ram13
[ 2.090321] (driver?)
[ 2.096540] 010e 8192 ram14
[ 2.096543] (driver?)
[ 2.102785] 010f 8192 ram15
[ 2.102789] (driver?)
[ 2.109006] 0800 732574584 sda
[ 2.109010] driver: sd
[ 2.115183] 0801 16384 sda1 ab197877-01
[ 2.115187]
[ 2.121594] 0802 732557176 sda2 ab197877-02
[ 2.121597]
[ 2.127986] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
[ 2.136286] CPU: 0 PID: 1 Comm: swapper Not tainted 4.16.7-1-ARCH #1
[ 2.142666] Hardware name: Marvell Kirkwood (Flattened Device Tree)
[ 2.148977] [<c00116a0>] (unwind_backtrace) from [<c000e59c>] (show_stack+0x10/0x14)
[ 2.156757] [<c000e59c>] (show_stack) from [<c002055c>] (panic+0xc8/0x25c)
[ 2.163669] [<c002055c>] (panic) from [<c09402a0>] (mount_block_root+0x1c4/0x2cc)
[ 2.171190] [<c09402a0>] (mount_block_root) from [<c09405c8>] (mount_root+0x100/0x144)
[ 2.179149] [<c09405c8>] (mount_root) from [<c0940764>] (prepare_namespace+0x158/0x1b8)
[ 2.187190] [<c0940764>] (prepare_namespace) from [<c093fe78>] (kernel_init_freeable+0x174/0x1bc)
[ 2.196109] [<c093fe78>] (kernel_init_freeable) from [<c075e74c>] (kernel_init+0x8/0xf8)
[ 2.204235] [<c075e74c>] (kernel_init) from [<c00090e0>] (ret_from_fork+0x14/0x34)
[ 2.211834] Exception stack(0xcf883fb0 to 0xcf883ff8)
[ 2.216911] 3fa0: 00000000 00000000 00000000 00000000
[ 2.225127] 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 2.233339] 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 2.239993] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
')
I have my root on the second, ext4 partition - the first one is ext2 and boot. The uImage is yours...
I'm closer this time it seems. But why this is still there? $this->bbcode_second_pass_code('', 'root=/dev/nfs'). I just made setenv as described at the beginning - right after resetenv end reset.

EDIT:
I set bootargs like this:
$this->bbcode_second_pass_code('', 'setenv bootargs=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')
and now i have:
$this->bbcode_second_pass_code('', 'NSA310>> run bootcmd_linux
Unknown command 'setenv=bootargs' - try 'help'

Reset IDE:
Marvell Serial ATA Adapter
Integrated Sata device found
[0 0 0]: Enable DMA mode (6)
Device 0 @ 0 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)


5155808 bytes read
## Booting image at 02000000 ...
Image Name: Linux 4.16.7-1 with nsa310 dt
Created: 2018-05-06 17:04:24 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 5155744 Bytes = 4.9 MB
Load Address: 00810000
Entry Point: 00810000
Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
')
Then I hear the hdd is loading something, but it isn't visible... Only one led is on - the blue one.
EDIT12 - now it is working!
The correct bootarg is this:
$this->bbcode_second_pass_code('', '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
')

$this->bbcode_second_pass_code('', 'Arch Linux 4.16.7-1-ARCH (ttyS0)

alarm login: rtorrent
Password:
Last login: Wed May 2 17:56:59 on ttyS0
[rtorrent@alarm ~]$ dmesg | grep Bad
[ 1.181542] Bad eraseblock 631 at 0x000004ee0000
')
And just one Bad eraseblock :)

Now, what should I do when I have this?:
$this->bbcode_second_pass_code('', '[rtorrent@alarm ~]$ yaourt -Ss kirkwood
core/linux-kirkwood 4.4.97-1 [installed]
The Linux Kernel and modules - Marvell Kirkwood
core/linux-kirkwood-dt 4.16.6-1
The Linux Kernel and modules - Marvell Kirkwood DT
core/linux-kirkwood-dt-headers 4.16.6-1 [installed]
Header files and scripts for building modules for linux kernel - Marvell Kirkwood DT
core/linux-kirkwood-headers 4.4.97-1
Header files and scripts for building modules for linux kernel - Marvell Kirkwood
')
The newest dt kernel from the repo is older than you gave me.
$this->bbcode_second_pass_code('', '[rtorrent@alarm ~]$ uname -r
4.16.7-1-ARCH')

fw_printenv command gives me:
$this->bbcode_second_pass_code('', 'Warning: Bad CRC, using default environment')
Maybe I should try to install (downgrade) the original dt-kernel now? Well, I guess not since the problem with the Bad Nand blocks will appear again...
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 3 guests