Welcome! Log In Create A New Profile

Advanced

Mainline Debian on Iomega ix4-300d

Posted by Koen 
Mainline Debian on Iomega ix4-300d
March 06, 2022 08:02AM
Hi,

I've recently bought a 2nd hand ix4-300d on ebay and decided to run mainline Debian on it. There is not much info on this device on the forum so this post describes the way I configured it and may be useful to others. I don't like writing / changing things on nand so my setup consists of booting Debian from a small SSD and then use the 3 remaining sata slots for RAID 5. That way the SSD can be easily removed and connected to another computer if something goes wrong and the storage drives can be spun down when there is no disk activity.

The initial preparation of the netboot images requires the use of a linux computer or VM. Once that step is done the rest of the install is done through serial.

Useful websites:

https://github.com/benoitm974/ix4-300d/wiki
https://www.hillenius.com/post/installing_debian_jessie_on_a_netgear_readynas_102/
https://blog.kleine-koenig.org/ukl/installing-debian-jessie-on-a-netgear-readynas-104.html

Start with the nas with just an empty SSD plugged in. I used the lower sata slot with number 1 next to it.

Prepare for install:

Download vmlinuz, initrd.gz and dtb files from the Debian website

https://deb.debian.org/debian/dists/bullseye/main/installer-armhf/current/images/netboot/
https://deb.debian.org/debian/dists/bullseye/main/installer-armhf/current/images/device-tree/

Append dtb file to the kernel:

cat vmlinuz armada-xp-lenovo-ix4-300d.dtb > vmlinuz_ix4_300d

Create an uImage with appended init ramdisk:

mkimage -A arm -O linux -T multi -C none -a 0x04000000 -e 0x04000000  -n "Debian armhf installer" -d vmlinuz_ix4_300d:initrd.gz uImage_di_ix4_300d

Copy the file to the tftp server on my OpenWrt router:

scp uImage_di_ix4_300d root@192.168.1.254:/mnt/mmcblk0p1/tftp

Connect serial adapter to the nas and interrupt the boot sequence. Set the ip address of the tftp server:

setenv serverip 192.168.1.254

Check if network connection works:

ping 192.168.1.254

Transfer the Debian installer via tftp:

tftpboot uImage_di_ix4_300d

Boot the Debian installer in RAM:

bootm 0x2000000

The Debian installer should start in the serial console window. Go through the process as shown on screen.
Skipping grub and bootloader results in the following warning:

You will need to boot manually with the /vmlinuz kernel on partition /dev/sda1 and root=/dev/sda2 passed as a kernel argument.

Do not complete the final 'cleanup and reboot' stage of the install but choose to execute a shell instead.

mount --bind /dev /target/dev
mount -t proc none /target/proc
mount -t sysfs none /target/sys
chroot /target /bin/sh
apt-get update
apt-get install flash-kernel

Configure flash-kernel database as follows:

nano /etc/flash-kernel/db

Machine: Lenovo Iomega ix4-300d
Kernel-Flavors: armmp armmp-lpae
DTB-Id: armada-xp-lenovo-ix4-300d.dtb
DTB-Append: yes
U-Boot-Kernel-Address: 0x00008000
U-Boot-Initrd-Address: 0x0
Boot-Kernel-Path: /boot/uImage
Boot-Initrd-Path: /boot/uInitrd
Boot-DTB-Path: /boot/dtb
Required-Packages: u-boot-tools
Bootloader-Sets-Incorrect-Root: no

Generate / update initramfs and kernel:

update-initramfs -u

Set label on the rootfs partition:

e2label /dev/sda2 rootfs

Exit chroot and reboot:

exit
reboot

Interrupt uboot and try to boot using the ssd:

printenv; ide reset; ext2load ide 2:1 0x0040000 uImage; ext2load ide 2:1 0x2000000 uInitrd; setenv bootargs $console $mtdparts root=/dev/sda2 rw rootdelay=10
bootm 0x40000 0x2000000

The boot sequence sometimes struggles to execute the 1st action. A dummy printenv has been added that doesn't do anything useful but allows the sequence to continue successfully if the 1st action fails. This works with the flash-kernel configuration above. Maybe try root=label as well since there is no guarantee that the SSD will always be sda?

Boot test with label:

printenv; ide reset; ext2load ide 2:1 0x0040000 uImage; ext2load ide 2:1 0x2000000 uInitrd; setenv bootargs $console $mtdparts root=LABEL=rootfs rw rootdelay=5; bootm 0x40000 0x2000000

This works fine as well and should be more resilient when multiple disks are present.

Boot into Debian and take a backup of the different mtd partitions using nanddump.There are no changes being done to nand except for the uboot variables but it can't hurt to have a backup (repeat the command below for each of the mtd parts!).

nanddump --noecc --omitoob -f mtd0 /dev/mtd0

Reboot and interrupt the uboot sequence in serial console. Define a new bootdebian environment variable:

setenv bootdebian 'printenv; ide reset; ext2load ide 2:1 0x0040000 uImage; ext2load ide 2:1 0x2000000 uInitrd; setenv bootargs $console $mtdparts root=LABEL=rootfs rw rootdelay=5; bootm 0x40000 0x2000000;'

This is the original bootcmd for reference:

bootcmd=nand read 0x40000 $kernel_start $kernel_size;nand read 0x2000000 $initrd_start $initrd_size;setenv bootargs $console $mtdparts $bootargs_root mem=512M  ramdisk_size=$ramdisk_size ramdisk_blocksize=1024 ip=$bootargs_end $mvNetConfig; bootm 0x40000 0x2000000;

Set a new bootcmd:

setenv bootcmd 'run bootdebian; reset;'

Save the variables and reset:

saveenv
reset

This should result in the NAS booting into Debian on the SSD. Running upgrades works fine and flash-kernel creates the new dtb apended uImage and uInitrd in the boot folder. From here on you can add storage drives and start setting up raid etc.

Known issues: The nas never powers off but always reboots. The original github page says this can be fixed by configuring both ethernet ports but I'm not sure what is needed.

I hope this is useful to someone having the same device. Any feedback or suggestions for improvements are appreciated.

Koen
Re: Mainline Debian on Iomega ix4-300d
March 06, 2022 08:28AM
Some additional info from the stock system before I started installing Debian. Mainly as reference.

Available uboot commands:

Marvell>> help

?       - alias for 'help'
SatR    - Sample At Reset sub-system

amp_boot- amp_boot - boot an AMP group

amp_config- Fully config an AMP group

amp_printenv- amp_printenv - print only AMP env variables

amp_verify- Verfiy AMP configuration

autoscr - DEPRECATED - use "source" command instead
base    - print or set address offset
bdinfo  - print Board Info structure
bios    - BIOS command to set the DB configuration.

boot    - boot default, i.e., run 'bootcmd'
bootd   - boot default, i.e., run 'bootcmd'
bootelf - Boot from an ELF image in memory
bootm   - boot application image from memory
bootp   - boot image via network using BOOTP/TFTP protocol
bootvx  - Boot vxWorks from an ELF image
bubt    - bubt  - Burn an image on the Boot Nand Flash.

chpart  - change active partition
cmp     - memory compare
cmpm    - cmpm  - Compare Memory

coninfo - print console devices and information
cp      - memory copy
cpumap  - cpumap - Display CPU memory mapping settings.

crc32   - checksum calculation
date    - get/set/reset date & time
ddrPhyRead- ddrPhyRead - Read DDR PHY register

ddrPhyWrite- ddrPhyWrite - Write DDR PHY register

dhcp    - boot image via network using DHCP/TFTP protocol
diskboot- diskboot- boot from IDE device

dma     - dma   - Perform DMA using the XOR engine

echo    - echo args to console
eeprom  - EEPROM sub-system
exit    - exit script
ext2load- load binary file from a Ext2 filesystem
ext2ls  - list files in a directory (default /)
fatinfo - print information about filesystem
fatload - load binary file from a dos filesystem
fatls   - list files in a directory (default /)
fi      - fi    - Find value in the memory.

fsinfo  - print information about filesystems
fsload  - load binary file from a filesystem image
g       - g     - start application at cached address 'addr'(default addr 0x40000)

go      - start application at address 'addr'
help    - print online help
i2c     - I2C sub-system
ide     - ide     - IDE sub-system

iminfo  - print header information for application image
imxtract- extract a part of a multi-image
ir      - ir    - reading and changing MV internal register values.

itest   - return true/false on integer compare
loadb   - load binary file over serial line (kermit mode)
loads   - load S-Record file over serial line
loady   - load binary file over serial line (ymodem mode)
loop    - infinite loop on address range
ls      - list files in a directory (default /)
map     - map   - Diasplay address decode windows

md      - memory display
me      - me    - PCI master enable

mm      - memory modify (auto-incrementing address)
mmc     - MMC sub system
mmcinfo - display MMC info
mp      - mp    - map PCI BAR

mtdparts- define flash/nand partitions
mtest   - simple RAM read/write test
mw      - memory write (fill)
nand    - NAND sub-system
nboot   - boot from NAND device
nfs     - boot image via network using NFS protocol
nm      - memory modify (constant address)
pci     - list and access PCI Configuration Space
pciePhyRead- phyRead    - Read PCI-E Phy register

pciePhyWrite- pciePhyWrite      - Write PCI-E Phy register

phyRead - phyRead       - Read Phy register

phyWrite- phyWrite      - Write Phy register

ping    - send ICMP ECHO_REQUEST to network host
printenv- print environment variables
rarpboot- boot image via network using RARP/TFTP protocol
rcvr    - rcvr  - Satrt recovery process (Distress Beacon with TFTP server)

reset   - Perform RESET of the CPU
resetenv- resetenv      - earse environment sector to reset all variables to default.

run     - run commands in an environment variable
saveenv - save environment variables to persistent storage
se      - se    - PCI Slave enable

setenv  - set environment variables
sg      - sg    - scanning the PHYs status

showvar - print local hushshell variables
sleep   - delay execution for some time
source  - run script from memory
sp      - sp    - Scan PCI bus.

temp    - temp  - Display the device temprature.

test    - minimal test like /bin/sh
tftpboot- boot image via network using TFTP protocol
training- training      - prints the results of the DDR3 Training.

ts_report- ts_report    - report touch screen cooridate

ts_test - ts_test       - test touch screen

ubi     - ubi commands
ubifsload- load file from an UBIFS filesystem
ubifsls - list files in a directory
ubifsmount- mount UBIFS volume
usb     - USB sub-system
usbboot - boot from USB device
version - print monitor version
whoAmI  - - reading CPU ID

uboot environment:

Marvell>> printenv

baudrate=115200
loads_echo=0
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
console=console=ttyS0,115200
mtdids=nand0=armada-nand
CASset=min
sata_delay_reset=0
MALLOC_len=5
ethprime=egiga0
bootargs_root=root=/dev/ram rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
serverip=192.168.1.100
ipaddr=192.168.1.2
loadpath=initrd.img
ramdisk_size=4194304
ramdisk_size_f=12582912
ramdisk_name=initrd.img
uver=v2.3.2.6
mfgmodel=IX4-300D
autoload=yes
ubin=0301
env_off=0xe0000
env1_off=0x100000
kernel_start=0x120000
initrd_start=0x520000
kernel_size=0x400000
initrd_size=0x400000
mtdparts=mtdparts=armada-nand:0xe0000@0x0(uboot),0x20000@0xe0000(env),0x20000@0x100000(env2),0x400000@0x120000(zImage),0x400000@0x520000(initrd),0x3F200000@0xE00000(boot),0x40000000@0x0(flash)
standalone=fsload 0x2000000 $image_name;setenv bootargs $console $mtdparts root=/dev/mtdblock0 rw ip=$ipaddr:$serverip$bootargs_end; bootm 0x2000000;
eth2addr=00:50:43:00:00:02
eth3addr=00:50:43:02:00:00
mv_pon_addr=00:50:43:02:00:00
ethmtu=1500
eth1mtu=1500
eth2mtu=1500
eth3mtu=1500
mvNetConfig=mv_net_config=2,(00:50:43:11:11:11,0:1),mtu=1500
usb0Mode=host
usb1Mode=host
usb2Mode=device
usbActive=0
yuk_ethaddr=00:00:00:EE:51:81
nandEcc=1bit
netretry=yes
rcvrip=169.254.100.100
loadaddr=0x02000000
eeeEnable=no
lcd0_enable=0
lcd0_params=640x480-16@60
lcd_panel=0
serial_number=5565U01001G324002A4J0G1
opid=Z12101594
ethaddr=00:D0:B8:24:CA:35
serialNo=EUD2400YA1
eth1addr=00:D0:B8:24:CA:36
modelname=32042300
serialno=0,01n4JkhykqG3IZ8edRG/eIuRK/8gSzpUIPiiS8zGSWduO1W4qix3a6I/vZ4/xT5WG0,EUD2400YA1,
mfgtest_state=final_tested_ok
runintime=14400
ftp_serverip=192.168.32.4
ftp_log_user=runinlog
ftp_log_password=123
ftp_log_dir=storagelogs/soclogs/partlogs/IX4-300D/runin
ftp_pass_user=qrypass
ftp_pass_password=123
ftp_pass_dir=socquery
ftp_qry_user=qrypass
ftp_qry_password=123
ftp_qry_dir=socquery
stdin=serial
stdout=serial
stderr=serial
enaMonExt=no
enaCpuStream=no
enaClockGating=no
enaWrAllo=no
pexMode=RC
disL2Cache=yes
MPmode=SMP
cacheShare=no
setL2CacheWT=no
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
enaFPU=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
amp_enable=no
bootdelay=3
bootcmd=nand read 0x40000 $kernel_start $kernel_size;nand read 0x2000000 $initrd_start $initrd_size;setenv bootargs $console $mtdparts $bootargs_root mem=512M  ramdisk_size=$ramdisk_size ramdisk_blocksize=1024 ip=$bootargs_end $mvNetConfig; bootm 0x40000 0x2000000;
disaMvPnp=no
enaAutoRecovery=yes
pcieTune=no
ethact=egiga0

Environment size: 2492/131067 bytes


Stock boot log:

BootROM 1.15
Booting from NAND flash
DDR3 Training Sequence - Ver 2.3.4
DDR3 Training Sequence - Ended Successfully
BootROM: Image checksum verification PASSED

 __   __                      _ _
|  \/  | __ _ _ ____   _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| |  | | (_| | |   \ V /  __/ | |
|_|  |_|\__,_|_|    \_/ \___|_|_|
         _   _     ____              _
        | | | |   | __ )  ___   ___ | |_
        | | | |___|  _ \ / _ \ / _ \| __|
        | |_| |___| |_) | (_) | (_) | |_
         \___/    |____/ \___/ \___/ \__|
 ** LOADER 2.3.2.6  **


U-Boot 2009.08 (Mar 04 2013 - 11:13:04) Marvell version:  2.3.2 PQ
U-Boot Addressing:
       Code:            00600000:006BFFF0
       BSS:             00708EC0
       Stack:           0x5fff70
       PageTable:       0x8e0000
       Heap address:    0x900000:0xe00000
Board: DB-78230-BP rev 2.0 Wistron
SoC:   MV78230 A0
       running 2 CPUs
       Custom configuration
CPU:   Marvell PJ4B (584) v7 (Rev 2) LE
       CPU # 0
       CPU @ 1333Mhz, L2 @ 667Mhz
       DDR @ 667Mhz, TClock @ 250Mhz
       DDR 32Bit Width, FastPath Memory Access
       DDR ECC Disabled
PEX 0.0(0): Root Complex Interface, Detected Link X4, GEN 1.1
PEX 1.0(1): Root Complex Interface, Detected Link X1, GEN 2.0
DRAM:  512 MB
       CS 0: base 0x00000000 size 512 MB
       Addresses 14M - 0M are saved for the U-Boot usage.
NAND:  1024 MiB
Bad block table found at page 524224, version 0x01
Bad block table found at page 524160, version 0x01
nand_read_bbt: Bad block at 0x000006c20000
nand_read_bbt: Bad block at 0x000013bc0000
nand_read_bbt: Bad block at 0x000029740000
nand_read_bbt: Bad block at 0x00002c040000
nand_read_bbt: Bad block at 0x0000346a0000
FPU initialized to Run Fast Mode.
USB 0: Host Mode
USB 1: Host Mode
USB 2: Device Mode
Modules Detected:
MMC:   MRVL_MMC: 0
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0

NAND read: device 0 offset 0x120000, size 0x400000
 4194304 bytes read: OK

NAND read: device 0 offset 0x520000, size 0x400000
 4194304 bytes read: OK
## Booting kernel from Legacy Image at 00040000 ...
   Image Name:   Linux-3.2.40
   Created:      2020-01-02  11:18:50 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3656376 Bytes =  3.5 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 02000000 ...
   Image Name:
   Created:      2020-01-14  10:40:35 UTC
   Image Type:   ARM Linux RAMDisk Image (bzip2 compressed)
   Data Size:    3012478 Bytes =  2.9 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.



Welcome to CenterPoint.
ix4-300d login:


Stock dmesg:

admin@ix4-300d:~$ dmesg

Booting Linux on physical CPU 0
Initializing cgroup subsys cpu
Linux version 3.2.40 (soho@bsoho083.iomegacorp.com) (gcc version 4.7.2 (crosstool-NG 1.20.0) ) #1 SMP Thu Jan 2 06:18:39 EST 2020 v2.1.1.1
CPU: Marvell PJ4Bv7 Processor [562f5842] revision 2 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
Machine: Marvell Armada XP Development Board
Using UBoot passing parameters structure
Reserving training memory: base=0x  (null) size=0x2800
Memory policy: ECC disabled, Data cache writealloc
On node 0 totalpages: 131072
free_area_init_node: node 0, pgdat c071ab40, node_mem_map c075a000
  DMA zone: 1152 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 129920 pages, LIFO batch:31
SMP: init cpus
PERCPU: Embedded 7 pages/cpu @c0bde000 s6336 r8192 d14144 u32768
pcpu-alloc: s6336 r8192 d14144 u32768 alloc=8*4096
pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129920
Kernel command line: console=ttyS0,115200 mtdparts=armada-nand:0xe0000@0x0(uboot),0x20000@0xe0000(env),0x20000@0x100000(env2),0x400000@0x120000(zImage),0x400000@0x520000(initrd),0x3F200000@0xE00000(boot),0x40000000@0x0(flash) root=/dev/ram rw mem=512M ramdisk_size=4194304 ramdisk_blocksize=1024 ip=:::DB88FXX81:eth0:none mv_net_config=2,(00:50:43:11:11:11,0:1),mtu=1500
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 512MB = 512MB total
Memory: 508660k/508660k available, 15628k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    vmalloc : 0xe0800000 - 0xfa800000   ( 416 MB)
    lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc06a7000   (6780 kB)
      .init : 0xc06a7000 - 0xc06de8c0   ( 223 kB)
      .data : 0xc06e0000 - 0xc071b620   ( 238 kB)
       .bss : 0xc071b644 - 0xc07597d4   ( 249 kB)
Hierarchical RCU implementation.
NR_IRQS:211
Initializing ArmadaXP SOC Timer 0
sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 171798ms
Calibrating delay loop... 1332.01 BogoMIPS (lpj=6660096)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
SMP: prepare CPUs (4 cores)
Setting Clocks for secondary CPUs
Armada-XP Performance Monitor Unit detected (Marvell ID)!!!
hw perfevents: enabled with Armada PJ4 PMU driver, 7 counters available
SMP: CPU 0 Waking up CPU 1
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (2664.03 BogoMIPS).
xor: measuring software checksum speed
   arm4regs  :  1088.000 MB/sec
   8regs     :   958.000 MB/sec
   32regs    :  1229.600 MB/sec
xor: using function: 32regs (1229.600 MB/sec)
NET: Registered protocol family 16
Aurora: Working in ARMv7 mode
L0 cache Enabled
Speculative Prefetch Disabled
Aurora L2 Cache Enabled
Support IO coherency.

  Marvell Armada-XP DB-78460-BP rev 2.0 Board -  Soc: MV78230 A0 LE
  Detected Tclk 250000000, SysClk 667000000, FabricClk 667000000, PClk 1333000000
  LSP version: linux-3.2.y-2013_Q1.2p2

registered dev#0 asa ehci_marvell
Marvell USB EHCI Host controller #0: df857ec0
registered dev#1 asa ehci_marvell
Marvell USB EHCI Host controller #1: df857dc0
registered dev#2 asa mv_udc
Marvell USB Gadget controller #2: df857cc0
bio: create slab <bio-0> at 0
raid6: int32x1    144 MB/s
raid6: int32x2    214 MB/s
raid6: int32x4    217 MB/s
raid6: int32x8    228 MB/s
raid6: using algorithm int32x8 (228 MB/s)
SCSI Staggered Spinup:
SCSI Staggered Spinup Feature Status: Disabled
SCSI subsystem initialized
libata version 3.00 loaded.
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Bluetooth: Core ver 2.16
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP socket layer initialized
Switching to clocksource axp_clocksource
NET: Registered protocol family 2
IP route cache hash table entries: 4096 (order: 2, 16384 bytes)
TCP established hash table entries: 16384 (order: 5, 131072 bytes)
TCP bind hash table entries: 16384 (order: 5, 131072 bytes)
TCP: Hash tables configured (established 16384 bind 16384)
TCP reno registered
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
PCI: CLS 0 bytes, default 32
Trying to unpack rootfs image as initramfs...
rootfs image is not initramfs (no cpio magic); looks like an initrd
Freeing initrd memory: 2940K
PCI-E: Cheking physical bus #0 (controller #0): Enabled - Link UP
PCI-E: Cheking physical bus #1 (controller #4): Enabled - Link UP
PCI-E: Cheking physical bus #2 (controller #5): Disabled
PCI-E: Cheking physical bus #3 (controller #6): Disabled
pci 0000:00:00.0: [11ab:7042] type 0 class 0x000100
pci 0000:00:00.0: reg 10: [mem 0x40000000-0x400fffff 64bit]
pci 0000:00:00.0: reg 18: [io  0xf1100000-0xf11000ff]
PCI: bus0: Fast back to back transfers disabled
pci 0000:01:00.0: [1033:0194] type 0 class 0x000c03
pci 0000:01:00.0: reg 10: [mem 0x4a000000-0x4a001fff 64bit]
pci 0000:01:00.0: PME# supported from D0 D3hot
pci 0000:01:00.0: PME# disabled
PCI: bus1: Fast back to back transfers disabled
pci 0000:01:00.0: BAR 0: assigned [mem 0xf2800000-0xf2801fff 64bit]
pci 0000:01:00.0: BAR 0: set to [mem 0xf2800000-0xf2801fff 64bit] (PCI address [0xf2800000-0xf2801fff])
pci 0000:00:00.0: BAR 0: assigned [mem 0xf2000000-0xf20fffff 64bit]
pci 0000:00:00.0: BAR 0: set to [mem 0xf2000000-0xf20fffff 64bit] (PCI address [0xf2000000-0xf20fffff])
pci 0000:00:00.0: BAR 2: can't assign io (size 0x100)
CESA test started: bufNum = 1, bufSize = 20000
Cesa Test Start: pMbufSrc=df9be000, pFragsSrc=dfa90000, pMbufDst=df8f9000, pFragsDst=df0bc000
mvCesaInit: channels=2, session=32, queue=256
cesadev_init(c06afa6c)
MV Buttons Driver Load
MV Buttons : return ok
MV Buttons : return ok
MV Buttons : return ok
MV Buttons : return ok
Armada XP hwmon thermal sensor initialized.
ArmadaXP Power Managament Suspend Operations Initialized
Initializing Armada-XP CPU power management  (WFI)
VFS: Disk quotas dquot_6.5.2
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Registering unionfs 2.5.11 (for 3.2.2)
Registering the id_resolver key type
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
SGI XFS with ACLs, security attributes, large block/inode numbers, no debug enabled
SGI XFS Quota Management subsystem
msgmni has been set to 999
async_tx: api initialized (async)
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Initializing ths8200_init
Initializing dove_adi9889_init
mv_xor_shared mv_xor_shared.0: Marvell shared XOR driver
mv_xor_shared mv_xor_shared.1: Marvell shared XOR driver
mv_xor mv_xor.0: Marvell XOR: ( xor cpy )
mv_xor mv_xor.1: Marvell XOR: ( xor fill cpy )
mv_xor mv_xor.2: Marvell XOR: ( xor )
mv_xor mv_xor.3: Marvell XOR: ( fill cpy )
brd: module loaded
loop: module loaded
Loading iSCSI transport class v2.0-870.
sata_mv 0000:00:00.0: version 1.28
sata_mv 0000:00:00.0: Gen-IIE 32 slots 4 ports SCSI mode IRQ via INTx
scsi0 : sata_mv
scsi1 : sata_mv
scsi2 : sata_mv
scsi3 : sata_mv
ata1: SATA max UDMA/133 mmio m1048576@0xf2000000 port 0xf2022000 irq 58
ata2: SATA max UDMA/133 mmio m1048576@0xf2000000 port 0xf2024000 irq 58
ata3: SATA max UDMA/133 mmio m1048576@0xf2000000 port 0xf2026000 irq 58
ata4: SATA max UDMA/133 mmio m1048576@0xf2000000 port 0xf2028000 irq 58
sata_mv sata_mv.0: version 1.28
sata_mv sata_mv.0: cannot get clkdev
sata_mv sata_mv.0: slots 32 ports 2
scsi4 : sata_mv
scsi5 : sata_mv
ata5: SATA max UDMA/133 irq 55
ata6: SATA max UDMA/133 irq 55

INFO: Found spi_flash 0 - base 0xf6000000, size 0x1000000
INFO: flashInfoFill - Found 1 Flash Devices
INFO: flash_map_init - detected 1 devices
MTD: Initialize the spi_flash device at address 0xf6000000

INFO: Io remapped successfully - phy addr = 0xf6000000, virt addr = 0xe1000000
INFO: Using sflash to probe spi_flash at address 0xf6000000, size 0x1000000, width 2mmvSFlashInit ERROR: Unknown SPI flash device!
ERROR: sflash_probe - Failed to initialize the SFlash. - Not detected - FAILED!
armada-nand armada-nand.0: Initialize HAL based NFC in 8bit mode with DMA Disabled using BCH 4bit ECC
NAND device: Manufacturer ID: 0xec, Chip ID: 0xd3 (Samsung NAND 1GiB 3,3V 8-bit)
Bad block table found at page 524224, version 0x01
Bad block table found at page 524160, version 0x01
nand_read_bbt: bad block at 0x000006c20000
nand_read_bbt: bad block at 0x000013bc0000
nand_read_bbt: bad block at 0x000029740000
nand_read_bbt: bad block at 0x00002c040000
nand_read_bbt: bad block at 0x0000346a0000
7 cmdlinepart partitions found on MTD device armada-nand
7 cmdlinepart partitions found on MTD device armada-nand
Creating 7 MTD partitions on "armada-nand":
0x000000000000-0x0000000e0000 : "uboot"
0x0000000e0000-0x000000100000 : "env"
0x000000100000-0x000000120000 : "env2"
0x000000120000-0x000000520000 : "zImage"
0x000000520000-0x000000920000 : "initrd"
0x000000e00000-0x000040000000 : "boot"
0x000000000000-0x000040000000 : "flash"
mv_eth_probe: port_mask=0xf, cpu_mask=0x3
  o 2 Giga ports supported
  o SKB recycle supported (Enabled)
  o NETA acceleration mode 1
  o RX Queue support: 8 Queues * 128 Descriptors
  o TX Queue support: 8 Queues * 532 Descriptors
  o GSO supported
  o GRO supported
  o Receive checksum offload supported
  o Transmit checksum offload supported
  o Driver ERROR statistics enabled

  o Loading network interface(s)

  o Port 0 is connected to Linux netdevice
        giga p=0: mtu=1500, mac=df833e64
    o eth0, ifindex = 2, GbE port = 0

  o Port 1 is connected to Linux netdevice
        giga p=1: mtu=1500, mac=df833e64
    o eth1, ifindex = 3, GbE port = 1

tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
sky2: driver version 1.30
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci_marvell ehci_marvell.0: Marvell Orion EHCI
ehci_marvell ehci_marvell.0: new USB bus registered, assigned bus number 1
ehci_marvell ehci_marvell.0: irq 45, io base 0xfbc50100
ehci_marvell ehci_marvell.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ehci_marvell ehci_marvell.1: Marvell Orion EHCI
ehci_marvell ehci_marvell.1: new USB bus registered, assigned bus number 2
ehci_marvell ehci_marvell.1: irq 46, io base 0xfbc51100
ehci_marvell ehci_marvell.1: USB 2.0 started, EHCI 1.00
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
uhci_hcd: USB Universal Host Controller Interface driver
xhci_hcd 0000:01:00.0: xHCI Host Controller
xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 3
xhci_hcd 0000:01:00.0: irq 62, io mem 0xf2800000
xHCI xhci_add_endpoint called for root hub
xHCI xhci_check_bandwidth called for root hub
hub 3-0:1.0: USB hub found
hub 3-0:1.0: 2 ports detected
xhci_hcd 0000:01:00.0: xHCI Host Controller
xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 4
xHCI xhci_add_endpoint called for root hub
xHCI xhci_check_bandwidth called for root hub
hub 4-0:1.0: USB hub found
hub 4-0:1.0: 2 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
mousedev: PS/2 mouse device common for all mice
rtc-mv rtc-mv: rtc core: registered rtc-mv as rtc0
pcf8563_init()~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
i2c /dev entries driver
rtc-pcf8563 0-0051: chip found, driver version 0.4.3
rtc-pcf8563 0-0051: low voltage detected, date/time is not reliable.
rtc-pcf8563 0-0051: rtc core: registered rtc-pcf8563 as rtc1
rtc init ok~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
adt7475 0-002e: ADT7473 device, revision 0
adt7475 0-002e: Optional features: fan4 pwm2
ADT7473 version = 0xfa68
md: linear personality registered for level -1
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
md: raid10 personality registered for level 10
md: raid6 personality registered for level 6
md: raid5 personality registered for level 5
md: raid4 personality registered for level 4
device-mapper: uevent: version 1.0.3
device-mapper: ioctl: 4.22.0-ioctl (2011-10-19) initialised: dm-devel@redhat.com
cpuidle: using governor ladder
cpuidle: using governor menu
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
nf_conntrack version 0.5.0 (7993 buckets, 31972 max)
ip_tables: (C) 2000-2006 Netfilter Core Team
TCP cubic registered
NET: Registered protocol family 17
8021q: 802.1Q VLAN Support v1.8
Registering the dns_resolver key type
VFP support v0.3: implementor 56 architecture 2 part 20 variant 9 rev 6
Registering SWP/SWPB emulation handler
rtc-mv rtc-mv: setting system clock to 2022-02-14 21:54:49 UTC (1644875689)
ata1: SATA link down (SStatus 0 SControl 300)
ata2: SATA link down (SStatus 0 SControl 300)
ata3: SATA link down (SStatus 0 SControl 300)
ata5: failed to resume link (SControl 4)
ata5: SATA link down (SStatus 0 SControl 4)
ata4: SATA link down (SStatus 0 SControl 300)
ata6: failed to resume link (SControl 4)
ata6: SATA link down (SStatus 0 SControl 4)
Warning: unable to open an initial console.
md: Waiting for all devices to be available before autodetect
md: If you don't use raid, use raid=noautodetect
md: Autodetecting RAID arrays.
md: Scanned 0 and added 0 devices.
md: autorun ...
md: ... autorun DONE.
RAMDISK: bzip2 image found at block 0
EXT2-fs (ram0): warning: checktime reached, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem) on device 1:0.
UBI: attaching mtd5 to ubi0
UBI: physical eraseblock size:   131072 bytes (128 KiB)
UBI: logical eraseblock size:    126976 bytes
UBI: smallest flash I/O unit:    2048
UBI: VID header offset:          2048 (aligned 2048)
UBI: data offset:                4096
UBI: max. sequence number:       102921
UBI: attached mtd5 to ubi0
UBI: MTD device name:            "boot"
UBI: MTD device size:            1010 MiB
UBI: number of good PEBs:        8067
UBI: number of bad PEBs:         13
UBI: number of corrupted PEBs:   0
UBI: max. allowed volumes:       128
UBI: wear-leveling threshold:    4096
UBI: number of internal volumes: 1
UBI: number of user volumes:     1
UBI: available PEBs:             0
UBI: total number of reserved PEBs: 8067
UBI: number of PEBs reserved for bad PEB handling: 80
UBI: max/mean erase counter: 18/13
UBI: image sequence number:  1545176087
UBI: background thread "ubi_bgt0d" started, PID 581
UBIFS: mounted UBI device 0, volume 0, name "boot"
UBIFS: file system size:   1011490816 bytes (987784 KiB, 964 MiB, 7966 LEBs)
UBIFS: journal size:       33521664 bytes (32736 KiB, 31 MiB, 264 LEBs)
UBIFS: media format:       w4/r0 (latest is w4/r0)
UBIFS: default compressor: lzo
UBIFS: reserved for root:  4952683 bytes (4836 KiB)
jnl: driver (lke_9.2.0, Aug 30 2019 09:19:25, LBD=ON) loaded at bf000000
ufsd: module license 'Commercial product' taints kernel.
Disabling lock debugging due to kernel taint
ufsd: driver (lke_9.2.0 lke_9.2.0_r256779_b61, build_host("bsoho083.iomegacorp.com"), acl, ioctl, bdi, sd2(0), fua, bz, rsrc, bh) loaded at bf00c000
NTFS support included
Hfs+/HfsJ support included
optimized: speed
Build_for__LenovoEMC_ix4-300d_k3.2.40_2013-07-15_lke_9.2.0_r256779_b61

Bluetooth: Generic Bluetooth USB driver ver 0.6
usbcore: registered new interface driver btusb
Bluetooth: RFCOMM socket layer initialized
Bluetooth: RFCOMM ver 1.11
usbcore: registered new interface driver usblp
Freeing init memory: 220K
Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 41) is a 16550A
udevd[967]: starting version 175
pool #1: pkt_size=1536, buf_size=1632 - 2048 of 2048 buffers added
eth1: link up
eth1: link up, full duplex, speed 1 Gbps
eth1: started
pool #0: pkt_size=1536, buf_size=1632 - 2048 of 2048 buffers added
eth0: started
rtc-pcf8563 0-0051: low voltage detected, date/time is not reliable.
md: md1 stopped.

admin@ix4-300d:~$
Re: Mainline Debian on Iomega ix4-300d
March 06, 2022 01:22PM
I've had another look at the poweroff / reboot issue. I now understand the issue and have managed to fix it. The nas has 2 network interfaces and both need to be brought up at boot for poweroff to work correctly.

I've setup my /etc/network/interfaces as follows:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
auto eth0
iface eth0 inet dhcp

auto eth1
iface eth1 inet static
address 192.168.1.80
gateway 192.168.1.254

I use eth0 with dhcp and let my router set the ip address. However this setup also forces eth1 to go up at boot even when no cable is plugged in.

dmesg:

[   21.383041] mvneta d0070000.ethernet eth0: PHY [d0072004.mdio-mii:00] driver [Marvell 88E1318S] (irq=POLL)
[   21.393138] mvneta d0070000.ethernet eth0: configuring for phy/rgmii-id link mode
[   25.501737] mvneta d0070000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[   25.509822] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   31.210032] mvneta d0074000.ethernet eth1: PHY [d0072004.mdio-mii:01] driver [Marvell 88E1318S] (irq=POLL)
[   31.220104] mvneta d0074000.ethernet eth1: configuring for phy/rgmii-id link mode

systemctl status networking:

Mar 06 19:09:42 ix4-300d systemd[1]: Starting Raise network interfaces...
Mar 06 19:09:42 ix4-300d ifup[646]: ifup: failed to bring up lo
Mar 06 19:09:42 ix4-300d ifup[646]: ifup: waiting for lock on /run/network/ifstate.eth0
Mar 06 19:09:52 ix4-300d ifup[709]: RTNETLINK answers: File exists
Mar 06 19:09:52 ix4-300d ifup[646]: ifup: failed to bring up eth1
Mar 06 19:09:52 ix4-300d systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Mar 06 19:09:52 ix4-300d systemd[1]: networking.service: Failed with result 'exit-code'.
Mar 06 19:09:52 ix4-300d systemd[1]: Failed to start Raise network interfaces.

So it complains that it can't establish a connection on eth1 but I don't care about that. Poweroff now works as expected and I don't have to pull the power cable any more.

Koen
Re: Mainline Debian on Iomega ix4-300d
March 06, 2022 04:24PM
Well done Koen!

You might want to check this:

mtdparts=mtdparts=armada-nand:0xe0000@0x0(uboot),0x20000@0xe0000(env),0x20000@0x100000(env2),0x400000@0x120000(zImage),0x400000@0x520000(initrd),0x3F200000@0xE00000(boot),0x40000000@0x0(flash)

I think it is no longer armada-nand in latest kernel for Armada. It is pxa3xx_nand-0

And in stock OS,
cat /etc/fw_env.config

Use the same definition in the new Debian rootfs. And then try
fw_printenv

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Mainline Debian on Iomega ix4-300d
March 07, 2022 03:36PM
Hi Bohdi,

thanks for the extra info. I'll set the correct nand environment when I've next got serial hooked up. I'm currently in the process of setting up raid and copying over data.

I've searched the stock firmware for /etc/fw_env.config but couldn't find it. So for now I'm not able to change things from Debian.

Koen
Re: Mainline Debian on Iomega ix4-300d
March 07, 2022 05:38PM
Hi Koen,

> I've searched the stock firmware for
> /etc/fw_env.config but couldn't find it. So for
> now I'm not able to change things from Debian.

Then we'll make one for it.

It should be

cat /etc/fw_env.config
# MTD device name	Device offset	Env. size	Flash sector size	Number of sectors

/dev/mtd1 0x00000 0x20000 0x20000

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Mainline Debian on Iomega ix4-300d
March 08, 2022 04:39PM
Hi Bohdi,

I've edited fw_config but can't access the environment from Debian. Do I need to set the mtd-parts to pxa3xx_nand-0 first for this to work?

koen@ix4-300d:~$ cat /etc/fw_env.config 
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mtd1 0x00000 0x20000 0x20000

koen@ix4-300d:~$ sudo fw_printenv 
Cannot read environment, using default
Cannot read default environment from file

I thought I had fixed the reboot / poweroff issue but it is not the case. When I issue a 'sudo systemctl poweroff' the device shuts down. However the next boot the device will not allow me to connect via ssh. Similar when I reboot the device it does not allow me to connect via ssh. So I still end up having to pull the plug and do a forced reboot to be able to connect again.

I'll try the suggestion in the original github repository to set eth1 to a static ip of 169.254.x.x to see if that helps.

One more thing that may come into play is that there are 2 environment regions on the mtd. I'm not sure if the nas switches between them every (re)boot? That could possibly explain why I have to do a forced restart every time?

Koen
Re: Mainline Debian on Iomega ix4-300d
March 08, 2022 07:04PM
Hi Koen,

> I've edited fw_config but can't access the
> environment from Debian. Do I need to set the
> mtd-parts to pxa3xx_nand-0 first for this to
> work?

Yes, it is required. After you've booted with the new mtdparts, do

dmesg | grep 0x0
cat /proc/mtd

The output should show the mtds are initialized by the kernel, and you can also see them in Debian

> I thought I had fixed the reboot / poweroff issue
> but it is not the case. When I issue a 'sudo
> systemctl poweroff' the device shuts down. However
> the next boot the device will not allow me to
> connect via ssh. Similar when I reboot the device
> it does not allow me to connect via ssh. So I
> still end up having to pull the plug and do a
> forced reboot to be able to connect again.

Usually this problem is the lack of definition in the DTS. If it is GPIO-based poweroff then it has a GPIO defined in the DTS to work correctly.

Some old boxes don't use GPIO poweroff, but it is rare.


> One more thing that may come into play is that
> there are 2 environment regions on the mtd. I'm
> not sure if the nas switches between them every
> (re)boot? That could possibly explain why I have
> to do a forced restart every time?

The normal case is that stock u-boot can access both. And one is the backup.

Let examine the serial boot log and see if there is a switch from one to another when you force a restart. Usually, the 2nd envs area only used when the 1st is corrupted.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 03/08/2022 07:51PM by bodhi.
Re: Mainline Debian on Iomega ix4-300d
March 09, 2022 03:36PM
Hi Bohdi,

I've hooked up serial and changed the mtdparts environment to the new settings. As far as I can see the correct mtd are defined in the Debian dmesg but fw_printenv does not work unfortunately.

Koen

koen@ix4-300d:~$ sudo dmesg | grep 0x0
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] cma: Reserved 16 MiB at 0x000000001f000000
[    0.000000]   DMA      [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] Kernel command line: console=ttyS0,115200 mtdparts=pxa3xx_nand-0:0xe0000@0x0(uboot),0x20000@0xe0000(env),0x20000@0x100000(env2),0x400000@0x120000(zImage),0x400000@0x520000(initrd),0x3F200000@0xE00000(boot),0x40000000@0x0(flash) root=LABEL=rootfs rw rootdelay=5
[    0.000000] Aurora: CACHE_ID 0x00000100, AUX_CTRL 0x1a696b12
[    2.642407] mvebu-pcie soc:pcie@82000000:      MEM 0x00d0040000..0x00d0041fff -> 0x0000040000
[    2.642437] mvebu-pcie soc:pcie@82000000:      MEM 0x00d0044000..0x00d0045fff -> 0x0000044000
[    2.642463] mvebu-pcie soc:pcie@82000000:      MEM 0x00d0048000..0x00d0049fff -> 0x0000048000
[    2.642489] mvebu-pcie soc:pcie@82000000:      MEM 0x00d004c000..0x00d004dfff -> 0x000004c000
[    2.642516] mvebu-pcie soc:pcie@82000000:      MEM 0x00d0080000..0x00d0081fff -> 0x0000080000
[    2.642542] mvebu-pcie soc:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    2.642566] mvebu-pcie soc:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    2.642590] mvebu-pcie soc:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
[    2.642615] mvebu-pcie soc:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
[    2.642639] mvebu-pcie soc:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0300000000
[    2.642663] mvebu-pcie soc:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0300000000
[    2.642687] mvebu-pcie soc:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0400000000
[    2.642711] mvebu-pcie soc:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0400000000
[    2.642734] mvebu-pcie soc:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0500000000
[    2.642751] mvebu-pcie soc:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0500000000
[    2.643075] pci_bus 0000:00: root bus resource [mem 0xd0040000-0xd0041fff] (bus address [0x00040000-0x00041fff])
[    2.643086] pci_bus 0000:00: root bus resource [mem 0xd0044000-0xd0045fff] (bus address [0x00044000-0x00045fff])
[    2.643098] pci_bus 0000:00: root bus resource [mem 0xd0048000-0xd0049fff] (bus address [0x00048000-0x00049fff])
[    2.643109] pci_bus 0000:00: root bus resource [mem 0xd004c000-0xd004dfff] (bus address [0x0004c000-0x0004dfff])
[    2.643120] pci_bus 0000:00: root bus resource [mem 0xd0080000-0xd0081fff] (bus address [0x00080000-0x00081fff])
[    2.643241] pci 0000:00:01.0: [11ab:7823] type 01 class 0x060400
[    2.643745] pci 0000:00:05.0: [11ab:7823] type 01 class 0x060400
[    2.645104] pci 0000:01:00.0: [11ab:7042] type 00 class 0x010000
[    2.646660] pci 0000:02:00.0: [1033:0194] type 00 class 0x0c0330
[    4.560795]     mtdparts=pxa3xx_nand-0:0xe0000@0x0(uboot),0x20000@0xe0000(env),0x20000@0x100000(env2),0x400000@0x120000(zImage),0x400000@0x520000(initrd),0x3F200000@0xE00000(boot),0x40000000@0x0(flash)
[    5.298239] xhci_hcd 0000:02:00.0: hcc params 0x014042cb hci version 0x96 quirks 0x0000000000000004
[   18.929281] Bad block table found at page 524224, version 0x01
[   18.988446] Bad block table found at page 524160, version 0x01
[   19.005404] nand_read_bbt: bad block at 0x000006c20000
[   19.010693] nand_read_bbt: bad block at 0x000013bc0000
[   19.015904] nand_read_bbt: bad block at 0x000029740000
[   19.021095] nand_read_bbt: bad block at 0x00002c040000
[   19.026283] nand_read_bbt: bad block at 0x0000346a0000
[   19.238807] 0x000000000000-0x0000000e0000 : "u-boot"
[   19.258550] 0x0000000e0000-0x000000100000 : "u-boot-env"
[   19.295783] 0x000000100000-0x000000120000 : "u-boot-env2"
[   19.322790] 0x000000120000-0x000000520000 : "zImage"
[   19.358044] 0x000000520000-0x000000920000 : "initrd"
[   19.382045] 0x000000e00000-0x000040000000 : "boot"

koen@ix4-300d:~$ cat /proc/mtd
dev:    size   erasesize  name
mtd0: 000e0000 00020000 "u-boot"
mtd1: 00020000 00020000 "u-boot-env"
mtd2: 00020000 00020000 "u-boot-env2"
mtd3: 00400000 00020000 "zImage"
mtd4: 00400000 00020000 "initrd"
mtd5: 3f200000 00020000 "boot"

koen@ix4-300d:~$ cat /etc/fw_env.config 
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mtd1 0x00000 0x20000 0x20000

koen@ix4-300d:~$ fw_printenv 
Configuration file wrong or corrupted
koen@ix4-300d:~$ sudo fw_printenv 
Cannot read environment, using default
Cannot read default environment from file
Re: Mainline Debian on Iomega ix4-300d
March 09, 2022 03:51PM
One thing serial did help with is identifying the reboot problems. It is not the network but the hard drives / SSD that seems to cause it. After a reboot Debian can't find the drives and then hangs. Not sure what the issue is since uboot does identify the ssd and 3 harddrives correctly.

koen@ix4-300d:~$ sudo systemctl reboot
[sudo] password for koen: 
         Stoppin[  OK  ] Removed slice system-modprobe.slice.
[  OK  ] Stopped target Graphical Interface.
[  OK  ] Stopped target Multi-User System.
[  OK  ] Stopped target Login Prompts.
[  OK  ] Stopped target Timers.
[  OK  ] Stopped Daily apt upgrade and clean activities.
[  OK  ] Stopped Daily apt download activities.
[  OK  ] Stopped Periodic ext4 Onli…ata Check for All Filesystems.
[  OK  ] Stopped Discard unused blocks once a week.
[  OK  ] Stopped Daily rotation of log files.
[  OK  ] Stopped Daily exim4-base housekeeping.
[  OK  ] Stopped Daily man-db regeneration.
[  OK  ] Stopped Daily Cleanup of Temporary Directories.
         Stopping Regular background program processing daemon...
         Stopping LSB: exim Mail Transport Agent...
         Stopping Getty on tty1...
[  OK  ] Stopped Initialize hardware monitoring sensors.
         Stopping System Logging Service...
         Stopping Serial Getty on ttyS0...
         Stopping Self Monitoring a…g Technology (SMART) Daemon...
         Stopping OpenBSD Secure Shell server...
         Stopping Load/Save Random Seed...
[  OK  ] Stopped Regular background program processing daemon.
[  OK  ] Stopped System Logging Service.
[  OK  ] Stopped Self Monitoring an…ing Technology (SMART) Daemon.
[  OK  ] Stopped Getty on tty1.
[  OK  ] Stopped Serial Getty on ttyS0.
[  OK  ] Stopped OpenBSD Secure Shell server.
[  OK  ] Stopped Load/Save Random Seed.
[  OK  ] Stopped Session 3 of user koen.
[  OK  ] Removed slice system-getty.slice.
[  OK  ] Removed slice system-serial\x2dgetty.slice.
         Stopping User Login Management...
         Stopping User Manager for UID 1000...
[  OK  ] Stopped User Manager for UID 1000.
         Stopping User Runtime Directory /run/user/1000...
[  OK  ] Stopped User Login Management.
[  OK  ] Unmounted /run/user/1000.
[  OK  ] Stopped LSB: exim Mail Transport Agent.
[  OK  ] Stopped User Runtime Directory /run/user/1000.
[  OK  ] Removed slice User Slice of UID 1000.
[  OK  ] Stopped target Network is Online.
[  OK  ] Stopped target System Time Synchronized.
[  OK  ] Stopped target System Time Set.
         Stopping D-Bus System Message Bus...
         Stopping Permit User Sessions...
[  OK  ] Stopped D-Bus System Message Bus.
[  OK  ] Stopped Permit User Sessions.
[  OK  ] Stopped target Basic System.
[  OK  ] Stopped target Network.
[  OK  ] Stopped target Paths.
[  OK  ] Stopped target Remote File Systems.
[  OK  ] Stopped target Slices.
[  OK  ] Removed slice User and Session Slice.
[  OK  ] Stopped target Sockets.
[  OK  ] Closed D-Bus System Message Bus Socket.
[  OK  ] Stopped target System Initialization.
[  OK  ] Stopped target Local Encrypted Volumes.
[  OK  ] Stopped Dispatch Password …ts to Console Directory Watch.
[  OK  ] Stopped Forward Password R…uests to Wall Directory Watch.
[  OK  ] Stopped target Swap.
[  OK  ] Closed Syslog Socket.
         Deactivating swap /dev/dis…_151281110001024706B1-part5...
         Stopping ifup for eth0...
         Stopping Network Time Synchronization...
         Stopping Update UTMP about System Boot/Shutdown...
[  OK  ] Deactivated swap /dev/disk…ci-0000:01:00.0-ata-1.0-part5.
[  OK  ] Deactivated swap /dev/disk/by-partuuid/20f65b3e-05.
[  OK  ] Deactivated swap /dev/disk…-pci-0000:01:00.0-ata-1-part5.
[  OK  ] Deactivated swap /dev/disk…SD_151281110001024706B1-part5.
[  OK  ] Deactivated swap /dev/sda5.
[  OK  ] Stopped Network Time Synchronization.
[  OK  ] Deactivated swap /dev/disk…5-31f0-40ca-ad64-f0b09c78a75b.
[  OK  ] Stopped Update UTMP about System Boot/Shutdown.
[  OK  ] Stopped Create Volatile Files and Directories.
[  335.370811] mvneta d0070000.ethernet eth0: Link is Down
[  OK  ] Stopped ifup for eth0.
[  OK  ] Stopped target Local File Systems.
         Unmounting /boot...
         Unmounting /mnt/md0...
[  OK  ] Stopped Apply Kernel Variables.
[  OK  ] Stopped Load Kernel Modules.
[  OK  ] Unmounted /boot.
[  OK  ] Stopped File System Check …a-583d-4349-8eb5-b33d046cda26.
[  OK  ] Removed slice system-systemd\x2dfsck.slice.
[  OK  ] Unmounted /mnt/md0.
[  OK  ] Stopped target Local File Systems (Pre).
[  OK  ] Reached target Unmount All Filesystems.
[  OK  ] Stopped Create Static Device Nodes in /dev.
[  OK  ] Stopped Create System Users.
[  OK  ] Stopped Remount Root and Kernel File Systems.
[  OK  ] Reached target Shutdown.
[  OK  ] Reached target Final Step.
[  OK  ] Finished Reboot.
[  OK  ] Reached target Reboot.
[  339.741280] systemd-shutdown[1]: Syncing filesystems and block devices.
[  339.790133] systemd-shutdown[1]: Sending SIGTERM to remaining processes...
[  339.809908] systemd-journald[223]: Received SIGTERM from PID 1 (systemd-shutdow).
[  339.964219] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
[  340.136881] systemd-shutdown[1]: Using hardware watchdog 'Orion Watchdog', version 0, device /dev/watchdog
[  340.150626] systemd-shutdown[1]: Unmounting file systems.
[  340.159388] [1458]: Remounting '/' read-only in with options 'errors=remount-ro'.
[  340.188535] EXT4-fs (sda2): re-mounted. Opts: errors=remount-ro
[  340.206131] systemd-shutdown[1]: All filesystems unmounted.
[  340.211804] systemd-shutdown[1]: Deactivating swaps.
[  340.218287] systemd-shutdown[1]: All swaps deactivated.
[  340.223704] systemd-shutdown[1]: Detaching loop devices.
[  340.229535] systemd-shutdown[1]: All loop devices detached.
[  340.235169] systemd-shutdown[1]: Stopping MD devices.
[  340.241750] systemd-shutdown[1]: Stopping MD /dev/md0 (9:0).
[  340.391135] md0: detected capacity change from 4000525058048 to 0
[  340.397284] md: md0 stopped.
[  340.447989] systemd-shutdown[1]: All MD devices stopped.
[  340.453560] systemd-shutdown[1]: Detaching DM devices.
[  340.459507] systemd-shutdown[1]: All DM devices detached.
[  340.465005] systemd-shutdown[1]: All filesystems, swaps, loop devices, MD devices and DM devices detached.
[  340.499503] systemd-shutdown[1]: Syncing filesystems and block devices.
[  340.506462] systemd-shutdown[1]: Rebooting.
[  340.526222] sd 3:0:0:0: [sdd] Synchronizing SCSI cache
[  340.533826] sd 2:0:0:0: [sdc] Synchronizing SCSI cache
[  340.541415] sd 1:0:0:0: [sdb] Synchronizing SCSI cache
[  340.548966] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[  340.575846] reboot: Restarting system

BootROM 1.15
Booting from NAND flash
DDR3 Training Sequence - Ver 2.3.4 
DDR3 Training Sequence - Ended Successfully 
BootROM: Image checksum verification PASSED

 __   __                      _ _
|  \/  | __ _ _ ____   _____| | |
| |\/| |/ _` | '__\ \ / / _ \ | |
| |  | | (_| | |   \ V /  __/ | |
|_|  |_|\__,_|_|    \_/ \___|_|_|
         _   _     ____              _
        | | | |   | __ )  ___   ___ | |_ 
        | | | |___|  _ \ / _ \ / _ \| __| 
        | |_| |___| |_) | (_) | (_) | |_ 
         \___/    |____/ \___/ \___/ \__| 
 ** LOADER 2.3.2.6  **


U-Boot 2009.08 (Mar 04 2013 - 11:13:04) Marvell version:  2.3.2 PQ
U-Boot Addressing:
       Code:            00600000:006BFFF0
       BSS:             00708EC0
       Stack:           0x5fff70
       PageTable:       0x8e0000
       Heap address:    0x900000:0xe00000
Board: DB-78230-BP rev 2.0 Wistron
SoC:   MV78230 A0
       running 2 CPUs
       Custom configuration
CPU:   Marvell PJ4B (584) v7 (Rev 2) LE
       CPU # 0
       CPU @ 1333Mhz, L2 @ 667Mhz
       DDR @ 667Mhz, TClock @ 250Mhz
       DDR 32Bit Width, FastPath Memory Access
       DDR ECC Disabled
PEX 0.0(0): Root Complex Interface, Detected Link X4, GEN 1.1
PEX 1.0(1): Root Complex Interface, Detected Link X1, GEN 2.0
DRAM:  512 MB
       CS 0: base 0x00000000 size 512 MB
       Addresses 14M - 0M are saved for the U-Boot usage.
NAND:  1024 MiB
Bad block table found at page 524224, version 0x01
Bad block table found at page 524160, version 0x01
nand_read_bbt: Bad block at 0x000006c20000
nand_read_bbt: Bad block at 0x000013bc0000
nand_read_bbt: Bad block at 0x00001ff00000
nand_read_bbt: Bad block at 0x0000268a0000
nand_read_bbt: Bad block at 0x000029740000
nand_read_bbt: Bad block at 0x00002c040000
nand_read_bbt: Bad block at 0x0000346a0000
FPU initialized to Run Fast Mode.
USB 0: Host Mode
USB 1: Host Mode
USB 2: Device Mode
Modules Detected:
MMC:   MRVL_MMC: 0
Net:   egiga0 [PRIME], egiga1
Hit any key to stop autoboot:  0 
Unknown command 'printenv' - try 'help'

Reset IDE: 
Marvell Serial ATA Adapter
Integrated Sata device found
Found adapter at bus 0, device 1 ... Scanning channels
  Device 2 @ 1 0:
Model: Corsair Force LS SSD                     Firm: S9FM02.0 Ser#: 151281110001024706B1
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 57241.8 MB = 55.9 GB (117231408 x 512)
  Device 3 @ 1 1:
Model: ST2000DM001-9YN164                       Firm: CC4B     Ser#:             W1E451DL
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 1907729.0 MB = 1863.0 GB (-387938128 x 512)
  Device 4 @ 1 2:
Model: ST2000DM001-9YN164                       Firm: CC4B     Ser#:             W1E452BM
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 1907729.0 MB = 1863.0 GB (-387938128 x 512)
  Device 5 @ 1 3:
Model: ST2000DM001-9YN164                       Firm: CC4B     Ser#:             W1E451GB
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 1907729.0 MB = 1863.0 GB (-387938128 x 512)

Loading file "uImage" from ide device 2:1 (hdc1)
5047775 bytes read
Loading file "uInitrd" from ide device 2:1 (hdc1)
24664484 bytes read
## Booting kernel from Legacy Image at 00040000 ...
   Image Name:   kernel 5.10.0-12-armmp-lpae
   Created:      2022-03-09  21:15:41 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5047711 Bytes =  4.8 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 02000000 ...
   Image Name:   ramdisk 5.10.0-12-armmp-lpae
   Created:      2022-03-09  21:15:41 UTC
   Image Type:   ARM Linux RAMDisk Image (uncompressed)
   Data Size:    24664420 Bytes = 23.5 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.10.0-12-armmp-lpae (debian-kernel@lists.debian.org) (gcc-10 (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2) #1 SMP Debian 5.10.103-1 (2022-03-07)
[    0.000000] CPU: ARMv7 Processor [562f5842] revision 2 (ARMv7), cr=30c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000] OF: fdt: Machine model: Lenovo Iomega ix4-300d
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] efi: UEFI not found.
[    0.000000] cma: Reserved 16 MiB at 0x000000001f000000
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000]   Normal   empty
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] percpu: Embedded 21 pages/cpu s54668 r8192 d23156 u86016
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 129920
[    0.000000] Kernel command line: console=ttyS0,115200 mtdparts=pxa3xx_nand-0:0xe0000@0x0(uboot),0x20000@0xe0000(env),0x20000@0x100000(env2),0x400000@0x120000(zImage),0x400000@0x520000(initrd),0x3F200000@0xE00000(boot),0x40000000@0x0(flash) root=LABEL=rootfs rw rootdelay=5
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000] Memory: 458040K/524288K available (12288K kernel code, 1680K rwdata, 3212K rodata, 2048K init, 343K bss, 49864K reserved, 16384K cma-reserved, 0K highmem)
[    0.000000] random: get_random_u32 called from __kmem_cache_create+0x30/0x450 with crng_init=0
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] ftrace: allocating 37766 entries in 111 pages
[    0.000000] ftrace: allocated 111 pages with 6 groups
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=2.
[    0.000000]  Rude variant of Tasks RCU enabled.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] L2C: DT/platform modifies aux control register: 0x1a696b10 -> 0x1a696b12
[    0.000000] Aurora cache controller enabled, 16 ways, 1024 kB
[    0.000000] Aurora: CACHE_ID 0x00000100, AUX_CTRL 0x1a696b12
[    0.000000] Switching to timer-based delay loop, resolution 40ns
[    0.000006] sched_clock: 32 bits at 25MHz, resolution 40ns, wraps every 85899345900ns
[    0.000019] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 76450417870 ns
[    0.001338] Console: colour dummy device 80x30
[    0.001379] Calibrating delay loop (skipped), value calculated using timer frequency.. 50.00 BogoMIPS (lpj=100000)
[    0.001395] pid_max: default: 32768 minimum: 301
[    0.001632] LSM: Security Framework initializing
[    0.001710] Yama: disabled by default; enable with sysctl kernel.yama.*
[    0.001855] AppArmor: AppArmor initialized
[    0.001868] TOMOYO Linux initialized
[    0.001938] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001951] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.002789] CPU: Testing write buffer coherency: ok
[    0.003023] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[    0.003860] Setting up static identity map for 0x400000 - 0x4000ac
[    0.004222] mvebu-soc-id: MVEBU SoC ID=0x7823, Rev=0x1
[    0.004321] mvebu-pmsu: Initializing Power Management Service Unit
[    0.004464] rcu: Hierarchical SRCU implementation.
[    0.005811] EFI services will not be available.
[    0.006085] smp: Bringing up secondary CPUs ...
[    0.006603] Booting CPU 1
[    0.007036] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
[    0.011126] smp: Brought up 1 node, 2 CPUs
[    0.011141] SMP: Total of 2 processors activated (100.00 BogoMIPS).
[    0.011148] CPU: All CPU(s) started in SVC mode.
[    0.011734] devtmpfs: initialized
[    0.015650] VFP support v0.3: implementor 56 architecture 2 part 20 variant 9 rev 6
[    0.015871] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[    0.015904] futex hash table entries: 512 (order: 3, 32768 bytes, linear)
[    0.016814] pinctrl core: initialized pinctrl subsystem
[    0.017590] DMI not present or invalid.
[    0.017873] NET: Registered protocol family 16
[    0.020150] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.020835] audit: initializing netlink subsys (disabled)
[    0.021819] thermal_sys: Registered thermal governor 'fair_share'
[    0.021827] thermal_sys: Registered thermal governor 'bang_bang'
[    0.021837] thermal_sys: Registered thermal governor 'step_wise'
[    0.021845] thermal_sys: Registered thermal governor 'user_space'
[    0.021852] thermal_sys: Registered thermal governor 'power_allocator'
[    0.022135] No ATAGs?
[    0.022177] hw-breakpoint: Debug register access (0xee003e17) caused undefined instruction on CPU 0
[    0.022187] hw-breakpoint: CPU 0 failed to disable vector catch
[    0.022223] audit: type=2000 audit(0.020:1): state=initialized audit_enabled=0 res=1
[    0.022229] hw-breakpoint: Debug register access (0xee003e17) caused undefined instruction on CPU 1
[    0.022988] Serial: AMBA PL011 UART driver
[    0.043444] Kprobes globally optimized
[    0.043985] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    1.511133] iommu: Default domain type: Translated 
[    1.511657] vgaarb: loaded
[    1.512336] mc: Linux media interface: v0.10
[    1.512372] videodev: Linux video capture interface: v2.00
[    1.513541] NetLabel: Initializing
[    1.513552] NetLabel:  domain hash size = 128
[    1.513559] NetLabel:  protocols = UNLABELED CIPSOv4 CALIPSO
[    1.513631] NetLabel:  unlabeled traffic allowed by default
[    1.513942] clocksource: Switched to clocksource armada_370_xp_clocksource
[    1.580542] VFS: Disk quotas dquot_6.6.0
[    1.580625] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    1.581297] AppArmor: AppArmor Filesystem Enabled
[    1.590437] NET: Registered protocol family 2
[    1.590546] IP idents hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    1.591537] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    1.591576] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    1.591621] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    1.591657] TCP: Hash tables configured (established 4096 bind 4096)
[    1.591752] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    1.591776] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    1.591924] NET: Registered protocol family 1
[    1.591951] NET: Registered protocol family 44
[    1.591966] PCI: CLS 0 bytes, default 64
[    1.592289] Trying to unpack rootfs image as initramfs...
[    2.626080] Freeing initrd memory: 24088K
[    2.626552] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    2.627952] Initialise system trusted keyrings
[    2.627991] Key type blacklist registered
[    2.628186] workingset: timestamp_bits=14 max_order=17 bucket_order=3
[    2.634664] zbud: loaded
[    2.635510] integrity: Platform Keyring initialized
[    2.635528] Key type asymmetric registered
[    2.635537] Asymmetric key parser 'x509' registered
[    2.635577] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
[    2.635763] io scheduler mq-deadline registered
[    2.639002] armada-xp-pinctrl d0018000.pin-ctrl: registered pinctrl driver
[    2.642245] mvebu-pcie soc:pcie@82000000: host bridge /soc/pcie@82000000 ranges:
[    2.642289] mvebu-pcie soc:pcie@82000000:      MEM 0x00d0040000..0x00d0041fff -> 0x0000040000
[    2.642318] mvebu-pcie soc:pcie@82000000:      MEM 0x00d0044000..0x00d0045fff -> 0x0000044000
[    2.642344] mvebu-pcie soc:pcie@82000000:      MEM 0x00d0048000..0x00d0049fff -> 0x0000048000
[    2.642371] mvebu-pcie soc:pcie@82000000:      MEM 0x00d004c000..0x00d004dfff -> 0x000004c000
[    2.642397] mvebu-pcie soc:pcie@82000000:      MEM 0x00d0080000..0x00d0081fff -> 0x0000080000
[    2.642423] mvebu-pcie soc:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    2.642447] mvebu-pcie soc:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0100000000
[    2.642471] mvebu-pcie soc:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
[    2.642496] mvebu-pcie soc:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0200000000
[    2.642520] mvebu-pcie soc:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0300000000
[    2.642544] mvebu-pcie soc:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0300000000
[    2.642568] mvebu-pcie soc:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0400000000
[    2.642592] mvebu-pcie soc:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0400000000
[    2.642615] mvebu-pcie soc:pcie@82000000:      MEM 0xffffffffffffffff..0x00fffffffe -> 0x0500000000
[    2.642632] mvebu-pcie soc:pcie@82000000:       IO 0xffffffffffffffff..0x00fffffffe -> 0x0500000000
[    2.642927] mvebu-pcie soc:pcie@82000000: PCI host bridge to bus 0000:00
[    2.642944] pci_bus 0000:00: root bus resource [bus 00-ff]
[    2.642957] pci_bus 0000:00: root bus resource [mem 0xd0040000-0xd0041fff] (bus address [0x00040000-0x00041fff])
[    2.642968] pci_bus 0000:00: root bus resource [mem 0xd0044000-0xd0045fff] (bus address [0x00044000-0x00045fff])
[    2.642979] pci_bus 0000:00: root bus resource [mem 0xd0048000-0xd0049fff] (bus address [0x00048000-0x00049fff])
[    2.642990] pci_bus 0000:00: root bus resource [mem 0xd004c000-0xd004dfff] (bus address [0x0004c000-0x0004dfff])
[    2.643002] pci_bus 0000:00: root bus resource [mem 0xd0080000-0xd0081fff] (bus address [0x00080000-0x00081fff])
[    2.643011] pci_bus 0000:00: root bus resource [mem 0xf8000000-0xffdfffff]
[    2.643021] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    2.643122] pci 0000:00:01.0: [11ab:7823] type 01 class 0x060400
[    2.643624] pci 0000:00:05.0: [11ab:7823] type 01 class 0x060400
[    2.644806] PCI: bus0: Fast back to back transfers disabled
[    2.644821] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.644837] pci 0000:00:05.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    2.644983] pci 0000:01:00.0: [11ab:7042] type 00 class 0x010000
[    2.645016] pci 0000:01:00.0: reg 0x10: [mem 0x40000000-0x400fffff 64bit]
[    2.645034] pci 0000:01:00.0: reg 0x18: [io  0xf1100000-0xf11000ff]
[    2.645313] pci 0000:01:00.0: disabling ASPM on pre-1.1 PCIe device.  You can enable it with 'pcie_aspm=force'
[    2.646380] PCI: bus1: Fast back to back transfers disabled
[    2.646395] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    2.646540] pci 0000:02:00.0: [1033:0194] type 00 class 0x0c0330
[    2.646573] pci 0000:02:00.0: reg 0x10: [mem 0x4a000000-0x4a001fff 64bit]
[    2.646705] pci 0000:02:00.0: PME# supported from D0 D3hot
[    2.659012] PCI: bus2: Fast back to back transfers disabled
[    2.659028] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[    2.659089] pci 0000:00:01.0: BAR 8: assigned [mem 0xf8000000-0xf80fffff]
[    2.659106] pci 0000:00:05.0: BAR 8: assigned [mem 0xf8100000-0xf81fffff]
[    2.659117] pci 0000:00:01.0: BAR 7: assigned [io  0x10000-0x10fff]
[    2.659134] pci 0000:01:00.0: BAR 0: assigned [mem 0xf8000000-0xf80fffff 64bit]
[    2.659154] pci 0000:01:00.0: BAR 2: assigned [io  0x10000-0x100ff]
[    2.659167] pci 0000:00:01.0: PCI bridge to [bus 01]
[    2.659177] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    2.659190] pci 0000:00:01.0:   bridge window [mem 0xf8000000-0xf80fffff]
[    2.659209] pci 0000:02:00.0: BAR 0: assigned [mem 0xf8100000-0xf8101fff 64bit]
[    2.659227] pci 0000:00:05.0: PCI bridge to [bus 02]
[    2.659239] pci 0000:00:05.0:   bridge window [mem 0xf8100000-0xf81fffff]
[    2.659317] pcieport 0000:00:01.0: enabling device (0140 -> 0143)
[    2.659410] pcieport 0000:00:05.0: enabling device (0140 -> 0142)
[    2.662793] mv_xor d0060900.xor: Marvell shared XOR driver
[    2.691108] mv_xor d0060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    2.691493] mv_xor d00f0900.xor: Marvell shared XOR driver
[    2.719103] mv_xor d00f0900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    2.721617] Serial: 8250/16550 driver, 5 ports, IRQ sharing enabled
[    2.723898] printk: console [ttyS0] disabled
[    2.744076] d0012000.serial: ttyS0 at MMIO 0xd0012000 (irq = 28, base_baud = 15625000) is a 16550A
[    3.917073] printk: console [ttyS0] enabled
[    3.922255] Serial: AMBA driver
[    3.926367] STM32 USART driver initialized
[    3.933835] mousedev: PS/2 mouse device common for all mice
[    3.940713] rtc-mv d0010300.rtc: registered as rtc0
[    3.945657] rtc-mv d0010300.rtc: setting system clock to 2022-03-09T21:32:26 UTC (1646861546)
[    4.059338] ledtrig-cpu: registered to indicate activity on CPUs
[    4.066658] NET: Registered protocol family 10
[    4.113221] Segment Routing with IPv6
[    4.117077] mip6: Mobile IPv6
[    4.120118] NET: Registered protocol family 17
[    4.124758] mpls_gso: MPLS GSO support
[    4.128667] ThumbEE CPU extension supported.
[    4.132990] Registering SWP/SWPB emulation handler
[    4.137989] registered taskstats version 1
[    4.142126] Loading compiled-in X.509 certificates
[    4.484500] Loaded X.509 cert 'Debian Secure Boot CA: 6ccece7e4c6c0d1f6149f3dd27dfcc5cbb419ea1'
[    4.493348] Loaded X.509 cert 'Debian Secure Boot Signer 2021 - linux: 4b6ef5abca669825178e052c84667ccbc0531f8c'
[    4.503697] zswap: loaded using pool lzo/zbud
[    4.508644] Key type ._fscrypt registered
[    4.512724] Key type .fscrypt registered
[    4.516681] Key type fscrypt-provisioning registered
[    4.521872] AppArmor: AppArmor sha1 policy hashing enabled
[    4.531444] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    4.546340] Freeing unused kernel memory: 2048K
[    4.563858] Checked W+X mappings: passed, no W+X pages found
[    4.569574] Run /init as init process
Loading, please wait...
Starting version 247.3-6
Segmentation fault
Begin: Loading essential drivers ... [    4.840292] md_mod: module verification failed: signature and/or required key missing - tainting kernel
[    5.101969] raid6: int32x8  gen()   395 MB/s
[    5.173968] raid6: int32x8  xor()   255 MB/s
[    5.245968] raid6: int32x4  gen()   433 MB/s
[    5.317944] raid6: int32x4  xor()   261 MB/s
[    5.389943] raid6: int32x2  gen()   545 MB/s
[    5.461953] raid6: int32x2  xor()   288 MB/s
[    5.533955] raid6: int32x1  gen()   533 MB/s
[    5.605969] raid6: int32x1  xor()   253 MB/s
[    5.610267] raid6: using algorithm int32x2 gen() 545 MB/s
[    5.615696] raid6: .... xor() 288 MB/s, rmw enabled
[    5.620601] raid6: using intx1 recovery algorithm
[    5.628397] xor: measuring software checksum speed
[    5.640667]    arm4regs        :  1333 MB/sec
[    5.655106]    8regs           :   980 MB/sec
[    5.667835]    32regs          :  1184 MB/sec
[    5.672219] xor: using function: arm4regs (1333 MB/sec)
[    5.704821] async_tx: api initialized (async)
done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... Begin: Waiting for suspend/resume device ... Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
mdadm: No devices listed in conf file were found.
mdadm: No devices listed in conf file were found.
mdadm: No devices listed in conf file were found.
mdadm: No devices listed in conf file were found.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
mdadm: No devices listed in conf file were found.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
mdadm: error opening /dev/md?*: No such file or directory
mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
mdadm: No devices listed in conf file were found.
done.
Gave up waiting for suspend/resume device
done.
Begin: Waiting for root file system ... Begin: Running /scripts/local-block ... mdadm: No devices listed in conf file were found.
done.
done.
Gave up waiting for root file system device.  Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
 - M[   37.166668] random: fast init done
issing modules (cat /proc/modules; ls /dev)
ALERT!  LABEL=rootfs does not exist.  Dropping to a shell!


BusyBox v1.30.1 (Debian 1:1.30.1-6+b3) built-in shell (ash)
Enter 'help' for a list of built-in commands.

(initramfs)

I will try to increase rootdelay as suggested in the output but don't understand why that would be an issue when running from an SSD?

Koen
Re: Mainline Debian on Iomega ix4-300d
March 09, 2022 04:16PM
Increasing rootdelay to 10 gives the drives enough time to spin up / initialise and fixes the reboot issue.

Koen
Re: Mainline Debian on Iomega ix4-300d
March 09, 2022 05:09PM
Hi Koen,

Quote

Increasing rootdelay to 10 gives the drives enough time to spin up / initialise and fixes the reboot issue.

Cool!

Quote

I've hooked up serial and changed the mtdparts environment to the new settings. As far as I can see the correct mtd are defined in the Debian dmesg but fw_printenv does not work unfortunately.


Try both

cat /etc/fw_env.config
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mtd1 0x00000 0x20000 0x20000
/dev/mtd2 0x00000 0x20000 0x20000

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 03/09/2022 05:09PM by bodhi.
Re: Mainline Debian on Iomega ix4-300d
March 09, 2022 05:28PM
Hi Bohdi,

listing them both fixes the issue and shows the uboot environment variables in Debian. It also shows the slight mess I made in trying to re-write the original bootcmd into a bootnand sequence. In the end I decided not to use the stock firmware as a rescue system since I don't know if it would try to initialise the drives and wipe data etc.

Thanks,

Koen

koen@ix4-300d:~$ sudo fw_printenv 
bootdebian=printenv; ide reset; ext2load ide 2:1 0x0040000 uImage; ext2load ide 2:1 0x2000000 uInitrd; setenv bootargs $console $mtdparts root=LABEL=rootfs rw rootdelay=5; bootm 0x40000 0x2000000;
bootnand=run loadnand; run loadargs; bootm 0x40000 0x2000000;
loadargs=setenv bootargs $console $mtdparts $bootargs_root mem=512M ramdisk_size=$ramdisk_size ramdisk_blocksize=1024 ip=$bootargs_end $mvNetConfig;
loadargs=setenv bootargs $console $mtdparts $bootargs_root mem=512M ramdisk_size=$ramdisk_size ramdisk_blocksize=1024 ip=$bootargs_end $mvNetConfig;
loadnand=nand read 0x40000 $kernel_start $kernel_size;nand read 0x2000000 $initrd_start $initrd_size;
loadnand=nand read 0x40000 $kernel_start $kernel_size;nand read 0x2000000 $initrd_start $initrd_size;
CASset=min
MALLOC_len=5
MPmode=SMP
amp_enable=no
autoload=yes
baudrate=115200
bootargs_end=:::DB88FXX81:eth0:none
bootargs_root=root=/dev/ram rw
bootcmd=run bootdebian; reset;
bootdebian=printenv; ide reset; ext2load ide 2:1 0x0040000 uImage; ext2load ide 2:1 0x2000000 uInitrd; setenv bootargs $console $mtdparts root=LABEL=rootfs rw rootdelay=10; bootm 0x40000 0x2000000;
bootdelay=3
cacheShare=no
console=console=ttyS0,115200
disL2Cache=yes
disL2Prefetch=yes
disaMvPnp=no
eeeEnable=no
enaAutoRecovery=yes
enaClockGating=no
enaCpuStream=no
enaDCPref=yes
enaFPU=yes
enaICPref=yes
enaMonExt=no
enaWrAllo=no
env1_off=0x100000
env_off=0xe0000
eth1addr=00:D0:B8:24:CA:36
eth1mtu=1500
eth2addr=00:50:43:00:00:02
eth2mtu=1500
eth3addr=00:50:43:02:00:00
eth3mtu=1500
ethact=egiga0
ethaddr=00:D0:B8:24:CA:35
ethmtu=1500
ethprime=egiga0
ftp_log_dir=storagelogs/soclogs/partlogs/IX4-300D/runin
ftp_log_password=123
ftp_log_user=runinlog
ftp_pass_dir=socquery
ftp_pass_password=123
ftp_pass_user=qrypass
ftp_qry_dir=socquery
ftp_qry_password=123
ftp_qry_user=qrypass
ftp_serverip=192.168.32.4
image_name=uImage
initrd_size=0x400000
initrd_start=0x520000
ipaddr=192.168.1.2
kernel_size=0x400000
kernel_start=0x120000
lcd0_enable=0
lcd0_params=640x480-16@60
lcd_panel=0
loadaddr=0x02000000
loadpath=initrd.img
loads_echo=0
mfgmodel=IX4-300D
mfgtest_state=final_tested_ok
modelname=32042300
mtdids=nand0=armada-nand
mtdparts=mtdparts=pxa3xx_nand-0:0xe0000@0x0(uboot),0x20000@0xe0000(env),0x20000@0x100000(env2),0x400000@0x120000(zImage),0x400000@0x520000(initrd),0x3F200000@0xE00000(boot),0x40000000@0x0(flash)
mvNetConfig=mv_net_config=2,(00:50:43:11:11:11,0:1),mtu=1500
mv_pon_addr=00:50:43:02:00:00
nandEcc=1bit
netbsd_en=no
netmask=255.255.255.0
netretry=yes
opid=Z12101594
pcieTune=no
pexMode=RC
ramdisk_name=initrd.img
ramdisk_size=4194304
ramdisk_size_f=12582912
rcvrip=169.254.100.100
rootpath=/mnt/ARM_FS/
runintime=14400
sata_delay_reset=0
sata_dma_mode=yes
serialNo=EUD2400YA1
serial_number=5565U01001G324002A4J0G1
serialno=0,01n4JkhykqG3IZ8edRG/eIuRK/8gSzpUIPiiS8zGSWduO1W4qix3a6I/vZ4/xT5WG0,EUD2400YA1,
serverip=192.168.1.100
setL2CacheWT=no
standalone=fsload 0x2000000 $image_name;setenv bootargs $console $mtdparts root=/dev/mtdblock0 rw ip=$ipaddr:$serverip$bootargs_end; bootm 0x2000000;
stderr=serial
stdin=serial
stdout=serial
ubin=0301
usb0Mode=host
usb1Mode=host
usb2Mode=device
usbActive=0
uver=v2.3.2.6
vxworks_en=no
yuk_ethaddr=00:00:00:EE:51:81
Re: Mainline Debian on Iomega ix4-300d
March 09, 2022 05:47PM
Hi Koen,

Quote

listing them both fixes the issue and shows the uboot environment variables in Debian.

That would prove the reason the envs were corrupted in the 1st area, but the 2nd area was OK.

Quote

It also shows the slight mess I made in trying to re-write the original bootcmd into a bootnand sequence. In the end I decided not to use the stock firmware as a rescue system since I don't know if it would try to initialise the drives and wipe data etc.

Yes, I would not boot back to stock. I think it would be safer if you wipe the unused partitions too to avoid accident.

mtd3: 00400000 00020000 "zImage"
mtd4: 00400000 00020000 "initrd"
mtd5: 3f200000 00020000 "boot"

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Mainline Debian on Iomega ix4-300d
March 31, 2022 08:09AM
I spent some time working with an ix4-200d a couple years ago. I found that benoitm974's kernel module for the LCD worked if adjusted the GPIOs but also found that approach to be a pain to work with.

I ended up writing some Python to set the display, it should work with the ix4-300d if you change the GPIOs to the proper ones for that device.

https://github.com/1000001101000/ix4-200d-research

I should really re-visit that device some day.
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: