Welcome! Log In Create A New Profile

Advanced

Debian on Netgear RN102

Posted by whitepawn 
Re: Debian on Netgear RN102
September 09, 2020 08:05PM
whitepawn,

What is the SPI chip model?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
tme
Re: Debian on Netgear RN102
September 10, 2020 02:28AM
Hi bodhi,

Quote

What is the SPI chip model?

You may find out by studying the PCB pictures here. Please share your findings.

Btw, do you know the current status of PaX/grsec and NX bit support mentioned on that web page and discussed in detail here for ReadyNAS Duo v2.

Regards,
Trond Melen
Re: Debian on Netgear RN102
September 10, 2020 04:06AM
Trond,

This RN102 does not have SPI flash. whitepawn added it as a hardware mod.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Netgear RN102
September 10, 2020 04:09AM
> Btw, do you know the current status of PaX/grsec
> and NX bit support mentioned on that web page and
> discussed in detail
> here
> for ReadyNAS Duo v2.

I don't have any idea about the above subject.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Netgear RN102
September 10, 2020 04:42AM
bodhi Wrote:
-------------------------------------------------------
> whitepawn,
>
> What is the SPI chip model?


Bodhi,
It's a spansion FL032PIF this was just on my scrapyard which was removed from Tplink 703N.I have soldered it for testing purposes.This flash is 32 Megabit which is 4 Megabytes only but i have also 128 megabit chip which is in my Tplink MR3020.I can solder 16 Megabyte one if it matters.My first idea was putting bootloader and envs to SPI flash and boot kernel and rootfs from NAND device.Since our bootloader has no SPI function in it, this idea is impossible without U-Boot GPL code.

I have tested your pristine kernel and rootfs instructions on a fresh usb drive they work fine btw.

Still can't cure USB problem on longterm(2-3 hours), i have ordered new old stock USB drives.Will post results.I am pretty sure this is a problem related with my USB drives.
Since this USB reseting stuff irritates me i am bulilding a NAND programmer for later NAND upgrades on this device.I have Micron 29f32g08cbaca and Samsung k9gbg08u0a NAND chips 32Gigabit=4Gigabytes on my hands which i salvaged from an allwinner A13 tablet.Before removing stock NAND chip i have to program new ones with u-boot and envs for minimum config.

Also RAM amount is not satisfied me (with OMV and some stuff it is nearly 80 percent) which i also ordered DDR3 stencils for reballing RAM chips.I have many old graphics card ram which i will investigate chip pin assignment, working frequency, bits and banks etc.What is the maximum amount of memory this CPU supports?
Regards.
Re: Debian on Netgear RN102
September 10, 2020 05:29AM
whitepawn,

> It's a spansion FL032PIF this was just on my
> scrapyard which was removed from Tplink 703N.I
> have soldered it for testing purposes.This flash
> is 32 Megabit which is 4 Megabytes only but i have
> also 128 megabit chip which is in my Tplink
> MR3020.I can solder 16 Megabyte one if it
> matters.My first idea was putting bootloader and
> envs to SPI flash and boot kernel and rootfs from
> NAND device.Since our bootloader has no SPI
> function in it, this idea is impossible without
> U-Boot GPL code.

I thought since you already soldered the SPI flash, we could try to test it with a modified DTS to see if the kernel initializes it . But that is just an execise (without new u-boot with SPI capabilty we can do much). But it would be fun to see it works!

>
> I have tested your pristine kernel and rootfs
> instructions on a fresh usb drive they work fine
> btw.

Cool!

> Also RAM amount is not satisfied me (with OMV and
> some stuff it is nearly 80 percent) which i also
> ordered DDR3 stencils for reballing RAM chips.I
> have many old graphics card ram which i will
> investigate chip pin assignment, working
> frequency, bits and banks etc.What is the maximum
> amount of memory this CPU supports?

This SoC is ARMv7 (32-bit). And I configured the kernel with HIGHMEM so it should be OK using 4GB RAM.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
tme
Re: Debian on Netgear RN102
September 10, 2020 05:40AM
Quote
bodhi
This RN102 does not have SPI flash. whitepawn added it as a hardware mod.

I see. I thought the mod was to be able to spy on the USB resets. My mistake.

Regards,
Trond Melen
Re: Debian on Netgear RN102
September 10, 2020 06:04AM
Bodhi,
It will be a good execise please share DTS with instructions and i will try with both 4mb and 16mb spi flashes.

Maybe i can use this device to program SPI flashes:)(joking)

Also another question for these tablet pcb boards and NAND flashes i have, i was have a serial connection and i saw u-boot booting android maybe i can write netgear uboot to new NAND (old tablet NAND) with allwinner before removing and soldering new NAND to netgear.This may be a workaround not using NAND programer.
I know when i flash netgear u-boot to new nand i have only one shot because allwinner will not be able to boot again.
Re: Debian on Netgear RN102
September 10, 2020 08:35AM
if you define your device-tree entry for the spi bus as compatible with spi-dev the flashrom utility will be able to program whatever is attached to it. I did this once while I was testing something. You could solder on a ZIF socket (or a header to connect to a breadboard or something) and fairly easily user it as a programmer.
Re: Debian on Netgear RN102
September 10, 2020 07:30PM
@whitepawn,

Sure. So it is spansion FL032PIF.

Let me modify the DTS and recompile it.

Regarding NAND, the better approach is to run kwboot to boot up this box.

@all,

I don't recall whitepawn or Trond mentioned if you can find the u-boot image in the new stock FW version? The idea is to use kwboot to load a different version of this u-boot so we know this rescue mechanism works.

If you can't find such binary, you can also nanddump mtd0 to a file, and then try kwboot to load it and see if the loading finishes and u-boot starts running. With the mtd0 u-boot we will not be able to tell if the image running is the one in RAM or from NAND :) however, the fact that kwboot can load the image to completion, good chance is that this rescue does work.

To be able to kwboot would save a lot of works when you replace RAM, NAND, or adding SPI flash. And know that the box will be almost unbrickable (as long as the serial port is OK).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Netgear RN102
September 11, 2020 05:48AM
whitepawn,

First try, to see if the kernel recognizes the SPI chip.

The attached tarball contains the DTB and DTS with SPI flash defintion.

- Back up your current DTB, extract the DTB file from this V1 version.

cd /boot/dts
cp -a  armada-370-netgear-rn102.dtb armada-370-netgear-rn102.dtb.orig 
tar xf armada-370-netgear-rn102-spi-v1.tar

- And remake the uImage like you did when you install the kernel.

cd /boot
cp -a uImage uImage.RN102.bak

cp -a zImage-5.8.5-mvebu-370xp-tld-1 zImage.fdt 
cat dts/armada-370-netgear-rn102.dtb >> zImage.fdt 
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.8.5-mvebu-370xp-tld-1 -d zImage.fdt uImage
sync

Reboot.

And please post the serial console log here.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Attachments:
open | download - armada-370-netgear-rn102-spi-v1.tar (30 KB)
Re: Debian on Netgear RN102
September 11, 2020 01:29PM
Hi bodhi,
Thank you for instructions.
Here is the bootlog:

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 5.8.5-mvebu-370xp-tld-1 (root@tldDebianVM) (arm-linux-gnueabihf-gcc (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0, GNU ld (GNU Binutils for Ubuntu) 2.30) #1.0 SMP PREEMPT Mon Aug 31 00:00:32 PDT 2020
[    0.000000] CPU: ARMv7 Processor [561f5811] revision 1 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
[    0.000000] OF: fdt: Machine model: NETGEAR ReadyNAS 102
[    0.000000] printk: bootconsole [earlycon0] enabled
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000]   HighMem  empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x000000001fffffff]
[    0.000000] On node 0 totalpages: 131072
[    0.000000]   Normal zone: 1024 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 131072 pages, LIFO batch:31
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] percpu: Embedded 20 pages/cpu s53068 r8192 d20660 u81920
[    0.000000] pcpu-alloc: s53068 r8192 d20660 u81920 alloc=20*4096
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=pxa3xx_nand-0:0x180000@0(u-boot),0x20000@0x180000(u-boot-env),0x600000@0x200000(uImage),0x400000@0x800000(minirootfs),-(ubifs) earlyprintk=serial init=/bin/systemd mtdparts=pxa3xx_nand-0:0x180000@0(u-boot),0x20000@0x180000(u-boot-env),0x600000@0x200000(uImage),0x400000@0x800000(minirootfs),-(ubifs) reason=normal bdtype=rn102
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:on, heap free:off
[    0.000000] Memory: 493536K/524288K available (10240K kernel code, 1012K rwdata, 3072K rodata, 1024K init, 342K bss, 30752K reserved, 0K cma-reserved, 0K highmem)
[    0.000000] random: get_random_u32 called from ____cache_alloc+0x338/0x794 with crng_init=0
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu: 	RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=1.
[    0.000000] 	Trampoline variant of Tasks RCU enabled.
[    0.000000] 	Rude variant of Tasks RCU enabled.
[    0.000000] 	Tracing variant of Tasks RCU enabled.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[    0.000000] L2C: DT/platform modifies aux control register: 0x12086300 -> 0x1a086302
[    0.000000] Aurora cache controller enabled, 4 ways, 256 kB
[    0.000000] Aurora: CACHE_ID 0x00000100, AUX_CTRL 0x1a086302
[    0.000000] Switching to timer-based delay loop, resolution 53ns
[    0.000006] sched_clock: 32 bits at 18MHz, resolution 53ns, wraps every 114537122277ns
[    0.007874] clocksource: armada_370_xp_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 101938038664 ns
[    0.019299] Console: colour dummy device 80x30
[    0.024017] Calibrating delay loop (skipped), value calculated using timer frequency.. 37.49 BogoMIPS (lpj=187492)
[    0.034147] pid_max: default: 32768 minimum: 301
[    0.039212] LSM: Security Framework initializing
[    0.044158] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.051487] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[    0.060291] CPU: Testing write buffer coherency: ok
[    0.065733] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[    0.072063] Setting up static identity map for 0x100000 - 0x100060
[    0.078756] mvebu-soc-id: MVEBU SoC ID=0x6710, Rev=0x1
[    0.084190] mvebu-pmsu: Initializing Power Management Service Unit
[    0.090714] rcu: Hierarchical SRCU implementation.
[    0.098538] smp: Bringing up secondary CPUs ...
[    0.103420] smp: Brought up 1 node, 1 CPU
[    0.107715] SMP: Total of 1 processors activated (37.49 BogoMIPS).
[    0.114044] CPU: All CPU(s) started in SVC mode.
[    0.119586] devtmpfs: initialized
[    0.128249] VFP support v0.3: implementor 56 architecture 2 part 20 variant 9 rev 6
[    0.137165] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.146936] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[    0.154156] xor: measuring software checksum speed
[    0.258576]    arm4regs  :  1103.200 MB/sec
[    0.358572]    8regs     :   671.200 MB/sec
[    0.458567]    32regs    :  1062.400 MB/sec
[    0.463021] xor: using function: arm4regs (1103.200 MB/sec)
[    0.468785] prandom: seed boundary self test passed
[    0.477388] prandom: 100 self tests passed
[    0.481802] pinctrl core: initialized pinctrl subsystem
[    0.488919] thermal_sys: Registered thermal governor 'step_wise'
[    0.489670] NET: Registered protocol family 16
[    0.502547] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.510436] audit: initializing netlink subsys (disabled)
[    0.516409] audit: type=2000 audit(0.490:1): state=initialized audit_enabled=0 res=1
[    0.526695] cpuidle: using governor ladder
[    0.532716] cpuidle: using governor menu
[    0.537230] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.809652] raid6: int32x8  gen()   214 MB/s
[    0.979006] raid6: int32x8  xor()   135 MB/s
[    1.148664] raid6: int32x4  gen()   224 MB/s
[    1.318710] raid6: int32x4  xor()   151 MB/s
[    1.488576] raid6: int32x2  gen()   414 MB/s
[    1.658566] raid6: int32x2  xor()   217 MB/s
[    1.828602] raid6: int32x1  gen()   430 MB/s
[    1.998588] raid6: int32x1  xor()   201 MB/s
[    2.003120] raid6: using algorithm int32x1 gen() 430 MB/s
[    2.008692] raid6: .... xor() 201 MB/s, rmw enabled
[    2.013777] raid6: using intx1 recovery algorithm
[    2.020113] vgaarb: loaded
[    2.025071] SCSI subsystem initialized
[    2.029994] libata version 3.00 loaded.
[    2.030326] usbcore: registered new interface driver usbfs
[    2.036026] usbcore: registered new interface driver hub
[    2.043211] usbcore: registered new device driver usb
[    2.049906] mc: Linux media interface: v0.10
[    2.055305] videodev: Linux video capture interface: v2.00
[    2.061825] pps_core: LinuxPPS API ver. 1 registered
[    2.066994] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    2.076728] PTP clock support registered
[    2.084564] clocksource: Switched to clocksource armada_370_xp_clocksource
[    3.073465] VFS: Disk quotas dquot_6.6.0
[    3.077849] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    3.112307] NET: Registered protocol family 2
[    3.119951] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[    3.128607] TCP established hash table entries: 4096 (order: 2, 16384 bytes, linear)
[    3.136653] TCP bind hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    3.143843] TCP: Hash tables configured (established 4096 bind 4096)
[    3.150948] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[    3.157758] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[    3.164995] NET: Registered protocol family 1
[    3.170371] RPC: Registered named UNIX socket transport module.
[    3.176512] RPC: Registered udp transport module.
[    3.181440] RPC: Registered tcp transport module.
[    3.186388] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    3.192906] PCI: CLS 0 bytes, default 64
[    3.197530] Trying to unpack rootfs image as initramfs...
[    3.820002] Freeing initrd memory: 9352K
[    3.824529] NetWinder Floating Point Emulator V0.97 (double precision)
[    3.831475] hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
[    3.842482] Initialise system trusted keyrings
[    3.849286] Key type blacklist registered
[    3.853818] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[    3.860639] zbud: loaded
[    3.865526] NFS: Registering the id_resolver key type
[    3.870797] Key type id_resolver registered
[    3.875503] Key type id_legacy registered
[    3.879819] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    3.886728] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    3.893477] jffs2: version 2.2. (NAND) (SUMMARY)  \xc2\xa9 2001-2006 Red Hat, Inc.
[    3.901751] orangefs_debugfs_init: called with debug mask: :none: :0:
[    3.908707] orangefs_init: module version upstream loaded
[    3.986070] async_tx: api initialized (async)
[    3.990715] Key type asymmetric registered
[    3.995167] Asymmetric key parser 'x509' registered
[    4.000621] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 243)
[    4.008251] io scheduler bfq registered
[    4.015425] armada-370-pinctrl d0018000.pin-ctrl: registered pinctrl driver
[    4.032279] mvebu-pcie soc:pcie@82000000: PCI host bridge to bus 0000:00
[    4.039671] pci_bus 0000:00: root bus resource [bus 00-ff]
[    4.045680] pci_bus 0000:00: root bus resource [mem 0xf8000000-0xffdfffff]
[    4.052594] pci_bus 0000:00: root bus resource [io  0x1000-0xeffff]
[    4.059126] pci_bus 0000:00: scanning bus
[    4.059278] pci 0000:00:01.0: [11ab:6710] type 01 class 0x060400
[    4.065506] pci 0000:00:01.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    4.072850] pci 0000:00:02.0: [11ab:6710] type 01 class 0x060400
[    4.079219] pci 0000:00:02.0: reg 0x38: [mem 0x00000000-0x000007ff pref]
[    4.087528] pci_bus 0000:00: fixups for bus
[    4.087548] PCI: bus0: Fast back to back transfers disabled
[    4.093277] pci 0000:00:01.0: scanning [bus 00-00] behind bridge, pass 0
[    4.093285] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    4.101469] pci 0000:00:02.0: scanning [bus 00-00] behind bridge, pass 0
[    4.101478] pci 0000:00:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    4.109566] pci 0000:00:01.0: scanning [bus 00-00] behind bridge, pass 1
[    4.109885] pci_bus 0000:01: scanning bus
[    4.109935] pci 0000:01:00.0: [1b4b:9170] type 00 class 0x010601
[    4.116320] pci 0000:01:00.0: reg 0x10: [io  0xfffffff8-0xffffffff]
[    4.122688] pci 0000:01:00.0: reg 0x14: [io  0xfffffffc-0xffffffff]
[    4.129159] pci 0000:01:00.0: reg 0x18: [io  0xfffffff8-0xffffffff]
[    4.135619] pci 0000:01:00.0: reg 0x1c: [io  0xfffffffc-0xffffffff]
[    4.141983] pci 0000:01:00.0: reg 0x20: [io  0xfffffff0-0xffffffff]
[    4.148405] pci 0000:01:00.0: reg 0x24: [mem 0x40000000-0x400001ff]
[    4.154831] pci 0000:01:00.0: reg 0x30: [mem 0xd0000000-0xd000ffff pref]
[    4.161605] pci 0000:01:00.0: Enabling fixed DMA alias to 00.1
[    4.167674] pci 0000:01:00.0: PME# supported from D3hot
[    4.173084] pci 0000:01:00.0: PME# disabled
[    4.173538] pci 0000:00:01.0: ASPM: current common clock configuration is inconsistent, reconfiguring
[    4.205653] pci_bus 0000:01: fixups for bus
[    4.205668] PCI: bus1: Fast back to back transfers disabled
[    4.211394] pci_bus 0000:01: bus scan returning with max=01
[    4.211407] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    4.218163] pci 0000:00:02.0: scanning [bus 00-00] behind bridge, pass 1
[    4.218481] pci_bus 0000:02: scanning bus
[    4.218522] pci 0000:02:00.0: [1b73:1009] type 00 class 0x0c0330
[    4.224875] pci 0000:02:00.0: reg 0x10: [mem 0x42000000-0x4200ffff 64bit]
[    4.231722] pci 0000:02:00.0: reg 0x18: [mem 0x42010000-0x42010fff 64bit]
[    4.238669] pci 0000:02:00.0: reg 0x20: [mem 0x42011000-0x42011fff 64bit]
[    4.245669] pci 0000:02:00.0: supports D1
[    4.249968] pci 0000:02:00.0: PME# supported from D0 D1 D3hot D3cold
[    4.256466] pci 0000:02:00.0: PME# disabled
[    4.256909] pci 0000:00:02.0: ASPM: current common clock configuration is inconsistent, reconfiguring
[    4.295651] pci_bus 0000:02: fixups for bus
[    4.295666] PCI: bus2: Fast back to back transfers disabled
[    4.301392] pci_bus 0000:02: bus scan returning with max=02
[    4.301404] pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 02
[    4.308157] pci_bus 0000:00: bus scan returning with max=02
[    4.308229] pci 0000:00:01.0: BAR 14: assigned [mem 0xf8000000-0xf80fffff]
[    4.315203] pci 0000:00:02.0: BAR 14: assigned [mem 0xf8100000-0xf81fffff]
[    4.322116] pci 0000:00:01.0: BAR 13: assigned [io  0x10000-0x10fff]
[    4.328603] pci 0000:00:01.0: BAR 6: assigned [mem 0xf8200000-0xf82007ff pref]
[    4.335858] pci 0000:00:02.0: BAR 6: assigned [mem 0xf8300000-0xf83007ff pref]
[    4.343097] pci 0000:01:00.0: BAR 6: assigned [mem 0xf8000000-0xf800ffff pref]
[    4.350346] pci 0000:01:00.0: BAR 5: assigned [mem 0xf8010000-0xf80101ff]
[    4.357200] pci 0000:01:00.0: BAR 4: assigned [io  0x10000-0x1000f]
[    4.363560] pci 0000:01:00.0: BAR 0: assigned [io  0x10010-0x10017]
[    4.369937] pci 0000:01:00.0: BAR 2: assigned [io  0x10018-0x1001f]
[    4.376314] pci 0000:01:00.0: BAR 1: assigned [io  0x10020-0x10023]
[    4.382674] pci 0000:01:00.0: BAR 3: assigned [io  0x10024-0x10027]
[    4.389051] pci 0000:00:01.0: PCI bridge to [bus 01]
[    4.394220] pci 0000:00:01.0:   bridge window [io  0x10000-0x10fff]
[    4.400596] pci 0000:00:01.0:   bridge window [mem 0xf8000000-0xf80fffff]
[    4.407455] pci 0000:02:00.0: BAR 0: assigned [mem 0xf8100000-0xf810ffff 64bit]
[    4.414790] pci 0000:02:00.0: BAR 2: assigned [mem 0xf8110000-0xf8110fff 64bit]
[    4.422106] pci 0000:02:00.0: BAR 4: assigned [mem 0xf8111000-0xf8111fff 64bit]
[    4.429437] pci 0000:00:02.0: PCI bridge to [bus 02]
[    4.434625] pci 0000:00:02.0:   bridge window [mem 0xf8100000-0xf81fffff]
[    4.441558] pcieport 0000:00:01.0: assign IRQ: got 0
[    4.441576] pcieport 0000:00:01.0: enabling device (0140 -> 0143)
[    4.447821] pcieport 0000:00:01.0: enabling bus mastering
[    4.447907] pcieport 0000:00:02.0: assign IRQ: got 0
[    4.447921] pcieport 0000:00:02.0: enabling device (0140 -> 0142)
[    4.454128] pcieport 0000:00:02.0: enabling bus mastering
[    4.454180] pci 0000:00:02.0: enabling bus mastering
[    4.455419] mv_xor d0060800.xor: Marvell shared XOR driver
[    4.525960] mv_xor d0060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    4.536974] mv_xor d0060900.xor: Marvell shared XOR driver
[    4.605967] mv_xor d0060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    4.812349] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    4.823480] printk: console [ttyS0] disabled
[    4.849881] d0012000.serial: ttyS0 at MMIO 0xd0012000 (irq = 19, base_baud = 12500000) is a 16550A
[    4.858952] printk: console [ttyS0] enabled
[    4.868010] printk: bootconsole [earlycon0] disabled
[    4.880688] ahci 0000:01:00.0: assign IRQ: got 42
[    4.880710] ahci 0000:01:00.0: version 3.0
[    4.880732] pci 0000:00:01.0: enabling bus mastering
[    4.880747] ahci 0000:01:00.0: enabling device (0146 -> 0147)
[    4.887876] ahci 0000:01:00.0: AHCI 0001.0000 32 slots 2 ports 6 Gbps 0x3 impl SATA mode
[    4.896112] ahci 0000:01:00.0: flags: 64bit ncq sntf led only pmp fbs pio slum part sxs 
[    4.907616] scsi host0: ahci
[    4.912188] scsi host1: ahci
[    4.916348] ata1: SATA max UDMA/133 abar m512@0xf8010000 port 0xf8010100 irq 43
[    4.923729] ata2: SATA max UDMA/133 abar m512@0xf8010000 port 0xf8010180 irq 43
[    4.932658] sata_mv d00a0000.sata: version 1.28
[    4.932958] sata_mv d00a0000.sata: slots 32 ports 1
[    4.940964] scsi host2: sata_mv
[    4.945288] ata3: SATA max UDMA/133 irq 27
[    4.951418] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xf1
[    4.959037] nand: Micron MT29F1G08ABADAWP
[    4.963384] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    4.971866] Bad block table found at page 65472, version 0x01
[    4.978483] Bad block table found at page 65408, version 0x01
[    4.984773] 5 cmdlinepart partitions found on MTD device pxa3xx_nand-0
[    4.991429] Creating 5 MTD partitions on "pxa3xx_nand-0":
[    4.997110] 0x000000000000-0x000000180000 : "u-boot"
[    5.004674] 0x000000180000-0x0000001a0000 : "u-boot-env"
[    5.012943] 0x000000200000-0x000000800000 : "uImage"
[    5.021009] 0x000000800000-0x000000c00000 : "minirootfs"
[    5.029404] 0x000000c00000-0x000008000000 : "ubifs"
[    5.041348] spi-nor spi1.0: unrecognized JEDEC id bytes: ff ff ff ff ff ff
[    5.049264] wireguard: WireGuard 1.0.0 loaded. See www.wireguard.com for information.
[    5.057635] wireguard: Copyright (C) 2015-2019 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
[    5.070864] libphy: Fixed MDIO Bus: probed
[    5.080405] libphy: orion_mdio_bus: probed
[    5.102443] mvneta d0074000.ethernet eth0: Using random mac address 46:32:d7:99:85:37
[    5.115524] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    5.122218] ehci-pci: EHCI PCI platform driver
[    5.127986] ehci-orion: EHCI orion driver
[    5.132542] orion-ehci d0050000.usb: EHCI Host Controller
[    5.138540] orion-ehci d0050000.usb: new USB bus registered, assigned bus number 1
[    5.146817] orion-ehci d0050000.usb: irq 25, io mem 0xd0050000
[    5.174615] orion-ehci d0050000.usb: USB 2.0 started, EHCI 1.00
[    5.181106] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.08
[    5.189483] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.196872] usb usb1: Product: EHCI Host Controller
[    5.202064] usb usb1: Manufacturer: Linux 5.8.5-mvebu-370xp-tld-1 ehci_hcd
[    5.209107] usb usb1: SerialNumber: d0050000.usb
[    5.215176] hub 1-0:1.0: USB hub found
[    5.219678] hub 1-0:1.0: 1 port detected
[    5.225436] xhci_hcd 0000:02:00.0: assign IRQ: got 44
[    5.225514] xhci_hcd 0000:02:00.0: enabling bus mastering
[    5.225527] xhci_hcd 0000:02:00.0: xHCI Host Controller
[    5.231546] xhci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 2
[    5.239971] xhci_hcd 0000:02:00.0: hcc params 0x200073a1 hci version 0x100 quirks 0x0000000000080010
[    5.249272] xhci_hcd 0000:02:00.0: enabling Mem-Wr-Inval
[    5.250086] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.08
[    5.258462] ata2: SATA link down (SStatus 0 SControl 300)
[    5.264145] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.271563] ata1: SATA link down (SStatus 0 SControl 300)
[    5.277232] ata3: SATA link down (SStatus 0 SControl F300)
[    5.283066] usb usb2: Product: xHCI Host Controller
[    5.288280] usb usb2: Manufacturer: Linux 5.8.5-mvebu-370xp-tld-1 xhci-hcd
[    5.295356] usb usb2: SerialNumber: 0000:02:00.0
[    5.301248] hub 2-0:1.0: USB hub found
[    5.305759] hub 2-0:1.0: 2 ports detected
[    5.311156] xhci_hcd 0000:02:00.0: xHCI Host Controller
[    5.317053] xhci_hcd 0000:02:00.0: new USB bus registered, assigned bus number 3
[    5.324527] xhci_hcd 0000:02:00.0: Host supports USB 3.0 SuperSpeed
[    5.331275] usb usb3: We don't know the algorithms for LPM for this host, disabling LPM.
[    5.339718] usb usb3: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.08
[    5.348045] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.355395] usb usb3: Product: xHCI Host Controller
[    5.360532] usb usb3: Manufacturer: Linux 5.8.5-mvebu-370xp-tld-1 xhci-hcd
[    5.367553] usb usb3: SerialNumber: 0000:02:00.0
[    5.373375] hub 3-0:1.0: USB hub found
[    5.377856] hub 3-0:1.0: 2 ports detected
[    5.383967] usbcore: registered new interface driver usblp
[    5.390655] usbcore: registered new interface driver usb-storage
[    5.397894] mousedev: PS/2 mouse device common for all mice
[    5.405830] i2c /dev entries driver
[    5.414208] rtc-ds1307 0-0068: 'wakeup-source' is set, request for an IRQ is disabled!
[    5.427729] rtc-ds1307 0-0068: registered as rtc0
[    5.433742] rtc-ds1307 0-0068: setting system clock to 2020-09-11T18:04:09 UTC (1599847449)
[    5.476338] orion_wdt: Initial timeout 229 sec
[    5.482768] device-mapper: uevent: version 1.0.3
[    5.488609] device-mapper: ioctl: 4.42.0-ioctl (2020-02-27) initialised: dm-devel@redhat.com
[    5.497963] device-mapper: multipath round-robin: version 1.2.0 loaded
[    5.504786] device-mapper: multipath queue-length: version 0.2.0 loaded
[    5.511523] device-mapper: multipath service-time: version 0.3.0 loaded
[    5.518542] device-mapper: dm-log-userspace: version 1.3.0 loaded
[    5.524873] device-mapper: raid: Loading target version 1.15.1
[    5.538402] marvell-cesa d0090000.crypto: CESA device successfully registered
[    5.546487] hid: raw HID events driver (C) Jiri Kosina
[    5.553135] usbcore: registered new interface driver usbhid
[    5.559419] usbhid: USB HID core driver
[    5.564314] drop_monitor: Initializing network drop monitor service
[    5.572073] NET: Registered protocol family 10
[    5.578384] Segment Routing with IPv6
[    5.582409] RPL Segment Routing with IPv6
[    5.586891] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    5.594075] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    5.603263] NET: Registered protocol family 17
[    5.609117] 8021q: 802.1Q VLAN Support v1.8
[    5.613699] Key type dns_resolver registered
[    5.618688] ThumbEE CPU extension supported.
[    5.623276] Registering SWP/SWPB emulation handler
[    5.628905] registered taskstats version 1
[    5.633347] Loading compiled-in X.509 certificates
[    5.638899] zswap: loaded using pool lzo/zbud
[    5.644032] Key type ._fscrypt registered
[    5.648536] Key type .fscrypt registered
[    5.652793] Key type fscrypt-provisioning registered
[    5.661077] Key type big_key registered
[    5.690351] Key type encrypted registered
[    5.699401] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[    5.710564] Freeing unused kernel memory: 1024K
[    5.745096] usb 3-2: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[    5.754246] Checked W+X mappings: passed, no W+X pages found
[    5.760345] Run /init as init process
[    5.764378]   with arguments:
[    5.764384]     /init
[    5.764389]   with environment:
[    5.764393]     HOME=/
[    5.764397]     TERM=linux
[    5.764402]     reason=normal
[    5.764406]     bdtype=rn102
[    5.777451] usb 3-2: New USB device found, idVendor=0930, idProduct=6545, bcdDevice= 1.10
[    5.787448] usb 1-1: New USB device found, idVendor=0781, idProduct=556b, bcdDevice= 1.26
[    5.802994] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    5.810405] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[    5.824773] usb 3-2: Product: TransMemory
[    5.829128] usb 3-2: Manufacturer: TOSHIBA
[    5.833546] usb 3-2: SerialNumber: MASKED
[    5.839483] usb 1-1: Product: Cruzer Edge
[    5.843830] usb 1-1: Manufacturer: SanDisk
[    5.852094] usb 1-1: SerialNumber: MASKED
[    5.867980] usb-storage 1-1:1.0: USB Mass Storage device detected
[    5.877664] usb-storage 3-2:1.0: USB Mass Storage device detected
[    5.895958] scsi host3: usb-storage 3-2:1.0
[    5.901030] scsi host4: usb-storage 1-1:1.0
[    6.986838] scsi 3:0:0:0: Direct-Access     TOSHIBA  TransMemory      PMAP PQ: 0 ANSI: 6
[    6.995284] scsi 4:0:0:0: Direct-Access     SanDisk  Cruzer Edge      1.26 PQ: 0 ANSI: 6
[    7.033769] sd 3:0:0:0: [sda] 30497664 512-byte logical blocks: (15.6 GB/14.5 GiB)
[    7.042272] sd 4:0:0:0: [sdb] 15633408 512-byte logical blocks: (8.00 GB/7.45 GiB)
[    7.061007] sd 3:0:0:0: [sda] Write Protect is off
[    7.066647] sd 4:0:0:0: [sdb] Write Protect is off
[    7.071789] sd 4:0:0:0: [sdb] Mode Sense: 43 00 00 00
[    7.087177] sd 4:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    7.096572] sd 3:0:0:0: [sda] Mode Sense: 2b 00 00 08
[    7.097118] sd 3:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[    7.155169]  sda: sda1
[    7.160203] random: fast init done
[    7.170060] sd 3:0:0:0: [sda] Attached SCSI removable disk
[    7.188791]  sdb: sdb1
[    7.210367] sd 4:0:0:0: [sdb] Attached SCSI disk
[    9.141210] usbcore: registered new interface driver uas
[   21.566953] process '/usr/bin/fstype' started with executable stack
[   21.837244] EXT4-fs (sdb1): mounting ext3 file system using the ext4 subsystem
[   21.923066] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
[   23.151350] systemd[1]: systemd 241 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN -PCRE2 default-hierarchy=hybrid)
[   23.175606] systemd[1]: Detected architecture arm.
[   23.246658] systemd[1]: Set hostname to <Neutron>.
[   24.579237] systemd[1]: File /lib/systemd/system/systemd-journald.service:12 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.
[   24.596017] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
[   25.082148] systemd[1]: /lib/systemd/system/rpc-statd.service:13: PIDFile= references path below legacy directory /var/run/, updating /var/run/rpc.statd.pid \xe2\x86\x92 /run/rpc.statd.pid; please update the unit file accordingly.
[   25.158665] systemd[1]: /lib/systemd/system/fancontrol.service:9: PIDFile= references path below legacy directory /var/run/, updating /var/run/fancontrol.pid \xe2\x86\x92 /run/fancontrol.pid; please update the unit file accordingly.
[   25.222743] random: systemd: uninitialized urandom read (16 bytes read)
[   25.244998] random: systemd: uninitialized urandom read (16 bytes read)
[   25.253082] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[   25.295176] random: systemd: uninitialized urandom read (16 bytes read)
[   25.302073] systemd[1]: Reached target Swap.
[   25.341112] systemd[1]: Created slice system-serial\x2dgetty.slice.
[   26.164768] EXT4-fs (sdb1): re-mounted. Opts: errors=remount-ro
[   26.275288] random: crng init done
[   26.279089] random: 7 urandom warning(s) missed due to ratelimiting
[   28.668710] systemd-journald[1547]: Received request to flush runtime journal from PID 1
[   33.700014] sd 3:0:0:0: Attached scsi generic sg0 type 0
[   33.799104] sd 4:0:0:0: Attached scsi generic sg1 type 0
[   53.637762] mvneta d0074000.ethernet eth0: PHY [d0072004.mdio-mii:00] driver [Marvell 88E1318S] (irq=POLL)
[   53.647803] mvneta d0074000.ethernet eth0: configuring for phy/rgmii-id link mode
[   55.705402] mvneta d0074000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[   55.713628] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   62.848468] Setting Persistent MAC address to MASKED
[   64.641990] mvneta d0074000.ethernet eth0: Link is Down
[   64.813295] NFSD: Using UMH upcall client tracking operations.
[   64.830234] NFSD: starting 90-second grace period (net f0000021)
[   66.034032] mvneta d0074000.ethernet eth0: PHY [d0072004.mdio-mii:00] driver [Marvell 88E1318S] (irq=POLL)
[   66.069954] mvneta d0074000.ethernet eth0: configuring for phy/rgmii-id link mode
[   68.188024] mvneta d0074000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[   68.196254] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   73.659572] fbcon: Taking over console

Since my FT232 adapter is occupied in allwinner A13 for NAND stuff i only dmesged it.But i think dmesg is enough in this case:
5.041348] spi-nor spi1.0: unrecognized JEDEC id bytes: ff ff ff ff ff ff
Is this my bad mod?:)What does it mean?

I were investigated latest offical firmware with binwalk doesn't include u-boot.It updates on between versions because netgear offical update instructions say downgrade is not possible, also you can't upgrade 6.2.4 to 6.10.3.

In my first post i said:
When i bought this unit it was shipped with 6.2.4 stock firmware so i upgraded it to 6.5.2 firmware and then i updated 6.10.3 firmware according to netgear offical firmware installation guide because i think it also replaces u-boot.Now it has stock 6.10.3 Firmware and U-Boot 2011.12-gec25d27-dirty (Oct 26 2015 - 16:53:05) Marvell version: v2011.12 2014_T2.0p1

If you have recommended guide about kwboot and other boxes u-boots i can try some stuff.I have already uploaded u-boot and evs mtd to this topic.

Nand News:
You give me an idea to program NAND chip since i have A13 Board with 2 flash slots, one is free btw (i have attached picture of it.)I have successfully booted debian on A13 and tested nand partitions write and read functions.Tomorrow i will solder second flash (which i am planning to use on rn102) and test if it detects and r/w without any problem.

Ram News:
My right stencil for DDR3 has arrived today but i don't have right solder balls (0.45mm).I only have closest 0.60 mm which will not fit under RAM chip.Since no fast way then solder ball method I have decided to make it with mechanic solder paste which i don't have now.I have already ordered locally waiting seller to ship me.

@1000001101000,
Yes you are right sir.Once i used Raspberry Pi with flashrom to program a SPI chip then i bought CH341a and never used flashrom again.



Edited 2 time(s). Last edit at 09/11/2020 02:01PM by whitepawn.
Attachments:
open | download - rsz_stencils_and_a13.jpg (718.8 KB)
Re: Debian on Netgear RN102
September 11, 2020 03:45PM
my cheap CH341a has opened up all sorts of possibilities for me on devices I don't have a serial console working on. I use flashrom to do the actual programming with it. Is there a better application I should be using?
Re: Debian on Netgear RN102
September 11, 2020 04:26PM
I use this program with an old machine runs windows xp.(I also use JTAG with parallel port on this machine.)

I had problems with later windows versions.Windows version seems a bit user friendly in my opinion.When i bought this device in 2013, seller also give me license with my hardware id.

Just took a photo of my programmer and attached to post.CH341A has many variants that you may know.It also supports serial port via a jumper setting.What is your serial problem i didn't get it?

In Linux flashrom both works with RPI and CH341A.



Edited 1 time(s). Last edit at 09/11/2020 04:27PM by whitepawn.
Attachments:
open | download - ch341a.png (781.2 KB)
Re: Debian on Netgear RN102
September 11, 2020 06:35PM
Buffalo deactivates the serial console on many of their devices. Many can be reactivated with moderate soldering skill though some are pretty difficult. Using the external programmer with a clip connector provides a handy alternative.
Re: Debian on Netgear RN102
September 11, 2020 10:57PM
Quote

5.041348] spi-nor spi1.0: unrecognized JEDEC id bytes: ff ff ff ff ff ff
Is this my bad mod?:)What does it mean?

It means the kernel tried to identify the chip JEDEC ID, but found at that location there is no ID.

The JEDEC ID in this case should be 0x010215.

/usr/src/linux-5.8.5-mvebu/drivers/mtd/spi-nor/spansion.c

{ "s25sl032p",  INFO(0x010215, 0x4d00,  64 * 1024,  64,
                             SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },

Quote

If you have recommended guide about kwboot and other boxes u-boots i can try some stuff.I have already uploaded u-boot and evs mtd to this topic.

The Wiki thread:
Quote
https://forum.doozan.com/read.php?2,23630
Unbricking with Serial Console & JTAG console

Repair Pogo E02 with Raspberry PI (JTAG) and OpenOCD
Serial Port connector - what are people using to make it work
Serial Console hookup - GoFlex Net (external link)
Serial Console hookup - Pogoplug E02 and Pogoplug Pro V3 (external link)
OSX Serial/Net Console
Use Phone Jack - Phone Jack Serial Console Pics
Adding serial connector to Pogoplug Mobile (external link)
WD Mycloud EX2100/4100 Serial Console pic1, also pic2, pic3
Dreamplug Serial Console
How to unbrick your box using serial console with kwboot
kwboot on Mac OSX 10
Unbrick a Pogoplug Pro v3 OXNAS by flashing u-boot in serial console
Unbricking Synology Diskstation DS414 - See also the working thread for this unbricking session

You would start kwboot from where you run serial console (use the kwboot command in that distribution would suffice)

If the mtd0 nanddump file is mtd0_backup_file:
kwboot  -t -B 115200 /dev/ttyUSB0 -b mtd0_backup_file  -p
And then power up the RN102 box. If kwboot handshakes with the RN102 BootROM successfully, it will start sending the mtd0_backup_file binary. When it completed, the RN102 BootROM will run this u-boot. And the rest is similar to a typicall serial console session.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Netgear RN102
September 12, 2020 03:46PM
I soldered micron flash (MT29F32G08CBACA) to my A13 tablet rip-off development PCB to preprogram it with RN102 u-boot but it seems this debian version R18 cannot recognized second flash.Maybe some kind of dtb required for it i don't know.I can only see nand0 on dev folder.So this idea was dead end.But i have photos of second flash soldering process in my dropbox folder (A13 NAND) if someone interested:

https://www.dropbox.com/sh/44vr77r4psy6gkg/AACnT025tiq-jTfBLsQU8A_Ma?dl=0

@1000001101000
Yes i have seen some examples of buffalo serial mod while i was searching GPIO information about RN102.There were examples of soldering tx-rx pins to some resistors and yes it will be hard for who has no experience in soldering.

@bohdi
I have tried kwboot (which comes with u-boot-tools in linux mint) with both my original mtd0 u-boot backup and modified mirabox u-boot but never succeeded.I have tried countless time for both images.Here is my output for it:

root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b mtd0stockuboot.img  -p
Sending boot message. Please reboot the target...-
Sending boot image...
~  0 % [+xmodem: Operation canceled
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b mtd0stockuboot.img  -p
Sending boot message. Please reboot the target...-
Sending boot image...
~~<���  0 % [+��~�+~<+xmodem: Operation canceled
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b mtd0stockuboot.img  -p
Sending boot message. Please reboot the target...-
Sending boot image...
����  0 % [+|<+xmodem: Operation canceled
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b mtd0stockuboot.img  -p
Sending boot message. Please reboot the target...-
Sending boot image...
>
   0 % [+xmodem: Operation canceled
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b mtd0stockuboot.img  -p
Sending boot message. Please reboot the target...-^C
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b mtd0stockuboot.img  -p
Sending boot message. Please reboot the target...\
Sending boot image...
~<  0 % [+xmodem: Operation canceled
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b mtd0stockuboot.img  -p
Sending boot message. Please reboot the target...-
Sending boot image...
�~�|�  0 % [+�^><����+�?

                        ��?�+~<8��|�>
                                     �+�>��>�+>+xmodem: Operation canceled
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b mtd0stockuboot.img  -p
Sending boot message. Please reboot the target...-
Sending boot image...
��~�>�  0 % [+~
             ��~�?�+�>
                      ��~�+<�~���+|<+xmodem: Operation canceled
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b mtd0stockuboot.img  -p
Sending boot message. Please reboot the target...\
Sending boot image...
~48  0 % [+xmodem: Operation canceled
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin  -p
Sending boot message. Please reboot the target...-^C
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin  -p
Sending boot message. Please reboot the target...\^C
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin  -p
Sending boot message. Please reboot the target...-
Sending boot image...
~�  0 % [+<
           ��+?x�+�+>�+++++�+�+��+x0��+xp��+~�+~>�++xmodem: Bad message
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b mtd0stockuboot.img  -p
Sending boot message. Please reboot the target...-
Sending boot image...
�i  0 % [+xmodem: Operation canceled
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b mtd0stockuboot.img  -p
Sending boot message. Please reboot the target...|^C
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b mtd0stockuboot.img  -p
Sending boot message. Please reboot the target...|
Sending boot image...
�<��~�  0 % [+>
               �?����+~<+xmodem: Operation canceled
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin  -p
Sending boot message. Please reboot the target...-
Sending boot image...
>�  0 % [++++++++++++�+�+�+�+�+xmodem: Bad message
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin  -p
Sending boot message. Please reboot the target...-
Sending boot image...
|�  0 % [+++++++�+�+?�+|��+�+>�+��+��+�+��+xmodem: Bad message
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin  -p
Sending boot message. Please reboot the target...-
Sending boot image...
�  0 % [+>�+|�++++�+++++++++++xmodem: Bad message
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin  -p
Sending boot message. Please reboot the target...-
Sending boot image...
?�  0 % [+���+<+xmodem: Operation canceled
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin  -p
Sending boot message. Please reboot the target...-
Sending boot image...
~�  0 % [+++++++�+~�+++++++++xmodem: Bad message
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin  -p
Sending boot message. Please reboot the target...-
Sending boot image...
  0 % [++++++++�+�+�+++++++xmodem: Bad message
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin  -p
Sending boot message. Please reboot the target.../
Sending boot image...
~�  0 % [+~�++++++++++++++++xmodem: Bad message
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin  -p
Sending boot message. Please reboot the target...-
Sending boot image...
|  0 % [+xmodem: Operation canceled
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin  -p
Sending boot message. Please reboot the target...\^C
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin  -p
Sending boot message. Please reboot the target...-
Sending boot image...
  0 % [+>�+<+xmodem: Operation canceled
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin  -p
Sending boot message. Please reboot the target...-
Sending boot image...
�  0 % [+?�++++++++++++++++xmodem: Bad message
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin  -p
Sending boot message. Please reboot the target...-
Sending boot image...
��  0 % [+|�++++++++++++++++xmodem: Bad message
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin  -p
Sending boot message. Please reboot the target...-
Sending boot image...
~�  0 % [++++++++++�+++�+�++�+xmodem: Bad message
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin  -p
Sending boot message. Please reboot the target...-
Sending boot image...
?�  0 % [++++�+��+�+++++++++++xmodem: Bad message
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin  -p
Sending boot message. Please reboot the target...-
Sending boot image...
����  0 % [+|+xmodem: Operation canceled
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin -p
Sending boot message. Please reboot the target...-
Sending boot image...
  0 % [+�+��+<��+|+xmodem: Operation canceled
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin -p
Sending boot message. Please reboot the target...-
Sending boot image...
�  0 % [+|�+�
             ��+|+xmodem: Operation canceled
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin -p
Sending boot message. Please reboot the target...-
Sending boot image...
|�  0 % [+~�+++��+++�+~�+++��+++�+>�++xmodem: Bad message
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b mtd0stockuboot.img -p
Sending boot message. Please reboot the target...-
Sending boot image...
>

   0 % [+xmodem: Operation canceled
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b mtd0stockuboot.img -p
Sending boot message. Please reboot the target...-
Sending boot image...

��~��  0 % [+~
              +xmodem: Operation canceled
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b mtd0stockuboot.img -p
Sending boot message. Please reboot the target...-
Sending boot image...
>
 �>��  0 % [+>+xmodem: Operation canceled
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b mtd0stockuboot.img -p
Sending boot message. Please reboot the target...-
Sending boot image...
>
 �?��  0 % [+�?
               +xmodem: Operation canceled
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin -p
Sending boot message. Please reboot the target...-
Sending boot image...
�  0 % [+��+��++~�++~�++��++~�++��++��++��+xmodem: Bad message
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin -p
Sending boot message. Please reboot the target...-
Sending boot image...
�  0 % [+��+~�+x8��+|8��+>��+��+>�+�+~�+?�+++|�++��++xmodem: Bad message
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin -p
Sending boot message. Please reboot the target...-
Sending boot image...
�  0 % [+�++~�++~�+|�+?�+~�++��++��+��++~�++xmodem: Bad message
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin -p
Sending boot message. Please reboot the target...-
Sending boot image...
|�  0 % [+~�+~�+~�++~�+��++�++��++�++~�++~�+xmodem: Bad message
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin -p
Sending boot message. Please reboot the target...|^C
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin -p
Sending boot message. Please reboot the target...\
Sending boot image...
��  0 % [++��++~�+++��++~�+++~�++�>�+++xmodem: Bad message
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin -p
Sending boot message. Please reboot the target...-
Sending boot image...
~�  0 % [+�>�+|8��+<+xmodem: Operation canceled
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin -p
Sending boot message. Please reboot the target...-
Sending boot image...
��  0 % [+>�+<��+.��+++++++++++++++++xmodem: Bad message
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin -p
Sending boot message. Please reboot the target...-
Sending boot image...
~�  0 % [+~�++�+~�++~�++~�++>�++?�++��++~�+xmodem: Bad message
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin -p
Sending boot message. Please reboot the target...-
Sending boot image...
|8��  0 % [+~�+<�+><�+~�++|�++~�++�+~�++~�++~�++xmodem: Bad message
root@whitepawn:/home/jigsaw/Downloads# kwboot 
kwboot-2016.05.tar     recover.bin            ubootrn102envs.tar.gz
kwboot-tool.tar.gz     recover.bin.gz         
mtd0stockuboot.img     steam_latest.deb       
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin -p
Sending boot message. Please reboot the target...-
Sending boot image...
~�  0 % [++��+++++��++++++~�++++xmodem: Bad message
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin -p
Sending boot message. Please reboot the target...|
Sending boot image...
  0 % [+|8��+<+xmodem: Operation canceled
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin -p
Sending boot message. Please reboot the target...|^C
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin -p
Sending boot message. Please reboot the target...|
Sending boot image...
<�  0 % [+<+xmodem: Operation canceled
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin -p
Sending boot message. Please reboot the target...\
Sending boot image...
|�  0 % [++++++++��+�++++++++xmodem: Bad message
root@whitepawn:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin -p
Sending boot message. Please reboot the target...\
Sending boot image...
>�  0 % [+~�++�++�++++++++++++xmodem: Bad message
root@whitepawn:/home/jigsaw/Downloads#


With mtd0stockuboot which is my original u-boot backup it always "xmodem: Operation canceled" but in other hand with mirabox modified uboot which is recover.bin it says:"xmodem: Bad message" I get mirabox bootloader from here by the way.
Rn102 has BootROM 1.30 mirabox has BootROM 1.08 maybe this is the issue?

@tme
Could you please try kwboot with your box and post results if possible?Maybe my USB to serial (FT232 Breakout) is not working properly or not suitable for kwboot.

Regards.



Edited 2 time(s). Last edit at 09/12/2020 03:52PM by whitepawn.
Attachments:
open | download - recover.bin.gz (330.9 KB)
Re: Debian on Netgear RN102
September 12, 2020 04:19PM
whitepawn,

Yes. That recover.bin from Willy Tarreau is handy! I kwbooted the Mirabox with that image successfully.

Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b mtd0stockuboot.img  -p
Sending boot message. Please reboot the target...-
Sending boot image...
~  0 % [+xmodem: Operation canceled

Sending boot image...
>�  0 % [+~�++�++�++++++++++++xmodem: Bad message

When you see "Sending boot umage.." message, it means the RN102 and kwboot has established the initial handshake successfully. What comes after this is further handshakes while the image is sent to the RN102.

What you should do is to recall the kwboot command and execute it rigth away when you see "xmodem: Operation canceled" or "xmodem: Bad message". Do this as many time as you can (up to 20 tries is about right).

BTW,

BootROM version only matters in the timing of the handshake. All Marvell Armada BootROM supports booting with UART. The timing is hard to figured out for some boxes. Some are real easy (Armada 370, XP, 385, 388). Some are harder (Armada 380).

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



Edited 1 time(s). Last edit at 09/12/2020 06:07PM by bodhi.
Re: Debian on Netgear RN102
September 13, 2020 10:23AM
Bodhi,

I have tried with another box (x86) with USB2.0, It loaded image in first try.No garbled unreadable text output from console.Here is the output:

jigsaw@whitepawnxeon:~/Downloads$ sudo su
[sudo] password for jigsaw:      
root@whitepawnxeon:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin -p
Sending boot message. Please reboot the target...-^C
root@whitepawnxeon:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin -p
Sending boot message. Please reboot the target...-
Sending boot image...
  0 % [......................................................................]
  1 % [......................................................................]
  2 % [......................................................................]
  3 % [......................................................................]
  4 % [......................................................................]
  6 % [......................................................................]
  7 % [......................................................................]
  8 % [......................................................................]
  9 % [......................................................................]
 11 % [......................................................................]
 12 % [......................................................................]
 13 % [......................................................................]
 14 % [......................................................................]
 16 % [......................................................................]
 17 % [......................................................................]
 18 % [......................................................................]
 19 % [......................................................................]
 21 % [......................................................................]
 22 % [......................................................................]
 23 % [......................................................................]
 24 % [......................................................................]
 26 % [......................................................................]
 27 % [......................................................................]
 28 % [......................................................................]
 29 % [......................................................................]
 30 % [......................................................................]
 32 % [......................................................................]
 33 % [......................................................................]
 34 % [......................................................................]
 35 % [......................................................................]
 37 % [......................................................................]
 38 % [......................................................................]
 39 % [......................................................................]
 40 % [......................................................................]
 42 % [......................................................................]
 43 % [......................................................................]
 44 % [......................................................................]
 45 % [......................................................................]
 47 % [......................................................................]
 48 % [......................................................................]
 49 % [......................................................................]
 50 % [......................................................................]
 51 % [......................................................................]
 53 % [......................................................................]
 54 % [......................................................................]
 55 % [......................................................................]
 56 % [......................................................................]
 58 % [......................................................................]
 59 % [......................................................................]
 60 % [......................................................................]
 61 % [......................................................................]
 63 % [......................................................................]
 64 % [......................................................................]
 65 % [......................................................................]
 66 % [......................................................................]
 68 % [......................................................................]
 69 % [......................................................................]
 70 % [......................................................................]
 71 % [......................................................................]
 73 % [......................................................................]
 74 % [......................................................................]
 75 % [......................................................................]
 76 % [......................................................................]
 77 % [......................................................................]
 79 % [......................................................................]
 80 % [......................................................................]
 81 % [......................................................................]
 82 % [......................................................................]
 84 % [......................................................................]
 85 % [......................................................................]
 86 % [......................................................................]
 87 % [......................................................................]
 89 % [......................................................................]
 90 % [......................................................................]
 91 % [......................................................................]
 92 % [......................................................................]
 94 % [......................................................................]
 95 % [......................................................................]
 96 % [......................................................................]
 97 % [......................................................................]
 99 % [.........................................................]
[Type Ctrl-\ + c to quit]
But it hangs on [Type Ctrl-\ + c to quit] phase i have searched online and found this topic and you said we could try on rPi.
I will try with rPi and post results.
Regards.



Edited 1 time(s). Last edit at 09/13/2020 10:24AM by whitepawn.
Re: Debian on Netgear RN102
September 13, 2020 04:12PM
whitepawn,

Very good, so we know kwboot is supported.

The recover.bin is for the Mirabox. So it might not work on this box (there are differences that migh have stopped u-boot from starting). Try your mtd0 file.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Netgear RN102
September 13, 2020 04:47PM
Bodhi,
It seems working with my mtd0 backup.Mirabox bootloader is not working in this device.With mirabox bootloader loading recover.bin was painfully slow.It loaded recover.bin in almost 1 hour:)but it is my ignorance because i have never used kwboot and i was thinking "it must take a while like unbuffered JTAG."Also i used my x86 box for kwboot, not rPi because rPi3 built in serial is not working somehow.

My original mtd0 bootloader loads way more faster than mirabox bootloader, about 5 to10 minutes i guess.Lesson learned:If image loading is painfully slow probably not right image for your box.

Tomorrow i will solder 8 Gigabytes of NAND (Will salvage from broken tablet pc) to RN102.Before soldering it i want to try similiar more updated bootloaders on RN102.Are there any similiar devices to try their bootloaders?

Regards.
Re: Debian on Netgear RN102
September 13, 2020 06:33PM
whitepawn,

> My original mtd0 bootloader loads way more faster
> than mirabox bootloader, about 5 to10 minutes i
> guess.Lesson learned:If image loading is painfully
> slow probably not right image for your box.

Yes. That has something to do with the header (where DDR training code is embedded). During loading, this training code is executed.

>
> Tomorrow i will solder 8 Gigabytes of NAND (Will
> salvage from broken tablet pc) to RN102.Before
> soldering it i want to try similiar more updated
> bootloaders on RN102.Are there any similiar
> devices to try their bootloaders?
>

There are Armada 370 boxes u-boot that potentially could work on this box. But to match up, we also need to make sure it is DDR3 for it to have a chance of working.

Here are the candidates:

seagate-nas-2bay
seagate-nas-4bay
seagate-personal-cloud
seagate-personal-cloud-2bay
synology-ds213j

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Netgear RN102
September 14, 2020 07:46AM
Bodhi,
Thank you for your suggestions.
Since i am impatient guy i have soldered 8Gigabytes of NAND to device and i couldn't find Any u-boot backups for above listed devices which have chance to work with RN102. Has anyone have mtd backups for above devices?

Anyway here is the full bootlog after soldering new flash:

root@whitepawnxeon:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b mtd0stockuboot.img -p
Sending boot message. Please reboot the target...|
Sending boot image...
  0 % [.........................................................+..++++......]
  0 % [.+.............................+++++++.......................+....++++]
  1 % [.....................+..............+.....++++........................]
  1 % [...++++.....+++++.......................+......+++++..................]
  1 % [.+.......................+..+++.......................+....+..........]
  2 % [.+....+.......................+...+...+++++....+.....+++..............]
  2 % [...................+....................................+...++++......]
  3 % [......+..+++..+.......................................................]
  3 % [+..+....+++..................+...........+............................]
  4 % [.......+.Bg f+xmodem: Protocol error
root@whitepawnxeon:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b mtd0stockuboot.img -p
Sending boot message. Please reboot the target...|
Sending boot image...
  0 % [..+...............+.................++++...+..........................]
  0 % [.++...............................+.++++...........+..................]
  1 % [...++++............................+.........++.++....................]
  1 % [......+.......+....++++...............................................]
  2 % [...................+++...........++....+.............+................]
  2 % [...........+.........................+.........+......................]
  3 % [.......+..................++++........................................]
  3 % [.....++++.+++++.....+..............................................+++]
  4 % [................+++++...........+.....................................]
  4 % [.........B+xmodem: Protocol error
root@whitepawnxeon:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin -p
Sending boot message. Please reboot the target...\^C
root@whitepawnxeon:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin -p
Sending boot message. Please reboot the target...|^C
root@whitepawnxeon:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin -p
/dev/ttyUSB0: No such file or directory
root@whitepawnxeon:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b recover.bin -p
Sending boot message. Please reboot the target...-
Sending boot image...
  0 % [......................................................................]
  1 % [......................................................................]
  2 % [......................................................................]
  3 % [......................................................................]
  4 % [......................................................................]
  6 % [......................................................................]
  7 % [....^C
root@whitepawnxeon:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b mtd0stockuboot.img -p
Sending boot message. Please reboot the target...|
Sending boot image...
  0 % [......................................................................]
  0 % [......................................................................]
  1 % [......................................................................]
  1 % [......................................................................]
  2 % [......................................................................]
  2 % [......................................................................]
  3 % [......................................................................]
  3 % [......................................................................]
  4 % [......................................................................]
  5 % [.........

General initialization - Version: 1.0.0

High speed PHY - Version: 2.1.4 (COM-PHY-V20) 
Update PEX Device ID 0x6710
High speed PHY - Ended Successfully
0000
DDR3 Training Sequence - Ver 5.7.1
DDR3 Training Sequence - Run without PBS.
DDR3 Training Sequence - Ended Successfully 
.............................................................]
  5 % [......................................................................]
  6 % [......................................................................]
  6 % [......................................................................]
  7 % [......................................................................]
  7 % [......................................................................]
  8 % [......................................................................]
  9 % [......................................................................]
  9 % [......................................................................]
 10 % [......................................................................]
 10 % [......................................................................]
 11 % [......................................................................]
 11 % [......................................................................]
 12 % [......................................................................]
 13 % [......................................................................]
 13 % [......................................................................]
 14 % [......................................................................]
 14 % [......................................................................]
 15 % [......................................................................]
 15 % [......................................................................]
 16 % [......................................................................]
 17 % [......................................................................]
 17 % [......................................................................]
 18 % [......................................................................]
 18 % [......................................................................]
 19 % [......................................................................]
 19 % [......................................................................]
 20 % [......................................................................]
 21 % [......................................................................]
 21 % [......................................................................]
 22 % [......................................................................]
 22 % [......................................................................]
 23 % [......................................................................]
 23 % [......................................................................]
 24 % [......................................................................]
 25 % [......................................................................]
 25 % [......................................................................]
 26 % [......................................................................]
 26 % [......................................................................]
 27 % [......................................................................]
 27 % [......................................................................]
 28 % [......................................................................]
 29 % [......................................................................]
 29 % [......................................................................]
 30 % [......................................................................]
 30 % [......................................................................]
 31 % [......................................................................]
 31 % [......................................................................]
 32 % [......................................................................]
 33 % [......................................................................]
 33 % [......................................................................]
 34 % [......................................................................]
 34 % [......................................................................]
 35 % [......................................................................]
 35 % [......................................................................]
 36 % [......................................................................]
 37 % [......................................................................]
 37 % [......................................................................]
 38 % [......................................................................]
 38 % [......................................................................]
 39 % [......................................................................]
 39 % [......................................................................]
 40 % [......................................................................]
 41 % [......................................................................]
 41 % [......................................................................]
 42 % [......................................................................]
 42 % [......................................................................]
 43 % [......................................................................]
 43 % [......................................................................]
 44 % [......................................................................]
 45 % [......................................................................]
 45 % [......................................................................]
 46 % [......................................................................]
 46 % [......................................................................]
 47 % [......................................................................]
 47 % [......................................................................]
 48 % [......................................................................]
 48 % [......................................................................]
 49 % [......................................................................]
 50 % [......................................................................]
 50 % [......................................................................]
 51 % [......................................................................]
 51 % [......................................................................]
 52 % [......................................................................]
 52 % [......................................................................]
 53 % [......................................................................]
 54 % [......................................................................]
 54 % [......................................................................]
 55 % [......................................................................]
 55 % [......................................................................]
 56 % [......................................................................]
 56 % [......................................................................]
 57 % [......................................................................]
 58 % [......................................................................]
 58 % [......................................................................]
 59 % [......................................................................]
 59 % [......................................................................]
 60 % [......................................................................]
 60 % [......................................................................]
 61 % [......................................................................]
 62 % [......................................................................]
 62 % [......................................................................]
 63 % [......................................................................]
 63 % [......................................................................]
 64 % [......................................................................]
 64 % [......................................................................]
 65 % [......................................................................]
 66 % [......................................................................]
 66 % [......................................................................]
 67 % [......................................................................]
 67 % [......................................................................]
 68 % [......................................................................]
 68 % [......................................................................]
 69 % [......................................................................]
 70 % [......................................................................]
 70 % [......................................................................]
 71 % [......................................................................]
 71 % [......................................................................]
 72 % [......................................................................]
 72 % [......................................................................]
 73 % [......................................................................]
 74 % [......................................................................]
 74 % [......................................................................]
 75 % [......................................................................]
 75 % [......................................................................]
 76 % [......................................................................]
 76 % [......................................................................]
 77 % [......................................................................]
 78 % [......................................................................]
 78 % [......................................................................]
 79 % [......................................................................]
 79 % [......................................................................]
 80 % [......................................................................]
 80 % [......................................................................]
 81 % [......................................................................]
 82 % [......................................................................]
 82 % [......................................................................]
 83 % [......................................................................]
 83 % [......................................................................]
 84 % [......................................................................]
 84 % [......................................................................]
 85 % [......................................................................]
 86 % [......................................................................]
 86 % [......................................................................]
 87 % [......................................................................]
 87 % [......................................................................]
 88 % [......................................................................]
 88 % [......................................................................]
 89 % [......................................................................]
 90 % [......................................................................]
 90 % [......................................................................]
 91 % [......................................................................]
 91 % [......................................................................]
 92 % [......................................................................]
 92 % [......................................................................]
 93 % [......................................................................]
 94 % [......................................................................]
 94 % [......................................................................]
 95 % [......................................................................]
 95 % [......................................................................]
 96 % [......................................................................]
 96 % [......................................................................]
 97 % [......................................................................]
 97 % [......................................................................]
 98 % [......................................................................]
 99 % [......................................................................]
 99 % [......................................]
[Type Ctrl-\ + c to quit]

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


U-Boot 2011.12-gec25d27-dirty (Oct 26 2015 - 16:53:05) Marvell version: v2011.12 2014_T2.0p1 
06/23/2015 ReadyNAS-102 V2.0

Board: DB-88F6710-BP
SoC:   MV6710 A1
CPU:   Marvell PJ4B v7 UP (Rev 1) LE
       CPU    @ 1200 [MHz]
       L2     @ 600 [MHz]
       TClock @ 200 [MHz]
       DDR    @ 600 [MHz]
       DDR 16Bit Width, FastPath Memory Access
DRAM:  512 MiB

Map:   Code:		0x1feef000:0x1ff9ef34
       BSS:		0x1ffef0a0
       Stack:		0x1f9eeef8
       Heap:		0x1f9ef000:0x1feef000

NAND:  (ID 0x642c)	mvNfcInit() failed.
0 MiB
MMC:   MRVL_MMC: 0
*** Warning - readenv() failed, using default environment


Initialize and scan all PCI interfaces
PEX unit.port(active IF[-first bus]):
------------------------------------------
PEX 0: Root Complex Interface, Detected Link X1, GEN 2.0
PEX 1: Root Complex Interface, Detected Link X1, GEN 2.0
FPU not initialized
USB 0: Host Mode
USB 1: Host Mode
Shutting down unused interfaces:
       GBE0
       SDIO
       AUDIO
       TDM
Modules/Interfaces Detected:
       RGMII1 Phy
       PEX0 (Lane 0)
       PEX1 (Lane 1)
       SATA0 (Lane 2)
       SATA1 (Lane 3)
Net:   , egiga1 [PRIME]
Detect MVT/MP board...
Saving Environment to NAND...
Erasing Nand...
Attempt to erase non page aligned data
Power On!

Updating env to v3...
Saving Environment to NAND...
Erasing Nand...
Attempt to erase non page aligned data
raise: Signal # 8 caught
raise: Signal # 8 caught

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


U-Boot 2011.12-gec25d27-dirty (Oct 26 2015 - 16:53:05) Marvell version: v2011.12 2014_T2.0p1 
06/23/2015 ReadyNAS-102 V2.0

Board: DB-88F6710-BP
SoC:   MV6710 A1
CPU:   Marvell PJ4B v7 UP (Rev 1) LE
       CPU    @ 1200 [MHz]
       L2     @ 600 [MHz]
       TClock @ 200 [MHz]
       DDR    @ 600 [MHz]
       DDR 16Bit Width, FastPath Memory Access
DRAM:  512 MiB

Map:   Code:		0x1feef000:0x1ff9ef34
       BSS:		0x1ffef0a0
       Stack:		0x1f9eeef8
       Heap:		0x1f9ef000:0x1feef000

NAND:  (ID 0x642c)	mvNfcInit() failed.
0 MiB
MMC:   MRVL_MMC: 0
*** Warning - readenv() failed, using default environment


Initialize and scan all PCI interfaces
PEX unit.port(active IF[-first bus]):
------------------------------------------
PEX 0: Root Complex Interface, Detected Link X1, GEN 2.0
PEX 1: Root Complex Interface, Detected Link X1, GEN 2.0
FPU not initialized
USB 0: Host Mode
USB 1: Host Mode
Shutting down unused interfaces:
       GBE0
       SDIO
       AUDIO
       TDM
Modules/Interfaces Detected:
       RGMII1 Phy
       PEX0 (Lane 0)
       PEX1 (Lane 1)
       SATA0 (Lane 2)
       SATA1 (Lane 3)
Net:   , egiga1 [PRIME]
Detect MVT/MP board...
Saving Environment to NAND...
Erasing Nand...
Attempt to erase non page aligned data
Power On!

Updating env to v3...
Saving Environment to NAND...
Erasing Nand...
Attempt to erase non page aligned data
raise: Signal # 8 caught
raise: Signal # 8 caught

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


U-Boot 2011.12-gec25d27-dirty (Oct 26 2015 - 16:53:05) Marvell version: v2011.12 2014_T2.0p1 
06/23/2015 ReadyNAS-102 V2.0

Board: DB-88F6710-BP
SoC:   MV6710 A1
CPU:   Marvell PJ4B v7 UP (Rev 1) LE
       CPU    @ 1200 [MHz]
       L2     @ 600 [MHz]
       TClock @ 200 [MHz]
       DDR    @ 600 [MHz]
       DDR 16Bit Width, FastPath Memory Access
DRAM:  512 MiB

Map:   Code:		0x1feef000:0x1ff9ef34
       BSS:		0x1ffef0a0
       Stack:		0x1f9eeef8
       Heap:		0x1f9ef000:0x1feef000

NAND:  (ID 0x642c)	mvNfcInit() failed.
0 MiB
MMC:   MRVL_MMC: 0
*** Warning - readenv() failed, using default environment


Initialize and scan all PCI interfaces
PEX unit.port(active IF[-first bus]):
------------------------------------------
PEX 0: Root Complex Interface, Detected Link X1, GEN 2.0
PEX 1: Root Complex Interface, Detected Link X1, GEN 2.0
FPU not initialized
USB 0: Host Mode
USB 1: Host Mode
Shutting down unused interfaces:
       GBE0
       SDIO
       AUDIO
       TDM
Modules/Interfaces Detected:
       RGMII1 Phy
       PEX0 (Lane 0)
       PEX1 (Lane 1)
       SATA0 (Lane 2)
       SATA1 (Lane 3)
Net:   , egiga1 [PRIME]

It seems u-boot cannot initiate 8 Gb NAND.I believe it ID's the NAND which i assume soldering process was done right.
Any suggestions are welcome.

PS:Uploaded NAND mod pictures to my dropbox folder(8GB NAND) if anyone interested.

Regards.

EDIT:Just found synology uboot.Will try that and post results.



Edited 1 time(s). Last edit at 09/14/2020 10:14AM by whitepawn.
Re: Debian on Netgear RN102
September 14, 2020 04:43PM
whitepawn,

Quote


NAND: (ID 0x642c) mvNfcInit() failed.
0 MiB

<snip>

Detect MVT/MP board...
Saving Environment to NAND...
Erasing Nand...
Attempt to erase non page aligned data
Power On!

This indicated that the NAND chip was detected OK. But it could not be initialized.

So the attempt to save default envs later failed because the NAND chip was not ready to be used.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Netgear RN102
September 14, 2020 05:19PM
Bodhi,

I have tried synology stock u-boot but it didn't work.So i have searched online and found this github page which patches DDR3 ram header stuff.
I have patched synology stock u-boot with my original mtd backup payload DDR header and it makes DDR Training successfully.

root@whitepawnxeon:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b synologyubootmodded.bin -p
Sending boot message. Please reboot the target...\
Sending boot image...
  0 % [......................................................................]
  1 % [......................................................................]
  2 % [......................................................................]
  3 % [......................................................................]
  4 % [......................................................................]
  5 % [......................................................................]
  6 % [......................................................................]
  7 % [.....................................................High speed PHY - Version: 2.1.2 (COM-PHY-V20) 
Update PEX Device ID 0x67100
High speed PHY - Ended Successfully
DDR3 Training Sequence - Ver 4.5.0 
DDR3 Training Sequence - Ended Successfully 
Status = MV_OK
.................]
  8 % [......................................................................]
  9 % [......................................................................]
 10 % [......................................................................]
 11 % [......................................................................]
 12 % [......................................................................]
 13 % [......................................................................]
 14 % [......................................................................]
 15 % [......................................................................]
 16 % [......................................................................]
 17 % [......................................................................]
 18 % [......................................................................]
 19 % [......................................................................]
 20 % [......................................................................]
 21 % [......................................................................]
 22 % [......................................................................]
 23 % [......................................................................]
 24 % [......................................................................]
 25 % [......................................................................]
 26 % [......................................................................]
 27 % [......................................................................]
 28 % [......................................................................]
 29 % [......................................................................]
 30 % [......................................................................]
 31 % [......................................................................]
 32 % [......................................................................]
 33 % [......................................................................]
 34 % [......................................................................]
 35 % [......................................................................]
 36 % [......................................................................]
 37 % [......................................................................]
 38 % [......................................................................]
 39 % [......................................................................]
 40 % [......................................................................]
 41 % [......................................................................]
 42 % [......................................................................]
 43 % [......................................................................]
 44 % [......................................................................]
 45 % [......................................................................]
 46 % [......................................................................]
 47 % [......................................................................]
 48 % [......................................................................]
 49 % [......................................................................]
 50 % [......................................................................]
 51 % [......................................................................]
 52 % [......................................................................]
 53 % [......................................................................]
 54 % [......................................................................]
 55 % [......................................................................]
 57 % [......................................................................]
 58 % [......................................................................]
 59 % [......................................................................]
 60 % [......................................................................]
 61 % [......................................................................]
 62 % [......................................................................]
 63 % [......................................................................]
 64 % [......................................................................]
 65 % [......................................................................]
 66 % [......................................................................]
 67 % [......................................................................]
 68 % [......................................................................]
 69 % [......................................................................]
 70 % [......................................................................]
 71 % [......................................................................]
 72 % [......................................................................]
 73 % [......................................................................]
 74 % [......................................................................]
 75 % [......................................................................]
 76 % [......................................................................]
 77 % [......................................................................]
 78 % [......................................................................]
 79 % [......................................................................]
 80 % [......................................................................]
 81 % [......................................................................]
 82 % [......................................................................]
 83 % [......................................................................]
 84 % [......................................................................]
 85 % [......................................................................]
 86 % [......................................................................]
 87 % [......................................................................]
 88 % [......................................................................]
 89 % [......................................................................]
 90 % [......................................................................]
 91 % [......................................................................]
 92 % [......................................................................]
 93 % [......................................................................]
 94 % [......................................................................]
 95 % [......................................................................]
 96 % [......................................................................]
 97 % [......................................................................]
 98 % [......................................................................]
 99 % [...................]
[Type Ctrl-\ + c to quit]

I have patched DDR3 with these commands:

jigsaw@whitepawn:~/ubootram$ ./kwbimage -x -i mtd0 -o /tmp/
jigsaw@whitepawn:~/ubootram$ mv /tmp/payload /tmp/payload.orig
jigsaw@whitepawn:~/ubootram$ ./kwbimage -x -i uboot_DS213jv10.bin -o /tmp/
jigsaw@whitepawn:~/ubootram$ ./mvebuimg -v 1 create -b /tmp/binary.0 -o /home/jigsaw/ubootram/synologyubootmodded.bin spi /tmp/payload.orig



However mirabox bootloader patched with DDR3 doesn't work.

root@whitepawnxeon:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b miraboxpached.bin -p
Sending boot message. Please reboot the target...\
Sending boot image...
  0 % [......................................................................]
  1 % [......................................................................]
  2 % [......................................................................]
  3 % [......................................................................]
  4 % [......................................................................]
  5 % [.................................DDR3 Training Sequence - Ver 2.1.6 
DDR3 Training Sequence - Number of DIMMs detected: 1
+xmodem: Protocol error

Synology patched bootloader hangs at "[Type Ctrl-\ + c to quit]"

I think stock RN102 bootloader is too old for this big NAND.So i guess i will bite the bullet and compile u-boot.
I have compiled some kernels in the past but never compiled u-boot before but i have searched online it is similiar to kernel compiling i guess.(make menuconfig, installing required packages and toolchains etc.)

Where i should start for this board?I mean there are many source codes for u-boot marvell u-boot mainline etc. and i don't know where to start for this board.Is it hard to config u-boot stuff or am i being a Don Quixote for this?

Regards.
Re: Debian on Netgear RN102
September 14, 2020 11:28PM
whitepawn,

> I have patched synology stock u-boot with my
> original mtd backup payload DDR header and it
> makes DDR Training successfully.

> I have patched DDR3 with these commands:
>
>
> jigsaw@whitepawn:~/ubootram$ ./kwbimage -x -i mtd0
> -o /tmp/
> jigsaw@whitepawn:~/ubootram$ mv /tmp/payload
> /tmp/payload.orig
> jigsaw@whitepawn:~/ubootram$ ./kwbimage -x -i
> uboot_DS213jv10.bin -o /tmp/
> jigsaw@whitepawn:~/ubootram$ ./mvebuimg -v 1
> create -b /tmp/binary.0 -o
> /home/jigsaw/ubootram/synologyubootmodded.bin spi
> /tmp/payload.orig
>

Cool!


> I think stock RN102 bootloader is too old for this
> big NAND.So i guess i will bite the bullet and
> compile u-boot.
> I have compiled some kernels in the past but never
> compiled u-boot before but i have searched online
> it is similiar to kernel compiling i guess.(make
> menuconfig, installing required packages and
> toolchains etc.)

To compile a mainlined u-boot is quite easy, just like compile a mainlined LInux kernel. But the process is different enough that you should do some research before atually doing it.

Building Linux kernel for a new box is actually many times easier than building u-boot for a new box. Patching kernel is also easier, because there are lots of documentation in the kernel area.

> Where i should start for this board?I mean there
> are many source codes for u-boot marvell u-boot
> mainline etc. and i don't know where to start for
> this board.Is it hard to config u-boot stuff or am
> i being a Don Quixote for this?

To build a new mainline u-boot, you'd need to start with a like-kind u-boot which is already working in mainline tree. AFAICT, there is no such u-boot for a specific Armada 370 box yet.

It is quite time consuming to roll mainline u-boot for a new box. So your best bet is rebuild stock u-boot. I would say you need GPL source so you can build the same stock u-boot with their build environment scripts already published. And tweak it just a bit if needed.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Netgear RN102
September 15, 2020 03:24AM
Bodhi,
I see, mainline uboot is not an option.Where can i find stock u-boot and their build environment scripts could you share a link?
Regards.
Re: Debian on Netgear RN102
September 15, 2020 03:54AM
whitepawn,

I don't have any link for this Netgear RN102 u-boot. Not for Mirabox either (Globalscale Technology is quite bad in providing GPL so we gave up).

For each of these boxes, if they don't have it in their website, then GPL source must be requested and hopefully they will respond and give you a link to download the GPL source.

Most of these Armada boxes use the same original Marvell u-boot source to build their own stock u-boot. Each of them added patches to that source to make it their own. So getting just any Marvell u-boot for Armada is not going to work right away (if at all).

There is a Marvell GitHub for this family of stock u-boot. I would have to search my notes to find where I have this link.

I have downloaded stock u-boots GPL for NAS326 (Armada 380), and Thecus (Armada 385). But they will not work for Armada 370 (this box and the Mirabox).

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



Edited 1 time(s). Last edit at 09/15/2020 03:57AM by bodhi.
Re: Debian on Netgear RN102
September 15, 2020 04:16AM
Bodhi,
I will request uboot GPL source code from netgear but i am not sure they will share it.
Thank you for your support.
Regards.

EDIT:
Just found seagate 2 bay nas U-boot GPL for Armada 370:
https://www.dropbox.com/s/3pkfcgw4xkjibu8/u-boot.tar.bz2?dl=0
Is this the right one?



Edited 1 time(s). Last edit at 09/15/2020 05:11AM by whitepawn.
Re: Debian on Netgear RN102
September 15, 2020 06:23PM
whitepawn,

I can only give you general advice like above to help you to a good starting point.

My policy is that I don't get into discussion about how to build a new kernel or u-boot for a new box. It is too time consuming for me (and it takes away my time helping troubleshooting problems here).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
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: