Welcome! Log In Create A New Profile

Advanced

Debian on Freecom Silverstore 2 NAS

Posted by garagoyun 
Re: Debian on Freecom Silverstore 2 NAS
November 25, 2018 07:24AM
I am extremely happy with the progress that has been achieved so far. bodhi and generik, thanks for the support and contribution.

Those devices are obviously aged, however for the price I paid for them (£10 each, including delivery!) it's a total bargain. Memory is limited, only 128MB, however, with swap partition one device is capable of running Tvheadend, Musikcube, Syncthing, MPD (although, I am not really using it, I prefer Musikcube), Transmission, Minidlna, Monit and Cockpit.
  CPU[ ||||                                                                3.9%]   Tasks: 50, 59 thr; 1 running
  Mem[ ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||51.0M/115M]   Load average: 0.05 0.07 0.02 
  Swp[ ||                                                           48.8M/2.00G]   Uptime: 21:09:16
  Hostname: silverdebian                                                           Time: 12:41:12
The uptime is due to testing the LEDs and restarting.


I am planning to install and test Nextcloud (KodExplorer, as an alternative, did run quite good), OpenVPN, PI hole, Autofs for NFS (I do not use samba) and to automount the second drive. I tried Openmediavault, it was running pretty well. Most of the above software I installed using the config scripts from armbian (after some modifications, as the scripts are not configured for armv5). There is some interesting software selection at DietPi project, I might look for some inspiration.

@bodhi,
Would it be possible to include the patch from generik for drivers/clk/mvebu/kirkwood.c in to your kernel? Although, running at 400MHz with ondemand governer probably would not make any massive savings on electricity :-)

---------------------------------


Regards,
garagoyun
Re: Debian on Freecom Silverstore 2 NAS
November 25, 2018 08:47PM
garagoyun,

> @bodhi,
> Would it be possible to include the patch from
> generik for
> drivers/clk/mvebu/kirkwood.c
> in to your kernel? Although, running at 400MHz
> with ondemand governer probably would not make any
> massive savings on electricity :-)

Sure! it will be in the next kernel release.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Freecom Silverstore 2 NAS
November 26, 2018 04:01PM
Hi garagoyun,

thanks for testing, i got my buttons working again i'm not quite sure why the kernel now complains about gpo though this worked in the past.

@bodhi it's true that mpp49 is gpio on kirkwood socs but the kernel defines it as gpo for the 88F6282, not sure why but i checked even the freecom sourcecode to be extra sure and poweroff is indeed atached to mpp49.

+#ifdef HNCN2_BOARD
+static struct btn_data                  btn_data_shasta[] = {
+        [0] = {
+                .gpp_id         = 29,  //Reset Default
+                .default_gpp_val= 0x0,
+                .btn_op         = BTN_CHANGE,
+                .btn_name       = "RESET",
+        },
+        [1] = {
+                .gpp_id         = 49,  //Power off Switch
+                .default_gpp_val= 0x0,
+                .btn_op         = BTN_CHANGE,
+                .btn_name       = "POWER",
+        }
+};
+#endif
+
anyway gpio_keys works for me v4.14 and atached patch.

CONFIG_POWER_RESET_GPIO is indeed a default part of mvebu_v5_defconfig, i was just curious about the ? in
garagoyun gpio debug output.
 gpio-36  (?                   ) out lo

i figured out the logic for the hdd white leds.

HDD1 White
|17 PRSNT|15 ACT|LED|
| 0      | 0    |  0|
| 0      | 1    |  1|
| 1      | 0    |  0|
| 1      | 1    |  0|

HDD2 White
|14 PRSNT|16 ACT|LED|
| 0      | 0    |  0|
| 0      | 1    |  1|
| 1      | 0    |  0|
| 1      | 1    |  0|

so sata led definition should be this for now.
                        /* SATA LED */
                        pmx_sata0: pmx-sata0 {
                                marvell,pins = "mpp15", "mpp17";
                                marvell,function = "sata0";
                        };
                        pmx_sata1: pmx-sata1 {
                                marvell,pins = "mpp14", "mpp16";
                                marvell,function = "sata1";
                        };

best regards,
generik



Edited 1 time(s). Last edit at 11/26/2018 04:06PM by generik.
Attachments:
open | download - add_mpp49gpio.patch (1.3 KB)
Re: Debian on Freecom Silverstore 2 NAS
November 26, 2018 04:29PM
bodhi,

I have tried to test the Linux Kernel 4.19. I had previously installed rootfs with Linux Kernel 4.12 on a usb flash memory, which is working without any issues. However, after installing the kernel 4.19, Debian is not booting:
 ** MARVELL BOARD: HNC-N2 LE 

U-Boot 1.1.4 (Nov  7 2018 - 16:39:05) Marvell version: 3.5.9

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00

Soc: 88F6282 A1CPU running @ 1000Mhz L2 running @ 333Mhz
SysClock = 400Mhz , TClock = 200Mhz 

DRAM (DDR3) CAS Latency = 6 tRP = 6 tRAS = 15 tRCD=6
DRAM CS[0] base 0x00000000   size 128MB 
DRAM Total size 128MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:128 MB
Found ADT7473, program PWM1 ... OK
Flash:  0 kB

Marvell Serial ATA Adapter
Integrated Sata device found


CPU : Marvell Feroceon (Rev 1)
Scanning partition header:

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
PEX 1: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0 
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found
....
.
......
............
.........................
...................................................
......................................................................................................
............................................................................................................................................................................................................
.

4205830 bytes read
....
.
......
............
.........................
...................................................
......................................................................................................
.................................................................................................................................................................................................................
..............................................................................................................................................................................................................................................................................................................................................................................................

8158340 bytes read

Reset IDE: 
Marvell Serial ATA Adapter
Integrated Sata device found

** Bad partition 1 **
** Bad partition 1 **
## Booting image at 00800000 ...
   Image Name:   Linux-4.19.0-kirkwood-tld-1
   Created:      2018-11-26  21:11:51 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4205766 Bytes =  4 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 02100000 ...
   Image Name:   initramfs-4.19.0-kirkwood-tld-1
   Created:      2018-11-26  21:12:11 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    8158276 Bytes =  7.8 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux...

LZMA data is corrupt

 -- System halted
FATAL: term closed

I can reverse back to kernel 4.12 and it would work again as normal.

I am not sure what i am doing wrong.

---------------------------------


Regards,
garagoyun
Re: Debian on Freecom Silverstore 2 NAS
November 26, 2018 05:27PM
@generik,

Kernel 4.19.x has the 1st entry as GPIO and supports all Kirkwood SoC. It must have been an oversight when this code was patched in the later kernel version. So I think it is better to remove this entry:
MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(0, 0, 0, 0, 1, 0)),


Here is what it looks like now.

root@tldDebian:/usr/src/linux-4.19.2-tld/drivers/pinctrl/mvebu# grep -i7 49 pinctrl-kirkwood.c

	MPP_MODE(49,
		MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1, 1)),
		MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(0, 0, 0, 0, 1, 0)),
		MPP_VAR_FUNCTION(0x1, "ts", "mp9",       V(0, 0, 0, 1, 0, 0)),
		MPP_VAR_FUNCTION(0x2, "tdm", "rx0ql",    V(0, 0, 0, 1, 1, 0)),
		MPP_VAR_FUNCTION(0x5, "ptp", "clk",      V(0, 0, 0, 1, 0, 0)),
		MPP_VAR_FUNCTION(0xa, "pex", "clkreq",   V(0, 0, 0, 0, 1, 0)),
		MPP_VAR_FUNCTION(0xb, "lcd", "d17",      V(0, 0, 0, 0, 1, 0))),

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Freecom Silverstore 2 NAS
November 26, 2018 05:33PM
garagoyun,

> LZMA data is corrupt

Try to recreate the uImage again from zImage and DTB.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Freecom Silverstore 2 NAS
November 26, 2018 07:47PM
All,

My bad. It is not in mainline yet.

Actually the pincontrol code was patched by myself in my kernel release for 4.19.1-kirkwood-tld-1. I think I've carried this patch for quite a long time so forgot all about it :)

--- a/drivers/pinctrl/mvebu/pinctrl-kirkwood.c  2018-10-21 23:37:37.000000000 -0700
+++ b/drivers/pinctrl/mvebu/pinctrl-kirkwood.c  2018-10-22 16:05:25.247141518 -0700
@@ -107,7 +107,7 @@
                MPP_VAR_FUNCTION(0x5, "sata0", "act",    V(0, 1, 1, 1, 1, 0))),
        MPP_MODE(12,
                MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(1, 1, 1, 0, 1, 0)),
-               MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 0, 0)),
+               MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1, 0)),
                MPP_VAR_FUNCTION(0x1, "sdio", "clk",     V(1, 1, 1, 1, 1, 0)),
                MPP_VAR_FUNCTION(0xa, "audio", "spdifo", V(0, 0, 0, 0, 1, 0)),
                MPP_VAR_FUNCTION(0xb, "spi", "mosi",     V(0, 0, 0, 0, 1, 0)),
@@ -338,7 +338,7 @@
                MPP_VAR_FUNCTION(0x2, "tdm", "fs",       V(0, 0, 0, 1, 1, 0)),
                MPP_VAR_FUNCTION(0xb, "lcd", "hsync",    V(0, 0, 0, 0, 1, 0))),
        MPP_MODE(47,
-               MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 1, 0)),
+               MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1, 1)),
                MPP_VAR_FUNCTION(0x1, "ts", "mp11",      V(0, 0, 0, 1, 1, 0)),
                MPP_VAR_FUNCTION(0x2, "tdm", "drx",      V(0, 0, 0, 1, 1, 0)),
                MPP_VAR_FUNCTION(0xb, "lcd", "vsync",    V(0, 0, 0, 0, 1, 0))),
@@ -348,7 +348,7 @@
                MPP_VAR_FUNCTION(0x2, "tdm", "dtx",      V(0, 0, 0, 1, 1, 0)),
                MPP_VAR_FUNCTION(0xb, "lcd", "d16",      V(0, 0, 0, 0, 1, 0))),
        MPP_MODE(49,
-               MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(0, 0, 0, 1, 0, 1)),
+               MPP_VAR_FUNCTION(0x0, "gpio", NULL,      V(1, 1, 1, 1, 1, 1)),
                MPP_VAR_FUNCTION(0x0, "gpo", NULL,       V(0, 0, 0, 0, 1, 0)),
                MPP_VAR_FUNCTION(0x1, "ts", "mp9",       V(0, 0, 0, 1, 0, 0)),
                MPP_VAR_FUNCTION(0x2, "tdm", "rx0ql",    V(0, 0, 0, 1, 1, 0)),


I think that's why the button works for garagoyun.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Martin from Dortmund
Re: Debian on Freecom Silverstore 2 NAS
November 27, 2018 01:58AM
garagoyun Wrote:
-------------------------------------------------------
> (KodExplorer, as an alternative, did run quite
> good), OpenVPN, PI hole, Autofs for NFS (I do not
> use samba)

I assume, that most of the above will not run well with 128 MByte RAM. PI hole homepage recommends at least 512 MByte of RAM...
Re: Debian on Freecom Silverstore 2 NAS
November 27, 2018 03:09PM
bodhi Wrote:
-------------------------------------------------------
> garagoyun,
>
> > LZMA data is corrupt
>
> Try to recreate the uImage again from zImage and
> DTB.


bodhi,

I tried recreating the uImage several time. Also, reinstalling rootfs on the same USB, and installing kernel 4.19 on top. Then I tried installing rootfs on a different USB flash memory. Kernel 4.12 boots fine, after upgrading to 4.19, they do not boot anymore.

I have also tried playing a bit with the envs:
        __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__|  ** uboot_ver:v0.0.9 **

 ** MARVELL BOARD: HNC-N2 LE 

U-Boot 1.1.4 (Nov  7 2018 - 16:39:05) Marvell version: 3.5.9

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00

Soc: 88F6282 A1CPU running @ 1000Mhz L2 running @ 333Mhz
SysClock = 400Mhz , TClock = 200Mhz 

DRAM (DDR3) CAS Latency = 6 tRP = 6 tRAS = 15 tRCD=6
DRAM CS[0] base 0x00000000   size 128MB 
DRAM Total size 128MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:128 MB
Found ADT7473, program PWM1 ... OK
Flash:  0 kB

Marvell Serial ATA Adapter
Integrated Sata device found


CPU : Marvell Feroceon (Rev 1)
Scanning partition header:

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
PEX 1: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0 
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found
....
.
......
............
.........................
...................................................
......................................................................................................
............................................................................................................................................................................................................
...

4230352 bytes read
....
.
......
............
.........................
...................................................
......................................................................................................
............................................................................................................................................................................................................
....
.............................................................................................................................................................................................................................................................................................................................................................................................

8154809 bytes read

Reset IDE: 
Marvell Serial ATA Adapter
Integrated Sata device found

** Bad partition 1 **
** Bad partition 1 **
## Booting image at 00800000 ...
   Image Name:   Linux-4.19.0-kirkwood-tld-1
   Created:      2018-11-27  20:27:42 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4230288 Bytes =  4 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 02100000 ...
   Image Name:   initramfs-4.19.0-kirkwood-tld-1
   Created:      2018-11-27  20:28:37 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    8154745 Bytes =  7.8 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux...

LZMA data is corrupt

 -- System halted
         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__|  ** uboot_ver:v0.0.9 **

 ** MARVELL BOARD: HNC-N2 LE 

U-Boot 1.1.4 (Nov  7 2018 - 16:39:05) Marvell version: 3.5.9

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00

Soc: 88F6282 A1CPU running @ 1000Mhz L2 running @ 333Mhz
SysClock = 400Mhz , TClock = 200Mhz 

DRAM (DDR3) CAS Latency = 6 tRP = 6 tRAS = 15 tRCD=6
DRAM CS[0] base 0x00000000   size 128MB 
DRAM Total size 128MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:128 MB
Found ADT7473, program PWM1 ... OK
Flash:  0 kB

Marvell Serial ATA Adapter
Integrated Sata device found


CPU : Marvell Feroceon (Rev 1)
Scanning partition header:

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
PEX 1: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0 
Marvell>> pri
baudrate=115200
loads_echo=0
ipaddr=10.4.52.165
serverip=10.4.52.7
rootpath=/srv/ubuntu
netmask=255.255.255.0
run_diag=yes
MALLOC_len=1
ethprime=egiga0
bootargs_root=root=/dev/ram0 rootfstype=cramfs init=/etc/rc.preroot initrd=0x800000,0x1000000
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end); bootm 0x2000000;
lcd0_enable=0
lcd0_params=640x480-16@60
ethaddr=00:50:43:47:1d:37
ethmtu=1500
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
image_multi=yes
uboot_ver=v0.0.9
mfgtest_state=final_tested_ok
mfgmodel=HNC-N2
ethact=egiga0
mtdparts=mtdparts=orion_nand:0x000a0000@0x0(uboot),0x00040000@0x000a0000(param),0x00280000@0x000e0000(preroot),0x00380000@0x00360000(uimage),0x076e0000@0x006e0000(rootfs),0x00240000@0x07dc0000(misc),128m@0x0(flash)
bootcmd_usb=usb start; ext2load usb 0:1 0x800000 /boot/uImage; ext2load usb 0:1 0x2100000 /boot/uInitrd
bootcmd_sata=ide reset; ext2load ide 0:1 0x800000 /boot/uImage; ext2load ide 0:1 0x2100000 /boot/uInitrd
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 ${mtdparts} earlyprintk=serial
preroot_ver=0.1.0
bootcmd_exec=run set_bootargs; run bootcmd_usb; run bootcmd_sata; bootm 0x800000 0x2100000
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
console=console=ttyS0,115200 mtdparts=nand_mtd:0x000a0000@0x0(uboot),0x00040000@0x000a0000(param),0x00280000@0x000e0000(preroot),0x00380000@0x00360000(uimage),0x076e0000@0x006e0000(rootfs),0x00240000@0x07dc0000(misc),128m@0x0(flash) 
bootcmd_f=run bootcmd_exec; nand reset; nand read.e 0x800000 0x00100000 0x00199800; check_crc32 PrEr; 
bootcmd=run bootcmd_exec; nand reset; nand read.e 0x800000 0x00100000 0x00199800; check_crc32 PrEr; nand reset; nand read.e 0x40000 0x00380000 0x0027d400; check_crc32 KrNl; setenv bootargs $(console) $(bootargs_root);  bootm 0x40000; 
bootdelay=3
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no
pcieTune1=no

Environment size: 2298/131067 bytes
Marvell>> setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x800000 /boot/uImage; ext2load usb 0:1 0x1100000 /boot/uInitrd'
Marvell>> pri
baudrate=115200
loads_echo=0
ipaddr=10.4.52.165
serverip=10.4.52.7
rootpath=/srv/ubuntu
netmask=255.255.255.0
run_diag=yes
MALLOC_len=1
ethprime=egiga0
bootargs_root=root=/dev/ram0 rootfstype=cramfs init=/etc/rc.preroot initrd=0x800000,0x1000000
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end); bootm 0x2000000;
lcd0_enable=0
lcd0_params=640x480-16@60
ethaddr=00:50:43:47:1d:37
ethmtu=1500
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
image_multi=yes
uboot_ver=v0.0.9
mfgtest_state=final_tested_ok
mfgmodel=HNC-N2
ethact=egiga0
mtdparts=mtdparts=orion_nand:0x000a0000@0x0(uboot),0x00040000@0x000a0000(param),0x00280000@0x000e0000(preroot),0x00380000@0x00360000(uimage),0x076e0000@0x006e0000(rootfs),0x00240000@0x07dc0000(misc),128m@0x0(flash)
bootcmd_sata=ide reset; ext2load ide 0:1 0x800000 /boot/uImage; ext2load ide 0:1 0x2100000 /boot/uInitrd
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 ${mtdparts} earlyprintk=serial
preroot_ver=0.1.0
bootcmd_exec=run set_bootargs; run bootcmd_usb; run bootcmd_sata; bootm 0x800000 0x2100000
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
console=console=ttyS0,115200 mtdparts=nand_mtd:0x000a0000@0x0(uboot),0x00040000@0x000a0000(param),0x00280000@0x000e0000(preroot),0x00380000@0x00360000(uimage),0x076e0000@0x006e0000(rootfs),0x00240000@0x07dc0000(misc),128m@0x0(flash) 
bootcmd_f=run bootcmd_exec; nand reset; nand read.e 0x800000 0x00100000 0x00199800; check_crc32 PrEr; 
bootcmd=run bootcmd_exec; nand reset; nand read.e 0x800000 0x00100000 0x00199800; check_crc32 PrEr; nand reset; nand read.e 0x40000 0x00380000 0x0027d400; check_crc32 KrNl; setenv bootargs $(console) $(bootargs_root);  bootm 0x40000; 
bootdelay=3
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no
pcieTune1=no
bootcmd_usb=usb start; ext2load usb 0:1 0x800000 /boot/uImage; ext2load usb 0:1 0x1100000 /boot/uInitrd

Environment size: 2298/131067 bytes
Marvell>> bootcmd
Unknown command 'bootcmd' - try 'help'
Marvell>> bootcmd
Unknown command 'bootcmd' - try 'help'
Marvell>> bootcmd
Unknown command 'bootcmd' - try 'help'
Marvell>> run bootcmd_exec
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found
....
.
......
............
.........................
...................................................
......................................................................................................
............................................................................................................................................................................................................
...

4230352 bytes read
....
.
......
............
.........................
...................................................
......................................................................................................
............................................................................................................................................................................................................
....
.............................................................................................................................................................................................................................................................................................................................................................................................

8154809 bytes read

Reset IDE: 
Marvell Serial ATA Adapter
Integrated Sata device found

** Bad partition 1 **
** Bad partition 1 **
## Booting image at 00800000 ...
   Image Name:   Linux-4.19.0-kirkwood-tld-1
   Created:      2018-11-27  20:27:42 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4230288 Bytes =  4 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 02100000 ...
Bad Magic Number�
         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__|  ** uboot_ver:v0.0.9 **

 ** MARVELL BOARD: HNC-N2 LE 

U-Boot 1.1.4 (Nov  7 2018 - 16:39:05) Marvell version: 3.5.9

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00

Soc: 88F6282 A1CPU running @ 1000Mhz L2 running @ 333Mhz
SysClock = 400Mhz , TClock = 200Mhz 

DRAM (DDR3) CAS Latency = 6 tRP = 6 tRAS = 15 tRCD=6
DRAM CS[0] base 0x00000000   size 128MB 
DRAM Total size 128MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:128 MB
Found ADT7473, program PWM1 ... OK
Flash:  0 kB

Marvell Serial ATA Adapter
Integrated Sata device found


CPU : Marvell Feroceon (Rev 1)
Scanning partition header:

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
PEX 1: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0 
Marvell>> setenv load_dtb 'ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-silverstore-hncn2.dtb
Marvell>> kirkwood-silverstore-hncn2.dtb
Unknown command 'kirkwood-silverstore-hncn2.dtb' - try 'help'
Marvell>> setenv load_initrd 'ext2load usb 0:1 0x1100000 /boot/uInitrd'
Marvell>> setenv load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
Marvell>> setenv usb_boot 'run load_dtb; run load_uimage; if run load_initrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi'
Marvell>> run usb_boot
** Bad partition 1 **
** Bad partition 1 **
Unknown command 'if' - try 'help'
Unknown command 'then' - try 'help'
Unknown command 'else' - try 'help'
This command can be used only if enaMonExt is set!
Marvell>> run usb_boot
** Bad partition 1 **
** Bad partition 1 **
Unknown command 'if' - try 'help'
Unknown command 'then' - try 'help'
Unknown command 'else' - try 'help'
This command can be used only if enaMonExt is set!
Marvell>> pri
Unknown command 'pri' - try 'help'
Marvell>> pri
baudrate=115200
loads_echo=0
ipaddr=10.4.52.165
serverip=10.4.52.7
rootpath=/srv/ubuntu
netmask=255.255.255.0
run_diag=yes
MALLOC_len=1
ethprime=egiga0
bootargs_root=root=/dev/ram0 rootfstype=cramfs init=/etc/rc.preroot initrd=0x800000,0x1000000
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end); bootm 0x2000000;
lcd0_enable=0
lcd0_params=640x480-16@60
ethaddr=00:50:43:47:1d:37
ethmtu=1500
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
image_multi=yes
uboot_ver=v0.0.9
mfgtest_state=final_tested_ok
mfgmodel=HNC-N2
ethact=egiga0
mtdparts=mtdparts=orion_nand:0x000a0000@0x0(uboot),0x00040000@0x000a0000(param),0x00280000@0x000e0000(preroot),0x00380000@0x00360000(uimage),0x076e0000@0x006e0000(rootfs),0x00240000@0x07dc0000(misc),128m@0x0(flash)
bootcmd_usb=usb start; ext2load usb 0:1 0x800000 /boot/uImage; ext2load usb 0:1 0x2100000 /boot/uInitrd
bootcmd_sata=ide reset; ext2load ide 0:1 0x800000 /boot/uImage; ext2load ide 0:1 0x2100000 /boot/uInitrd
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 ${mtdparts} earlyprintk=serial
preroot_ver=0.1.0
bootcmd_exec=run set_bootargs; run bootcmd_usb; run bootcmd_sata; bootm 0x800000 0x2100000
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
console=console=ttyS0,115200 mtdparts=nand_mtd:0x000a0000@0x0(uboot),0x00040000@0x000a0000(param),0x00280000@0x000e0000(preroot),0x00380000@0x00360000(uimage),0x076e0000@0x006e0000(rootfs),0x00240000@0x07dc0000(misc),128m@0x0(flash) 
bootcmd_f=run bootcmd_exec; nand reset; nand read.e 0x800000 0x00100000 0x00199800; check_crc32 PrEr; 
bootcmd=run bootcmd_exec; nand reset; nand read.e 0x800000 0x00100000 0x00199800; check_crc32 PrEr; nand reset; nand read.e 0x40000 0x00380000 0x0027d400; check_crc32 KrNl; setenv bootargs $(console) $(bootargs_root);  bootm 0x40000; 
bootdelay=3
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no
pcieTune1=no
load_dtb=ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-silverstore-hncn2.dtb
load_initrd=ext2load usb 0:1 0x1100000 /boot/uInitrd
load_uimage=ext2load usb 0:1 0x800000 /boot/uImage
usb_boot=run load_dtb; run load_uimage; if run load_initrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi

Environment size: 2616/131067 bytes
Marvell>> usb_boot
Unknown command 'usb_boot' - try 'help'
Marvell>> usb_boot
Unknown command 'usb_boot' - try 'help'
Marvell>> run usb_boot
Unknown command 'run' - try 'help'
Marvell>> run usb_boot
** Bad partition 1 **
** Bad partition 1 **
Unknown command 'if' - try 'help'
Unknown command 'then' - try 'help'
Unknown command 'else' - try 'help'
This command can be used only if enaMonExt is set!
Marvell>> setenv usb_boot 'run load_dtb; run load_uimage; if run load_initrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000'
Marvell>> run usb_boot
** Bad partition 1 **
** Bad partition 1 **
Unknown command 'if' - try 'help'
Unknown command 'then' - try 'help'
Unknown command 'else' - try 'help'
Marvell>> pri
baudrate=115200
loads_echo=0
ipaddr=10.4.52.165
serverip=10.4.52.7
rootpath=/srv/ubuntu
netmask=255.255.255.0
run_diag=yes
MALLOC_len=1
ethprime=egiga0
bootargs_root=root=/dev/ram0 rootfstype=cramfs init=/etc/rc.preroot initrd=0x800000,0x1000000
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end); bootm 0x2000000;
lcd0_enable=0
lcd0_params=640x480-16@60
ethaddr=00:50:43:47:1d:37
ethmtu=1500
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
image_multi=yes
uboot_ver=v0.0.9
mfgtest_state=final_tested_ok
mfgmodel=HNC-N2
ethact=egiga0
mtdparts=mtdparts=orion_nand:0x000a0000@0x0(uboot),0x00040000@0x000a0000(param),0x00280000@0x000e0000(preroot),0x00380000@0x00360000(uimage),0x076e0000@0x006e0000(rootfs),0x00240000@0x07dc0000(misc),128m@0x0(flash)
bootcmd_usb=usb start; ext2load usb 0:1 0x800000 /boot/uImage; ext2load usb 0:1 0x2100000 /boot/uInitrd
bootcmd_sata=ide reset; ext2load ide 0:1 0x800000 /boot/uImage; ext2load ide 0:1 0x2100000 /boot/uInitrd
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 ${mtdparts} earlyprintk=serial
preroot_ver=0.1.0
bootcmd_exec=run set_bootargs; run bootcmd_usb; run bootcmd_sata; bootm 0x800000 0x2100000
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
console=console=ttyS0,115200 mtdparts=nand_mtd:0x000a0000@0x0(uboot),0x00040000@0x000a0000(param),0x00280000@0x000e0000(preroot),0x00380000@0x00360000(uimage),0x076e0000@0x006e0000(rootfs),0x00240000@0x07dc0000(misc),128m@0x0(flash) 
bootcmd_f=run bootcmd_exec; nand reset; nand read.e 0x800000 0x00100000 0x00199800; check_crc32 PrEr; 
bootcmd=run bootcmd_exec; nand reset; nand read.e 0x800000 0x00100000 0x00199800; check_crc32 PrEr; nand reset; nand read.e 0x40000 0x00380000 0x0027d400; check_crc32 KrNl; setenv bootargs $(console) $(bootargs_root);  bootm 0x40000; 
bootdelay=3
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no
pcieTune1=no
load_dtb=ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-silverstore-hncn2.dtb
load_initrd=ext2load usb 0:1 0x1100000 /boot/uInitrd
load_uimage=ext2load usb 0:1 0x800000 /boot/uImage
usb_boot=run load_dtb; run load_uimage; if run load_initrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000

Environment size: 2612/131067 bytes
Marvell>> usb_boot
Unknown command 'usb_boot' - try 'help'
Marvell>> run usb_boot
** Bad partition 1 **
** Bad partition 1 **
Unknown command 'if' - try 'help'
Unknown command 'then' - try 'help'
Unknown command 'else' - try 'help'
Marvell>> run bootcmd_usb
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found
....
.
......
............
.........................
...................................................
......................................................................................................
............................................................................................................................................................................................................
...

4230352 bytes read
....
.
......
............
.........................
...................................................
......................................................................................................
............................................................................................................................................................................................................
....
.............................................................................................................................................................................................................................................................................................................................................................................................

8154809 bytes read
Marvell>> setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-silverstore-hncn2.dtb; ext2load usb 0:1 0x800000 /boot/uImage; ext2load usb 0:1 0x2100000 /boot/uInitrd'
Marvell>> run bootcmd_usb
(Re)start USB...
USB:   scanning bus for devices... 1 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
0 Storage Device(s) found
** Bad partition 1 **
** Bad partition 1 **
** Bad partition 1 **
Marvell>> setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x800000 /boot/uImage; ext2load usb 0:1 0x1100000 /boot/uInitrd'
Marvell>> run bootcmd_usb
Unknown command 'run' - try 'help'
Marvell>> run bootcmd_usb
(Re)start USB...
USB:   scanning bus for devices... 1 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
0 Storage Device(s) found
** Bad partition 1 **
** Bad partition 1 **
Marvell>>  
Marvell>> 
Marvell>> setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x800000 /boot/uImage; ext2load usb 0:1 0x2100000 /boot/uInitrd'
Marvell>> run bootcmd_usb
(Re)start USB...
USB:   scanning bus for devices... 1 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
0 Storage Device(s) found
** Bad partition 1 **
** Bad partition 1 **
Marvell>> usb start
(Re)start USB...
USB:   scanning bus for devices... 1 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
0 Storage Device(s) found
Marvell>> boot
(Re)start USB...
USB:   scanning bus for devices... 1 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
0 Storage Device(s) found
** Bad partition 1 **
** Bad partition 1 **

Reset IDE: 
Marvell Serial ATA Adapter
Integrated Sata device found

** Bad partition 1 **
** Bad partition 1 **
## Booting image at 00800000 ...
   Image Name:   Linux-4.19.0-kirkwood-tld-1
   Created:      2018-11-27  20:27:42 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4230288 Bytes =  4 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 02100000 ...
   Image Name:   initramfs-4.19.0-kirkwood-tld-1
   Created:      2018-11-27  20:28:37 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    8154745 Bytes =  7.8 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux...

LZMA data is corrupt

 -- System halted

---------------------------------


Regards,
garagoyun
Re: Debian on Freecom Silverstore 2 NAS
November 27, 2018 06:19PM
garagoyun,

1. It seems as though your rootfs file system is corrupted. Have you tried running fsck to see if there are errors?

2. It it has no error, then try loading uImage but dont load uInitrd and change bootm command to boot with uImage only. See how far you can boot.

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



Edited 1 time(s). Last edit at 11/27/2018 06:20PM by bodhi.
Re: Debian on Freecom Silverstore 2 NAS
December 03, 2018 10:37AM
bodhi Wrote:
-------------------------------------------------------
> garagoyun,
>
> 1. It seems as though your rootfs file system is
> corrupted. Have you tried running fsck to see if
> there are errors?

No errors:
root@X220:~# fsck /dev/sdc1
fsck from util-linux 2.31.1
e2fsck 1.44.1 (24-Mar-2018)
rootfs: clean, 27955/979200 files, 788337/3912192 blocks


> 2. It it has no error, then try loading uImage but
> dont load uInitrd and change bootm command to boot
> with uImage only. See how far you can boot.

I have managed to install one after another the kernels until 4.17.2 .

Kernel 4.19.0 halts after message 'LZMA data is corrupt'
         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__|  ** uboot_ver:v0.0.9 **

 ** MARVELL BOARD: HNC-N2 LE 

U-Boot 1.1.4 (Nov  7 2018 - 16:39:05) Marvell version: 3.5.9

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00

Soc: 88F6282 A1CPU running @ 1000Mhz L2 running @ 333Mhz
SysClock = 400Mhz , TClock = 200Mhz 

DRAM (DDR3) CAS Latency = 6 tRP = 6 tRAS = 15 tRCD=6
DRAM CS[0] base 0x00000000   size 128MB 
DRAM Total size 128MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:128 MB
Found ADT7473, program PWM1 ... OK
Flash:  0 kB

Marvell Serial ATA Adapter
Integrated Sata device found


CPU : Marvell Feroceon (Rev 1)
Scanning partition header:

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
PEX 1: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0 
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found
....
.
......
............
.........................
...................................................
......................................................................................................
.............................................................................................................................................................................................................

4205376 bytes read
....
.
......
............
.........................
...................................................
......................................................................................................
............................................................................................................................................................................................................
....
............................................................................................................................................................................................................................................................................................................................................................

7815018 bytes read

Reset IDE: 
Marvell Serial ATA Adapter
Integrated Sata device found

** Bad partition 1 **
** Bad partition 1 **
## Booting image at 00800000 ...
   Image Name:   Linux-4.19.0-kirkwood-tld-1
   Created:      2018-12-02  23:03:15 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4205312 Bytes =  4 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 02100000 ...
   Image Name:   initramfs-4.14.1-kirkwood-tld-1
   Created:      2018-12-02  22:31:54 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7814954 Bytes =  7.5 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux...

LZMA data is corrupt

 -- System halted



Kernel 4.18.4 hangs after message 'Console: colour dummy device 80x30'
        __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__|  ** uboot_ver:v0.0.9 **

 ** MARVELL BOARD: HNC-N2 LE 

U-Boot 1.1.4 (Nov  7 2018 - 16:39:05) Marvell version: 3.5.9

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00

Soc: 88F6282 A1CPU running @ 1000Mhz L2 running @ 333Mhz
SysClock = 400Mhz , TClock = 200Mhz 

DRAM (DDR3) CAS Latency = 6 tRP = 6 tRAS = 15 tRCD=6
DRAM CS[0] base 0x00000000   size 128MB 
DRAM Total size 128MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:128 MB
Found ADT7473, program PWM1 ... OK
Flash:  0 kB

Marvell Serial ATA Adapter
Integrated Sata device found


CPU : Marvell Feroceon (Rev 1)
Scanning partition header:

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
PEX 1: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0 
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found
....
.
......
............
.........................
...................................................
......................................................................................................
..........................................................................................................................................................................................................

4170632 bytes read
....
.
......
............
.........................
...................................................
......................................................................................................
............................................................................................................................................................................................................
....
.........................................................................................................................................................................................................................................................................................................................................................................................

8111921 bytes read

Reset IDE: 
Marvell Serial ATA Adapter
Integrated Sata device found

** Bad partition 1 **
** Bad partition 1 **
## Booting image at 00800000 ...
   Image Name:   Linux-4.18.4-kirkwood-tld-1
   Created:      2018-12-03  16:04:42 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4170568 Bytes =  4 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 02100000 ...
   Image Name:   initramfs-4.18.4-kirkwood-tld-1
   Created:      2018-12-03  16:04:52 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    8111857 Bytes =  7.7 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.18.4-kirkwood-tld-1 (root@tldDebian) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #1 PREEMPT Fri Aug 24 22:13:40 PDT 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: Freecom Silverstore HNCN2
[    0.000000] bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writeback
[    0.000000] OF: fdt: Error -11 processing FDT
[    0.000000] random: get_random_bytes called from start_kernel+0x78/0x4e8 with crng_init=0
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:0x000a0000@0x0(uboot),0x00040000@0x000a0000(param),0x00280000@0x000e0000(preroot),0x00380000@0x00360000(uimage),0x076e0000@0x006e0000(rootfs),0x00240000@0x07dc0000(misc),128m@0x0(flash) earlyprintk=serial
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 108568K/131072K available (8192K kernel code, 799K rwdata, 2148K rodata, 1024K init, 279K bss, 22504K 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 : 0xc8800000 - 0xff800000   ( 880 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0x(ptrval) - 0x(ptrval)   (9184 kB)
[    0.000000]       .init : 0x(ptrval) - 0x(ptrval)   (1024 kB)
[    0.000000]       .data : 0x(ptrval) - 0x(ptrval)   ( 800 kB)
[    0.000000]        .bss : 0x(ptrval) - 0x(ptrval)   ( 280 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Tasks RCU enabled.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] timer_probe: no matching timers found
[    0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns
[    0.000000] Console: colour dummy device 80x30

I have tried booting either of the last two kernels with the following envs:
bootcmd_exec=run set_bootargs; run bootcmd_usb; run bootcmd_sata; bootm 0x800000
bootcmd_usb=usb start; ext2load usb 0:1 0x800000 /boot/uImage

Same outputs respectively as above. I have tried on different USB flash memeories as well.


I will settle with Kernel 4.17.2 for now.

---------------------------------


Regards,
garagoyun
Re: Debian on Freecom Silverstore 2 NAS
December 03, 2018 05:19PM
garagoyun,

> I have tried booting either of the last two
> kernels with the following envs:
>
> bootcmd_exec=run set_bootargs; run bootcmd_usb;
> run bootcmd_sata; bootm 0x800000
> bootcmd_usb=usb start; ext2load usb 0:1 0x800000
> /boot/uImage
>
>
> Same outputs respectively as above. I have tried
> on different USB flash memeories as well.

The above was a test to see if uInitrd loading has anything to do with it. And it does not. So the problem was solely about uImage. Let me look where stock u-boot load the uImage.

Remember, we are running with stock u-boot. Normally 0x800000 works for all Kirkwood boxes, except when we run with stock u-boot, then we need to see if it has to be the same as stock env.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Freecom Silverstore 2 NAS
October 25, 2020 01:34PM
After two years of silence I am resurrecting this topic. I hope that is ok.

As per my last message I have settled with kernel 4.17.2 as that was the most recent kernel the unit could boot from. I have tried the kernel 4.18.4 and later, however, non of them are booting. They are ending with:

Starting kernel ...

Uncompressing Linux...

LZMA data is corrupt

 -- System halted


Now after 2 years (i am still on debian stretch) and some spare time which is rare nowadays, I decided to try the new rootfs kernel 5.9.9 and the serial condsole is spiting the same message:

USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found
....
.
......
............
.........................
...................................................
......................................................................................................
............................................................................................................................................................................................................
....
.......................................................................

4976168 bytes read
....
.
...................
.........................
...................................................
......................................................................................................
............................................................................................................................................................................................................
....
....................................................................................................................................................................................................................................................................................................................................................................................................................
....
............................................................................................................................

9713936 bytes read

Reset IDE: 
Marvell Serial ATA Adapter
Integrated Sata device found

** Bad partition 1 **
** Bad partition 1 **
## Booting image at 00800000 ...
   Image Name:   Linux-5.2.9-kirkwood-tld-1
   Created:      2020-10-25  15:04:18 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4976104 Bytes =  4.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 02100000 ...
   Image Name:   initramfs-5.2.9-kirkwood-tld-1
   Created:      2019-08-25   2:22:50 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9713872 Bytes =  9.3 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux...

LZMA data is corrupt

I have tried several times to confirm it is not an issue with the usb flash. Also tried different usb dongles. The image with kernel 4.17.2 works any time.

Any suggestions would be appreciated.

---------------------------------


Regards,
garagoyun
Re: Debian on Freecom Silverstore 2 NAS
October 25, 2020 05:13PM
garagoyun,

> After two years of silence I am resurrecting this
> topic. I hope that is ok.

It is OK. Except that I already forgot most about this topic :)

Let do the process over so I can see where the problem is.

1. Create the rootfs Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2 on USB. And this time do Step 4,


Quote

4. Create uImage with embedded DTB for booting with older u-boots (2012 or earlier). Do not do this step if you have installed the latest U-Boot for Kirkwood (or are installing this u-boot at the same time).

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.2.9-kirkwood-tld-1 zImage.fdt
cat kirkwood-silverstore-hncn2.dtb >> zImage.fdt
mv uImage uImage.orig
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.2.9-kirkwood-tld-1 -d zImage.fdt uImage
sync

I've attached the latest kirkwood-silverstore-hncn2.dtb to this post.


2. Bring it to the Silverstore_2 box and power up try booting like you did before (set u-boot envs to boot USB).

Please post the entire serial boot log. After that I can orient myself to this by seeing the log.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Attachments:
open | download - kirkwood-silverstore-hncn2.dtb (12.2 KB)
Re: Debian on Freecom Silverstore 2 NAS
October 25, 2020 05:40PM
Hi bodhi,

Your reply is appreciated.

In my previous message I have already posted the log following your instructions for rootfs Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2

Let me know if you need me to test anything else.

Thanks!

---------------------------------


Regards,
garagoyun
Re: Debian on Freecom Silverstore 2 NAS
October 25, 2020 05:58PM
garagoyun,

> Let me know if you need me to test anything else.

Please repeat the test again with the new DTB I've attched above. And post the serial boot log here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Freecom Silverstore 2 NAS
October 26, 2020 05:01AM
bodhi,

That was unfortunately unsuccessful.

I have created the rootfs:
metin@X220:~$ su -
Password: 
root@X220:~# cd /media/metin/rootfs
root@X220:/media/metin/rootfs# cp /home/metin/Downloads/Silver/rootfs_buster/Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2 ./
root@X220:/media/metin/rootfs# sync
root@X220:/media/metin/rootfs# tar -xjf Debian-*
root@X220:/media/metin/rootfs# cp /home/metin/Downloads/Silver/rootfs-bak/kirkwood-silverstore-hncn2.dtb ./boot
root@X220:/media/metin/rootfs# ls
bin  boot  Debian-5.2.9-kirkwood-tld-1-rootfs-bodhi.tar.bz2  dev  etc  home  lib  lost+found  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
root@X220:/media/metin/rootfs# ls boot
config-5.2.9-kirkwood-tld-1  initrd.img-5.2.9-kirkwood-tld-1  linux-headers-5.2.9-kirkwood-tld-1_1.0_armel.deb  uImage   vmlinuz-5.2.9-kirkwood-tld-1
dts                          kirkwood-silverstore-hncn2.dtb   System.map-5.2.9-kirkwood-tld-1                   uInitrd  zImage-5.2.9-kirkwood-tld-1
root@X220:/media/metin/rootfs# sync
root@X220:/media/metin/rootfs# cd boot
root@X220:/media/metin/rootfs/boot# cp -a zImage-5.2.9-kirkwood-tld-1 zImage.fdt 
root@X220:/media/metin/rootfs/boot# cat kirkwood-silverstore-hncn2.dtb >> zImage.fdt 
root@X220:/media/metin/rootfs/boot# mv uImage uImage.orig 
root@X220:/media/metin/rootfs/boot# mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.2.9-kirkwood-tld-1 -d zImage.fdt uImage 
Image Name:   Linux-5.2.9-kirkwood-tld-1
Created:      Mon Oct 26 09:49:15 2020
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    4976104 Bytes = 4859.48 KiB = 4.75 MiB
Load Address: 00008000
Entry Point:  00008000
root@X220:/media/metin/rootfs/boot# sync
root@X220:/media/metin/rootfs/boot# sync
root@X220:/media/metin/rootfs/boot# sync
root@X220:/media/metin/rootfs/boot# exit
logout




I then tried to boot of the newly created usb:

         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__|  ** uboot_ver:v0.0.9 **

 ** MARVELL BOARD: HNC-N2 LE 

U-Boot 1.1.4 (Nov  7 2018 - 16:39:05) Marvell version: 3.5.9

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00

Soc: 88F6282 A1CPU running @ 1000Mhz L2 running @ 333Mhz
SysClock = 400Mhz , TClock = 200Mhz 

DRAM (DDR3) CAS Latency = 6 tRP = 6 tRAS = 15 tRCD=6
DRAM CS[0] base 0x00000000   size 128MB 
DRAM Total size 128MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:128 MB
Found ADT7473, program PWM1 ... OK
Flash:  0 kB

Marvell Serial ATA Adapter
Integrated Sata device found


CPU : Marvell Feroceon (Rev 1)
Scanning partition header:

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
PEX 1: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0 
Marvell>> pri
baudrate=115200
loads_echo=0
ipaddr=10.4.52.165
serverip=10.4.52.7
rootpath=/srv/ubuntu
netmask=255.255.255.0
run_diag=yes
MALLOC_len=1
ethprime=egiga0
bootargs_root=root=/dev/ram0 rootfstype=cramfs init=/etc/rc.preroot initrd=0x800000,0x1000000
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end); bootm 0x2000000;
lcd0_enable=0
lcd0_params=640x480-16@60
ethaddr=00:50:43:47:1d:37
ethmtu=1500
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
image_multi=yes
uboot_ver=v0.0.9
mfgtest_state=final_tested_ok
mfgmodel=HNC-N2
ethact=egiga0
mtdparts=mtdparts=orion_nand:0x000a0000@0x0(uboot),0x00040000@0x000a0000(param),0x00280000@0x000e0000(preroot),0x00380000@0x00360000(uimage),0x076e0000@0x006e0000(rootfs),0x00240000@0x07dc0000(misc),128m@0x0(flash)
bootcmd_usb=usb start; ext2load usb 0:1 0x800000 /boot/uImage; ext2load usb 0:1 0x2100000 /boot/uInitrd
bootcmd_sata=ide reset; ext2load ide 0:1 0x800000 /boot/uImage; ext2load ide 0:1 0x2100000 /boot/uInitrd
set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 ${mtdparts} earlyprintk=serial
preroot_ver=0.1.0
bootcmd_exec=run set_bootargs; run bootcmd_usb; run bootcmd_sata; bootm 0x800000 0x2100000
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
console=console=ttyS0,115200 mtdparts=nand_mtd:0x000a0000@0x0(uboot),0x00040000@0x000a0000(param),0x00280000@0x000e0000(preroot),0x00380000@0x00360000(uimage),0x076e0000@0x006e0000(rootfs),0x00240000@0x07dc0000(misc),128m@0x0(flash) 
bootcmd_f=run bootcmd_exec; nand reset; nand read.e 0x800000 0x00100000 0x00199800; check_crc32 PrEr; 
bootcmd=run bootcmd_exec; nand reset; nand read.e 0x800000 0x00100000 0x00199800; check_crc32 PrEr; nand reset; nand read.e 0x40000 0x00380000 0x0027d400; check_crc32 KrNl; setenv bootargs $(console) $(bootargs_root);  bootm 0x40000; 
bootdelay=3
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no
pcieTune1=no

Environment size: 2298/131067 bytes
Marvell>> setenv mtdparts 'mtdparts=orion_nand:0x000a0000@0x0(uboot),0x00040000@0x000a0000(param),0x00280000@0x000e0000(preroot),0x00380000@0x00360000(uimage),0x076e0000@0x006e0000(rootfs),0x00240000@0x07dc0000(misc),128m@0x0(flash)'
Marvell>> setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 ${mtdparts} earlyprintk=serial'
Marvell>> setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x800000 /boot/uImage; ext2load usb 0:1 0x2100000 /boot/uInitrd'
Marvell>> setenv bootcmd_exec 'run set_bootargs; run bootcmd_usb; bootm 0x800000 0x2100000'
Marvell>> run bootcmd_exec
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found
....
.
......
............
.........................
...................................................
......................................................................................................
............................................................................................................................................................................................................
....
.......................................................................

4976168 bytes read
....
.
...................
.........................
...................................................
......................................................................................................
............................................................................................................................................................................................................
....
....................................................................................................................................................................................................................................................................................................................................................................................................................
....
............................................................................................................................

9713936 bytes read
## Booting image at 00800000 ...
   Image Name:   Linux-5.2.9-kirkwood-tld-1
   Created:      2020-10-26   9:49:15 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4976104 Bytes =  4.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 02100000 ...
   Image Name:   initramfs-5.2.9-kirkwood-tld-1
   Created:      2019-08-25   2:22:50 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9713872 Bytes =  9.3 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux...

LZMA data is corrupt

 -- System halted



Something has changed between kernel 4.17 and 4.18... Could it be the size of uImage?

---------------------------------


Regards,
garagoyun
Re: Debian on Freecom Silverstore 2 NAS
October 26, 2020 04:31PM
garagoyun,

> Something has changed between kernel 4.17 and
> 4.18... Could it be the size of uImage?

Most likely is.

Stock u-boot is very picky with the load address. So our load addresses oftently need to change when a kernel uImage size is increased substantially. Note that modern u-boots (such as ones I built) don't have this quirk.

And in stock u-boot, these load addresses are probably not good with newer kernel.

## Booting image at 00800000 ...
## Loading Ramdisk Image at 02100000 ...


So let's try these:

In serial console,
setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x02000000 /boot/uImage; ext2load usb 0:1 0x03000000 /boot/uInitrd'
setenv bootcmd_exec 'run set_bootargs; run bootcmd_usb; run bootcmd_sata; bootm 0x02000000 0x03000000'
and then

boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Freecom Silverstore 2 NAS
October 27, 2020 07:25AM
bodhi,

I have tried with the advised addresses, unfortunately, no luck:
        __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__|  ** uboot_ver:v0.0.9 **

 ** MARVELL BOARD: HNC-N2 LE 

U-Boot 1.1.4 (Nov  7 2018 - 16:39:05) Marvell version: 3.5.9

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00

Soc: 88F6282 A1CPU running @ 1000Mhz L2 running @ 333Mhz
SysClock = 400Mhz , TClock = 200Mhz 

DRAM (DDR3) CAS Latency = 6 tRP = 6 tRAS = 15 tRCD=6
DRAM CS[0] base 0x00000000   size 128MB 
DRAM Total size 128MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:128 MB
Found ADT7473, program PWM1 ... OK
Flash:  0 kB

Marvell Serial ATA Adapter
Integrated Sata device found


CPU : Marvell Feroceon (Rev 1)
Scanning partition header:

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
PEX 1: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0 
Marvell>> setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x02000000 /boot/uImage; ext2load usb 0:1 0x03000000 /boot/uInitrd'
Marvell>> 
Marvell>> setenv bootcmd_exec 'run set_bootargs; run bootcmd_usb; run bootcmd_sata; bootm 0x02000000 0x03000000'
Marvell>> boot
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found
....
.
......
............
.........................
...................................................
......................................................................................................
............................................................................................................................................................................................................
....
.......................................................................

4976168 bytes read
....
.
...................
.........................
...................................................
......................................................................................................
............................................................................................................................................................................................................
....
....................................................................................................................................................................................................................................................................................................................................................................................................................
....
............................................................................................................................

9713936 bytes read

Reset IDE: 
Marvell Serial ATA Adapter
Integrated Sata device found

** Bad partition 1 **
** Bad partition 1 **
## Booting image at 02000000 ...
   Image Name:   Linux-5.2.9-kirkwood-tld-1
   Created:      2020-10-26   9:49:15 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4976104 Bytes =  4.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 03000000 ...
   Image Name:   initramfs-5.2.9-kirkwood-tld-1
   Created:      2019-08-25   2:22:50 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9713872 Bytes =  9.3 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux...

LZMA data is corrupt

 -- System halted

---------------------------------


Regards,
garagoyun
Re: Debian on Freecom Silverstore 2 NAS
October 27, 2020 04:55PM
garagoyun,

What was the size of the kernel 4.17.2 uImage that was booting OK?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Freecom Silverstore 2 NAS
October 27, 2020 05:56PM
bodhi,

Quote
What was the size of the kernel 4.17.2 uImage that was booting OK?

I have copied the boot log below:

(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found
....
.
......
............
.........................
...................................................
......................................................................................................
......................................................................................................................................................................................................

4127984 bytes read
...
.
.
......
............
.........................
...................................................
......................................................................................................
............................................................................................................................................................................................................
....
......................................................................................................................................................................................................................................................................................................................................................................................

8076040 bytes read

Reset IDE: 
Marvell Serial ATA Adapter
Integrated Sata device found

** Bad partition 1 **
** Bad partition 1 **
## Booting image at 00800000 ...
   Image Name:   Linux-4.17.2-kirkwood-tld-1
   Created:      2020-10-25  15:34:04 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4127920 Bytes =  3.9 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 02100000 ...
   Image Name:   initramfs-4.17.2-kirkwood-tld-1
   Created:      2020-10-25  15:34:17 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    8075976 Bytes =  7.7 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Does that help?

---------------------------------


Regards,
garagoyun
Re: Debian on Freecom Silverstore 2 NAS
October 27, 2020 10:06PM
garagoyun,

> ## Booting image at 00800000 ...
>    Image Name:   Linux-4.17.2-kirkwood-tld-1
>    Created:      2020-10-25  15:34:04 UTC
>    Image Type:   ARM Linux Kernel Image
> (uncompressed)
>    Data Size:    4127920 Bytes =  3.9 MB
>    Load Address: 00008000
>    Entry Point:  00008000
>    Verifying Checksum ... OK
> OK
> ## Loading Ramdisk Image at 02100000 ...
>    Image Name:   initramfs-4.17.2-kirkwood-tld-1
>    Created:      2020-10-25  15:34:17 UTC
>    Image Type:   ARM Linux RAMDisk Image (gzip
> compressed)
>    Data Size:    8075976 Bytes =  7.7 MB
>    Load Address: 00000000
>    Entry Point:  00000000
>    Verifying Checksum ... OK
> 
> Starting kernel ...
>

> Does that help?

Yes it does. Given that all the steps you did look correct to me. The behavior is that this stock u-boot most likely has a restriction on the uImage size of 4MB. Some of old stock u-boots actually has this uImage size hardcoded (I could not remember which one, but definitely I have seen such u-boots).

So the best kernel to use for the time being is 4.14.x (since it is an LTS kernel). Until we can figure out the work around, or if the problem is actually something else.

I don't recall if we have GPL source for this stock u-boot. That would confirm my theory.

======

Let's try to boot with uImage only again. Do this test:

setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x00800000 /boot/uImage'
setenv bootcmd_exec 'run set_bootargs; run bootcmd_usb; run bootcmd_sata; bootm 0x00800000'
boot

and if not successful, cycle the power and try

setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x02000000 /boot/uImage'
setenv bootcmd_exec 'run set_bootargs; run bootcmd_usb; run bootcmd_sata; bootm 0x02000000'
boot

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Freecom Silverstore 2 NAS
October 28, 2020 03:27AM
There is what is purported to be a u-boot for Silverstore NAS on github at https://github.com/TeXniKK/silverstore-uboot. It appears to be u-boot 1.1.4 based. You could build that and see if it will boot properly with kwboot.

WikiDevi has the following statement about this device:

Stock bootloader is locked to boot only Stock OS by checking signature.

Ray
Re: Debian on Freecom Silverstore 2 NAS
October 28, 2020 04:23AM
Hi Ray,

I have the GPL source and I have already unlocked the stock uboot about two years ago. The modified bootlader is attached somewhere in this thread. In addition, generik also has shared his bootloader, which is based on uboot 2017.

The bootloader, which I have modified has been booting the kernels up to 4.17.2. I guess I will have to dig the GPL source out again...

---------------------------------


Regards,
garagoyun
Re: Debian on Freecom Silverstore 2 NAS
October 28, 2020 04:59AM
bodhi,

I have tried the advised steps already. See the logs below:

        __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__|  ** uboot_ver:v0.0.9 **

 ** MARVELL BOARD: HNC-N2 LE 

U-Boot 1.1.4 (Nov  7 2018 - 16:39:05) Marvell version: 3.5.9

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00

Soc: 88F6282 A1CPU running @ 1000Mhz L2 running @ 333Mhz
SysClock = 400Mhz , TClock = 200Mhz 

DRAM (DDR3) CAS Latency = 6 tRP = 6 tRAS = 15 tRCD=6
DRAM CS[0] base 0x00000000   size 128MB 
DRAM Total size 128MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:128 MB
Found ADT7473, program PWM1 ... OK
Flash:  0 kB

Marvell Serial ATA Adapter
Integrated Sata device found


CPU : Marvell Feroceon (Rev 1)
Scanning partition header:

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
PEX 1: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0 
Marvell>> setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x00800000 /boot/uImage'
Marvell>> setenv bootcmd_exec 'run set_bootargs; run bootcmd_usb; run bootcmd_sata; bootm 0x00800000'
Marvell>> boot
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found
....
.
......
............
.........................
...................................................
......................................................................................................
............................................................................................................................................................................................................
....
.......................................................................

4976168 bytes read

Reset IDE: 
Marvell Serial ATA Adapter
Integrated Sata device found

** Bad partition 1 **
** Bad partition 1 **
## Booting image at 00800000 ...
   Image Name:   Linux-5.2.9-kirkwood-tld-1
   Created:      2020-10-26   9:49:15 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4976104 Bytes =  4.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux...

LZMA data is corrupt

 -- System halted

        __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__|  ** uboot_ver:v0.0.9 **

 ** MARVELL BOARD: HNC-N2 LE 

U-Boot 1.1.4 (Nov  7 2018 - 16:39:05) Marvell version: 3.5.9

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00

Soc: 88F6282 A1CPU running @ 1000Mhz L2 running @ 333Mhz
SysClock = 400Mhz , TClock = 200Mhz 

DRAM (DDR3) CAS Latency = 6 tRP = 6 tRAS = 15 tRCD=6
DRAM CS[0] base 0x00000000   size 128MB 
DRAM Total size 128MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:128 MB
Found ADT7473, program PWM1 ... OK
Flash:  0 kB

Marvell Serial ATA Adapter
Integrated Sata device found


CPU : Marvell Feroceon (Rev 1)
Scanning partition header:

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: PCI Express Root Complex Interface
PEX interface detected Link X1
PEX 1: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0 
Marvell>> setenv bootcmd_usb 'usb start; ext2load usb 0:1 0x02000000 /boot/uImage'
Marvell>> setenv bootcmd_exec 'run set_bootargs; run bootcmd_usb; run bootcmd_sata; bootm 0x02000000'
Marvell>> boot
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found
....
.
......
............
.........................
...................................................
......................................................................................................
............................................................................................................................................................................................................
....
.......................................................................

4976168 bytes read

Reset IDE: 
Marvell Serial ATA Adapter
Integrated Sata device found

** Bad partition 1 **
** Bad partition 1 **
## Booting image at 02000000 ...
   Image Name:   Linux-5.2.9-kirkwood-tld-1
   Created:      2020-10-26   9:49:15 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    4976104 Bytes =  4.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux...

LZMA data is corrupt

 -- System halted


Quote
I don't recall if we have GPL source for this stock u-boot. That would confirm my theory.

I do have the GPL source. What should I be looking for? It probably would be worth it just to build a new uboot? This little device is not best and outdated to today's standards. Mind it is running over two years without hiccups; doing backups, light media server, pi-hole, tvheadend, openvpn server. I also have a dedicated AMD server for the heavy lifting. But I like tinkering; and keeping this kirkwood device alive is a good way learning something new ...

---------------------------------


Regards,
garagoyun
Re: Debian on Freecom Silverstore 2 NAS
October 28, 2020 05:45AM
garagoyun,

> I do have the GPL source. What should I be looking
> for?

Look for the bootm command.

find . -name '*bootm*'

or
find . -name '*.c' | xargs grep -i bootm

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Freecom Silverstore 2 NAS
October 28, 2020 02:06PM
bodhi,

I have attached the search results and the cmd_bootm.c

---------------------------------


Regards,
garagoyun
Attachments:
open | download - search_bootm (17.7 KB)
open | download - cmd_bootm.c (37 KB)
Re: Debian on Freecom Silverstore 2 NAS
October 28, 2020 06:42PM
garagoyun,

Please post:

./u-boot-3.5.9/board/mv_feroceon/mv_kw/mv_main.c

Or upload the tarball somewhere (e.g. Dropbox).

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



Edited 1 time(s). Last edit at 10/28/2020 06:43PM by bodhi.
Re: Debian on Freecom Silverstore 2 NAS
October 29, 2020 07:41AM
bodhi,

Quote

garagoyun,

Please post:

./u-boot-3.5.9/board/mv_feroceon/mv_kw/mv_main.c

See attached.

I will upload the original u-boot with patches and build directory shortly.

---------------------------------


Regards,
garagoyun
Attachments:
open | download - mv_main.c (52.9 KB)
Re: Debian on Freecom Silverstore 2 NAS
October 30, 2020 12:09AM
garagoyun,

I forgot that I already download this GPL previously! perhaps a couple years ago.

Quote

fc2001.3101_source-release.tar

Try building u-boot again in your environment (or if you already built and kep the tree unclean), look for

MV_BOOTSIZE_4M

It looks suspected. I have not determined whether it is the uImage size or something else.

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

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: