Welcome! Log In Create A New Profile

Advanced

NAS 220 doesn't work with debian install

Posted by gigirock 
NAS 220 doesn't work with debian install
October 13, 2021 05:14PM
Hi all,
Proud to be in this forum where a lot of experts are.
I have a seagate nas220 bricked as someone starts an (official) upgrade and tried to stop it disconnecting power supply connector.

I have a 3.3V rs232 connection to the device and a stable connection , following https://github.com/hn/seagate-blackarmor-nas I tried several times and ways to get debian installed but the point where i'm stuck is :

## Booting kernel from Legacy Image at 00040000 ...
Image Name: kernel 4.19.0-17-marvell
Created: 2021-09-29 21:27:21 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2068066 Bytes = 2 MiB
Load Address: 00040000
Entry Point: 00040000
Verifying Checksum ... OK
Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid
nas220>


I can boot from usb easly and run the installer , i tried openwrt but with the same results. Anyway I'm interested in install Debian to use the nas as nas. No need for special apps o application. I want to install nas220 in a local network and share /yourbackup to some users that will backup their files.
As I learned from other post in the forum i place my env here....

nas220> printenv
autoload=no
autostart=no
baudrate=115200
bootargs=console=ttyS0,115200
bootargs_base=console=ttyS0,115200
bootcmd=run bootcmd_nand
bootcmd_nand=setenv bootargs ${bootargs_base} ${mtdparts} ${bootargs_extra}; nand read.e 0x40000 0xc0000 0x500000; nand read.e 0x800000 0x5c0000 0x1a3fff0; bootm 0x40000 0x800000
bootcmd_rescue=setenv bootargs_extra rescue/enable=true; run bootcmd_usb
bootcmd_usb=setenv bootargs ${bootargs_base} ${mtdparts} ${bootargs_extra}; usb start; fatload usb 0:1 0x40000 uImage-dtb; fatload usb 0:1 0x800000 uInitrd; bootm 0x40000 0x800000
bootdelay=5
ethact=egiga0
ethaddr=00:00:00:00:00:00 ( yes yes i placed the mac address on the nas label.... :) )
fdtcontroladdr=7b56608
mtdids=nand0=orion_nand
mtdparts=cmdlinepart.mtdparts=orion_nand:0xa0000@0x0(uboot),0x010000@0xa0000(env),0x500000@0xc0000(uimage),0x1a40000@0x5c0000(rootfs)
stderr=serial
stdin=serial
stdout=serial
Re: NAS 220 doesn't work with debian install
October 13, 2021 07:32PM
gigirock,

You could try to boot Debian-5.13.6-kirkwood-tld-1-rootfs-bodhi.tar.bz2.

See here for how to boot with stock Kirkwood u-boot:

https://forum.doozan.com/read.php?2,102054,105374#msg-105374

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NAS 220 doesn't work with debian install
October 13, 2021 11:51PM
Current U-Boot source has support for the Seagate NAS220 also, so you could also build and replace the stock U-Boot. OpenWrt has a binary available at https://downloads.openwrt.org/releases/21.02.0/targets/kirkwood/generic/u-boot-nas220/u-boot.kwb

ray
Re: NAS 220 doesn't work with debian install
October 15, 2021 07:25PM
nothing to do i have u-boot new version
i used your Debian-5.13.6-kirkwood-tld-1-rootfs-bodhi.tar.bz2 files on usb/SD
I tried ext3 or ext4 fs
The results is always kernel "wrong image format"


nas220> printenv
autoload=no
autostart=no
baudrate=115200
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial
bootargs_base=console=ttyS0,115200
bootcmd=usb reset; run usb_bootcmd; usb stop; reset
bootcmd_nand=setenv bootargs ${bootargs_base} ${mtdparts} ${bootargs_extra}; nand read.e 0x40000 0xc0000 0x500000; nand read.e 0x800000 0x5c0000 0x1a3fff0; bootm 0x40000 0x800000
bootcmd_rescue=setenv bootargs_extra rescue/enable=true; run bootcmd_usb
bootcmd_usb=setenv bootargs ${bootargs_base} ${mtdparts} ${bootargs_extra}; usb start; fatload usb 0:1 0x40000 uImage-dtb; fatload usb 0:1 0x800000 uInitrd; bootm 0x40000 0x800000
bootdelay=5
ethact=egiga0
ethaddr=00:10:75:07:62:85
fdtcontroladdr=7b55608
load_uimage=ext4load usb 0:1 0x800000 /boot/uImage
load_uinitrd=ext4load usb 0:1 0x2100000 /boot/uInitrd
mtdids=nand0=orion_nand
mtdparts=cmdlinepart.mtdparts=orion_nand:0xa0000@0x0(uboot),0x010000@0xa0000(env),0x500000@0xc0000(uimage),0x1a40000@0x5c0000(rootfs)
stderr=serial
stdin=serial
stdout=serial
usb_boot=mw 0x800000 0 1; run load_uimage; run load_uinitrd; bootm 0x800000 0x2100000
usb_bootcmd=run usb_set_bootargs; run usb_boot
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial

Environment size: 1257/65532 bytes
nas220> run usb_bootcmd
Wrong Image Format for bootm command
ERROR: can't get kernel image!
nas220>
Re: NAS 220 doesn't work with debian install
October 15, 2021 08:08PM
gigirock,

The rootfs should be Ext3.

And,

load_uimage=ext4load usb 0:1 0x800000 /boot/uImage 
load_uinitrd=ext4load usb 0:1 0x2100000 /boot/uInitrd

should be
load_uimage=ext2load usb 0:1 0x800000 /boot/uImage 
load_uinitrd=ext2load usb 0:1 0x2100000 /boot/uInitrd

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NAS 220 doesn't work with debian install
October 16, 2021 10:16AM
Yes thank you but with ext3 ( called by ext2load ?) filesystem , my linux box ( the pc from I'm writing now) has strange behaviour like take some minutes to complete the 'sync' command to flush all the files to the SD, that is very hot when I unplug it from the PC, I also saw a note about the version 20.x of the u-boot is able to load rootfs from ext4 filesystems
https://github.com/ARM-software/u-boot/blob/master/doc/README.ext4

is there a way to 'load' the file through the tftp command ?
I think the type of file used to load kernel is somehow not compatible with my configuration, but I don't know where the issue or error is coming from.
I will investigate more.
Re: NAS 220 doesn't work with debian install
October 16, 2021 02:50PM
gigirock,

> Yes thank you but with ext3 ( called by ext2load
> ?) filesystem , my linux box ( the pc from I'm
> writing now) has strange behaviour like take some
> minutes to complete the 'sync' command to flush
> all the files to the SD

Ext2load command is used for both Ext2 and Ext3 file system.

> version 20.x of the u-boot is able to load rootfs
> from ext4 filesystems
> https://github.com/ARM-software/u-boot/blob/master/doc/README.ext4

That's just general mainline u-boot capability. You stock u-boot is likely quite old. None of old stock u-boots has Ext4 capability.

And to boot manually step by step, you must do

usb reset
setenv load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
setenv load_uinitrd 'ext2load usb 0:1 0x2100000 /boot/uInitrd'
run usb_bootcmd

Do the commands above and post the entire serial console log (everything from u-boot banner until the last line on the terminal).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NAS 220 doesn't work with debian install
October 16, 2021 04:45PM
something is moving.....
I changed SD card with an old one about 4Gb and something happens:

How to create the right image for my Seagate nas220 ?
mkimage in /boot ?

nas220> run usb_bootcmd
5435888 bytes read in 313 ms (16.6 MiB/s)
9671091 bytes read in 536 ms (17.2 MiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.13.6-kirkwood-tld-1
   Created:      2021-09-24   0:22:58 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5435824 Bytes = 5.2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 02100000 ...
   Image Name:   initramfs-5.13.6-kirkwood-tld-1
   Created:      2021-09-24   1:06:32 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9671027 Bytes = 9.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image
   Loading Ramdisk to 0721b000, end 07b54173 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Error: invalid dtb and unrecognized/unsupported machine ID
  r1=0x00000691, r2=0x00000100
  r2[]=05 00 00 00 01 00 41 54 00 00 00 00 00 00 00 00
Available machine support:

ID (hex)        NAME
ffffffff        Generic DT based system
ffffffff        Marvell Kirkwood (Flattened Device Tree)

Please check your kernel config and/or bootloader.

=====
moderator edit: please use code tags (formatted code buttom) to post log.



Edited 1 time(s). Last edit at 10/16/2021 04:48PM by bodhi.
Re: NAS 220 doesn't work with debian install
October 16, 2021 04:51PM
You need to do Step 4 when you create the rootfs.


Quote

4. (Stock u-boot only) Create uImage with embedded DTB for booting with older u-boots (2012 or earlier). Skip this step if you have installed the latest U-Boot for Kirkwood (or are installing this u-boot at the same time, or running kwboot with latest u-boot image).

Please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box (see the folder /media/sdb1/boot/dts for the exact spelling of your Kirkwood box name).

Generate the uImage with DTB embedded inside:
cd /media/sdb1/boot
cp -a zImage-5.13.6-kirkwood-tld-1 zImage.fdt
cat dts/kirkwood-goflexnet.dtb >> zImage.fdt
mv uImage uImage.orig
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.13.6-kirkwood-tld-1 -d zImage.fdt uImage
sync

Your box DTB file name is kirkwood-blackarmor-nas220.dtb.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NAS 220 doesn't work with debian install
October 18, 2021 10:30AM
Hi Bodhi, just like always you are right. :)

Ok now I have a kind of boot , also openwrt starts as expected, but I prefer to have a pure Debian enviroment

No way to start from nand,
How to check if I have some bad blocks ?

Can I test to start from hdd ?
I guess to create a partition etx3 named rootfs with the same files I have in actual SD ( boot from USB/SD is ok now) , I can create a chroot and modify fstab in order to mount hard disk from the beginning, then I can manage to have a Debian NAS box.

If I will reach this status , then can I "apt update & apt upgrade" without problems ?
Re: NAS 220 doesn't work with debian install
October 18, 2021 03:32PM
gigirock,


> Ok now I have a kind of boot , also openwrt starts
> as expected, but I prefer to have a pure Debian
> enviroment

That's booting with Debian-5.13.6-kirkwood-tld-1-rootfs-bodhi.tar.bz2. on USB, which you did.

>
> No way to start from nand,
> How to check if I have some bad blocks ?

dmesg | grep -i bad


> Can I test to start from hdd ?
> I guess to create a partition etx3 named rootfs
> with the same files I have in actual SD ( boot
> from USB/SD is ok now)

That's all you need to do to prepare the HDD rootfs. Note that when you copy the root file system from SD to HDD, you must be root user.

Wiki thread:
Quote
https://forum.doozan.com/read.php?2,23630
Backup and Cloning rootfs

Back up a live rootfs using rsync
CrashPlan 4.3.0
Backup/Restore rootfs using tar command
Adjust udev rules after cloning rootfs
Stock Pogoplug rootfs
How to clone a rootfs from one Kirkwood box to another: Step 1 and Step 2
How to clone SATA rootfs to USB rootfs

> I can create a chroot and
> modify fstab in order to mount hard disk from the
> beginning, then I can manage to have a Debian NAS
> box.

No need to do that. You can adjust the u-boot envs to boot from the HDD rootfs. The fstab is already correct for both USB and HDD. Your bootargs contains this root device:
root=LABEL=rootfs

======

To boot with HDD rootfs, the envs should be:


load_uimage=ext2load ide 0:1 0x800000 /boot/uImage 
load_uinitrd=ext2load ide 0:1 0x2100000 /boot/uInitrd

sata_set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial 
sata_boot=mw 0x800000 0 1; run load_uimage; run load_uinitrd; bootm 0x800000 0x2100000 
sata_bootcmd=run sata_set_bootargs; run sata_boot

bootcmd=ide reset; run sata_bootcmd; reset

Note that usb_set_bootargs and sata_set_bootargs are identical.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NAS 220 doesn't work with debian install
October 19, 2021 04:53PM
I have :

nas220> nand bad

Device 0 bad blocks:
0127c000
01284000
0128c000

but the help system said: nand markbad off [...] - mark bad block(s) at offset (UNSAFE)
are this 3 blocks already marked as bad ?
Is it a good idea markbad the 3 bad blocks ?
Re: NAS 220 doesn't work with debian install
October 19, 2021 05:13PM
gigirock,

Quote

>
> How to check if I have some bad blocks ?

dmesg | grep -i bad

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NAS 220 doesn't work with debian install
October 20, 2021 06:24PM
No chance to start from hdd , because hdd is not seen by u-boot , is the disk gpt or mbr ?
note some examples here , the only command that has an answer is ide reset
No chance to boot from nand, no chance to come back to original firmware ... do I throw away ?

nas220> ide reset

Reset IDE: Bus 0: OK Bus 1: OK 
  Device 0: Model: ST32000542AS Firm: CC95 Ser#: 5XW0M7ZQ
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)
  Device 1: Model: ST32000542AS Firm: CC34 Ser#: 6XW04VRL
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 1907729.0 MB = 1863.0 GB (3907029168 x 512)
nas220> ide info
nas220> ide device ide

Device 0: unknown device
nas220> ide device 0  

Device 0: unknown device
nas220> ide part 0

ide device 0 not available
nas220> ide part ide

ide device 0 not available
nas220> ide part    

no ide partition table available
nas220> diskboot
** No device specified **
nas220> diskboot ide
** No device specified **
nas220> diskboot ide 0:!
nas220> diskboot ide 0:1
nas220> e  
  echo editenv env exit ext2load ext2ls ext4load ext4ls ext4size
nas220> ext2ls ide0
** No device specified **
nas220> ext2ls ide 
** No device specified **
nas220> ext2ls ide 0:1
nas220> ext2ls ide 2:1 
nas220> ext2ls ide 1:1 
nas220> version
U-Boot 2020.04 (Jun 13 2021 - 22:02:19 +0000)
NAS 220

arm-openwrt-linux-muslgnueabi-gcc (OpenWrt GCC 8.4.0 r16172-2aba3e9784) 8.4.0
GNU ld (GNU Binutils) 2.34
nas220> 

Re: NAS 220 doesn't work with debian install
October 20, 2021 06:51PM
gigirock,

> No chance to start from hdd , because hdd is not
> seen by u-boot , is the disk gpt or mbr ?
> note some examples here , the only command that
> has an answer is ide reset
> No chance to boot from nand, no chance to come
> back to original firmware ... do I throw away ?

No need to throw away a good piece of hardware! You can boot to USB Debian rootfs already. Then it is most likely you can boot to HDD Debian rootfs.

With old u-boot, or modern OpenWrt u-boot, the disk should be MBR. But when in doubt, use MBR, no need to use GPT for small disk.

Quote

> nas220> ide reset
>
> Reset IDE: Bus 0: OK Bus 1: OK
> Device 0: Model: ST32000542AS Firm: CC95 Ser#:
> 5XW0M7ZQ
> Type: Hard Disk
> Supports 48-bit addressing
> Capacity: 1907729.0 MB = 1863.0 GB
> (3907029168 x 512)
> Device 1: Model: ST32000542AS Firm: CC34 Ser#:
> 6XW04VRL
> Type: Hard Disk
> Supports 48-bit addressing
> Capacity: 1907729.0 MB = 1863.0 GB
> (3907029168 x 512)

It's a very good sign that the HDDs are recognized like above.

Check partitions:

ide part

And then try to list the files. Assuming you already copied from USB, or create a new Debian rootfs on one of the HDDs.

ext2ls ide 0:1 /boot
ext2ls ide 1:1 /boot

See which one has the rootfs. And then adjust the envs I've posted previously to boot that rootfs. If the rootfs is on the IDE 1 then the 0:1 device below should be 1:1

load_uimage=ext2load ide 0:1 0x800000 /boot/uImage 
load_uinitrd=ext2load ide 0:1 0x2100000 /boot/uInitrd

sata_set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial 
sata_boot=mw 0x800000 0 1; run load_uimage; run load_uinitrd; bootm 0x800000 0x2100000 
sata_bootcmd=run sata_set_bootargs; run sata_boot

bootcmd=ide reset; run sata_bootcmd; reset

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



Edited 3 time(s). Last edit at 10/21/2021 06:38AM by bodhi.
Re: NAS 220 doesn't work with debian install
October 23, 2021 04:21PM
i tried

full disk ext3 or ext4 partition mbr with/without boot flag and
5Gb ext3 or ext4 partition mbr with/without boot flag but from consolle never saw the ext2ls or ext4ls command to work
also ide info never gave me some result.
Ony ide reset works as expected
i want to test an old u-boot , i think the issue is about there.

GiGiRoCk
Re: NAS 220 doesn't work with debian install
October 23, 2021 06:11PM
GiGiRoCk,

Either stock u-boot . But you should try UART booting with kwboot first. Use the stock image that you can find, or use the OpenWrt image.

Example:
https://forum.doozan.com/read.php?3,51739,51919#msg-51919

Or I will build a new 2021.07 u-boot image for you. Looks like the OpenWrt u-boot came straigth from mainline, and there is no SATA support.

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



Edited 1 time(s). Last edit at 10/23/2021 06:32PM by bodhi.
Re: NAS 220 doesn't work with debian install
October 23, 2021 07:51PM
Here is the 2019.10 u-boot for Seagate NAS220 with SATA support.

This is untested. So make sure you can kwboot with this u-boot image.

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



Edited 1 time(s). Last edit at 10/23/2021 08:31PM by bodhi.
Attachments:
open | download - uboot.2019.10-tld-1.nas220.mtd0.kwb (512 KB)
Re: NAS 220 doesn't work with debian install
October 30, 2021 03:14PM
Thank you bodhi,

I'm sorry about my delayed answer , but I'm in trouble with internet connection at home and so I can't be online at night.
Many thanks for your special version of the kwb file for my nas220 , also your version doesn't find hard disks , or better the contents of the filesystem. I'm back to the 11.2017 version of u-boot:
( U-Boot 2017.11 (Dec 18 2018 - 09:52:13 +0100) )
and seems this version is able to read ext3 or fat formatted disk partitions, now i'm checking if I'm able to boot from that, the only way is your way: to copy the contents of / (root) usb ext3 files in a cloned partition on hardisk then configure the u-boot to start from hd. I will try to boot a 'strange' FAT version of filesystem ...

I will inform you about my job
Re: NAS 220 doesn't work with debian install
November 02, 2021 08:58AM
I'm replying myself, ;)

Ok I can boot from hardisk using ext3 filesystem , seems also ext4 fs is recognized, but it is difficult to have a raid 1 for example and boot the device from there.
Maty be I have to create a /boot partition in only one disk and boot from there then create raid 1 on another partiton ( /sda2 for example ) and have raid 1 only on sda2 sdb2 partitions.... but I'm stubborn and I want to boot from nand.

I think the error message I have about "wrong image format" , is related to an error reading in nand , because of some bad block.
I can't realize when the nand is writtten if the 'u-boot' take care about the bad blocks and also during the reading procedure if the bad block are recognized.
Re: NAS 220 doesn't work with debian install
November 02, 2021 03:47PM
gigirock,

> Ok I can boot from hardisk using ext3 filesystem ,

Power up, interrupt serial console,
printenv
And then enter the envs to boo tthe HDD ext3 rootfs. And then boot.

Please port the entire serial bootlog here (from u-boot banner until the login prompt).

> but I'm stubborn and I want to boot from nand.

At the login prompt, log into Debian, and

cat /proc/mtd
dmesg | grep -i bad
cat /etc/fw_env.config

> I can't realize when the nand is writtten if the
> 'u-boot' take care about the bad blocks and also
> during the reading procedure if the bad block are
> recognized.

When you are in Debian, and can see the mtds, then we'll know if the bad blocks are relevant or not. And whether the kernel files can be flashed to NAND.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NAS 220 doesn't work with debian install
November 03, 2021 06:17AM
Ok I will do as you request , in the meantime:

printenv give me back this parameter:

fdtcontroladdr=7b55608

What is it ?

can I disable it with "set fdtcontroladdr" ?
( tonight I will check the contents of that address )
Re: NAS 220 doesn't work with debian install
November 03, 2021 03:58PM
> fdtcontroladdr=7b55608
>
> What is it ?

We are not using that.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NAS 220 doesn't work with debian install
November 03, 2021 05:27PM
Bodhi:

nas220> setenv usb_set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial'
nas220> setenv load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
nas220> setenv load_uinitrd 'ext2load usb 0:1 0x2100000 /boot/uInitrd'
nas220> setenv usb_boot 'mw 0x800000 0 1; run load_uimage; run load_uinitrd; bootm 0x800000 0x2100000'
nas220> setenv usb_bootcmd 'run usb_set_bootargs; run usb_boot'
nas220> printenv
autoload=no
autostart=no
baudrate=115200
bootargs=console=ttyS0,115200 cmdlinepart.mtdparts=orion_nand:0xa0000@0x0(uboot),0x010000@0xa0000(env),0x500000@0xc0000(uimage),0x1a40000@0x5c0000(rootfs)
bootargs_base=console=ttyS0,115200
bootcmd=run bootcmd_nand
bootcmd_nand=setenv bootargs ${bootargs_base} ${mtdparts} ${bootargs_extra}; nand read.e 0x40000 0xc0000 0x500000; nand read.e 0x800000 0x5c0000 0x1a3fff0; b0
bootcmd_rescue=setenv bootargs_extra rescue/enable=true; run bootcmd_usb
bootcmd_usb=setenv bootargs ${bootargs_base} ${mtdparts} ${bootargs_extra}; usb start; fatload usb 0:1 0x40000 uImage-dtb; fatload usb 0:1 0x800000 uInitrd; 0
bootdelay=-1
ethact=egiga0
ethaddr=00:10:75:42:42:42
load_uimage=ext2load usb 0:1 0x800000 /boot/uImage
load_uinitrd=ext2load usb 0:1 0x2100000 /boot/uInitrd
mtdids=nand0=orion_nand
mtdparts=cmdlinepart.mtdparts=orion_nand:0xa0000@0x0(uboot),0x010000@0xa0000(env),0x500000@0xc0000(uimage),0x1a40000@0x5c0000(rootfs)
stderr=serial
stdin=serial
stdout=serial
usb_boot=mw 0x800000 0 1; run load_uimage; run load_uinitrd; bootm 0x800000 0x2100000
usb_bootcmd=run usb_set_bootargs; run usb_boot
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial

Environment size: 1327/65532 bytes
nas220> run usb_bootcmd 
5446�30 bytes read in 509 ms (10.2 MiB/s)
9671091 bytes read in 714 ms (12.9 MiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.13.6-kirkwood-tld-1
   Created:      2021-10-17  14:06:32 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5446266 Bytes = 5.2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 02100000 ...
   Image Name:   initramfs-5.13.6-kirkwood-tld-1
   Created:      2021-09-24   1:06:32 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9671027 Bytes = 9.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
   Loading Ramdisk to 071f9000, end 07b32173 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.13.6-kirkwood-tld-1 (root@tldDebian) (gcc (Debian 8.3.0-6) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #1.0 PREEMP1
[    0.000000][    T0] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000][    T0] CPU: VIVT data cache, VIVT instruction cache
[    0.000000][    T0] OF: fdt: Machine model: Seagate Blackarmor NAS220
[    0.000000][    T0] printk: bootconsole [earlycon0] enabled
[    0.000000][    T0] Memory policy: Data cache writeback
[    0.000000][    T0] Zone ranges:
[    0.000000][    T0]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000][    T0] Movable zone start for each node
[    0.000000][    T0] Early memory node ranges
[    0.000000][    T0]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000][    T0] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000][    T0] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial
[    0.000000][    T0] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000][    T0] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000][    T0] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000][    T0] Memory: 101108K/131072K available (11264K kernel code, 1553K rwdata, 4272K rodata, 1024K init, 309K bss, 29964K reserved, 0K cma-reser)
[    0.000000][    T0] random: get_random_u32 called from ____cache_alloc+0x408/0x7b4 with crng_init=0
[    0.000000][    T0] trace event string verifier disabled
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0]  Trampoline variant of Tasks RCU enabled.
[    0.000000][    T0]  Tracing variant of Tasks RCU enabled.
[    0.000000][    T0] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000][    T0] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000][    T0] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 11467562657 ns
[    0.000003][    T0] sched_clock: 32 bits at 166MHz, resolution 6ns, wraps every 12884901885ns
[    0.008560][    T0] Switching to timer-based delay loop, resolution 6ns
[    0.016473][    T0] Console: colour dummy device 80x30
[    0.021768][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 333.33 BogoMIPS (lpj=1666666)
[    0.033061][    T0] pid_max: default: 32768 minimum: 301
[    0.039060][    T0] LSM: Security Framework initializing
[    0.044629][    T0] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.052726][    T0] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.063460][    T0] CPU: Testing write buffer coherency: ok
[    0.072921][    T1] Setting up static identity map for 0x100000 - 0x100058
[    0.080350][    T1] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.086685][    T1] rcu: Hierarchical SRCU implementation.
[    0.094472][    T1] devtmpfs: initialized
[    0.107407][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.118112][    T1] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.181892][    T1] prandom32: self test passed (less than 6 bits correlated)
[    0.189107][    T1] prandom: seed boundary self test passed
[    0.201017][    T1] prandom: 100 self tests passed
[    0.205823][    T1] pinctrl core: initialized pinctrl subsystem
[    0.214344][    T1] NET: Registered protocol family 16
[    0.220898][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.230075][    T1] audit: initializing netlink subsys (disabled)
[    0.238365][    T1] thermal_sys: Registered thermal governor 'step_wise'
[    0.239013][   T16] audit: type=2000 audit(0.220:1): state=initialized audit_enabled=0 res=1
[    0.254398][    T1] cpuidle: using governor ladder
[    0.259415][    T1] cpuidle: using governor menu
[    0.264806][    T1] Feroceon L2: Enabling L2
[    0.269226][    T1] Feroceon L2: Cache support initialised.
[    0.289492][    T1] No ATAGs?
[    2.568569][    C0] random: fast init done
[    7.629550][   T39] "cryptomgr_test" (39) uses obsolete ecb(arc4) skcipher
[    7.675851][   T59] wait_for_initramfs() called before rootfs_initcalls
[    7.888687][    T1] raid6: int32x8  gen()    73 MB/s
[    8.058794][    T1] raid6: int32x8  xor()    46 MB/s
[    8.228807][    T1] raid6: int32x4  gen()    76 MB/s
[    8.398621][    T1] raid6: int32x4  xor()    48 MB/s
[    8.568828][    T1] raid6: int32x2  gen()    98 MB/s
[    8.738718][    T1] raid6: int32x2  xor()    60 MB/s
[    8.908654][    T1] raid6: int32x1  gen()    75 MB/s
[    9.078694][    T1] raid6: int32x1  xor()    43 MB/s
[    9.083650][    T1] raid6: using algorithm int32x2 gen() 98 MB/s
[    9.089660][    T1] raid6: .... xor() 60 MB/s, rmw enabled
[    9.095133][    T1] raid6: using intx1 recovery algorithm
[    9.100922][    T1] vgaarb: loaded
[    9.105158][    T1] SCSI subsystem initialized
[    9.110432][    T1] usbcore: registered new interface driver usbfs
[    9.116723][    T1] usbcore: registered new interface driver hub
[    9.122854][    T1] usbcore: registered new device driver usb
[    9.128912][    T1] pps_core: LinuxPPS API ver. 1 registered
[    9.134557][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    9.144407][    T1] PTP clock support registered
[    9.151778][    T1] clocksource: Switched to clocksource orion_clocksource
[    9.302840][    T1] VFS: Disk quotas dquot_6.6.0
[    9.307591][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    9.355964][    T1] NET: Registered protocol family 2
[    9.361241][    T1] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    9.383170][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    9.401970][    T1] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    9.410327][    T1] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    9.441855][    T1] TCP: Hash tables configured (established 1024 bind 1024)
[    9.449287][    T1] MPTCP token hash table entries: 512 (order: 0, 6144 bytes, linear)
[    9.471887][    T1] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    9.479124][    T1] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    9.502178][    T1] NET: Registered protocol family 1
[    9.512617][    T1] RPC: Registered named UNIX socket transport module.
[    9.519227][    T1] RPC: Registered udp transport module.
[    9.541801][    T1] RPC: Registered tcp transport module.
[    9.547195][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    9.561812][    T1] PCI: CLS 0 bytes, default 32
[    9.566878][    T1] NetWinder Floating Point Emulator V0.97 (double precision)
[    9.582365][   T58] Trying to unpack rootfs image as initramfs...
[   12.189854][   T58] Freeing initrd memory: 9448K
[   13.024624][    T1] Initialise system trusted keyrings
[   13.029832][    T1] Key type blacklist registered
[   13.035022][    T1] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[   13.042417][    T1] zbud: loaded
[   13.047886][    T1] NFS: Registering the id_resolver key type
[   13.053774][    T1] Key type id_resolver registered
[   13.058647][    T1] Key type id_legacy registered
[   13.063430][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[   13.070825][    T1] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[   13.078921][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[   13.086386][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  �© 2001-2006 Red Hat, Inc.
[   13.094959][    T1] fuse: init (API version 7.34)
[   13.100252][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[   13.107724][    T1] orangefs_init: module version upstream loaded
[   13.113904][    T1] SGI XFS with ACLs, security attributes, realtime, scrub, quota, no debug enabled
[   13.279488][    T1] xor: measuring software checksum speed
[   13.298442][    T1]    arm4regs        :   742 MB/sec
[   13.325737][    T1]    8regs           :   444 MB/sec
[   13.346083][    T1]    32regs          :   647 MB/sec
[   13.351128][    T1] xor: using function: arm4regs (742 MB/sec)
[   13.357009][    T1] async_tx: api initialized (async)
[   13.362102][    T1] Key type asymmetric registered
[   13.366880][    T1] Asymmetric key parser 'x509' registered
[   13.372539][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[   13.380699][    T1] io scheduler bfq registered
[   13.684077][    T1] kirkwood-pinctrl f1010000.pin-controller: unknown pinctrl group 47
[   13.692050][    T1] kirkwood-pinctrl f1010000.pin-controller: unknown pinctrl group 49
[   13.700598][    T1] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[   13.712155][    T1] mv_xor f1060800.xor: Marvell shared XOR driver
[   13.783462][    T1] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[   13.795475][    T1] mv_xor f1060900.xor: Marvell shared XOR driver
[   13.863464][    T1] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[   13.875917][    T1] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[   13.885070][    T1] printk: console [ttyS0] disabled
[   13.890152][    T1] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 10416666) is a 16550A
[   13.899992][    T1] printk: console [ttyS0] enabled
[   13.899992][    T1] printk: console [ttyS0] enabled
[   13.909785][    T1] printk: bootconsole [earlycon0] disabled
[   13.909785][    T1] printk: bootconsole [earlycon0] disabled
[   13.934580][    T1] loop: module loaded
[   13.939598][    T1] sata_mv f1080000.sata: slots 32 ports 2
[   13.950968][    T1] scsi host0: sata_mv
[   13.955881][    T1] scsi host1: sata_mv
[   13.960122][    T1] ata1: SATA max UDMA/133 irq 33
[   13.964992][    T1] ata2: SATA max UDMA/133 irq 33
[   13.971197][    T1] nand: device found, Manufacturer ID: 0xec, Chip ID: 0x75
[   13.978291][    T1] nand: Samsung NAND 32MiB 3,3V 8-bit
[   13.983533][    T1] nand: 32 MiB, SLC, erase size: 16 KiB, page size: 512, OOB size: 16
[   13.991987][    T1] Scanning device for bad blocks
[   14.149500][    T1] Bad eraseblock 1183 at 0x00000127c000
[   14.155125][    T1] Bad eraseblock 1185 at 0x000001284000
[   14.160711][    T1] Bad eraseblock 1187 at 0x00000128c000
[   14.280732][    T1] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[   14.289359][    T1] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[   14.301559][    T1] libphy: Fixed MDIO Bus: probed
[   14.308686][    T1] libphy: orion_mdio_bus: probed
[   14.338288][    T1] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[   14.461840][   T94] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[   14.473482][   T94] ata1.00: ATA-8: ST32000542AS, CC95, max UDMA/133
[   14.479833][   T94] ata1.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   14.494229][   T94] ata1.00: configured for UDMA/133
[   14.509991][    T7] scsi 0:0:0:0: Direct-Access     ATA      ST32000542AS     CC95 PQ: 0 ANSI: 5
[   14.520623][   T80] sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[   14.529956][   T80] sd 0:0:0:0: [sda] Write Protect is off
[   14.535767][   T80] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   14.573585][   T80]  sda: sda1
[   14.578916][   T80] sd 0:0:0:0: [sda] Attached SCSI disk
[   15.031825][   T96] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[   15.043488][   T96] ata2.00: ATA-8: ST32000542AS, CC34, max UDMA/133
[   15.049840][   T96] ata2.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   15.063362][    T1] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:10:75:42:42:42
[   15.072929][   T96] ata2.00: configured for UDMA/133
[   15.078210][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   15.085524][    T1] ehci-pci: EHCI PCI platform driver
[   15.091288][   T58] scsi 1:0:0:0: Direct-Access     ATA      ST32000542AS     CC34 PQ: 0 ANSI: 5
[   15.100226][    T1] ehci-orion: EHCI orion driver
[   15.105293][    T1] orion-ehci f1050000.ehci: EHCI Host Controller
[   15.111530][    T1] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[   15.121728][   T80] sd 1:0:0:0: [sdb] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[   15.130766][   T80] sd 1:0:0:0: [sdb] Write Protect is off
[   15.136495][   T80] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   15.146588][    T1] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[   15.181850][    T1] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[   15.189008][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.13
[   15.197998][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   15.205971][    T1] usb usb1: Product: EHCI Host Controller
[   15.211876][   T80]  sdb: sdb1
[   15.215260][    T1] usb usb1: Manufacturer: Linux 5.13.6-kirkwood-tld-1 ehci_hcd
[   15.224647][   T80] sd 1:0:0:0: [sdb] Attached SCSI disk
[   15.230043][    T1] usb usb1: SerialNumber: f1050000.ehci
[   15.236535][    T1] hub 1-0:1.0: USB hub found
[   15.241045][    T1] hub 1-0:1.0: 1 port detected
[   15.246944][    T1] usbcore: registered new interface driver usb-storage
[   15.254329][    T1] mousedev: PS/2 mouse device common for all mice
[   15.262220][    T1] rtc-mv f1010300.rtc: registered as rtc0
[   15.267818][    T1] rtc-mv f1010300.rtc: setting system clock to 2021-11-03T22:06:23 UTC (1635977183)
[   15.277518][    T1] i2c /dev entries driver
[   15.284416][    T1] device-mapper: uevent: version 1.0.3
[   15.290153][    T1] device-mapper: ioctl: 4.45.0-ioctl (2021-03-22) initialised: dm-devel@redhat.com
[   15.300029][    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[   15.307325][    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[   15.314658][    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[   15.322072][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[   15.328846][    T1] device-mapper: raid: Loading target version 1.15.1
[   15.337402][    T1] hid: raw HID events driver (C) Jiri Kosina
[   15.343898][    T1] drop_monitor: Initializing network drop monitor service
[   15.351592][    T1] NET: Registered protocol family 10
[   15.358849][    T1] Segment Routing with IPv6
[   15.363354][    T1] RPL Segment Routing with IPv6
[   15.368184][    T1] NET: Registered protocol family 17
[   15.373714][    T1] Key type dns_resolver registered
[   15.379539][    T1] registered taskstats version 1
[   15.384664][    T1] Loading compiled-in X.509 certificates
[   15.390821][    T1] zswap: loaded using pool lzo/zbud
[   15.396534][    T1] Key type ._fscrypt registered
[   15.401238][    T1] Key type .fscrypt registered
[   15.405948][    T1] Key type fscrypt-provisioning registered
[   15.415273][    T1] Key type big_key registered
[   15.465708][    T1] Key type encrypted registered
[   15.480121][    T1] Freeing unused kernel memory: 1024K
[   15.503046][    T1] Checked W+X mappings: passed, no W+X pages found
[   15.509412][    T1] Run /init as init process
[   15.531980][  T104] usb 1-1: new high-speed USB device number 2 using orion-ehci
Loading, please wait...
Starting version 247.3-6
[   15.744865][  T104] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608, bcdDevice=77.63
[   15.771987][  T104] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[   15.779863][  T104] usb 1-1: Product: USB2.0 Hub
[   15.810624][  T104] hub 1-1:1.0: USB hub found
[   15.828026][  T104] hub 1-1:1.0: 4 ports detected
[   16.161923][  T104] usb 1-1.2: new high-speed USB device number 3 using orion-ehci
[   16.384743][  T104] usb 1-1.2: New USB device found, idVendor=090c, idProduct=1000, bcdDevice=10.00
[   16.411970][  T104] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   16.420010][  T104] usb 1-1.2: SerialNumber: 11121259010066
[   16.453312][  T104] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[   16.479966][  T104] scsi host2: usb-storage 1-1.2:1.0
[   16.852179][  T137] usbcore: registered new interface driver uas
[   16.880532][  T134] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[   17.299111][  T134] regulator@1 GPIO handle specifies active low - ignored
[   17.366235][  T134] regulator@2 GPIO handle specifies active low - ignored
[   17.922920][   T80] scsi 2:0:0:0: Direct-Access                                    PQ: 0 ANSI: 0 CCS
[   17.943295][   T58] sd 2:0:0:0: [sdc] 7802880 512-byte logical blocks: (4.00 GB/3.72 GiB)
Begin: Loading essential drivers ... done.
[   17.973375][   T58] sd 2:0:0:0: [sdc] Write Protect is off
[   17.988196][   T58] sd 2:0:0:0: [sdc] No Caching mode page found
[   18.002069][   T58] sd 2:0:0:0: [sdc] Assuming drive cache: write through
[   18.021127][   T58]  sdc: sdc1
[   18.035681][   T58] sd 2:0:0:0: [sdc] Attached SCSI removable disk
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.36.1
[/sbin/fsck.ext3 (1) -- /dev/sdc1] fsck.ext3 -a -C0 /dev/sdc1 
rootfs: recovering journal
rootfs: clean, 19406/243840 files, 295158/975104 blocks
done.
[   32.011486][  T168] EXT4-fs (sdc1): mounting ext3 file system using the ext4 subsystem
[   32.101376][  T168] EXT4-fs (sdc1): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
[   32.483875][    C0] random: crng init done
INIT: version 2.96 booting
Using makefile-style concurrent boot in runlevel S.
Setting hostname to 'debian'...done.
Starting hotplug events dispatcher: systemd-udevd.
Synthesizing the initial hotplug events (subsystems)...done.
Synthesizing the initial hotplug events (devices)...done.
Waiting for /dev to be fully populated...[   36.403392][  T354] hwmon_vid: Unknown VRM version of your CPU
[   36.452925][  T354] adt7475 0-002e: ADT7476 device, revision 0
[   36.473582][  T356] orion_wdt: Initial timeout 25 sec
[   36.586073][  T354] adt7475 0-002e: Optional features: in0 in4 fan4 pwm2 vid
[   36.852099][  T350] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   36.882116][  T350] sd 1:0:0:0: Attached scsi generic sg1 type 0
[   36.975233][  T350] sd 2:0:0:0: Attached scsi generic sg2 type 0
[   37.272253][  T353] marvell-cesa f1030000.crypto: CESA device successfully registered
[   37.776946][  T397] md/raid1:md0: not clean -- starting background reconstruction
[   37.822055][  T397] md/raid1:md0: active with 2 out of 2 mirrors
[   38.222215][  T397] md0: detected capacity change from 0 to 3906764928
[   38.262006][  T414] md: resync of RAID array md0
done.
Activating swap:.
[   42.298864][  T523] EXT4-fs (sdc1): re-mounted. Opts: errors=remount-ro. Quota mode: none.
Will now check all file systems.
Checking all file systems.
LABEL=rootfs is mounted
Done checking file systems.
Log is being saved in /var/log/fsck/checkfs if that location is writable.
Cleaning up temporary files...Cleaning /tmp...done.
 /tmp.
Will now mount local filesystems:.
Will now activate swapfile swap, if any:done.
Checking minimum space in /tmp...done.
Cleaning up temporary files....
Starting Setting kernel variables: sysctl.
Initializing random number generator...done.
Configuring network interfaces...Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/00:10:75:42:42:42
Sending on   LPF/eth0/00:10:75:42:42:42
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
[   53.717168][    C0] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   53.728139][  T104] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 19
DHCPOFFER of 192.168.1.204 from 192.168.1.254
DHCPREQUEST for 192.168.1.204 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.1.204 from 192.168.1.254
bound to 192.168.1.204 -- renewal in 38488 seconds.
done.
Starting RPC port mapper daemon: rpcbind.
Starting NFS common utilities: statd idmapd.
Cleaning up temporary files....
Setting sensors limits...
done.
INIT: Entering runlevel: 2
Using makefile-style concurrent boot in runlevel 2.
Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
1080 (syslogd)
.
Starting NFS common utilities: statd idmapd.
Starting system message bus: dbus.
Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
Starting MD monitoring service: mdadm --monitor.
Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1121 (klogd)
.
Not starting NFS kernel daemon: no exports. ... (warning).
Starting NTP server: ntpd.
Starting OpenBSD Secure Shell server: sshd.
Running local boot scripts (/etc/rc.local)
.

Debian GNU/Linux 11 debian ttyS0

root@192.168.1.204's password: 
Linux debian 5.13.6-kirkwood-tld-1 #1.0 PREEMPT Sat Jul 31 22:10:39 PDT 2021 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Mon Nov  1 15:23:17 2021
debian
192.168.1.204
Seagate Blackarmor NAS220
Linux version 5.13.6-kirkwood-tld-1 (root@tldDebian) (gcc (Debian 8.3.0-6) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #1.0 PREEMPT Sat Jul 31 22:10:39 PDT 2021
Debian 11.0
Wed Nov 3 15:12:21 PDT 2021 up 6 minutes
root@debian:~# 
debian
192.168.1.204
Seagate Blackarmor NAS220
Linux version 5.13.6-kirkwood-tld-1 (root@tldDebian) (gcc (Debian 8.3.0-6) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #1.0 PREEMPT Sat Jul 31 22:10:39 PDT 2021
Debian 11.0
Wed Nov 3 15:12:21 PDT 2021 up 6 minutes
root@debian:~# 
root@debian:~# 
root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 02000000 00004000 "orion_nand"
root@debian:~# dmesg | grep -i bad
[   13.991987] Scanning device for bad blocks
[   14.149500] Bad eraseblock 1183 at 0x00000127c000
[   14.155125] Bad eraseblock 1185 at 0x000001284000
[   14.160711] Bad eraseblock 1187 at 0x00000128c000
root@debian:~# cat /etc/fw_env.config
# MTD device name	Device offset	Env. size	Flash sector size	Number of sectors
/dev/mtd0 0xc0000 0x20000 0x20000
root@debian:~# 
Re: NAS 220 doesn't work with debian install
November 03, 2021 07:42PM
gigirock,

You've left out the u-boot banner. Is it the kwboot session with the u-boot I've just built?

> nas220> setenv usb_set_bootargs 'setenv bootargs
> console=ttyS0,115200 root=LABEL=rootfs
> rootdelay=10 earlyprintk=serial'
> nas220> setenv load_uimage 'ext2load usb 0:1
> 0x800000 /boot/uImage'
> nas220> setenv load_uinitrd 'ext2load usb 0:1
> 0x2100000 /boot/uInitrd'
> nas220> setenv usb_boot 'mw 0x800000 0 1; run
> load_uimage; run load_uinitrd; bootm 0x800000
> 0x2100000'
> nas220> setenv usb_bootcmd 'run usb_set_bootargs;
> run usb_boot'
> nas220> printenv
> autoload=no
> autostart=no
> baudrate=115200
> bootargs=console=ttyS0,115200
> cmdlinepart.mtdparts=orion_nand:0xa0000@0x0(uboot),0x010000@0xa0000(env),0x500000@0xc0000(uimage),0x1a40000@0x5c0000(rootfs)
> bootargs_base=console=ttyS0,115200
> bootcmd=run bootcmd_nand
> bootcmd_nand=setenv bootargs ${bootargs_base}
> ${mtdparts} ${bootargs_extra}; nand read.e 0x40000
> 0xc0000 0x500000; nand read.e 0x800000 0x5c0000
> 0x1a3fff0; b0
> bootcmd_rescue=setenv bootargs_extra
> rescue/enable=true; run bootcmd_usb
> bootcmd_usb=setenv bootargs ${bootargs_base}
> ${mtdparts} ${bootargs_extra}; usb start; fatload
> usb 0:1 0x40000 uImage-dtb; fatload usb 0:1
> 0x800000 uInitrd; 0
> bootdelay=-1
> ethact=egiga0
> ethaddr=00:10:75:42:42:42
> load_uimage=ext2load usb 0:1 0x800000
> /boot/uImage
> load_uinitrd=ext2load usb 0:1 0x2100000
> /boot/uInitrd
> mtdids=nand0=orion_nand
> mtdparts=cmdlinepart.mtdparts=orion_nand:0xa0000@0x0(uboot),0x010000@0xa0000(env),0x500000@0xc0000(uimage),0x1a40000@0x5c0000(rootfs)
> stderr=serial
> stdin=serial
> stdout=serial
> usb_boot=mw 0x800000 0 1; run load_uimage; run
> load_uinitrd; bootm 0x800000 0x2100000
> usb_bootcmd=run usb_set_bootargs; run usb_boot
> usb_set_bootargs=setenv bootargs
> console=ttyS0,115200 root=LABEL=rootfs
> rootdelay=10 earlyprintk=serial
> 
> Environment size: 1327/65532 bytes
> nas220> run usb_bootcmd 
> 5446�30 bytes read in 509 ms (10.2 MiB/s)
> 9671091 bytes read in 714 ms (12.9 MiB/s)
> ## Booting kernel from Legacy Image at 00800000
> ...
>    Image Name:   Linux-5.13.6-kirkwood-tld-1
>    Created:      2021-10-17  14:06:32 UTC
>    Image Type:   ARM Linux Kernel Image
> (uncompressed)
>    Data Size:    5446266 Bytes = 5.2 MiB
>    Load Address: 00008000
>    Entry Point:  00008000
>    Verifying Checksum ... OK
> ## Loading init Ramdisk from Legacy Image at
> 02100000 ...
>    Image Name:   initramfs-5.13.6-kirkwood-tld-1
>    Created:      2021-09-24   1:06:32 UTC
>    Image Type:   ARM Linux RAMDisk Image (gzip
> compressed)
>    Data Size:    9671027 Bytes = 9.2 MiB
>    Load Address: 00000000
>    Entry Point:  00000000
>    Verifying Checksum ... OK
>    Loading Kernel Image ... OK
>    Loading Ramdisk to 071f9000, end 07b32173 ...
> OK
> 
> Starting kernel ...
> 
> Uncompressing Linux... done, booting the kernel.


<snip>

> root@debian:~# 
> root@debian:~# cat /proc/mtd
> dev:    size   erasesize  name
> mtd0: 02000000 00004000 "orion_nand"

So we need more adjustment for the bootargs env.

> root@debian:~# dmesg | grep -i bad
> [   13.991987] Scanning device for bad blocks
> [   14.149500] Bad eraseblock 1183 at
> 0x00000127c000
> [   14.155125] Bad eraseblock 1185 at
> 0x000001284000
> [   14.160711] Bad eraseblock 1187 at
> 0x00000128c000


Let's see the correct mtds before I can say more. But these bad block start at 147 MB or greater (which is where the stock rootfs is) so it is OK to store the kernel files on NAND.

1183 * 128 / 1024 is about 147.8 MB

> root@debian:~# cat /etc/fw_env.config
> # MTD device name	Device offset	Env. size	Flash
> sector size	Number of sectors
> /dev/mtd0 0xc0000 0x20000 0x20000
> root@debian:~#


Looks good.

Add this env to your other booting envs:

setenv  mtdparts 'mtdparts=orion_nand:0xa0000@0x0(uboot),0x010000@0xa0000(env),0x500000@0xc0000(uimage),0x1a40000@0x5c0000(rootfs)'

And modify this

setenv usb_set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial'

And then boot into Debian, and

dmesg
cat /proc/mtd
I expect to see the NAND mtds are initialized properly. Please post the log as you did before.

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



Edited 1 time(s). Last edit at 11/03/2021 10:39PM by bodhi.
Re: NAS 220 doesn't work with debian install
November 05, 2021 06:21PM
Hello again , I think you are interested about this news :

debian login: root
Password: 
Linux debian 5.13.6-kirkwood-tld-1 #1.0 PREEMPT Sat Jul 31 22:10:39 PDT 2021 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Nov  6 00:02:17 CET 2021 on ttyS0
debian
192.168.1.210
Seagate Blackarmor NAS220
Linux version 5.13.6-kirkwood-tld-1 (root@tldDebian) (gcc (Debian 8.3.0-6) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #1.0 PREEMPT Sat Jul 31 22:10:39 P1
Debian 11.0
Sat Nov 6 00:07:29 CET 2021 up 1 minute
root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 000a0000 00004000 "uboot"
mtd1: 00010000 00004000 "env"
mtd2: 00500000 00004000 "uimage"
mtd3: 01a40000 00004000 "rootfs"
root@debian:~# dmesg | grep -i bad                                                                                                                            
[   13.981948] Scanning device for bad blocks
[   14.139463] Bad eraseblock 1183 at 0x00000127c000
[   14.145084] Bad eraseblock 1185 at 0x000001284000
[   14.150672] Bad eraseblock 1187 at 0x00000128c000
root@debian:~# cat /etc/fw_env.config                                                                                                                         
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mtd0 0xc0000 0x20000 0x20000
root@debian:~#

Here the complete process.

Environment size: 850/65532 bytes
nas220> setenv  mtdparts 'mtdparts=orion_nand:0xa0000@0x0(uboot),0x010000@0xa0000(env),0x500000@0xc0000(uimage),0x1a40000@0x5c0000(rootfs)'
nas220> setenv usb_set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial'
nas220> setenv load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
nas220> setenv load_uinitrd 'ext2load usb 0:1 0x2100000 /boot/uInitrd'
nas220> setenv usb_boot 'mw 0x800000 0 1; run load_uimage; run load_uinitrd; bootm 0x800000 0x2100000'
nas220> setenv usb_bootcmd 'run usb_set_bootargs; run usb_boot'
nas220> printenv
autoload=no
autostart=no
baudrate=115200
bootargs=console=ttyS0,115200
bootargs_base=console=ttyS0,115200
bootcmd=run bootcmd_nand
bootcmd_nand=setenv bootargs ${bootargs_base} ${mtdparts} ${bootargs_extra}; nand read.e 0x40000 0xc0000 0x500000; nand read.e 0x800000 0x5c0000 0x1a3fff0; b0
bootcmd_rescue=setenv bootargs_extra rescue/enable=true; run bootcmd_usb
bootcmd_usb=setenv bootargs ${bootargs_base} ${mtdparts} ${bootargs_extra}; usb start; fatload usb 0:1 0x40000 uImage-dtb; fatload usb 0:1 0x800000 uInitrd; 0
bootdelay=-1
ethact=egiga0
ethaddr=00:10:75:42:42:42
load_uimage=ext2load usb 0:1 0x800000 /boot/uImage
load_uinitrd=ext2load usb 0:1 0x2100000 /boot/uInitrd
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0xa0000@0x0(uboot),0x010000@0xa0000(env),0x500000@0xc0000(uimage),0x1a40000@0x5c0000(rootfs)
stderr=serial
stdin=serial
stdout=serial
usb_boot=mw 0x800000 0 1; run load_uimage; run load_uinitrd; bootm 0x800000 0x2100000
usb_bootcmd=run usb_set_bootargs; run usb_boot
usb_set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial

Environment size: 1200/65532 bytes
nas220> run usb_bootcmd 
** Bad device usb 0 **
** Bad device usb 0 **
Wrong Image Format for bootm command
ERROR: can't get kernel image!
nas220> usb start
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
nas220> run usb_bootcmd 
5446330 bytes read in 509 ms (10.2 MiB/s)
9671091 bytes read in 715 ms (12.9 MiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.13.6-kirkwood-tld-1
   Created:      2021-10-17  14:06:32 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5446266 Bytes = 5.2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 02100000 ...
   Image Name:   initramfs-5.13.6-kirkwood-tld-1
   Created:      2021-09-24   1:06:32 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9671027 Bytes = 9.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
   Loading Ramdisk to 071f9000, end 07b32173 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.13.6-kirkwood-tld-1 (root@tldDebian) (gcc (Debian 8.3.0-6) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #1.0 PREEMP1
[    0.000000][    T0] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000][    T0] CPU: VIVT data cache, VIVT instruction cache
[    0.000000][    T0] OF: fdt: Machine model: Seagate Blackarmor NAS220
[    0.000000][    T0] printk: bootconsole [earlycon0] enabled
[    0.000000][    T0] Memory policy: Data cache writeback
[    0.000000][    T0] Zone ranges:
[    0.000000][    T0]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000][    T0] Movable zone start for each node
[    0.000000][    T0] Early memory node ranges
[    0.000000][    T0]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000][    T0] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000][    T0] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:0xa0000@0x0(uboot),0x010000@0xa0000(env),l
[    0.000000][    T0] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000][    T0] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000][    T0] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000][    T0] Memory: 101108K/131072K available (11264K kernel code, 1553K rwdata, 4272K rodata, 1024K init, 309K bss, 29964K reserved, 0K cma-reser)
[    0.000000][    T0] random: get_random_u32 called from ____cache_alloc+0x408/0x7b4 with crng_init=0
[    0.000000][    T0] trace event string verifier disabled
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0]  Trampoline variant of Tasks RCU enabled.
[    0.000000][    T0]  Tracing variant of Tasks RCU enabled.
[    0.000000][    T0] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000][    T0] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000][    T0] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 11467562657 ns
[    0.000003][    T0] sched_clock: 32 bits at 166MHz, resolution 6ns, wraps every 12884901885ns
[    0.008560][    T0] Switching to timer-based delay loop, resolution 6ns
[    0.016478][    T0] Console: colour dummy device 80x30
[    0.021776][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 333.33 BogoMIPS (lpj=1666666)
[    0.033056][    T0] pid_max: default: 32768 minimum: 301
[    0.039044][    T0] LSM: Security Framework initializing
[    0.044605][    T0] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.052708][    T0] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.063451][    T0] CPU: Testing write buffer coherency: ok
[    0.072909][    T1] Setting up static identity map for 0x100000 - 0x100058
[    0.080344][    T1] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.086675][    T1] rcu: Hierarchical SRCU implementation.
[    0.094477][    T1] devtmpfs: initialized
[    0.107532][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.118232][    T1] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.182019][    T1] prandom32: self test passed (less than 6 bits correlated)
[    0.189239][    T1] prandom: seed boundary self test passed
[    0.201157][    T1] prandom: 100 self tests passed
[    0.205961][    T1] pinctrl core: initialized pinctrl subsystem
[    0.214476][    T1] NET: Registered protocol family 16
[    0.221083][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.230234][    T1] audit: initializing netlink subsys (disabled)
[    0.238503][    T1] thermal_sys: Registered thermal governor 'step_wise'
[    0.239171][   T16] audit: type=2000 audit(0.220:1): state=initialized audit_enabled=0 res=1
[    0.254549][    T1] cpuidle: using governor ladder
[    0.259574][    T1] cpuidle: using governor menu
[    0.265014][    T1] Feroceon L2: Enabling L2
[    0.269434][    T1] Feroceon L2: Cache support initialised.
[    0.289724][    T1] No ATAGs?
[    2.568570][    C0] random: fast init done
[    7.630461][   T39] "cryptomgr_test" (39) uses obsolete ecb(arc4) skcipher
[    7.676681][   T59] wait_for_initramfs() called before rootfs_initcalls
[    7.888889][    T1] raid6: int32x8  gen()    73 MB/s
[    8.058834][    T1] raid6: int32x8  xor()    46 MB/s
[    8.228885][    T1] raid6: int32x4  gen()    76 MB/s
[    8.398626][    T1] raid6: int32x4  xor()    48 MB/s
[    8.568606][    T1] raid6: int32x2  gen()    99 MB/s
[    8.738602][    T1] raid6: int32x2  xor()    60 MB/s
[    8.908684][    T1] raid6: int32x1  gen()    75 MB/s
[    9.078629][    T1] raid6: int32x1  xor()    43 MB/s
[    9.083581][    T1] raid6: using algorithm int32x2 gen() 99 MB/s
[    9.089591][    T1] raid6: .... xor() 60 MB/s, rmw enabled
[    9.095063][    T1] raid6: using intx1 recovery algorithm
[    9.100859][    T1] vgaarb: loaded
[    9.105094][    T1] SCSI subsystem initialized
[    9.110367][    T1] usbcore: registered new interface driver usbfs
[    9.116654][    T1] usbcore: registered new interface driver hub
[    9.122785][    T1] usbcore: registered new device driver usb
[    9.128851][    T1] pps_core: LinuxPPS API ver. 1 registered
[    9.134496][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    9.144346][    T1] PTP clock support registered
[    9.151761][    T1] clocksource: Switched to clocksource orion_clocksource
[    9.302824][    T1] VFS: Disk quotas dquot_6.6.0
[    9.307572][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    9.355937][    T1] NET: Registered protocol family 2
[    9.361215][    T1] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    9.391913][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    9.400994][    T1] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    9.421858][    T1] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    9.429605][    T1] TCP: Hash tables configured (established 1024 bind 1024)
[    9.452181][    T1] MPTCP token hash table entries: 512 (order: 0, 6144 bytes, linear)
[    9.460173][    T1] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    9.481815][    T1] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    9.489799][    T1] NET: Registered protocol family 1
[    9.512833][    T1] RPC: Registered named UNIX socket transport module.
[    9.519444][    T1] RPC: Registered udp transport module.
[    9.541786][    T1] RPC: Registered tcp transport module.
[    9.547178][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    9.561798][    T1] PCI: CLS 0 bytes, default 32
[    9.566906][    T1] NetWinder Floating Point Emulator V0.97 (double precision)
[    9.582354][   T58] Trying to unpack rootfs image as initramfs...
[   12.189372][   T58] Freeing initrd memory: 9448K
[   13.024301][    T1] Initialise system trusted keyrings
[   13.029528][    T1] Key type blacklist registered
[   13.034697][    T1] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[   13.042091][    T1] zbud: loaded
[   13.047544][    T1] NFS: Registering the id_resolver key type
[   13.053425][    T1] Key type id_resolver registered
[   13.058293][    T1] Key type id_legacy registered
[   13.063073][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[   13.070462][    T1] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[   13.078558][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[   13.086016][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  �© 2001-2006 Red Hat, Inc.
[   13.094583][    T1] fuse: init (API version 7.34)
[   13.099862][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[   13.107336][    T1] orangefs_init: module version upstream loaded
[   13.113514][    T1] SGI XFS with ACLs, security attributes, realtime, scrub, quota, no debug enabled
[   13.274513][    T1] xor: measuring software checksum speed
[   13.293404][    T1]    arm4regs        :   742 MB/sec
[   13.320654][    T1]    8regs           :   445 MB/sec
[   13.341017][    T1]    32regs          :   647 MB/sec
[   13.346116][    T1] xor: using function: arm4regs (742 MB/sec)
[   13.352009][    T1] async_tx: api initialized (async)
[   13.357059][    T1] Key type asymmetric registered
[   13.361893][    T1] Asymmetric key parser 'x509' registered
[   13.367525][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[   13.375729][    T1] io scheduler bfq registered
[   13.679062][    T1] kirkwood-pinctrl f1010000.pin-controller: unknown pinctrl group 47
[   13.687043][    T1] kirkwood-pinctrl f1010000.pin-controller: unknown pinctrl group 49
[   13.695625][    T1] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[   13.707109][    T1] mv_xor f1060800.xor: Marvell shared XOR driver
[   13.773456][    T1] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[   13.785479][    T1] mv_xor f1060900.xor: Marvell shared XOR driver
[   13.853461][    T1] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[   13.865910][    T1] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[   13.875070][    T1] printk: console [ttyS0] disabled
[   13.880151][    T1] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 10416666) is a 16550A
[   13.889987][    T1] printk: console [ttyS0] enabled
[   13.889987][    T1] printk: console [ttyS0] enabled
[   13.899780][    T1] printk: bootconsole [earlycon0] disabled
[   13.899780][    T1] printk: bootconsole [earlycon0] disabled
[   13.924532][    T1] loop: module loaded
[   13.929569][    T1] sata_mv f1080000.sata: slots 32 ports 2
[   13.940922][    T1] scsi host0: sata_mv
[   13.945835][    T1] scsi host1: sata_mv
[   13.950080][    T1] ata1: SATA max UDMA/133 irq 33
[   13.954955][    T1] ata2: SATA max UDMA/133 irq 33
[   13.961162][    T1] nand: device found, Manufacturer ID: 0xec, Chip ID: 0x75
[   13.968252][    T1] nand: Samsung NAND 32MiB 3,3V 8-bit
[   13.973494][    T1] nand: 32 MiB, SLC, erase size: 16 KiB, page size: 512, OOB size: 16
[   13.981948][    T1] Scanning device for bad blocks
[   14.139463][    T1] Bad eraseblock 1183 at 0x00000127c000
[   14.145084][    T1] Bad eraseblock 1185 at 0x000001284000
[   14.150672][    T1] Bad eraseblock 1187 at 0x00000128c000
[   14.267565][    T1] 4 cmdlinepart partitions found on MTD device orion_nand
[   14.274571][    T1] Creating 4 MTD partitions on "orion_nand":
[   14.280455][    T1] 0x000000000000-0x0000000a0000 : "uboot"
[   14.288511][    T1] 0x0000000a0000-0x0000000b0000 : "env"
[   14.296058][    T1] 0x0000000c0000-0x0000005c0000 : "uimage"
[   14.304138][    T1] 0x0000005c0000-0x000002000000 : "rootfs"
[   14.314146][    T1] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[   14.322724][    T1] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[   14.334862][    T1] libphy: Fixed MDIO Bus: probed
[   14.341984][    T1] libphy: orion_mdio_bus: probed
[   14.371374][    T1] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[   14.451832][   T94] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[   14.463480][   T94] ata1.00: ATA-8: ST32000542AS, CC95, max UDMA/133
[   14.469828][   T94] ata1.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   14.484223][   T94] ata1.00: configured for UDMA/133
[   14.499976][    T7] scsi 0:0:0:0: Direct-Access     ATA      ST32000542AS     CC95 PQ: 0 ANSI: 5
[   14.510637][   T80] sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[   14.519927][   T80] sd 0:0:0:0: [sda] Write Protect is off
[   14.525736][   T80] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   14.544754][   T80]  sda: sda1
[   14.550093][   T80] sd 0:0:0:0: [sda] Attached SCSI disk
[   15.021831][   T96] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[   15.033486][   T96] ata2.00: ATA-8: ST32000542AS, CC34, max UDMA/133
[   15.039835][   T96] ata2.00: 3907029168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   15.054256][   T96] ata2.00: configured for UDMA/133
[   15.070000][   T58] scsi 1:0:0:0: Direct-Access     ATA      ST32000542AS     CC34 PQ: 0 ANSI: 5
[   15.080570][   T80] sd 1:0:0:0: [sdb] 3907029168 512-byte logical blocks: (2.00 TB/1.82 TiB)
[   15.089613][   T80] sd 1:0:0:0: [sdb] Write Protect is off
[   15.095456][   T80] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   15.106406][    T1] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:10:75:42:42:42
[   15.117826][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   15.125136][    T1] ehci-pci: EHCI PCI platform driver
[   15.130356][    T1] ehci-orion: EHCI orion driver
[   15.135402][    T1] orion-ehci f1050000.ehci: EHCI Host Controller
[   15.141616][    T1] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[   15.150292][    T1] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[   15.166544][   T80]  sdb: sdb1
[   15.172006][   T80] sd 1:0:0:0: [sdb] Attached SCSI disk
[   15.181815][    T1] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[   15.188941][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.13
[   15.197928][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[   15.205902][    T1] usb usb1: Product: EHCI Host Controller
[   15.211471][    T1] usb usb1: Manufacturer: Linux 5.13.6-kirkwood-tld-1 ehci_hcd
[   15.218878][    T1] usb usb1: SerialNumber: f1050000.ehci
[   15.225327][    T1] hub 1-0:1.0: USB hub found
[   15.229838][    T1] hub 1-0:1.0: 1 port detected
[   15.235761][    T1] usbcore: registered new interface driver usb-storage
[   15.243117][    T1] mousedev: PS/2 mouse device common for all mice
[   15.250894][    T1] rtc-mv f1010300.rtc: registered as rtc0
[   15.256605][    T1] rtc-mv f1010300.rtc: setting system clock to 2021-11-05T23:06:42 UTC (1636153602)
[   15.266331][    T1] i2c /dev entries driver
[   15.273248][    T1] device-mapper: uevent: version 1.0.3
[   15.278998][    T1] device-mapper: ioctl: 4.45.0-ioctl (2021-03-22) initialised: dm-devel@redhat.com
[   15.288857][    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[   15.296156][    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[   15.303494][    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[   15.310885][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[   15.317690][    T1] device-mapper: raid: Loading target version 1.15.1
[   15.326263][    T1] hid: raw HID events driver (C) Jiri Kosina
[   15.332769][    T1] drop_monitor: Initializing network drop monitor service
[   15.340417][    T1] NET: Registered protocol family 10
[   15.347715][    T1] Segment Routing with IPv6
[   15.352218][    T1] RPL Segment Routing with IPv6
[   15.357046][    T1] NET: Registered protocol family 17
[   15.362585][    T1] Key type dns_resolver registered
[   15.368460][    T1] registered taskstats version 1
[   15.373569][    T1] Loading compiled-in X.509 certificates
[   15.379744][    T1] zswap: loaded using pool lzo/zbud
[   15.385418][    T1] Key type ._fscrypt registered
[   15.390129][    T1] Key type .fscrypt registered
[   15.394839][    T1] Key type fscrypt-provisioning registered
[   15.404143][    T1] Key type big_key registered
[   15.454532][    T1] Key type encrypted registered
[   15.468984][    T1] Freeing unused kernel memory: 1024K
[   15.493024][    T1] Checked W+X mappings: passed, no W+X pages found
[   15.499395][    T1] Run /init as init process
[   15.521965][  T104] usb 1-1: new high-speed USB device number 2 using orion-ehci
Loading, please wait...
Starting version 247.3-6
[   15.734821][  T104] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608, bcdDevice=77.63
[   15.761917][  T104] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[   15.769787][  T104] usb 1-1: Product: USB2.0 Hub
[   15.803512][  T104] hub 1-1:1.0: USB hub found
[   15.811939][  T104] hub 1-1:1.0: 4 ports detected
[   16.151904][  T104] usb 1-1.2: new high-speed USB device number 3 using orion-ehci
[   16.374696][  T104] usb 1-1.2: New USB device found, idVendor=090c, idProduct=1000, bcdDevice=10.00
[   16.399042][  T104] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   16.424998][  T104] usb 1-1.2: SerialNumber: 11121259010066
[   16.448034][  T104] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[   16.477187][  T104] scsi host2: usb-storage 1-1.2:1.0
[   16.877152][  T143] usbcore: registered new interface driver uas
[   16.889737][  T134] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[   17.368581][  T138] regulator@1 GPIO handle specifies active low - ignored
[   17.438072][  T138] regulator@2 GPIO handle specifies active low - ignored
[   17.790697][   T80] scsi 2:0:0:0: Direct-Access                                    PQ: 0 ANSI: 0 CCS
[   17.814354][   T58] sd 2:0:0:0: [sdc] 7802880 512-byte logical blocks: (4.00 GB/3.72 GiB)
[   17.828007][   T58] sd 2:0:0:0: [sdc] Write Protect is off
[   17.839255][   T58] sd 2:0:0:0: [sdc] No Caching mode page found
[   17.849800][   T58] sd 2:0:0:0: [sdc] Assuming drive cache: write through
[   17.872083][   T58]  sdc: sdc1
[   17.882886][   T58] sd 2:0:0:0: [sdc] Attached SCSI removable disk
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.36.1
[/sbin/fsck.ext3 (1) -- /dev/sdc1] fsck.ext3 -a -C0 /dev/sdc1 
rootfs: clean, 19492/243840 files, 303561/975104 blocks
done.
[   28.743056][  T170] EXT4-fs (sdc1): mounting ext3 file system using the ext4 subsystem
[   28.821051][  T170] EXT4-fs (sdc1): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.96 booting
Using makefile-style concurrent boot in runlevel S.
Setting hostname to 'debian'...done.
[   30.233826][    C0] random: crng init done
Starting hotplug events dispatcher: systemd-udevd.
Synthesizing the initial hotplug events (subsystems)...done.
Synthesizing the initial hotplug events (devices)...done.
Waiting for /dev to be fully populated...[   33.253081][  T361] orion_wdt: Initial timeout 25 sec
[   33.281919][  T352] hwmon_vid: Unknown VRM version of your CPU
[   33.358822][  T352] adt7475 0-002e: ADT7476 device, revision 0
[   33.495703][  T352] adt7475 0-002e: Optional features: in0 in4 fan4 pwm2 vid
[   33.850543][  T356] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   33.906001][  T356] sd 1:0:0:0: Attached scsi generic sg1 type 0
[   33.975580][  T356] sd 2:0:0:0: Attached scsi generic sg2 type 0
[   34.055282][  T353] marvell-cesa f1030000.crypto: CESA device successfully registered
[   34.636213][  T403] md/raid1:md0: active with 2 out of 2 mirrors
[   34.862193][  T403] md0: detected capacity change from 0 to 3906764928
done.
Activating swap:.
[   37.548028][  T584] EXT4-fs (sdc1): re-mounted. Opts: errors=remount-ro. Quota mode: none.
Will now check all file systems.
Checking all file systems.
LABEL=rootfs is mounted
Done checking file systems.
Log is being saved in /var/log/fsck/checkfs if that location is writable.
Cleaning up temporary files...Cleaning /tmp...done.
 /tmp.
Will now mount local filesystems:.
Will now activate swapfile swap, if any:done.
Checking minimum space in /tmp...done.
Cleaning up temporary files....
Initializing random number generator...done.
Starting Setting kernel variables: sysctl.
Configuring network interfaces...Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/00:10:75:42:42:42
Sending on   LPF/eth0/00:10:75:42:42:42
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
[   44.649764][    C0] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   44.660401][  T104] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 8
DHCPOFFER of 192.168.1.210 from 192.168.1.254
DHCPREQUEST for 192.168.1.210 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.1.210 from 192.168.1.254
invoke-rc.d: could not determine current runlevel
bound to 192.168.1.210 -- renewal in 333766 seconds.
done.
Starting RPC port mapper daemon: rpcbind.
Starting NFS common utilities: statd idmapd.
Cleaning up temporary files....
Setting sensors limits...done.
INIT: Entering runlevel: 2
Using makefile-style concurrent boot in runlevel 2.
Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
1154 (syslogd)
.
Starting NFS common utilities: statd idmapd.
Starting system message bus: dbus.
Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
Starting MD monitoring service: mdadm --monitor.
Not starting NFS kernel daemon: no exports. ... (warning).
Starting NTP server: ntpd.
Starting OpenBSD Secure Shell server: sshd.
Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1196 (klogd)
.
Running local boot scripts (/etc/rc.local)
.

Debian GNU/Linux 11 debian ttyS0

debian login: root
Password: 
Linux debian 5.13.6-kirkwood-tld-1 #1.0 PREEMPT Sat Jul 31 22:10:39 PDT 2021 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Sat Nov  6 00:02:17 CET 2021 on ttyS0
debian
192.168.1.210
Seagate Blackarmor NAS220
Linux version 5.13.6-kirkwood-tld-1 (root@tldDebian) (gcc (Debian 8.3.0-6) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #1.0 PREEMPT Sat Jul 31 22:10:39 P1
Debian 11.0
Sat Nov 6 00:07:29 CET 2021 up 1 minute
root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 000a0000 00004000 "uboot"
mtd1: 00010000 00004000 "env"
mtd2: 00500000 00004000 "uimage"
mtd3: 01a40000 00004000 "rootfs"
root@debian:~# dmesg | grep -i bad                                                                                                                            
[   13.981948] Scanning device for bad blocks
[   14.139463] Bad eraseblock 1183 at 0x00000127c000
[   14.145084] Bad eraseblock 1185 at 0x000001284000
[   14.150672] Bad eraseblock 1187 at 0x00000128c000
root@debian:~# cat /etc/fw_env.config                                                                                                                         
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mtd0 0xc0000 0x20000 0x20000
root@debian:~# 
Re: NAS 220 doesn't work with debian install
November 05, 2021 07:23PM
gigirock,

Fantastic!

You did not include the u-boot banner and the first part of the boot before this. It is quite relevant so I don't have to ask many follow up questions.

Environment size: 850/65532 bytes
nas220> setenv  mtdparts 'mtdparts=orion_nand:0xa0000@0x0(uboot),0x010000@0xa0000(env),0x500000@0xc0000(uimage),0x1a40000@0x5c0000(rootfs)'

<snip>

> root@debian:~# cat /proc/mtd
> dev:    size   erasesize  name
> mtd0: 000a0000 00004000 "uboot"
> mtd1: 00010000 00004000 "env"
> mtd2: 00500000 00004000 "uimage"
> mtd3: 01a40000 00004000 "rootfs"

Now at this point, everything checkout OK.

However, the u-boot image I built was a test version. I'll need to build a real version that can be released later. Would you be willing to run some kwboot test after I've done that?

If you only wants to run stock u-boot, then it's up to you to move on to the "flashing kernel to NAND" part.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NAS 220 doesn't work with debian install
November 06, 2021 05:46PM
Thank you Bodhi,

Yes please if you have something to 'test' now please try to send me and I will make some tests for you.
I have no 'production' files to store on nas220 by now , so I want to test btrfs now.

But now in order to boot from nand i have to load zImage in mtd2 and zInitrd in mtd3 ?
Re: NAS 220 doesn't work with debian install
November 07, 2021 02:28PM
gigirock,

> But now in order to boot from nand i have to load
> zImage in mtd2 and zInitrd in mtd3 ?

We will need to repartition the NAND mtds. Basically erase the stock kernel and rootfs, and then create new partitions to store the 2 kernel files: uImage and uInird. I'll get back to you with some instruction how to do that.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: NAS 220 doesn't work with debian install
November 09, 2021 02:13AM
Thank you , I will study the case in the next days but I'm too busy at work......

Anyway I don't understand if at the end the os will be loaded in nand , yes I will boot from nand but the further modification will be written in nand , so we will use nand as a disk ?
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: