Welcome! Log In Create A New Profile

Advanced

Dockstar mods: SATA, SD, 256MB RAM, Compiling/Modding U-boot; kernel DTB...

Posted by davidalfa 
Re: Dockstar HW mod: Trying to add native sata
November 18, 2021 03:19PM
> Same (Silent).

The crash occured during decompression, before the early console was activated.

> Interestingly, I found that when setting 256MB in
> uboot, the kernel does detect it:
> top
>
> MiB Mem :    235.9 total, 
>

Meaning it has booted completely with 256MB?

As usual, you should post the serial log for each case (from begining until at least the part where it crash, hang, or showing interesting info). That's the best way for me spot anything unsual.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dockstar HW mod: Trying to add native sata
November 18, 2021 07:53PM
bootargs
console=ttyS0,115200 earlyprintk=serial ignore_loglevel memblock=debug initcall_debug bootmem_debug root=LABEL=rootfs rootdelay=1 orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)(data)


64MB
SoC:   Kirkwood 88F6281_A0
DRAM:  64 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices...
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found

Reset IDE: ide_preinit failed

Partition Map for USB device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     53817344        20969472        e9df59ed-01     83 Boot
  2     74788864        1048576         e9df59ed-02     82
  3     75837440        900933632       e9df59ed-03     83

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
** File not found /boot/uEnv.txt **

no IDE devices available
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 723 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
5435888 bytes read in 1004 ms (5.2 MiB/s)
loading uInitrd ...
9671091 bytes read in 967 ms (9.5 MiB/s)
loading DTB /boot/dts/kirkwood-goflexnet.dtb ...
11457 bytes read in 1768 ms (5.9 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.13.6-kirkwood-tld-1
   Created:      2021-09-24   0:22:58 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5435824 Bytes = 5.2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-5.13.6-kirkwood-tld-1
   Created:      2021-09-24   1:06:32 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9671027 Bytes = 9.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 031d4000, end 03b0d173 ... OK
   Loading Device Tree to 031ce000, end 031d3cc0 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
(Dies there)



128MB
U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:17:19 -0700)
Seagate GoFlex Net

SoC:   Kirkwood 88F6281_A0
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices...
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found

Reset IDE: ide_preinit failed

Partition Map for USB device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     53817344        20969472        e9df59ed-01     83 Boot
  2     74788864        1048576         e9df59ed-02     82
  3     75837440        900933632       e9df59ed-03     83

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
** File not found /boot/uEnv.txt **

no IDE devices available
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 723 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
5435888 bytes read in 1004 ms (5.2 MiB/s)
loading uInitrd ...
9671091 bytes read in 966 ms (9.5 MiB/s)
loading DTB /boot/dts/kirkwood-goflexnet.dtb ...
11457 bytes read in 1769 ms (5.9 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.13.6-kirkwood-tld-1
   Created:      2021-09-24   0:22:58 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5435824 Bytes = 5.2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-5.13.6-kirkwood-tld-1
   Created:      2021-09-24   1:06:32 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9671027 Bytes = 9.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 071d4000, end 07b0d173 ... OK
   Loading Device Tree to 071ce000, end 071d3cc0 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.13.6-kirkwood-tld-1 (root@tldDebian) (gcc (Debian 8.3.0-6) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #1.0 PREEMPT Sat Jul 31 22:10:39 PDT 2021
[    0.000000][    T0] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000][    T0] CPU: VIVT data cache, VIVT instruction cache
[    0.000000][    T0] OF: fdt: Machine model: Seagate GoFlex Net
[    0.000000][    T0] Memory policy: Data cache writeback
[    0.000000][    T0] Zone ranges:
[    0.000000][    T0]   Normal   [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000][    T0] Movable zone start for each node
[    0.000000][    T0] Early memory node ranges
[    0.000000][    T0]   node   0: [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000][    T0] Initmem setup node 0 [mem 0x0000000000000000-0x0000000007ffffff]
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 32512
[    0.000000][    T0] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
[    0.000000][    T0] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000][    T0] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[    0.000000][    T0] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000][    T0] Memory: 101104K/131072K available (11264K kernel code, 1553K rwdata, 4272K rodata, 1024K init, 309K bss, 29968K reserved, 0K cma-reserved)
[    0.000000][    T0] random: get_random_u32 called from ____cache_alloc+0x408/0x7b4 with crng_init=0
[    0.000000][    T0] trace event string verifier disabled
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0]  Trampoline variant of Tasks RCU enabled.
[    0.000000][    T0]  Tracing variant of Tasks RCU enabled.
[    0.000000][    T0] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000][    T0] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000][    T0] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000002][    T0] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000056][    T0] Switching to timer-based delay loop, resolution 5ns
[    0.000852][    T0] Console: colour dummy device 80x30
[    0.000927][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000969][    T0] pid_max: default: 32768 minimum: 301
[    0.001341][    T0] LSM: Security Framework initializing
[    0.001513][    T0] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001561][    T0] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.002962][    T0] CPU: Testing write buffer coherency: ok
[    0.005449][    T1] Setting up static identity map for 0x100000 - 0x100058
[    0.005742][    T1] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x2
[    0.006096][    T1] rcu: Hierarchical SRCU implementation.
[    0.007485][    T1] devtmpfs: initialized
[    0.013353][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.013409][    T1] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.043493][    T1] prandom32: self test passed (less than 6 bits correlated)
[    0.043538][    T1] prandom: seed boundary self test passed
[    0.046910][    T1] prandom: 100 self tests passed
[    0.046928][    T1] pinctrl core: initialized pinctrl subsystem
[    0.048510][    T1] NET: Registered protocol family 16
[    0.049375][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.050389][    T1] audit: initializing netlink subsys (disabled)
[    0.051818][    T1] thermal_sys: Registered thermal governor 'step_wise'
[    0.052204][   T16] audit: type=2000 audit(0.050:1): state=initialized audit_enabled=0 res=1
[    0.052365][    T1] cpuidle: using governor ladder
[    0.052465][    T1] cpuidle: using governor menu
[    0.052934][    T1] Feroceon L2: Enabling L2
[    0.052986][    T1] Feroceon L2: Cache support initialised.
[    0.060759][    T1] No ATAGs?
[    2.560062][    C0] random: fast init done
[    3.970468][   T39] "cryptomgr_test" (39) uses obsolete ecb(arc4) skcipher
[    3.993577][   T59] wait_for_initramfs() called before rootfs_initcalls
[    4.180298][    T1] raid6: int32x8  gen()   134 MB/s
[    4.350217][    T1] raid6: int32x8  xor()    86 MB/s
[    4.520211][    T1] raid6: int32x4  gen()   136 MB/s
[    4.690147][    T1] raid6: int32x4  xor()    89 MB/s
[    4.860139][    T1] raid6: int32x2  gen()   175 MB/s
[    5.030148][    T1] raid6: int32x2  xor()   106 MB/s
[    5.200268][    T1] raid6: int32x1  gen()   123 MB/s
[    5.370092][    T1] raid6: int32x1  xor()    74 MB/s
[    5.370107][    T1] raid6: using algorithm int32x2 gen() 175 MB/s
[    5.370118][    T1] raid6: .... xor() 106 MB/s, rmw enabled
[    5.370128][    T1] raid6: using intx1 recovery algorithm
[    5.370379][    T1] vgaarb: loaded
[    5.370911][    T1] SCSI subsystem initialized
[    5.371395][    T1] usbcore: registered new interface driver usbfs
[    5.371472][    T1] usbcore: registered new interface driver hub
[    5.371523][    T1] usbcore: registered new device driver usb
[    5.371711][    T1] pps_core: LinuxPPS API ver. 1 registered
[    5.371725][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    5.371766][    T1] PTP clock support registered
[    5.373444][    T1] clocksource: Switched to clocksource orion_clocksource
[    5.464121][    T1] VFS: Disk quotas dquot_6.6.0
[    5.464227][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    5.477527][    T1] NET: Registered protocol family 2
[    5.477696][    T1] IP idents hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    5.478564][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    5.478616][    T1] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    5.478649][    T1] TCP bind hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    5.478676][    T1] TCP: Hash tables configured (established 1024 bind 1024)
[    5.478924][    T1] MPTCP token hash table entries: 512 (order: 0, 6144 bytes, linear)
[    5.478998][    T1] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    5.479035][    T1] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    5.479245][    T1] NET: Registered protocol family 1
[    5.484058][    T1] RPC: Registered named UNIX socket transport module.
[    5.484081][    T1] RPC: Registered udp transport module.
[    5.484091][    T1] RPC: Registered tcp transport module.
[    5.484101][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    5.484117][    T1] PCI: CLS 0 bytes, default 32
[    5.484287][    T1] NetWinder Floating Point Emulator V0.97 (double precision)
[    5.493793][   T58] Trying to unpack rootfs image as initramfs...
[    6.939349][   T58] Freeing initrd memory: 9448K
[    7.409866][    T1] Initialise system trusted keyrings
[    7.409945][    T1] Key type blacklist registered
[    7.410202][    T1] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[    7.410318][    T1] zbud: loaded
[    7.411703][    T1] NFS: Registering the id_resolver key type
[    7.411748][    T1] Key type id_resolver registered
[    7.411761][    T1] Key type id_legacy registered
[    7.411801][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    7.411825][    T1] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    7.411838][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    7.412095][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    7.412609][    T1] fuse: init (API version 7.34)
[    7.412985][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[    7.413182][    T1] orangefs_init: module version upstream loaded
[    7.413200][    T1] SGI XFS with ACLs, security attributes, realtime, scrub, quota, no debug enabled
[    7.494892][    T1] xor: measuring software checksum speed
[    7.502001][    T1]    arm4regs        :  1391 MB/sec
[    7.513887][    T1]    8regs           :   834 MB/sec
[    7.522002][    T1]    32regs          :  1214 MB/sec
[    7.522014][    T1] xor: using function: arm4regs (1391 MB/sec)
[    7.522034][    T1] async_tx: api initialized (async)
[    7.522053][    T1] Key type asymmetric registered
[    7.522064][    T1] Asymmetric key parser 'x509' registered
[    7.522125][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    7.522198][    T1] io scheduler bfq registered
[    7.682245][    T1] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    7.684312][    T1] mv_xor f1060800.xor: Marvell shared XOR driver
[    7.744386][    T1] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    7.746641][    T1] mv_xor f1060900.xor: Marvell shared XOR driver
[    7.804380][    T1] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    7.806859][    T1] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    7.808128][    T1] printk: console [ttyS0] disabled
[    7.808220][    T1] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 25, base_baud = 12500000) is a 16550A
[    8.658028][    T1] printk: console [ttyS0] enabled
[    8.670880][    T1] loop: module loaded
[    8.675554][    T1] sata_mv f1080000.sata: slots 32 ports 2
[    8.684731][    T1] scsi host0: sata_mv
[    8.689204][    T1] scsi host1: sata_mv
[    8.693298][    T1] ata1: SATA max UDMA/133 irq 32
[    8.698179][    T1] ata2: SATA max UDMA/133 irq 32
[    8.704055][    T1] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda
[    8.711201][    T1] nand: Micron MT29F2G08AAD
[    8.715606][    T1] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    8.724172][    T1] Scanning device for bad blocks
[    8.964307][    T1] 4 cmdlinepart partitions found on MTD device orion_nand
[    8.971330][    T1] Creating 4 MTD partitions on "orion_nand":
[    8.977240][    T1] 0x000000000000-0x000000100000 : "u-boot"
[    8.984395][    T1] 0x000000100000-0x000000500000 : "uImage"
[    8.991392][    T1] 0x000000500000-0x000002500000 : "rootfs"
[    8.998514][    T1] 0x000002500000-0x000010000000 : "data"
[    9.006603][    T1] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    9.015250][    T1] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[    9.026671][    T1] libphy: Fixed MDIO Bus: probed
[    9.032888][    T1] libphy: orion_mdio_bus: probed
[    9.037776][   T94] ata1: SATA link down (SStatus 0 SControl F300)
[    9.059142][    T1] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    9.384981][   T96] ata2: SATA link down (SStatus 0 SControl F300)
[    9.824428][    T1] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:10:75:1a:94:3f
[    9.834064][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    9.841357][    T1] ehci-pci: EHCI PCI platform driver
[    9.846602][    T1] ehci-orion: EHCI orion driver
[    9.851514][    T1] orion-ehci f1050000.ehci: EHCI Host Controller
[    9.857786][    T1] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    9.866383][    T1] orion-ehci f1050000.ehci: irq 29, io mem 0xf1050000
[    9.893480][    T1] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    9.900507][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.13
[    9.909543][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    9.917522][    T1] usb usb1: Product: EHCI Host Controller
[    9.923121][    T1] usb usb1: Manufacturer: Linux 5.13.6-kirkwood-tld-1 ehci_hcd
[    9.930567][    T1] usb usb1: SerialNumber: f1050000.ehci
[    9.936644][    T1] hub 1-0:1.0: USB hub found
[    9.941157][    T1] hub 1-0:1.0: 1 port detected
[    9.946559][    T1] usbcore: registered new interface driver usb-storage
[    9.953726][    T1] mousedev: PS/2 mouse device common for all mice
[   10.233471][   T17] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   10.435253][   T17] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608, bcdDevice= 6.03
[   10.444202][   T17] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[   10.452093][   T17] usb 1-1: Product: USB2.0 Hub
[   10.457567][   T17] hub 1-1:1.0: USB hub found
[   10.462382][   T17] hub 1-1:1.0: 4 ports detected
[   10.783464][   T17] usb 1-1.2: new high-speed USB device number 3 using orion-ehci
[   10.934752][   T17] usb 1-1.2: New USB device found, idVendor=2537, idProduct=1068, bcdDevice= 1.00
[   10.943873][   T17] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   10.951936][   T17] usb 1-1.2: Product: Device
[   10.956423][   T17] usb 1-1.2: Manufacturer: USB3.0 External
[   10.962196][   T17] usb 1-1.2: SerialNumber: 0123456789ABCDE
[   10.968674][   T17] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[   10.976136][   T17] usb-storage 1-1.2:1.0: Quirks match for vid 2537 pid 1068: 800000
[   10.984171][   T17] scsi host2: usb-storage 1-1.2:1.0
[   11.043477][    T1] rtc-mv f1010300.rtc: internal RTC not ticking
[   11.049768][    T1] i2c /dev entries driver
[   11.054581][    T1] device-mapper: uevent: version 1.0.3
[   11.060209][    T1] device-mapper: ioctl: 4.45.0-ioctl (2021-03-22) initialised: dm-devel@redhat.com
[   11.069831][    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[   11.077151][    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[   11.084530][    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[   11.091935][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[   11.098782][    T1] device-mapper: raid: Loading target version 1.15.1
[   11.107695][    T1] hid: raw HID events driver (C) Jiri Kosina
[   11.113923][    T1] drop_monitor: Initializing network drop monitor service
[   11.121359][    T1] NET: Registered protocol family 10
[   11.127970][    T1] Segment Routing with IPv6
[   11.132359][    T1] RPL Segment Routing with IPv6
[   11.137248][    T1] NET: Registered protocol family 17
[   11.142645][    T1] Key type dns_resolver registered
[   11.148174][    T1] registered taskstats version 1
[   11.153004][    T1] Loading compiled-in X.509 certificates
[   11.159002][    T1] zswap: loaded using pool lzo/zbud
[   11.164477][    T1] Key type ._fscrypt registered
[   11.169209][    T1] Key type .fscrypt registered
[   11.173915][    T1] Key type fscrypt-provisioning registered
[   11.181788][    T1] Key type big_key registered
[   11.213709][    T1] Key type encrypted registered
[   11.224821][    T1] Freeing unused kernel memory: 1024K
[   11.244135][    T1] Checked W+X mappings: passed, no W+X pages found
[   11.250544][    T1] Run /init as init process
Loading, please wait...
Starting version 247.3-6
[   12.159074][  T139] usbcore: registered new interface driver uas
Begin: Loading essential drivers ... done.
[   13.527247][   T58] scsi 2:0:0:0: Direct-Access     USB3.0   External Device  LVM1 PQ: 0 ANSI: 6
[   13.541444][    T7] sd 2:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/466 GiB)
[   13.555553][    T7] sd 2:0:0:0: [sda] Write Protect is off
[   13.561783][    T7] sd 2:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   15.124787][    T7]  sda: sda1 sda2 sda3
[   15.136554][    T7] sd 2:0:0:0: [sda] Attached SCSI disk
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.36.1
[/sbin/fsck.ext3 (1) -- /dev/sda1] fsck.ext3 -a -C0 /dev/sda1
rootfs: clean, 15642/655360 files, 229886/2621184 blocks
done.
[   23.096450][  T168] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[   23.329283][  T168] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.96 booting
Using makefile-style concurrent boot in runlevel S.
Setting hostname to 'debian'...done.
Starting hotplug events dispatcher: systemd-udevd.
Synthesizing the initial hotplug events (subsystems)...done.
Synthesizing the initial hotplug events (devices)...done.
Waiting for /dev to be fully populated...[   27.459249][  T359] orion_wdt: Initial timeout 21 sec
[   27.877000][    C0] random: crng init done
[   27.975840][  T352] sd 2:0:0:0: Attached scsi generic sg0 type 0
[   27.991277][  T354] marvell-cesa f1030000.crypto: CESA device successfully registered
done.
Activating swap:.
[   30.465608][  T500] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro. Quota mode: none.
Will now check all file systems.
Checking all file systems.
LABEL=rootfs is mounted
Done checking file systems.
Log is being saved in /var/log/fsck/checkfs if that location is writable.
Cleaning up temporary files...Cleaning /tmp...done.
 /tmp.
Will now mount local filesystems:.
Will now activate swapfile swap, if any:done.
Checking minimum space in /tmp...done.
Cleaning up temporary files....
Initializing random number generator...done.
Starting Setting kernel variables: sysctl
.
Configuring network interfaces...Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/00:10:75:1a:94:3f
Sending on   LPF/eth0/00:10:75:1a:94:3f
Sending on   Socket/fallback
DHCPREQUEST for 192.168.0.15 on eth0 to 255.255.255.255 port 67
[   36.702425][    C0] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   36.713075][   T17] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
DHCPREQUEST for 192.168.0.15 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.0.15 from 192.168.0.1
bound to 192.168.0.15 -- renewal in 32851 seconds.
done.
Starting RPC port mapper daemon: rpcbind.
Starting NFS common utilities: statd idmapd.
Cleaning up temporary files....
INIT: Entering runlevel: 2
Using makefile-style concurrent boot in runlevel 2.
Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
1057 (syslogd)
.
Starting NFS common utilities: statd idmapd.
Starting system message bus: dbus.
Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
Not starting NFS kernel daemon: no exports. ... (warning).
Starting NTP server: ntpd.
Starting OpenBSD Secure Shell server: sshd.
Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1091 (klogd)
.
Running local boot scripts (/etc/rc.local)
.

Debian GNU/Linux 11 debian ttyS0

debian login:




256MB
U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:17:19 -0700)
Seagate GoFlex Net

SoC:   Kirkwood 88F6281_A0
DRAM:  256 MiB
WARNING: Caches not enabled
NAND:  256 MiB
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0
starting USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices...
Use USB retry period from the environment: 15 second(s)
1 Storage Device(s) found

Reset IDE: ide_preinit failed

Partition Map for USB device 0  --   Partition Type: DOS

Part    Start Sector    Num Sectors     UUID            Type
  1     53817344        20969472        e9df59ed-01     83 Boot
  2     74788864        1048576         e9df59ed-02     82
  3     75837440        900933632       e9df59ed-03     83

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
** File not found /boot/uEnv.txt **

no IDE devices available
running scan_disk ...
Scan device usb
device usb 0:1
1 bytes read in 723 ms (0 Bytes/s)
Found bootable drive on usb 0
loading uImage ...
5435888 bytes read in 1004 ms (5.2 MiB/s)
loading uInitrd ...
9671091 bytes read in 966 ms (9.5 MiB/s)
loading DTB /boot/dts/kirkwood-goflexnet.dtb ...
11457 bytes read in 1769 ms (5.9 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.13.6-kirkwood-tld-1
   Created:      2021-09-24   0:22:58 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5435824 Bytes = 5.2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initramfs-5.13.6-kirkwood-tld-1
   Created:      2021-09-24   1:06:32 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    9671027 Bytes = 9.2 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000
   Loading Kernel Image ... OK
   Loading Ramdisk to 0f1d4000, end 0fb0d173 ... OK
   Loading Device Tree to 0f1ce000, end 0f1d3cc0 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000][    T0] Booting Linux on physical CPU 0x0
[    0.000000][    T0] Linux version 5.13.6-kirkwood-tld-1 (root@tldDebian) (gcc (Debian 8.3.0-6) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #1.0 PREEMPT Sat Jul 31 22:10:39 PDT 2021
[    0.000000][    T0] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000][    T0] CPU: VIVT data cache, VIVT instruction cache
[    0.000000][    T0] OF: fdt: Machine model: Seagate GoFlex Net
[    0.000000][    T0] Memory policy: Data cache writeback
[    0.000000][    T0] Zone ranges:
[    0.000000][    T0]   Normal   [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000][    T0] Movable zone start for each node
[    0.000000][    T0] Early memory node ranges
[    0.000000][    T0]   node   0: [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000][    T0] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000][    T0] Built 1 zonelists, mobility grouping on.  Total pages: 65024
[    0.000000][    T0] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=orion_nand:1M(u-boot),4M(uImage),32M(rootfs),-(data)
[    0.000000][    T0] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000][    T0] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000][    T0] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000][    T0] Memory: 231056K/262144K available (11264K kernel code, 1553K rwdata, 4272K rodata, 1024K init, 309K bss, 31088K reserved, 0K cma-reserved)
[    0.000000][    T0] random: get_random_u32 called from ____cache_alloc+0x408/0x7b4 with crng_init=0
[    0.000000][    T0] trace event string verifier disabled
[    0.000000][    T0] rcu: Preemptible hierarchical RCU implementation.
[    0.000000][    T0]  Trampoline variant of Tasks RCU enabled.
[    0.000000][    T0]  Tracing variant of Tasks RCU enabled.
[    0.000000][    T0] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000][    T0] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000][    T0] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000002][    T0] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000057][    T0] Switching to timer-based delay loop, resolution 5ns
[    0.000848][    T0] Console: colour dummy device 80x30
[    0.000921][    T0] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[    0.000962][    T0] pid_max: default: 32768 minimum: 301
[    0.001336][    T0] LSM: Security Framework initializing
[    0.001510][    T0] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.001557][    T0] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.002953][    T0] CPU: Testing write buffer coherency: ok
[    0.005436][    T1] Setting up static identity map for 0x100000 - 0x100058
[    0.005729][    T1] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x2
[    0.006084][    T1] rcu: Hierarchical SRCU implementation.
[    0.007485][    T1] devtmpfs: initialized
[    0.013337][    T1] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.013392][    T1] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.043464][    T1] prandom32: self test passed (less than 6 bits correlated)
[    0.043508][    T1] prandom: seed boundary self test passed
[    0.046879][    T1] prandom: 100 self tests passed
[    0.046897][    T1] pinctrl core: initialized pinctrl subsystem
[    0.048488][    T1] NET: Registered protocol family 16
[    0.049355][    T1] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.050369][    T1] audit: initializing netlink subsys (disabled)
[    0.051803][    T1] thermal_sys: Registered thermal governor 'step_wise'
[    0.052186][   T16] audit: type=2000 audit(0.050:1): state=initialized audit_enabled=0 res=1
[    0.052352][    T1] cpuidle: using governor ladder
[    0.052451][    T1] cpuidle: using governor menu
[    0.052921][    T1] Feroceon L2: Enabling L2
[    0.052972][    T1] Feroceon L2: Cache support initialised.
[    0.060736][    T1] No ATAGs?
[    2.560063][    C0] random: fast init done
[    3.970419][   T39] "cryptomgr_test" (39) uses obsolete ecb(arc4) skcipher
[    3.993329][   T59] wait_for_initramfs() called before rootfs_initcalls
[    4.180229][    T1] raid6: int32x8  gen()   134 MB/s
[    4.350196][    T1] raid6: int32x8  xor()    86 MB/s
[    4.520194][    T1] raid6: int32x4  gen()   136 MB/s
[    4.690148][    T1] raid6: int32x4  xor()    89 MB/s
[    4.860117][    T1] raid6: int32x2  gen()   176 MB/s
[    5.030164][    T1] raid6: int32x2  xor()   106 MB/s
[    5.200233][    T1] raid6: int32x1  gen()   121 MB/s
[    5.370078][    T1] raid6: int32x1  xor()    75 MB/s
[    5.370093][    T1] raid6: using algorithm int32x2 gen() 176 MB/s
[    5.370105][    T1] raid6: .... xor() 106 MB/s, rmw enabled
[    5.370115][    T1] raid6: using intx1 recovery algorithm
[    5.370373][    T1] vgaarb: loaded
[    5.370917][    T1] SCSI subsystem initialized
[    5.371405][    T1] usbcore: registered new interface driver usbfs
[    5.371481][    T1] usbcore: registered new interface driver hub
[    5.371534][    T1] usbcore: registered new device driver usb
[    5.371722][    T1] pps_core: LinuxPPS API ver. 1 registered
[    5.371736][    T1] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    5.371778][    T1] PTP clock support registered
[    5.373452][    T1] clocksource: Switched to clocksource orion_clocksource
[    5.464131][    T1] VFS: Disk quotas dquot_6.6.0
[    5.464239][    T1] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    5.476747][    T1] NET: Registered protocol family 2
[    5.476931][    T1] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    5.483555][    T1] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes, linear)
[    5.483609][    T1] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    5.483658][    T1] TCP bind hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    5.483697][    T1] TCP: Hash tables configured (established 2048 bind 2048)
[    5.483944][    T1] MPTCP token hash table entries: 512 (order: 0, 6144 bytes, linear)
[    5.484016][    T1] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    5.484054][    T1] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    5.484270][    T1] NET: Registered protocol family 1
[    5.484983][    T1] RPC: Registered named UNIX socket transport module.
[    5.485004][    T1] RPC: Registered udp transport module.
[    5.485015][    T1] RPC: Registered tcp transport module.
[    5.485025][    T1] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    5.485041][    T1] PCI: CLS 0 bytes, default 32
[    5.485205][    T1] NetWinder Floating Point Emulator V0.97 (double precision)
[    5.485773][   T58] Trying to unpack rootfs image as initramfs...
[    6.949826][   T58] Freeing initrd memory: 9448K
[    7.414487][    T1] Initialise system trusted keyrings
[    7.414559][    T1] Key type blacklist registered
[    7.414819][    T1] workingset: timestamp_bits=30 max_order=16 bucket_order=0
[    7.414939][    T1] zbud: loaded
[    7.416312][    T1] NFS: Registering the id_resolver key type
[    7.416355][    T1] Key type id_resolver registered
[    7.416368][    T1] Key type id_legacy registered
[    7.416409][    T1] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    7.416432][    T1] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    7.416445][    T1] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    7.416703][    T1] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    7.417215][    T1] fuse: init (API version 7.34)
[    7.417591][    T1] orangefs_debugfs_init: called with debug mask: :none: :0:
[    7.417791][    T1] orangefs_init: module version upstream loaded
[    7.417808][    T1] SGI XFS with ACLs, security attributes, realtime, scrub, quota, no debug enabled
[    7.499046][    T1] xor: measuring software checksum speed
[    7.506222][    T1]    arm4regs        :  1391 MB/sec
[    7.518082][    T1]    8regs           :   834 MB/sec
[    7.526343][    T1]    32regs          :  1201 MB/sec
[    7.526359][    T1] xor: using function: arm4regs (1391 MB/sec)
[    7.526380][    T1] async_tx: api initialized (async)
[    7.526399][    T1] Key type asymmetric registered
[    7.526410][    T1] Asymmetric key parser 'x509' registered
[    7.526469][    T1] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    7.526546][    T1] io scheduler bfq registered
[    7.686506][    T1] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    7.688514][    T1] mv_xor f1060800.xor: Marvell shared XOR driver
[    7.744390][    T1] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    7.746639][    T1] mv_xor f1060900.xor: Marvell shared XOR driver
[    7.804369][    T1] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    7.806830][    T1] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    7.808098][    T1] printk: console [ttyS0] disabled
[    7.808188][    T1] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 25, base_baud = 12500000) is a 16550A
[    8.658162][    T1] printk: console [ttyS0] enabled
[    8.670944][    T1] loop: module loaded
[    8.675619][    T1] sata_mv f1080000.sata: slots 32 ports 2
[    8.684792][    T1] scsi host0: sata_mv
[    8.689267][    T1] scsi host1: sata_mv
[    8.693359][    T1] ata1: SATA max UDMA/133 irq 32
[    8.698241][    T1] ata2: SATA max UDMA/133 irq 32
[    8.704115][    T1] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda
[    8.711257][    T1] nand: Micron MT29F2G08AAD
[    8.715662][    T1] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    8.724226][    T1] Scanning device for bad blocks
[    8.964373][    T1] 4 cmdlinepart partitions found on MTD device orion_nand
[    8.971404][    T1] Creating 4 MTD partitions on "orion_nand":
[    8.977311][    T1] 0x000000000000-0x000000100000 : "u-boot"
[    8.984471][    T1] 0x000000100000-0x000000500000 : "uImage"
[    8.991452][    T1] 0x000000500000-0x000002500000 : "rootfs"
[    8.998556][    T1] 0x000002500000-0x000010000000 : "data"
[    9.006616][    T1] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    9.015268][    T1] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[    9.026700][    T1] libphy: Fixed MDIO Bus: probed
[    9.032891][    T1] libphy: orion_mdio_bus: probed
[    9.037780][   T94] ata1: SATA link down (SStatus 0 SControl F300)
[    9.059328][    T1] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    9.384990][   T96] ata2: SATA link down (SStatus 0 SControl F300)
[    9.824429][    T1] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:10:75:1a:94:3f
[    9.834065][    T1] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    9.841350][    T1] ehci-pci: EHCI PCI platform driver
[    9.846594][    T1] ehci-orion: EHCI orion driver
[    9.851507][    T1] orion-ehci f1050000.ehci: EHCI Host Controller
[    9.857777][    T1] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    9.866375][    T1] orion-ehci f1050000.ehci: irq 29, io mem 0xf1050000
[    9.893488][    T1] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    9.900508][    T1] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.13
[    9.909545][    T1] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    9.917525][    T1] usb usb1: Product: EHCI Host Controller
[    9.923124][    T1] usb usb1: Manufacturer: Linux 5.13.6-kirkwood-tld-1 ehci_hcd
[    9.930570][    T1] usb usb1: SerialNumber: f1050000.ehci
[    9.936654][    T1] hub 1-0:1.0: USB hub found
[    9.941168][    T1] hub 1-0:1.0: 1 port detected
[    9.946567][    T1] usbcore: registered new interface driver usb-storage
[    9.953730][    T1] mousedev: PS/2 mouse device common for all mice
[   10.233481][   T17] usb 1-1: new high-speed USB device number 2 using orion-ehci
[   10.435242][   T17] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608, bcdDevice= 6.03
[   10.444196][   T17] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[   10.452082][   T17] usb 1-1: Product: USB2.0 Hub
[   10.457557][   T17] hub 1-1:1.0: USB hub found
[   10.462372][   T17] hub 1-1:1.0: 4 ports detected
[   10.783472][   T17] usb 1-1.2: new high-speed USB device number 3 using orion-ehci
[   10.934741][   T17] usb 1-1.2: New USB device found, idVendor=2537, idProduct=1068, bcdDevice= 1.00
[   10.943860][   T17] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   10.951931][   T17] usb 1-1.2: Product: Device
[   10.956418][   T17] usb 1-1.2: Manufacturer: USB3.0 External
[   10.962191][   T17] usb 1-1.2: SerialNumber: 0123456789ABCDE
[   10.968665][   T17] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[   10.976129][   T17] usb-storage 1-1.2:1.0: Quirks match for vid 2537 pid 1068: 800000
[   10.984177][   T17] scsi host2: usb-storage 1-1.2:1.0
[   11.043485][    T1] rtc-mv f1010300.rtc: internal RTC not ticking
[   11.049778][    T1] i2c /dev entries driver
[   11.054589][    T1] device-mapper: uevent: version 1.0.3
[   11.060209][    T1] device-mapper: ioctl: 4.45.0-ioctl (2021-03-22) initialised: dm-devel@redhat.com
[   11.069844][    T1] device-mapper: multipath round-robin: version 1.2.0 loaded
[   11.077164][    T1] device-mapper: multipath queue-length: version 0.2.0 loaded
[   11.084541][    T1] device-mapper: multipath service-time: version 0.3.0 loaded
[   11.091944][    T1] device-mapper: dm-log-userspace: version 1.3.0 loaded
[   11.098785][    T1] device-mapper: raid: Loading target version 1.15.1
[   11.107702][    T1] hid: raw HID events driver (C) Jiri Kosina
[   11.113930][    T1] drop_monitor: Initializing network drop monitor service
[   11.121363][    T1] NET: Registered protocol family 10
[   11.127948][    T1] Segment Routing with IPv6
[   11.132335][    T1] RPL Segment Routing with IPv6
[   11.137223][    T1] NET: Registered protocol family 17
[   11.142605][    T1] Key type dns_resolver registered
[   11.148130][    T1] registered taskstats version 1
[   11.152955][    T1] Loading compiled-in X.509 certificates
[   11.158951][    T1] zswap: loaded using pool lzo/zbud
[   11.164429][    T1] Key type ._fscrypt registered
[   11.169160][    T1] Key type .fscrypt registered
[   11.173869][    T1] Key type fscrypt-provisioning registered
[   11.181730][    T1] Key type big_key registered
[   11.213712][    T1] Key type encrypted registered
[   11.224763][    T1] Freeing unused kernel memory: 1024K
[   11.244163][    T1] Checked W+X mappings: passed, no W+X pages found
[   11.250564][    T1] Run /init as init process
Loading, please wait...
Starting version 247.3-6
[   12.165928][  T142] usbcore: registered new interface driver uas
Begin: Loading essential drivers ... done.
[   13.527109][   T58] scsi 2:0:0:0: Direct-Access     USB3.0   External Device  LVM1 PQ: 0 ANSI: 6
[   13.541431][    T7] sd 2:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/466 GiB)
[   13.555415][    T7] sd 2:0:0:0: [sda] Write Protect is off
[   13.561647][    T7] sd 2:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   15.130774][    T7]  sda: sda1 sda2 sda3
[   15.146543][    T7] sd 2:0:0:0: [sda] Attached SCSI disk
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
Begin: Will now check root file system ... fsck from util-linux 2.36.1
[/sbin/fsck.ext3 (1) -- /dev/sda1] fsck.ext3 -a -C0 /dev/sda1
rootfs: clean, 15643/655360 files, 229889/2621184 blocks
done.
[   23.068814][  T168] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[   23.301900][  T168] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null). Quota mode: none.
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.96 booting
Using makefile-style concurrent boot in runlevel S.
Setting hostname to 'debian'...done.
Starting hotplug events dispatcher: systemd-udevd.
Synthesizing the initial hotplug events (subsystems)...done.
Synthesizing the initial hotplug events (devices)...done.
Waiting for /dev to be fully populated...[   27.510137][  T352] orion_wdt: Initial timeout 21 sec
[   27.840387][    C0] random: crng init done
[   27.890505][  T354] sd 2:0:0:0: Attached scsi generic sg0 type 0
[   27.964111][  T357] marvell-cesa f1030000.crypto: CESA device successfully registered
done.
Activating swap:.
[   30.549217][  T500] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro. Quota mode: none.
Will now check all file systems.
Checking all file systems.
LABEL=rootfs is mounted
Done checking file systems.
Log is being saved in /var/log/fsck/checkfs if that location is writable.
Cleaning up temporary files...Cleaning /tmp...done.
 /tmp.
Will now mount local filesystems:.
Will now activate swapfile swap, if any:done.
Checking minimum space in /tmp...done.
Cleaning up temporary files....
Starting Setting kernel variables: sysctl.
Initializing random number generator...done.
Configuring network interfaces...Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/00:10:75:1a:94:3f
Sending on   LPF/eth0/00:10:75:1a:94:3f
Sending on   Socket/fallback
DHCPREQUEST for 192.168.0.15 on eth0 to 255.255.255.255 port 67
[   36.708833][    C0] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   36.719495][   T17] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
DHCPREQUEST for 192.168.0.15 on eth0 to 255.255.255.255 port 67
DHCPACK of 192.168.0.15 from 192.168.0.1
bound to 192.168.0.15 -- renewal in 32851 seconds.
done.
Starting RPC port mapper daemon: rpcbind.
Starting NFS common utilities: statd idmapd.
Cleaning up temporary files....
INIT: Entering runlevel: 2
Using makefile-style concurrent boot in runlevel 2.
Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
1054 (syslogd)
.
Starting NFS common utilities: statd idmapd.
Starting system message bus: dbus.
Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
Not starting NFS kernel daemon: no exports. ... (warning).
Starting NTP server: ntpd.
Starting OpenBSD Secure Shell server: sshd.
Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1092 (klogd)
.
Running local boot scripts (/etc/rc.local)
.

Debian GNU/Linux 11 debian ttyS0

debian login:
Re: Dockstar HW mod: Trying to add native sata
November 18, 2021 09:21PM
Attached is the tarball for kirkwood-dockstar.dtb and dts.

Please try!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Attachments:
open | download - kirkwood-dockstar-64MB.tar (20 KB)
Re: Dockstar HW mod: Trying to add native sata
November 19, 2021 10:20AM
If the kernel recognizes 256MB automatically, there's no need to do any work on this, else than the header bytes.
Nobody is going to downgrade the ram to 64M, so why waste your time on making the kernel working with 64M?

Don't spend more time on this! At least until the 256MB memory chips arrive and I try them :)

Tested the DTB:
- With >=128MB setting, it boots normally.
- With 64M setting, it dies exactly like before.

Consider using goflexnet files in the future, so you don't need further modifying to enable sata, everything works fine in the dockstar.



Edited 1 time(s). Last edit at 11/19/2021 10:33AM by davidalfa.
Re: Dockstar HW mod: Trying to add native sata
November 19, 2021 03:07PM
David,

> If the kernel recognizes 256MB automatically,
> there's no need to do any work on this, else than
> the header bytes.
> Nobody is going to downgrade the ram to 64M, so
> why waste your time on making the kernel working
> with 64M?

It's all academic.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dockstar HW mod: Trying to add native sata
November 19, 2021 05:19PM
Oh yeah, I know that feeling where you just want to know why something happens, even if useless, hehe
Re: Dockstar HW mod: Trying to add native sata
November 19, 2021 07:29PM
> Oh yeah, I know that feeling where you just want
> to know why something happens, even if useless,
> hehe

Knowledge is never useless. There is somebody out there who needs to know about something that seems useless to us individually!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dockstar HW mod: Trying to add native sata
November 20, 2021 05:15PM
I know, I know!
But from my point of view, there isn't a 64MB kirkwood device on earth, so why spend hours on that?


I made a small JTAG adapter, modded the Dockstar's top USB hole, adding a small header that fits perfectly on it.
No more flying wires, simply plug it and run openocd, recovering takes 7 minutes. Anything you want to try, it's easy now.
Everything is my Dockstar Gallery


Here's my JTAG walkthrough for Windows

For Linux it's pretty much the same, install libusb 1.0 instead WinUSB. The config files are the same.

- Take a STM32F103 Blue Pill board
- Download Versaloon firmware. Homepage

No custom bootloaders are supported, program it to flash base address (0x08000000).
You have two options:
- ST-Link programmer. Straighforward, use ST-Link Utility or STM32 Cube Programmer
- Use serial port, boot the internal bootloader. Use stm32flash or ST's Flash loader
Setup for serial programming:
BOOT0 = 1
RX      PA9
TX      PA10
If using internal bootloader method, restore BOOT0 to position 0 after programming.
I used a ST-Link, as I already had it.


JTAG connection (The author forgot to mention nTRST, had to search it in the source code):
TCK:   B13
TDO:   B14
TDI:   B15
TMS:   B4
nTRST: B10

Dockstar header pinout (Thanks Alexander!:
https://i.postimg.cc/gjycfBYz/jtag-dockstar-pinout-1.png

Download OpenOCD. To avoid compiling, I downloaded prebuild binaries here. I used v0.10.
I tried newer builds from here but none worked when programming the nand.

Download Zadig.
Connect the stm32 board, windows should recognice two new devices: A serial port and a Versaloon device.
Open zadig. If no Versaloon devices are shown, go to Options/List all devices.
Search "Versaloon (Interface 0)" and install WinUSB driver.
Don't select "COMonVersaloon (Interface 1)"!

Go to openocd / bin folder (where openocd.exe is located).
Create these files:

vsslink.cfg
interface vsllink
adapter_khz 250
transport select jtag

docskstar.cfg
# For Seagate Dockstar and other 128MB kirkwood devices
# Based on Alexander's guide:
# https://lunarius.fe80.eu/blog/openwrt-dockstar-jtag.html
#
# Modified DDR SRAM settings for 128MB single chip kirkwood devices
# Original code for sheevaplug is not correct, DRAM config is different

 source [find vsllink.cfg] 
 source [find target/feroceon.cfg]
  
$_TARGETNAME configure \
-work-area-phys 0x100000 \
-work-area-size 16777216 \
-work-area-backup 0

 # Slightly faster transfer speed
 arm7_9 dcc_downloads enable
 
 # This assumes the hardware default peripherals location before u-Boot moves it
 set _FLASHNAME $_CHIPNAME.flash
 nand device $_FLASHNAME orion feroceon.cpu 0xd8000000
 
 proc _init { } {
 
 # We need to assert DBGRQ while holding nSRST down.
 # However DBGACK will be set only when nSRST is released.
 # Furthermore, the JTAG interface doesn't respond at all when
 # the CPU is in the WFI (wait for interrupts) state, so it is
 # possible that initial tap examination failed. So let's
 # re-examine the target again here when nSRST is asserted which
 # should then succeed.
 
 jtag_reset 0 1
 feroceon.cpu arp_examine
 halt 0
 jtag_reset 0 0
 wait_halt
 
 arm mcr 15 0 0 1 0 0x00052078
 
 mww 0xD0001400 0x43000c30 ;# DDR SDRAM Configuration Register
 mww 0xD0001404 0x37543000 ;# DDR SDRAM Control Low
 mww 0xD0001408 0x22125451 ;# DDR SDRAM Timing (Low) Register
 mww 0xD000140C 0x00000a33 ;# DDR SDRAM Timing (High) Register
 mww 0xD0001410 0x0000000d ;# DDR SDRAM Address Control Register (1Gbit, x16)
 mww 0xD0001414 0x00000000 ;# DDR SDRAM Open Pages Control Register
 mww 0xD0001418 0x00000000 ;# DDR SDRAM Operation Register
 mww 0xD000141C 0x00000C52 ;# DDR SDRAM Mode Register
 mww 0xD0001420 0x00000040 ;# DDR SDRAM Extended Mode Register
 mww 0xD0001424 0x0000F17F ;# DDR SDRAM Control High
 mww 0xD0001428 0x00085520 ;# DDR SDRAM ODT Read Timing (default values)
 mww 0xD000147c 0x00008552 ;# DDR SDRAM ODT Write Timing (default values)
 mww 0xD0001500 0x00000000 ;# DDR SDRAM CS[0]n Base address to 0x0
 mww 0xD0001504 0x07FFFFF1 ;# DDR SDRAM CS[0]n Size Register (128MB)
 mww 0xD0001508 0x10000000 ;# DDR SDRAM CS[1]n Base address to 0x10000000
 mww 0xD000150C 0x00000000 ;# DDR SDRAM CS[1]n Size Register, window disabled
 mww 0xD0001514 0x00000000 ;# DDR SDRAM CS[2]n Size Register, window disabled
 mww 0xD000151C 0x00000000 ;# DDR SDRAM CS[3]n Size Register, window disabled
 mww 0xD0001494 0x00030000 ;# DDR SDRAM ODT Control (Low) Register
 mww 0xD0001498 0x00000000 ;# DDR SDRAM ODT Control (High) REgister
 mww 0xD000149C 0x0000E803 ;# DDR SDRAM CPU ODT Control
 mww 0xD0001480 0x00000001 ;# DDR SDRAM Initialization Control Register
 mww 0xD0020204 0x00000000 ;# Main IRQ Interrupt Mask Register
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0020204 0x00000000 ;# "
 mww 0xD0010000 0x01111111 ;# MPP 0 to 7
 mww 0xD0010004 0x11113322 ;# MPP 8 to 15
 mww 0xD0010008 0x00001111 ;# MPP 16 to 23
 mww 0xD0010418 0x003E07CF ;# NAND Read Parameters REgister
 mww 0xD001041C 0x000F0F0F ;# NAND Write Parameters Register
 mww 0xD0010470 0x01C7D943 ;# NAND Flash Control Register
  
 soft_reset_halt
 
}


proc flash_all { } {

 # Flash everything (uboot+env)
 nand probe 0
 nand erase 0 0x0 0xa0000
 nand write 0 uboot.kwb 0 oob_softecc
 nand erase 0 0xc0000 0x20000
 nand write 0 uboot-env.bin 0xc0000 oob_softecc

}

proc flash_uboot { } {

 # Flash the u-Boot binary
 nand probe 0
 nand erase 0 0x0 0xa0000
 nand write 0 uboot.kwb 0 oob_softecc

}

proc flash_env { } {

 # Flash the u-Boot environment variables area
 nand probe 0
 nand erase 0 0xc0000 0x20000
 nand write 0 uboot-env.bin 0xc0000 oob_softecc

}

proc load_uboot { } {

 # Load u-Boot image into RAM and execute it
 load_image uboot.kwb
 verify_image uboot.kwb
 resume 0x800200

}

Download your u-boot and uboot default envs.
Put these files in the openocd folder:
uboot.2017.07-tld-1.(board).mtd0.kwb -> Rename to uboot.kwb
uboot.2016.05-tld-1.environment.img  -> Rename to uboot-env.bin

Connect the JTAG pins. Power on the Dockstar. Connect the Blue Pill board to the computer.
Run:
openocd.exe -f docsktar.cfg

If all went ok, you should see this:
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
adapter speed: 250 kHz
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain connect_deassert_srst
adapter_nsrst_delay: 200
jtag_ntrst_delay: 200
dcc downloads are enabled
load_uboot
Info : Versaloon(0x15)by Simon(compiled on Dec 21 2018)
Info : USB_TO_XXX abilities: 0x00000208:0x010001E3:0xC0000007
Info : clock speed 250 kHz
Error: JTAG scan chain interrogation failed: all zeroes
Error: Check JTAG interface, timings, target power, etc.
Error: Trying to use configured scan chain anyway...
Warn : Bypassing JTAG setup events due to errors
Info : Embedded ICE version 0
Info : feroceon.cpu: hardware has 1 breakpoint/watchpoint unit
Info : accepting 'telnet' connection on tcp/4444
target halted in Thumb state due to debug-request, current mode: Supervisor
cpsr: 0x200000f3 pc: 0xffff0a8e
MMU: enabled, D-Cache: enabled, I-Cache: enabled

Open any telnet client (telnet, putty...) and connect to locahost, port 4444.
You should see this:
Open On-Chip Debugger
>

Now you can enter commands. Here's a quick description:
_init         Init the CPU (Run this after opening openocd, before any other command)
flash_all     Flash u-boot and environment
flash_uboot   Flash u-boot only
flash_env     Flash environment only
load_uboot    Download uboot to ram and execute it (I have not tested it)

Before running them, you might want to ensure everything is working correctly:

>_init
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x800000d3 pc: 0x07f81d9c
MMU: disabled, D-Cache: disabled, I-Cache: disabled
requesting target halt and executing a soft reset
target halted in ARM state due to debug-request, current mode: Supervisor
cpsr: 0x800000d3 pc: 0x00000000
MMU: disabled, D-Cache: disabled, I-Cache: disabled
>nand probe 0
NAND flash device 'NAND 256MiB 3.3V 8-bit (Micron)' found

If you get errors, plug everything off try again. This worked well for me:
- Plug the dockstar first, wait a second
- Plug the jtag adapter
- Start openocd

If everything was ok, you're ready to go. It'll take about 7 minutes:
> flash_all
NAND flash device 'NAND 256MiB 3.3V 8-bit (Micron)' found
erased blocks 0 to 4 on NAND flash device #0 'NAND 256MiB 3.3V 8-bit'
wrote file uboot.kwb to NAND flash 0 up to offset 0x00080000 in 332.655731s (1.539 KiB/s)
erased blocks 6 to 6 on NAND flash device #0 'NAND 256MiB 3.3V 8-bit'
wrote file uboot-env.bin to NAND flash 0 up to offset 0x000e0000 in 82.984138s (1.542 KiB/s)

The system will boot now.

If you flashed the environment and you get this error:
NAND read from offset c0000 failed -74
*** Warning - readenv() failed, using default environment
It means the ECC is wrong, likely the selected nand ecc algorithm was incorrect.
I had this issue when using oob_softecc_kw. All configs I saw used that option.
After a lot of testing, I found that the correct one was oob_softecc.
I don't know if Bodhi's custom uboot has a different ECC setting or if it's something else.

If you're getting that error, check if the ECC algorithm is correct. Run this u-boot command:
GoFlexNet> nand read 0x100000 0 0x10
Good ECC:
NAND read: device 0 offset 0x0, size 0x10
 16 bytes read: OK

Bad ECC:
NAND read: device 0 offset 0x0, size 0x10
NAND read from offset 0 failed -74
 0 bytes read: ERROR

If the ECC is bad, edit docskstar.cfg and change all lines having this:
nand write 0 ... oob_softecc
to
nand write 0 ... oob_softecc_kw
Then try again.



Edited 4 time(s). Last edit at 11/21/2021 01:55AM by davidalfa.
Re: Dockstar HW mod: Trying to add native sata
November 21, 2021 01:50AM
Huh...this is becoming a Dockstar modding thread, else than just adding sata!

I was tired of few issues:
- The date was always lost on power removal, NTP taking minutes to update.
- There was no easy way to turn it off, needing ssh, etc.... unplugging it usually damaged the filesystem.

So I:
- Made the RTC mod.
- Wired a led button to gpio36(button) and gpio49(led).

Made a small daemon that polls the button and shuts down the system if pressed for more than 5 seconds.
When triggered, it turns on the led to let you know.

/etc/init.d/button_monitor
#!/bin/sh
### BEGIN INIT INFO
# Provides:          button_monitor
# Required-Start:
# Required-Stop:
# Should-Start:
# Default-Start:     1 2 3 4 5
# Default-Stop:
# Short-Description: Starts shutdown button daemon
# Description:
### END INIT INFO

PATH=/usr/sbin:/usr/bin:/sbin:/bin


case "$1" in
  start)
        /usr/bin/button_monitor &
        ;;
  stop)
        ;;
  restart|reload)
        ;;
  *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
esac
:

/usr/bin/button_monitor
# Pressing time to trigger shutdown
TIME=5

# Button gpio
IO_BTN=36

# LED gpio
IO_LED=49

# Time counter
COUNT=0

echo "$IO_BTN" >/sys/class/gpio/export
echo "in" > /sys/class/gpio/gpio$IO_BTN/direction
echo "$IO_LED" >/sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio$IO_LED/direction
echo "0" >/sys/class/gpio/gpio$IO_LED/value

while true; do
  VAL="$(cat /sys/class/gpio/gpio$IO_BTN/value)"
  if [ $VAL -eq 0 ]; then 
    COUNT=$(($COUNT+1))
    if [ $COUNT -gt $TIME ]; then
      echo  "Power button detected! Shutting down system"
      echo "1" >/sys/class/gpio/gpio$IO_LED/value
      poweroff &
      exit 0
    fi
  else
    COUNT=0
  fi
  sleep 1
done
chmod +x /usr/init.d/button_monitor /usr/bin/button_monitor
update-rc.d -f button_monitor defaults

I should have done this years ago, but you know, I didn't want to take the risk of damaging it.
Added more pictures to the Dockstar gallery.

I took the gpio pins from here: https://www.mikrocontroller.net/articles/Dockstar

I made a small script to quickly test the pins, as doing it manually is slow and painful.
It automatically exports and configures the gpio, detects if the pin can't be used, and unexports the gpio on exit.
Press q to exit, don't use control+c!
The usage is:
gpio [number] [mode]
number: 45 for gpio45
mode: in or out

Examples:
gpio 45 out
gpio 34 in

Input mode: Shows the pin value in real time (1 or 0)
Output mode: Toogles the output every second

gpio
GPIO=$1

if [ -z "$1" ]; then
  echo "No gpio provided"
  exit 1
elif [ -z "${1##*[!0-9]*}" ];then
  echo "Gpio must be a number!"
  exit 1
fi

if [ -z "$2" ]; then
  echo "No mode provided"
  exit 1
elif [ "$2" != "in" ] && [ "$2" != "out" ]; then
  echo "Bad mode. Select \"in\" or \"out\""
  exit 1
fi

echo "$1" >/sys/class/gpio/export
if [ $? -ne 0 ]; then
  echo "Error exporting gpio number"
  echo "$GPIO" >/sys/class/gpio/unexport
  exit 1
fi

echo "$2" > /sys/class/gpio/gpio$1/direction
if [ $? -ne 0 ]; then
  echo "Error setting gpio direction"
  echo "$GPIO" >/sys/class/gpio/unexport
  exit 1
fi

function read_key {
  read -rsn1 -t0.001 KEY
  if [ "$KEY" == "q" ];then
    echo "$GPIO" >/sys/class/gpio/unexport
    exit 0
  fi
}

echo Testing gpio $1 as $2


if  [ "$2" == "in" ]; then
 while true; do
   cat /sys/class/gpio/gpio$1/value | tr '\n' '\r'
   sleep 0.1
   read_key
  done
else
  while true; do
    echo 1 >/sys/class/gpio/gpio$1/value
    sleep 1
    read_key
    echo 0 >/sys/class/gpio/gpio$1/value
    sleep 1
    read_key
  done
fi



Edited 1 time(s). Last edit at 11/21/2021 01:59AM by davidalfa.
Re: Dockstar HW mod: Trying to add native sata
November 21, 2021 02:58PM
David,

Nice! can you use the standard esekeyd? that way the HW mod works without extra scripts.

Quote
https://forum.doozan.com/read.php?2,23630

Key daemon (button control)

Multimedia keyboard daemon for Linux
How to use set up button to reboot or shutdown with Key Daemon (esekeyd)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dockstar HW mod: Trying to add native sata
November 24, 2021 03:25AM
I don't see how, there's no input device, no gpio-keys-polled, and esekeyd also needs a script...
This is the part I hate so much about linux, needing to recompile the whole thing, usually dealing with obscure and weird details.
For a simple button and a led, this script does the job, not going through another compiling nightmare... there's no need of speed or performance that justifies it.
Waiting impatiently for the 256MB chips...



Edited 2 time(s). Last edit at 11/24/2021 03:26AM by davidalfa.
Re: Dockstar HW mod: Trying to add native sata
November 24, 2021 03:35PM
David,

Just a thought, whatever works is good.

BTW, mods like this does not involve compiling the kernel. Since you've added only GPIOs, you would modify the kirkwood-dockstar.dts or kirkwood-goflexnet.dts, and recompile it with DTC compiler to get the new .dtb and use it to boot. In ancient days, all these device hardware were baked into the kernel, but not anymore since FDT-enable kernel (about 3.6.x).

So the bottom line is that you can run a mainline Debian Kirkwood kernel on this Dockstar box (don't need to use my custom built kernel). You just need a special DTB that you build on your own.

For a few other Kirkwood boxes (e.g. Zyxel NSA325), I do have some patches to get it working correctly.

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



Edited 1 time(s). Last edit at 11/24/2021 04:53PM by bodhi.
Re: Dockstar HW mod: Trying to add native sata
November 25, 2021 08:15PM
Will have to try that.

I wanted to add SDcard support, so a quick way to test it was:
- Take pogo v4 uboot.
- Patch header with DRAM config from dockstar.
- Use DTB from pogo v4.

The serial output is broken in u-boot, but starts working when the kernel boots.
LAN and netconsole work, so I could use u-boot cmd line anyways.
Led gpios are different so they don't work.
SD worked... sort of. I guess the unconnected SD detect pin is causing issues.

So it was time to compile a custom u-boot and stop the dirty patching.
gcc 9 caused issues, breaking the network, also some files had to be patched to skip errors.
So I assumed I had to use an older toolchain.
I was lucky, got it working at the second try, with gcc-linaro-6.5 toolchain:
wget https://releases.linaro.org/components/toolchain/binaries/latest-6/arm-linux-gnueabi/gcc-linaro-6.5.0-2018.12-x86_64_arm-linux-gnueabi.tar.xz
sudo tar xvf gcc-linaro-6.5.0-2018.12-x86_64_arm-linux-gnueabi.tar.xz -C /usr/local/

Export the tools:
export CROSS_COMPILE=/usr/local/gcc-linaro-6.5.0-2018.12-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi- \
PATH=/usr/local/gcc-linaro-6.5.0-2018.12-x86_64_arm-linux-gnueabi/bin:$PATH

Build:
make clean; make goflexnet_defconfig; make -sj12 u-boot.kwb

Some stdio library warnings, but builds correctly:
  CLEAN   examples/standalone
  CLEAN   tools
  CLEAN   tools/lib tools/common
  CLEAN   u-boot-nodtb.bin u-boot.lds u-boot.kwb u-boot.map u-boot.bin u-boot.cfg u-boot
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  HOSTCC  scripts/kconfig/zconf.tab.o
In file included from scripts/kconfig/zconf.tab.c:2468:
scripts/kconfig/confdata.c: In function ‘conf_write’:
scripts/kconfig/confdata.c:771:19: warning: ‘%s’ directive writing likely 7 or more bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
  771 |  sprintf(newname, "%s%s", dirname, basename);
      |                   ^~~~~~
scripts/kconfig/confdata.c:771:19: note: assuming directive output of 7 bytes
In file included from /usr/include/stdio.h:867,
                 from scripts/kconfig/zconf.tab.c:82:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output 1 or more bytes (assuming 4104) into a destination of size 4097
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from scripts/kconfig/zconf.tab.c:2468:
scripts/kconfig/confdata.c:774:20: warning: ‘.tmpconfig.’ directive writing 11 bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
  774 |   sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
      |                    ^~~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
                 from scripts/kconfig/zconf.tab.c:82:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:36:10: note: ‘__builtin___sprintf_chk’ output between 13 and 4119 bytes into a destination of size 4097
   36 |   return __builtin___sprintf_chk (__s, __USE_FORTIFY_LEVEL - 1,
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   37 |       __bos (__s), __fmt, __va_arg_pack ());
      |       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#


Take the generated file u-boot.kwb and copy it somehow to the box.
Flashing:
flash_erase /dev/mtd0 0 4
nandwrite /dev/mtd0 -p u-boot.kwb

Verifying:
nanddump /dev/mtd0 -f read.kwb -l $(stat --printf="%s" u-boot.kwb)
diff u-boot.kwb read.kwb

If the files are different, you will get:
Binary files u-boot.kwb and read.kwb differ



Edited 8 time(s). Last edit at 11/25/2021 09:57PM by davidalfa.
Re: Dockstar HW mod: Trying to add native sata
November 25, 2021 08:53PM
Making a custom board profile (To avoid messing up the existing dockstar code)

Edit arch/arm/mach-kirkwood/Kconfig (This is the only existing file file that needs to be modified)
config TARGET_DOCKSTAR_MOD
	bool "Dockstar_mod Board"
  
source "board/Seagate/dockstar_mod/Kconfig"

Copy: board/Seagate/dockstar folder to board/Seagate/dockstar_mod
Edit board/Seagate/dockstar_mod/Kconfig
if TARGET_DOCKSTAR_MOD

config SYS_BOARD
	default "dockstar_mod"

config SYS_VENDOR
	default "Seagate"

config SYS_CONFIG_NAME
	default "dockstar_mod"

endif

Copy include/configs/dockstar.h to include/configs/dockstar_mod.h
Edit include/configs/dockstar_mod.h
  #ifndef _CONFIG_DOCKSTAR_MOD_H
  #define _CONFIG_DOCKSTAR_MOD_H

Copy configs/dockstar_defconfig to configs/dockstar_mod_defconfig
Edit configs/dockstar_mod_defconfig
  CONFIG_TARGET_DOCKSTAR_MOD=y

Testing build:
make clean; make dockstar_mod_defconfig; make -sj12 u-boot.kwb


Modding the code (To add Sata and mmc)

Edit configs/dockstar_mod_defconfig
CONFIG_HUSH_PARSER=y
CONFIG_CMD_IDE=y
CONFIG_CMD_MMC=y

Edit include/configs/dockstar_mod.h
/*
 * SATA 
 */
#ifdef CONFIG_MVSATA_IDE
#define CONFIG_SYS_ATA_IDE0_OFFSET	MV_SATA_PORT0_OFFSET
#define CONFIG_SYS_ATA_IDE1_OFFSET	MV_SATA_PORT1_OFFSET
#endif
/*
 * Kirkwood GPIO
 */
#define CONFIG_KIRKWOOD_GPIO
/*
 * SDIO/MMC Card Configuration
 */
#ifdef CONFIG_CMD_MMC
#define CONFIG_MVEBU_MMC
#define CONFIG_SYS_MMC_BASE KW_SDIO_BASE
#endif /* CONFIG_CMD_MMC */

After compiling and flashing, sata and mmc are working:
U-Boot 2017.07-g697f50bf18-dirty (Nov 26 2021 - 05:19:58 +0100)
Seagate FreeAgent DockStar

SoC:   Kirkwood 88F6281_A0
DRAM:  128 MiB
WARNING: Caches not enabled
NAND:  256 MiB
MMC:   MVEBU_MMC: 0
In:    serial
Out:   serial
Err:   serial
Net:   egiga0
88E1116 Initialized on egiga0
Hit any key to stop autoboot:  0
DockStar> ide reset

Reset IDE: Bus 0: OK Bus 1: not available
  Device 0: Model: WDC WD10JPVX-22JC3T0 Firm: 01.01A01 Ser#:  WD-WX61E14X1081
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 953869.7 MB = 931.5 GB (1953525168 x 512)
DockStar> mmc rescan

MMC rescan: current device # 0 initialized OK
DockStar> mmc info
Device: MVEBU_MMC
Manufacturer ID: 1b
OEM: 534d
Name: USD
Tran Speed: 50000000
Rd Block Len: 512
SD version 2.0
High Capacity: No
Capacity: 1.9 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
DockStar>

More coming...



Edited 7 time(s). Last edit at 11/25/2021 10:26PM by davidalfa.
Re: Dockstar mods: SATA, SD, 256MB RAM, Compiling/Modding U-boot; kernel DTB...
November 26, 2021 07:28PM
I must say, my hate for Linux intensifies every time I have to build something...!
Most of the time it just won't work, there're always issues, requiring hours investigating to compiling a simple thing.
Arghh...

I was able to build the DTB. But it was no easy!
In the end I used this repo, which includes all required dts files: https://github.com/ARM-software/u-boot

Then I modified arch/arm/dts/kirkwood-dockstar.dts
I added Sata, MMC, I2C, red led@mpp49, power button@mpp36
Unfortunately, SPI pins are used by nand and uart0.

I attached the files.

Building was smooth:
export ARCH=arm CROSS_COMPILE=/usr/local/gcc-linaro-6.5.0-2018.12-x86_64_arm-linux-gnueabi/bin/arm-linux-gnueabi- PATH=/usr/local/gcc-linaro-6.5.0-2018.12-x86_64_arm-linux-gnueabi/bin:$PATH
make clean
make dockstar_defconfig
make -sj12 dtbs
The dtb file is placed in /arch/arm/dts, same filename but with dtb extension (kirkwod-dockstar.dtb).

After installing evtest, I can see button presses at /dev/input/event0:
evtest /dev/input/event0

Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "gpio_keys"
Supported events:
  Event type 0 (EV_SYN)
  Event type 1 (EV_KEY)
    Event code 116 (KEY_POWER)
Properties:
Testing ... (interrupt to exit)
Event: time 1637976351.226717, type 1 (EV_KEY), code 116 (KEY_POWER), value 1
Event: time 1637976351.226717, -------------- SYN_REPORT ------------
Event: time 1637976351.532663, type 1 (EV_KEY), code 116 (KEY_POWER), value 0
Event: time 1637976351.532663, -------------- SYN_REPORT ------------

The red led also works:
echo 1 > /sys/class/leds/status\:red\:power/brightness
echo 0 > /sys/class/leds/status\:red\:power/brightness

Also does sata, mmc, etc..



Edited 8 time(s). Last edit at 11/27/2021 02:44AM by davidalfa.
Attachments:
open | download - kirkwood-dockstar.tar.bz2 (3.6 KB)
Re: Dockstar mods: SATA, SD, 256MB RAM, Compiling/Modding U-boot; kernel DTB...
November 27, 2021 07:46PM
I was finally able to debug the kernel crash when setting the ram to 64MB .
A stupid environment varable was overwriting my bootargs, Duh!
I attached the log. It seems it's getting out of memory when decompressing stuff.




Today I decided to remove the nand, and use SATA for booting, making it unbrickable, no more JTAG mess!
For that, GE_TXD[0...2] bootstrap resistors need to be moved from 101 (5=Boot from nand) to 110 (6=boot from sata).
These are the resistors:
https://i.postimg.cc/KG65wCyB/Pics-Art-11-28-01-14-58.jpg

Usually, disks are aligned to 1MB, so the first MB is unused (except sector 0, MBR) and we can use that space to store header and uboot.
Bootrom loads the header from hdd sector 1, but there's a slight difference in the header bytes 0x0C...0x0D (Source address).
In nand/SPI, this is the offset in bytes, but in sata mode, it's the offset in disk sectors, which means that u-boot image needs to be stored in a different sector.
However I found that kwb image tool didn't handle this option properly, it always stores the header size in bytes (byte offset).
In sata mode, this will cause a 512 sector offset (512*512=262KB of unused storage!)

So I modified tools/kwbimage.c
Delete line 868:
main_hdr->srcaddr   = cpu_to_le32(headersz);
Modify this code from this:
	e = image_find_option(IMAGE_CFG_BOOT_FROM);
	if (e)
		main_hdr->blockid = e->bootfrom;
To this:
	e = image_find_option(IMAGE_CFG_BOOT_FROM);
	if (e){
		main_hdr->blockid = e->bootfrom;
		if(main_hdr->blockid==0x78)	// Boot from sata. HDD sector=512bytes
			// Get image from disk sector 2 (Sector 0 is MBR, sector 1 is kwb header)
			main_hdr->srcaddr = cpu_to_le32(headersz / 512 + 1);
			
		else	//  Nand or spi, header offset in bytes
			main_hdr->srcaddr   = cpu_to_le32(headersz);
	}

Then I found this marvell uboot repo, updated to uboot 2020! https://source.denx.de/u-boot/custodians/u-boot-marvell
Everything compiled nicely, mmc, sata (much faster loading!), unfortunately booting was impossible, complaining about not valid uInitrd image format. I tried adding legacy options... no way. After few hours I have up and went back to the 2017 version.

I removed the nand to avoid those useless block errors. However, the kernel crashed, likely was expecting a filesystem there, entering panic mode, so I also disabled the nand system in DTS and u-boot. Done.

Compiling uboot 2017 failed in every possible way when trying to embed the environment into the sata.
Something weird around /drivers/block/sata.c and sata_mv.c
I ended giving up and decided to load it from the filesystem at boot time (/boot/uEnv.txt).
Modified the boot script to check and loads it from any device (usb, sd, sata), thus making it very easy to modify and recover.
Currently I tested sdcard and rootfs for that, working great. It's a shame that the bootRom can't boot from the sd.

Copying the kwb image is extremely easy, just write it at sector 1 in the hdd (512byte offset).
And its working!

Of course, this not a mod for everyone. Lifting the cpu is not easy, and very time-consuming.
Might be useful for other kirkwood boxes, or any curious like me trying to sequeeze every single bit out it.

Attached modified u-boot files, compiled kwb, and modified dts/dtb.
Only the first u-boot step is fixed,the default environment weill try to load a new environment from any connected disk.
Then, everything can be customized. In this examples, netconsole is enabled in the first stage.



Edited 8 time(s). Last edit at 11/27/2021 11:53PM by davidalfa.
Attachments:
open | download - 64MB_crash.txt (67.8 KB)
open | download - dockstar-nandless.tar.bz2 (244 KB)
Re: Dockstar mods: SATA, SD, 256MB RAM, Compiling/Modding U-boot; kernel DTB...
November 28, 2021 05:35PM
David,

All good and interesting hacks :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dockstar mods: SATA, SD, 256MB RAM, Compiling/Modding U-boot; kernel DTB...
November 29, 2021 12:22AM
I finally was able to boot using the latest u-boot version (2022.01-rc1 from the marvel repo I posted earlier) with your kernel.
It seems the kernel image format is now deprecated? I have no idea...

There were some really hidden and badly documented configs that had to be enabled.
Turns out it's easily seen in menuconfig, but I figured out in the hard way

In defconfig
CONFIG_LEGACY_IMAGE_FORMAT=y
CONFIG_SUPPORT_RAW_INITRD=y

Also to enable "load":
CONFIG_CMD_FS_GENERIC=y


Booting a legacy initrd requires the image length as parameter, so the boot commands are slightly different.
load_initrd=load $bootdev $device $load_initrd_addr /boot/uInitrd; setenv initrd_size $filesize
boot_exec=bootm $load_uimage_addr $load_initrd_addr:$initrd_size $load_dtb_addr

Notice the added variable "initrd_size", set in "setenv initrd_size $filesize".
filesize is set by u-boot when reading file, so we need to store it after reading intramfs, before loading anything else, or it will be overwritten.

I had serious issues with the DTS, does the line order matter?
Ex. putting "serial" before sata, (under the same section)... I got issues due that! Getting no sata devices found (This uboot uses dtb, too).

Sata, mmc, usb, network...It's working perfect now:

U-Boot 2022.01-rc1-67610-g5c61710c98-dirty (Nov 29 2021 - 07:10:52 +0100)
Seagate FreeAgent DockStar

SoC:   Kirkwood 88F6281_A0
Model: Seagate FreeAgent Dockstar
DRAM:  128 MiB
MMC:   mvsdio@90000: 0
Loading Environment from nowhere... OK
In:    serial
Out:   serial
Err:   serial
Model: Seagate FreeAgent Dockstar
Net:   eth0: ethernet-controller@72000
88E1116 Initialized on ethernet-controller@72000
Hit any key to stop autoboot:  0
resetting USB...
Bus ehci@50000: USB EHCI 1.00
scanning bus ehci@50000 for devices... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
No storage devices, perhaps not 'usb start'ed..?
Card did not respond to voltage select! : -110

Device 0: Model: WDC WD10JPVX-22JC3T0 Firm: 01.01A01 Ser#:      WD-WX61E14X1081
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 953869.7 MB = 931.5 GB (1953525168 x 512)
... is now current device
** Searching /boot/uEnv.txt in sata 0 ... **
1949 bytes read in 50 ms (37.1 KiB/s)
** Environment successfully imported ***
Scanning devices...
Testing sata 0...
1 bytes read in 13 ms (0 Bytes/s)
Found bootable drive on sata 0
loading uImage ...
5472984 bytes read in 116 ms (45 MiB/s)
loading uInitrd ...
9710443 bytes read in 184 ms (50.3 MiB/s)
loading DTB /boot/dts/kirkwood-dockstar.dtb ...
10297 bytes read in 51 ms (196.3 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.14.9-kirkwood-tld-1
   Created:      2021-11-19  15:35:55 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5472920 Bytes = 5.2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
   Booting using the fdt blob at 0x1c00000
   Loading Kernel Image
   Loading Device Tree to 07b6c000, end 07b71838 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.



Edited 1 time(s). Last edit at 11/29/2021 12:30AM by davidalfa.
Re: Dockstar mods: SATA, SD, 256MB RAM, Compiling/Modding U-boot; kernel DTB...
November 29, 2021 12:41AM
> It seems the kernel image format is now
> deprecated? I have no idea...

No, it is not.

>
> There were some really hidden and badly documented
> configs that had to be enabled.
> Turns out it's easily seen in menuconfig, but I
> figured out in the hard way
>
> In defconfig
>
> CONFIG_LEGACY_IMAGE_FORMAT=y
> CONFIG_SUPPORT_RAW_INITRD=y
>

CONFIG_LEGACY_IMAGE_FORMAT is always yes, and will always be available. CONFIG_SUPPORT_RAW_INITRD is never needed for Kirkwood boxes.


> Booting a legacy initrd requires the image length
> as parameter

That's not required.

I've been running the my latest u-boot builds (i.e. 2021.10, and 2022.01-rc1) with my latest released kernel/rootfs. I can confirm that there is no such new requirements. It would be insane for the u-boot developers to make that typpe of decision. It is going to be backward compatible forever regarding uImage and uInitrd.

It'll take a while before I can release new u-boots and push to GitHub.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dockstar mods: SATA, SD, 256MB RAM, Compiling/Modding U-boot; kernel DTB...
November 29, 2021 02:04AM
For sure, compiling 30 uboots must not be a funny experience! You got everything working, that's what matters!
I don't think new u-boots are required, it's just for what it is, booting... Until something changes in newer kernels.
The box will boot, load the kernel, end of story!

I just entered the game for the mods....
Well, actually it was like rodeo, with a very angry bull destroying your back on each key press! :)
I like the new uboot more because I can make the dtb and u-boot at the same time, and also kwbimage tool is complete now, no hacks for sata...

bodhi Wrote:
-------------------------------------------------------
> > Booting a legacy initrd requires the image
> length
> > as parameter
>
> That's not required.
>

I made the test... After removing CONFIG_SUPPORT_RAW_INITRD, I got this, no matter what I tried:
## Booting kernel from Legacy Image at 00800000 ...
   Image Name:   Linux-5.14.9-kirkwood-tld-1
   Created:      2021-11-19  15:35:55 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5472920 Bytes = 5.2 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
Wrong Ramdisk Image Format
Ramdisk image is corrupt or invalid
resetting ...

Check
common/image-board.c
The code below CONFIG_SUPPORT_RAW_INITRD is the only case that needs the length argument:
bootm uimage initrd:length dtb


I set a minimal environment that scans for devices, searchs and imports the environment file at preboot time.
Then everything is up to you! Override bootcmd variable and add other stuff in uEnvt.txt to boot...

Attached the tarball, it works fine with https://source.denx.de/u-boot/custodians/u-boot-marvell code, also generates the DTB files correctly.

Oh, also enabled THUMB build, makes the image much smaller...



Edited 20 time(s). Last edit at 11/29/2021 03:29AM by davidalfa.
Attachments:
open | download - uboot_2022-01-rc1_dockstar_nandless_sata_mmc.tar.bz2 (176.2 KB)
Re: Dockstar mods: SATA, SD, 256MB RAM, Compiling/Modding U-boot; kernel DTB...
November 29, 2021 05:09PM
David,

My advice is to do thing methodically. The Dockstar u-boot is in mainline, so just build that vanilla Dockstar, no mods. And then flash and run it. You will confirm that your assumption about the initrd lenght requirement was right or wrong. And if it was a wrong assumption, then the only remaining explation is that your build was misconfigured.

And clone the latest u-boot tree from GitHub to make sure you did not inherit a bug somewhere.

With all that said, if your HW mods is working then perhaps there is no need to spend more time.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dockstar mods: SATA, SD, 256MB RAM, Compiling/Modding U-boot; kernel DTB...
December 01, 2021 03:10AM
Yep, current uboot works perfectly fine too. Nice to see it's supported correctly in the main repo.
But I also have to enable CONFIG_SUPPORT_RAW_INITRD or it'll show the initrd format error.
Not a big issue though. The ram delivery is delaying a lot...
Re: Dockstar mods: SATA, SD, 256MB RAM, Compiling/Modding U-boot; kernel DTB...
December 01, 2021 09:04PM
> CONFIG_SUPPORT_RAW_INITRD or it'll show the initrd
> format error.

That is a RAM configuration issue. Mainline u-boot is configured with 128MB RAM.

Once you have 256MB RAM chip installed, this problem should be automatically solved. At that time, mainline u-boot should run fine without CONFIG_SUPPORT_RAW_INITRD.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dockstar mods: SATA, SD, 256MB RAM, Compiling/Modding U-boot; kernel DTB...
December 01, 2021 11:07PM
The RAM is unmodified, running the default 128MB settings...
Re: Dockstar mods: SATA, SD, 256MB RAM, Compiling/Modding U-boot; kernel DTB...
December 02, 2021 05:35AM
David, just a stupid question: Is it possible to replace the original 128 MB RAM with a socket that can take (snap in) a notebook 2/4/8/16 GB RAM?
Re: Dockstar mods: SATA, SD, 256MB RAM, Compiling/Modding U-boot; kernel DTB...
December 02, 2021 06:35AM
It would be pretty complicated.
The soc supports 1GB max, divided in 4 RAM memories (4 chip select), and uses a 16-bit bus.

Computer DDR2 modules are very different: they use 64-bit bus and only 2 chip select inputs, so in the best case, you will only access 512MB.
And remember the connections, which are a lot. Wiring 400MHz signals is no joke, it's a very complex thing, not like connecting few leds and buttons.

In any case, the dockstar uses only one chip select, to acces the other 3 you would need to lift the CPU, like I've done with the sata pins.
Re: Dockstar mods: SATA, SD, 256MB RAM, Compiling/Modding U-boot; kernel DTB...
December 02, 2021 09:33PM
Quote

Wiring 400MHz signals is no joke, it's a very complex thing, not like connecting few leds and buttons

Quite a difficult mod! and I bow to your HW skill! no joke, I don't think I would ever do that successfully without destroying a fortune of electronics :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Dockstar mods: SATA, SD, 256MB RAM, Compiling/Modding U-boot; kernel DTB...
December 03, 2021 06:11AM
davidalfa Wrote:
-------------------------------------------------------
> It would be pretty complicated. The soc supports 1GB max, divided in 4 RAM memories (4 chip select), and uses a 16-bit bus.
>
> Computer DDR2 modules are very different: they use 64-bit bus and only 2 chip select inputs, so in the best case, you will only access 512MB. And remember the connections, which are a lot. Wiring 400MHz signals is no joke, it's a very complex thing, not like connecting few leds and buttons.
>
> In any case, the dockstar uses only one chip select, to acces the other 3 you would need to lift the CPU, like I've done with the sata pins.
>
David: From what you explained above the task is pretty involving and that's certainly beyond my skills. Thank you very much.
Re: Dockstar mods: SATA, SD, 256MB RAM, Compiling/Modding U-boot; kernel DTB...
December 03, 2021 06:25AM
Sata is "easy", because although it's very high frequency, there're only 2 differential pairs (Rx, TX), so only 2 signals to take care of.
So as long as the mod wires are short and similar in lenght, it's easy to make it work.

However DDR2 has 40+ signals..heheh
Is It possible? Sure. Easy? Absolutely not. And not cheap either.
Routing a custom 4-layer PCB that could be soldered over the existing DDR2 memory pads, and expand it to 4 memory chips...
Perhabs with a Flex pcb, but they're also expensive.
In the end you would spend more that buying a cheap SBC like banana Pi / Orange pi, which already come with 1GB+ RAM, and you'll be lucky if it works at all.
Anyways, I never give completely, maybe I'll bite the bullet in the future and try it...



Edited 2 time(s). Last edit at 12/03/2021 06:30AM by davidalfa.
Re: Dockstar mods: SATA, SD, 256MB RAM, Compiling/Modding U-boot; kernel DTB...
December 04, 2021 07:51AM
Finally, the RAM arrived!
At first nothing worked, it was completely dead.
Reballed and soldered the ram few times, no change.
Then I suspected that maybe the A13 addressing pin, although routed in the board, was unused for 128MB, and maybe there was some unpopulated jumper/resistor.
After removing the ram for 4th time, I checked and definitely, A13 pin was unconnected.
Tracing the pin I found that this unpopulated resistor was the culprit. Must be shorted with a 0 ohm resistor or a thin wire.
Details here:
https://i.postimg.cc/YCXjy4LS/DDR-A13.jpg


In the mean time, I had checked every detail in the datasheet and found that more registers needed tweaking.
tRFC (Refresh to Active/Refresh command time) had to be modified from 127.5ns (for 128MB) to 197.5ns (for 256MB).
That's done in the register 0x0140C. The delay is clock cycles. For 400MHZ, each clock is 2.5ns, and 197.5ns is translated to 79cycles.
The effective value is (set value+1), so we need to put 78 here.
So the final value here had to be modified from 0x00000a33 to 0x00000A4E, in boards/Seagate/dockstar/kwbimage.cfg.

So after modifying 0x0xFFD0140C (DDR Timing high register), 0x0xFFD01410 (DDR address control/size register) and 0xFFD01504(DDR Window size register), it finally booted.

Once in debian, I installed memtester, disabled swap, killed most processes to free as much memory as possible and ran memtester assigning 208MB. Anymore than that and the process was being killed due insufficient RAM. Should be ok to know if the chips works.
root@debian:~# memtester 208

got  208MB (218103808 bytes), trying mlock ...locked.
Loop 1:
  Stuck Address       : ok
  Random Value        : ok
  Compare XOR         : ok
  Compare SUB         : ok
  Compare MUL         : ok
  Compare DIV         : ok
  Compare OR          : ok
  Compare AND         : ok
  Sequential Increment: ok
  Solid Bits          : ok
  Block Sequential    : ok
  Checkerboard        : ok
  Bit Spread          : ok
  Bit Flip            : ok
  Walking Ones        : ok
  Walking Zeroes      : ok
  8-bit Writes        : ok
  16-bit Writes       : ok

Everything seems working great!


The system seems happy to use the extra ram for buffering/caching:
top - 06:19:01 up 9 min,  1 user,  load average: 0.80, 0.94, 0.57
Tasks:  76 total,   1 running,  75 sleeping,   0 stopped,   0 zombie
%Cpu(s):  1.3 us, 29.0 sy,  0.0 ni, 54.7 id,  0.0 wa,  0.0 hi, 15.0 si,  0.0 st
MiB Mem :    235.9 total,      2.9 free,     22.7 used,    210.3 buff/cache
MiB Swap:   2048.0 total,   2048.0 free,      0.0 used.    204.2 avail Mem

It's kinda crazy the 256MB RAM chip was only $2 incl. shipping!
Probably a counterfeit or who knows, but as long as it works...
https://www.aliexpress.com/item/1005003067028122.html



Edited 10 time(s). Last edit at 12/04/2021 10:35AM by davidalfa.
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: