Welcome! Log In Create A New Profile

Advanced

Debian on Lacie networkspace 2.

Posted by ahuovinen 
Re: Debian on Lacie networkspace 2.
March 11, 2024 08:32PM
Not sure if you are aware, but the Network Space 2 like most LaCie NAS devices has issues as documented at Install from a LaCie stock U-Boot. It also implements its own form of U-Boot Net Console called CLUNC. If you follow the instructions at the first link you should be able to get U-Boot replaced and Debian installed. Its been a few years, but that is how I got Debian working on my Network Space 2 as well as a few other LaCie NAS devices.

Ray
Re: Debian on Lacie networkspace 2.
March 12, 2024 01:27AM
Yes but if you look my printenv output:

rootfs=/dev/sdb7 .

have to type

setenv rootfs <enter>

to remove it. after that booting from usb works. i really have to get u-boot flashed to standard version so i can install
Linux of hdd. Now im waiting another USB-TTL converter which has jumper for voltage setting. The two i currently have
should be automatic. But apparently they dont work.

-a
Re: Debian on Lacie networkspace 2.
March 12, 2024 01:38AM
ahuovinen,

> Yes but if you look my printenv output:
>
> rootfs=/dev/sdb7 .
>
> have to type
>
> setenv rootfs <enter>
>
> to remove it. after that booting from usb works.

Ah I see. Cool!

> really have to get u-boot flashed to standard
> version so i can install
> Linux of hdd.

You can flash it in netconsole or in Debian too. But there is always a risk of bricking when you cannot kwboot.

Perhaps you can chainload stock u-boot image. Since the version you are running is also a stock u-boot derivative, chain load might work.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Lacie networkspace 2.
March 12, 2024 01:44AM
I think, i flashed the current using that fvdw-sl-console which automated the process. It used tftp to transfer image to ram first.
Re: Debian on Lacie networkspace 2.
March 12, 2024 08:36AM
Marvell>> setenv rootfs
setenv rootfs
Marvell>> setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10 earlyprintk=serial
setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10 earlyprintk=serial
Marvell>> mw 0x800000 0 1
mw 0x800000 0 1
Marvell>> ext2load ide 0:1 0x800000 /boot/uImage
ext2load ide 0:1 0x800000 /boot/uImage
GPT: skipping last lba check
## Valid EFI partition found ##
GPT: skipping last lba check
## Valid EFI partition found ##

6234132 bytes read
Marvell>> ext2load ide 0:1 0x2100000 /boot/uInitrd
ext2load ide 0:1 0x2100000 /boot/uInitrd
GPT: skipping last lba check
## Valid EFI partition found ##
GPT: skipping last lba check
## Valid EFI partition found ##

5791271 bytes read
Marvell>> bootm 0x800000 0x2100000
bootm 0x800000 0x2100000
## Booting image at 00800000 ...
   Image Name:   Linux-6.5.7-kirkwood-tld-1
   Created:      2024-03-10  19:27:49 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    6234068 Bytes =  5.9 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 02100000 ...
   Image Name:   initramfs-6.5.7-kirkwood-tld-1
   Created:      2023-10-31  22:53:55 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    5791207 Bytes =  5.5 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...


Succesfully booted from hdd.

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



Edited 1 time(s). Last edit at 03/12/2024 01:37PM by bodhi.
Re: Debian on Lacie networkspace 2.
March 12, 2024 01:41PM
Root device root=/dev/sda1 should be used temporarily way to test boot.

Use root=LABEL=rootfs so that it will boot successfully when you boot with multiple drives (SATA, USB,....) attached to the box (only one partition among them should be a rootfs)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Lacie networkspace 2.
March 12, 2024 02:39PM
Yes, was just experimenting. Too bad i cannot set bootargs as i would like to in environment variables because they are hard coded on the u-boot differently. How to test out that u-boot using netconsole? is it even possible?
Re: Debian on Lacie networkspace 2.
March 12, 2024 03:27PM
> Yes, was just experimenting. Too bad i cannot set
> bootargs as i would like to in environment
> variables because they are hard coded on the
> u-boot differently.

You already did set bootargs correctly. That's why you can boot and the kernel can mount the root device using the partition label.
warri@debian:~$ cat /proc/cmdline
console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial

So this is the instruction to boot USB rootfs with stock u-boot in the Wiki

Boot Kirkwood rootfs with stock u-boot
https://forum.doozan.com/read.php?2,102054,105374#msg-105374

setenv usb_set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial'
setenv load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
setenv load_uinitrd 'ext2load usb 0:1 0x2100000 /boot/uInitrd'
setenv usb_boot 'mw 0x800000 0 1; run load_uimage; run load_uinitrd; bootm 0x800000 0x2100000'
setenv usb_bootcmd 'run usb_set_bootargs; run usb_boot'
setenv bootcmd 'usb reset; run usb_bootcmd; usb stop; reset'

Because this u-boot detect the env rootfs and hardcode the bootargs, change the usb_set_bootargs to:
setenv usb_set_bootargs 'setenv rootfs; setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial'

And similarly when you boot with SATA.


> How to test out that u-boot
> using netconsole? is it even possible?

Not sure I understand this question.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Lacie networkspace 2.
March 12, 2024 03:45PM
> > How to test out that u-boot
> > using netconsole? is it even possible?
>
> Not sure I understand this question.

If i compile mainline u-boot for networkspace 2, how to test if it works without serial or flashing?

-a



Edited 1 time(s). Last edit at 03/12/2024 04:00PM by ahuovinen.
Re: Debian on Lacie networkspace 2.
March 12, 2024 04:14PM
> If i compile mainline u-boot for networkspace 2,
> how to test if it works without serial or
> flashing?

I don't think there is any other way to test.

The only remaining way to test without flashing is to chain load u-boot image from u-boot prompt. However, the mainline u-boot has a very different architecture from the old stock u-boot. So chainload will not work in that direction (stock --> modern u-boot).

Chainload is loading another u-boot image from tftp or storage drive to a memory location, and then use the "go" command to jump to that location and execute it.

Chainload an old u-boot such as stock u-boot image while a modern u-boot is running might work (this box is one that should work). But it's not what you need.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Lacie networkspace 2.
March 12, 2024 04:29PM
bodhi Wrote:
-------------------------------------------------------
> > If i compile mainline u-boot for networkspace
> 2,
> > how to test if it works without serial or
> > flashing?
>
> I don't think there is any other way to test.
>
> The only remaining way to test without flashing is
> to chain load u-boot image from u-boot prompt.
> However, the mainline u-boot has a very different
> architecture from the old stock u-boot. So
> chainload will not work in that direction (stock
> --> modern u-boot).
>
> Chainload is loading another u-boot image from
> tftp or storage drive to a memory location, and
> then use the "go" command to jump to that location
> and execute it.
>
> Chainload an old u-boot such as stock u-boot image
> while a modern u-boot is running might work (this
> box is one that should work). But it's not what
> you need.

Darn, maybe i have to desolder the flash chips to program them ;) might be easier with a jtag. There might be a way to do this with arduino
or raspberry pi IIRC . though dont have a pi and all my arduinos are 5v 16mhz.

-a
Re: Debian on Lacie networkspace 2.
March 12, 2024 05:04PM
> Darn, maybe i have to desolder the flash chips to
> program them ;) might be easier with a jtag. There
> might be a way to do this with arduino
> or raspberry pi IIRC . though dont have a pi and
> all my arduinos are 5v 16mhz.

No need to do that drastic step yet.

The next step is to get the mtds definition correct and so Linux can see the MTD partitions (u-boot and envs ).

setenv usb_set_bootargs 'setenv rootfs; setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi0.0:0x80000@0(uboot) earlyprintk=serial'
Boot and check dmesg
dmesg
cat /proc/mtd

Backup the SPI flash mtd0
dd if=/dev/mtd0 of=mtd0.ns2 bs=512k conv=sync

And then build new mainline u-boot.

Now you can flash the new uboot to mtd0 in Debian (blindly without running kwboot). But it it's bricked then use JTAG or desolder-reprogramming.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Lacie networkspace 2.
March 12, 2024 05:12PM
After you see mtd0 detected and listed in Linux.

Modify /etc/fw_env.config
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
/dev/mtd0 0x70000 0x1000 0x1000

And then list the envs
fw_printenv

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Lacie networkspace 2.
March 12, 2024 05:39PM
warri@debian:~$ dmesg
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 6.5.7-kirkwood-tld-1 (root@tldDebian) (gcc (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #2 PREEMPT Wed Oct 18 21:14:11 PDT 2023
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005317f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt: Machine model: LaCie Network Space v2
[    0.000000] printk: bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000000fffffff]
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Kernel command line: console=ttyS0,115200 root=/dev/sda1 rootdelay=10 mtdparts=spi0.0:0x80000@0(uboot) earlyprintk=serial
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 64960
[    0.000000] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000] Memory: 232352K/262144K available (12288K kernel code, 1755K rwdata, 5416K rodata, 1024K init, 301K bss, 29792K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] trace event string verifier disabled
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000]  Trampoline variant of Tasks RCU enabled.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 11467562657 ns
[    0.000003] sched_clock: 32 bits at 167MHz, resolution 6ns, wraps every 12884901885ns
[    0.008570] Switching to timer-based delay loop, resolution 6ns
[    0.016069] Console: colour dummy device 80x30
[    0.021381] Calibrating delay loop (skipped), value calculated using timer frequency.. 333.33 BogoMIPS (lpj=1666666)
[    0.032667] CPU: Testing write buffer coherency: ok
[    0.038447] pid_max: default: 32768 minimum: 301
[    0.057039] LSM: initializing lsm=capability,integrity
[    0.066563] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.074673] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.102185] RCU Tasks: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1.
[    0.110591] RCU Tasks Trace: Setting shift to 0 and lim to 1 rcu_task_cb_adjust=1.
[    0.119656] Setting up static identity map for 0x100000 - 0x100058
[    0.127003] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x2
[    0.133583] rcu: Hierarchical SRCU implementation.
[    0.139208] rcu:     Max phase no-delay instances is 1000.
[    0.149705] devtmpfs: initialized
[    0.167760] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.178547] futex hash table entries: 256 (order: -1, 3072 bytes, linear)
[    0.190464] prandom: seed boundary self test passed
[    0.202848] prandom: 100 self tests passed
[    0.207658] pinctrl core: initialized pinctrl subsystem
[    0.220352] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.228733] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.244524] audit: initializing netlink subsys (disabled)
[    0.253890] thermal_sys: Registered thermal governor 'step_wise'
[    0.254149] audit: type=2000 audit(0.240:1): state=initialized audit_enabled=0 res=1
[    0.269429] cpuidle: using governor ladder
[    0.274355] cpuidle: using governor menu
[    0.280068] Feroceon L2: Enabling L2
[    0.284393] Feroceon L2: Cache support initialised.
[    0.305236] No ATAGs?
[    0.678596] raid6: int32x8  gen()    73 MB/s
[    1.018591] raid6: int32x4  gen()    73 MB/s
[    1.358624] raid6: int32x2  gen()    94 MB/s
[    1.698590] raid6: int32x1  gen()    71 MB/s
[    1.703553] raid6: using algorithm int32x2 gen() 94 MB/s
[    2.058587] raid6: .... xor() 59 MB/s, rmw enabled
[    2.064066] raid6: using intx1 recovery algorithm
[    2.081022] SCSI subsystem initialized
[    2.098756] libata version 3.00 loaded.
[    2.099419] usbcore: registered new interface driver usbfs
[    2.105682] usbcore: registered new interface driver hub
[    2.118689] usbcore: registered new device driver usb
[    2.125000] pps_core: LinuxPPS API ver. 1 registered
[    2.148590] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    2.158435] PTP clock support registered
[    2.182893] vgaarb: loaded
[    2.199642] clocksource: Switched to clocksource orion_clocksource
[    2.230645] VFS: Disk quotas dquot_6.6.0
[    2.235901] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    2.298736] NET: Registered PF_INET protocol family
[    2.320134] IP idents hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    2.341553] tcp_listen_portaddr_hash hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    2.360056] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    2.368515] TCP established hash table entries: 2048 (order: 1, 8192 bytes, linear)
[    2.389730] TCP bind hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    2.397608] TCP: Hash tables configured (established 2048 bind 2048)
[    2.420734] MPTCP token hash table entries: 512 (order: 0, 6144 bytes, linear)
[    2.428984] UDP hash table entries: 256 (order: 0, 4096 bytes, linear)
[    2.459705] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes, linear)
[    2.468657] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    2.491274] RPC: Registered named UNIX socket transport module.
[    2.497889] RPC: Registered udp transport module.
[    2.509677] RPC: Registered tcp transport module.
[    2.515073] RPC: Registered tcp-with-tls transport module.
[    2.539672] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    2.546814] PCI: CLS 0 bytes, default 32
[    2.564146] Trying to unpack rootfs image as initramfs...
[    4.028169] Freeing initrd memory: 5656K
[    5.877143] Initialise system trusted keyrings
[    5.884132] Key type blacklist registered
[    5.889383] workingset: timestamp_bits=14 max_order=16 bucket_order=2
[    5.896907] zbud: loaded
[    5.929038] NFS: Registering the id_resolver key type
[    5.934927] Key type id_resolver registered
[    5.939831] Key type id_legacy registered
[    5.944808] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    5.952236] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    5.962767] jffs2: version 2.2. (NAND) (SUMMARY)  \xc2\xa9 2001-2006 Red Hat, Inc.
[    5.971968] fuse: init (API version 7.38)
[    5.978815] orangefs_debugfs_init: called with debug mask: :none: :0:
[    5.986540] orangefs_init: module version upstream loaded
[    5.993266] SGI XFS with ACLs, security attributes, realtime, scrub, quota, no debug enabled
[    6.319829] xor: measuring software checksum speed
[    6.338666]    arm4regs        :   745 MB/sec
[    6.365773]    8regs           :   447 MB/sec
[    6.386364]    32regs          :   634 MB/sec
[    6.391435] xor: using function: arm4regs (745 MB/sec)
[    6.397269] async_tx: api initialized (async)
[    6.402347] Key type asymmetric registered
[    6.407128] Asymmetric key parser 'x509' registered
[    6.488690] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[    6.497618] io scheduler bfq registered
[    6.785979] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    6.796533] gpio gpiochip0: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    6.808223] gpio gpiochip1: Static allocation of GPIO base is deprecated, use dynamic allocation.
[    6.820391] mv_xor f1060800.xor: Marvell shared XOR driver
[    6.903653] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    6.919057] mv_xor f1060900.xor: Marvell shared XOR driver
[    7.003657] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    7.019761] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    7.030791] printk: console [ttyS0] disabled
[    7.036751] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 27, base_baud = 10416666) is a 16550A
[    7.046587] printk: console [ttyS0] enabled
[    7.056398] printk: bootconsole [earlycon0] disabled
[    7.110377] loop: module loaded
[    7.114827] sata_mv f1080000.sata: version 1.28
[    7.115531] sata_mv f1080000.sata: slots 32 ports 1
[    7.125406] scsi host0: sata_mv
[    7.131001] ata1: SATA max UDMA/133 irq 28
[    7.139740] spi-nor spi0.0: mx25l4005a (512 Kbytes)
[    7.145448] 1 cmdlinepart partitions found on MTD device spi0.0
[    7.152119] Creating 1 MTD partitions on "spi0.0":
[    7.157662] 0x000000000000-0x000000080000 : "uboot"
[    7.165611] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    7.174181] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[    7.224303] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    7.629702] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    7.941671] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:d0:4b:8b:89:da
[    7.952201] orion-ehci f1050000.ehci: EHCI Host Controller
[    7.958497] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    7.967318] orion-ehci f1050000.ehci: irq 31, io mem 0xf1050000
[    7.999693] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    8.006878] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 6.05
[    8.015999] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    8.024023] ata1.00: ATA-8: WDC WD10EARS-22Y5B1, 80.00A80, max UDMA/133
[    8.031372] usb usb1: Product: EHCI Host Controller
[    8.036944] usb usb1: Manufacturer: Linux 6.5.7-kirkwood-tld-1 ehci_hcd
[    8.044277] ata1.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    8.051987] usb usb1: SerialNumber: f1050000.ehci
[    8.059296] hub 1-0:1.0: USB hub found
[    8.064215] hub 1-0:1.0: 1 port detected
[    8.068961] ata1.00: configured for UDMA/133
[    8.075530] usbcore: registered new interface driver usb-storage
[    8.083283] mousedev: PS/2 mouse device common for all mice
[    8.092036] rtc-mv f1010300.rtc: registered as rtc0
[    8.098503] scsi 0:0:0:0: Direct-Access     ATA      WDC WD10EARS-22Y 0A80 PQ: 0 ANSI: 5
[    8.108242] rtc-mv f1010300.rtc: setting system clock to 2024-03-12T22:33:18 UTC (1710282798)
[    8.120085] sd 0:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
[    8.128442] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    8.135456] i2c_dev: i2c /dev entries driver
[    8.144343] device-mapper: uevent: version 1.0.3
[    8.149964] sd 0:0:0:0: [sda] Write Protect is off
[    8.155459] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    8.155613] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    8.166278] device-mapper: ioctl: 4.48.0-ioctl (2023-03-01) initialised: dm-devel@redhat.com
[    8.176650] sd 0:0:0:0: [sda] Preferred minimum I/O size 4096 bytes
[    8.183765] device-mapper: multipath round-robin: version 1.2.0 loaded
[    8.191058] device-mapper: multipath queue-length: version 0.2.0 loaded
[    8.198350] device-mapper: multipath service-time: version 0.3.0 loaded
[    8.208939] device-mapper: dm-log-userspace: version 1.3.0 loaded
[    8.218409] ledtrig-cpu: registered to indicate activity on CPUs
[    8.225355] hid: raw HID events driver (C) Jiri Kosina
[    8.232930] drop_monitor: Initializing network drop monitor service
[    8.242342] NET: Registered PF_INET6 protocol family
[    8.251712] Segment Routing with IPv6
[    8.256079] RPL Segment Routing with IPv6
[    8.261526] In-situ OAM (IOAM) with IPv6
[    8.266389] NET: Registered PF_PACKET protocol family
[    8.273573]  sda: sda1
[    8.277603] sd 0:0:0:0: [sda] Attached SCSI disk
[    8.283242] Key type dns_resolver registered
[    8.318096] registered taskstats version 1
[    8.323289] Loading compiled-in X.509 certificates
[    8.362969] Key type .fscrypt registered
[    8.367617] Key type fscrypt-provisioning registered
[    8.384187] Key type big_key registered
[    8.456563] Key type encrypted registered
[    8.622935] "cryptomgr_test" (102) uses obsolete ecb(arc4) skcipher
[   12.122971] clk: Disabling unused clocks
[   12.132750] Freeing unused kernel image (initmem) memory: 1024K
[   12.150900] Checked W+X mappings: passed, no W+X pages found
[   12.157270] Run /init as init process
[   12.161711]   with arguments:
[   12.161731]     /init
[   12.161746]   with environment:
[   12.161759]     HOME=/
[   12.161772]     TERM=linux
[   38.949733] random: crng init done
[   46.109973] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[   48.256785] EXT4-fs (sda1): mounted filesystem b8f99368-eb92-4388-ab3c-8ec8316b270f ro with ordered data mode. Quota mode: none.
[   53.620788] input: gpio_keys as /devices/platform/gpio_keys/input/input0
[   53.992657] at24 0-0050: supply vcc not found, using dummy regulator
[   54.100951] at24 0-0050: 512 byte 24c04 EEPROM, writable, 16 bytes/write
[   54.118763] orion_wdt: Initial timeout 25 sec
[   54.594598] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   55.261747] marvell-cesa f1030000.crypto: CESA device successfully registered
[   57.970057] EXT4-fs (sda1): re-mounted b8f99368-eb92-4388-ab3c-8ec8316b270f r/w. Quota mode: none.
[   76.562351] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled

warri@debian:~$ cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00080000 00001000 "uboot"

root@debian:/home/warri# fw_printenv
Cannot read environment, using default
Cannot read default environment from file

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



Edited 1 time(s). Last edit at 03/12/2024 05:40PM by ahuovinen.
Re: Debian on Lacie networkspace 2.
March 12, 2024 05:47PM
> root@debian:/home/warri# cat /etc/fw_env.config
> # MTD device name Device offset Env. size
> Flash sector size Number of sectors
> #/dev/mtd0 0xc0000 0x20000 0x20000
> /dev/mtd0 0x70000 0x1000 0x1000

I missed one zero, 6KB = 0x10000

cat /etc/fw_env.config
/dev/mtd0 0x70000 0x10000 0x1000

But this u-boot seems to use only 4K envs
Environment size: 2756/4092 bytes

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



Edited 1 time(s). Last edit at 03/12/2024 05:50PM by bodhi.
Re: Debian on Lacie networkspace 2.
March 12, 2024 05:54PM
After dumping u-boot as described above, use hexedit to find the localtion in the image file mtd0.ns2, see if it is really 0x70000.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Lacie networkspace 2.
March 12, 2024 05:55PM
root@debian:~# nano /etc/fw_env.config
root@debian:~# fw_printenv
Cannot read environment, using default
Cannot read default environment from file
root@debian:~# cat /etc/fw_env.config
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors
#/dev/mtd0 0xc0000 0x20000 0x20000
/dev/mtd0               0x70000         0x10000         0x1000

do i need a reboot between the editing and fw_printenv?

-a
Re: Debian on Lacie networkspace 2.
March 12, 2024 06:33PM
> do i need a reboot between the editing and
> fw_printenv?

No need to.

Check dmesg

dmesg | grep -i2 spi
[    7.139740] spi-nor spi0.0: mx25l4005a (512 Kbytes)
[    7.145448] 1 cmdlinepart partitions found on MTD device spi0.0
[    7.152119] Creating 1 MTD partitions on "spi0.0":
[    7.157662] 0x000000000000-0x000000080000 : "uboot"

Check mtd

cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00080000 00001000 "uboot"

And then, try 4KB size and sector size 64KB
# MTD device name       Device offset   Env. size       Flash sector size       Number of sectors

/dev/mtd0 0x70000 0x1000 0x10000

Remember you have to be root while doing this (which I saw was true).

====

Of course there is also a chance that the envs location was moved by the modified u-boot.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Lacie networkspace 2.
March 12, 2024 06:39PM
bodhi Wrote:
-------------------------------------------------------
> > do i need a reboot between the editing and
> > fw_printenv?
>
> No need to.
>
> Check dmesg
>
> dmesg | grep -i2 spi
>
> [    7.139740] spi-nor spi0.0: mx25l4005a (512
> Kbytes)
> [    7.145448] 1 cmdlinepart partitions found on
> MTD device spi0.0
> [    7.152119] Creating 1 MTD partitions on
> "spi0.0":
> [    7.157662] 0x000000000000-0x000000080000 :
> "uboot"
>


[    7.125355] scsi host0: sata_mv
[    7.130941] ata1: SATA max UDMA/133 irq 28
[    7.139597] spi-nor spi0.0: mx25l4005a (512 Kbytes)
[    7.145388] 1 cmdlinepart partitions found on MTD device spi0.0
[    7.152066] Creating 1 MTD partitions on "spi0.0":
[    7.157610] 0x000000000000-0x000000080000 : "uboot"
[    7.165554] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.

> Check mtd
>
> cat /proc/mtd
>
> dev:    size   erasesize  name
> mtd0: 00080000 00001000 "uboot"
>

root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00080000 00001000 "uboot"

>
> And then, try 4KB size and sector size 64KB
>
> # MTD device name       Device offset   Env. size 
>      Flash sector size       Number of sectors
> 
> /dev/mtd0 0x70000 0x1000 0x10000
>
>
> Remember you have to be root while doing this
> (which I saw was true).

location is different for the envs.. that you mentioned was all empty. its much before.
Re: Debian on Lacie networkspace 2.
March 12, 2024 06:46PM
0004A4B0 61 72 67 65 74 20 00 76 78 57 6F 72 6B 73 5F 62 6F 6F 74 61 72 67 73 00 62 6F 6F 74 61 72 67 73 5F 72 6F 6F 74 00 72 6F 6F 74 3D 2F 64 65 76 2F 6E 66 73 20 arget .vxWorks_bootargs.bootargs_root.root=/dev/nfs
0004A4E4 72 77 00 62 6F 6F 74 61 72 67 73 5F 65 6E 64 00 3A 3A 3A 6F 72 69 6F 6E 3A 65 74 68 30 3A 6E 6F 6E 65 00 3A 3A 3A 44 42 38 38 46 58 58 38 31 3A 65 74 68 30 rw.bootargs_end.:::orion:eth0:none.:::DB88FXX81:eth0
0004A518 3A 6E 6F 6E 65 00 69 6D 61 67 65 5F 6E 61 6D 65 00 74 66 74 70 62 6F 6F 74 20 30 78 32 30 30 30 30 30 30 20 24 28 69 6D 61 67 65 5F 6E 61 6D 65 29 3B 73 65 :none.image_name.tftpboot 0x2000000 $(image_name);se
0
Re: Debian on Lacie networkspace 2.
March 12, 2024 07:14PM
Quote
bodhi
Of course there is also a chance that the envs location was moved by the modified u-boot.

Quote
a
location is different for the envs.. that you mentioned was all empty. its much before.

It can also be that the modified u-boot doesn't store the envs on flash at all. They instead specified them internally in the code.

Use hexedit to load the mtd0 dump and search for "start_netconsole". If you see there are more envs after and some non-zeros before, then that means the envs are only exist in the code. If there are zeros before that group of envs, then perhaps envs are in flash but at a different location. Try to figure out the hex address of the beginning.

You can also upload the mtd0 dump here so I can help viewing it.

Mainline u-boot usually reuses stock definition re envs location. And it is 0x70000. If there is nothing or very small set of envs then this modified u-boot does not store them on flash.

=====

But we don't really care much. You can set envs in u-boot.

We just need mtd0 exposed in Debian, so you can flash original stock u-boot or mainline u-boot. And that's possible now.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Lacie networkspace 2.
March 13, 2024 01:33AM
i think the envs start at 0x7e000 -> i changed that and fw_printenv started working.
Yes, there are thos few variables i personally added. though there are also some variables
i cant change using u-boot console.

-a
Re: Debian on Lacie networkspace 2.
March 13, 2024 05:37AM
Ok, FINALLY got a working connectorthingy

Marvell>> reset
           _           ____ _
          | |    __ _ / ___(_) ___
          | |   / _` | |   | |/ _ \
          | |___ (_| | |___| |  __/
          |_____\__,_|\____|_|\___|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__| fvdw vs80
 ** LOADER **
 ** MARVELL BOARD: ASTON_NS LE
Hold rear button - long :  FAIL


U-Boot 1.1.4 (Jan  7 2013 - 21:15:04) Marvell version: 3.4.16  LaCie 1.3.9 256MB fvdw gpt usbboot vs80

U-Boot code: 00600000 -> 006701D0  BSS: -> 006BDAE0

Soc: 88F6281 A0 (DDR2)
CPU running @ 800Mhz L2 running @ 400Mhz
SysClock = 200Mhz , TClock = 166Mhz

DRAM CAS Latency = 3 tRP = 3 tRAS = 9 tRCD=3
DRAM CS[0] base 0x00000000   size 256MB
DRAM Total size 256MB  16bit width
[512kB@f8000000] Flash: 512 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done

CPU : Marvell Feroceon (Rev 1)
.
Un-Protected 1 sectors
Erasing Flash...
.
Erased 1 sectors
Writing to Flash... done
.
Protected 1 sectors

Streaming disabled
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME]
egiga0 no link
Waiting for LUMP (3)
no lump receive; continuing
Hit any key to stop autoboot:  0

Reset IDE:
Marvell Serial ATA Adapter
Integrated Sata device found


** Device 0 not available

** Device 1 not available

** Device 0 not available

** Device 1 not available
## Booting image at 00800000 ...
Bad Magic Number
egiga0 no link
Waiting for LUMP (0)

no hdd installed at the moment. seems like it erases and rewrites environment variables at every boot?

or atleast something.....
Re: Debian on Lacie networkspace 2.
March 13, 2024 07:23AM
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: