Welcome! Log In Create A New Profile

Advanced

Debian on Netgear RN102

Posted by whitepawn 
Re: Debian on Netgear RN102
September 15, 2020 07:52PM
Keep us updated though. I've been trying to build a u-boot image for a different armada-370 device (Linkstation LS441DE). I've had some success setting up a crossbuild setup but haven't been able to generate anything useful yet.
Re: Debian on Netgear RN102
September 16, 2020 04:31AM
I see bodhi, anyway thank you very much for your support.
Re: Debian on Netgear RN102
September 16, 2020 04:00PM
whitepawn,

If you have specific questions while rebuilding the RN102 stock u-boot from GPL, I'll do my best to answer them.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Netgear RN102
September 16, 2020 04:31PM
All,
First i get really pissed off to netgear because they didn't share u-boot source code, since i get mad to netgear i was desoldered 8gb flash and resoldered 128mb and removed SPI flash mod while doing this surgery i realized why i should not download their entire GPL source codes and look each one by one in first place? I couldn't give up easy.

I didn't have much hope but after downloading nearly 30 gigabytes of netgear source code I finally managed to find GPL code for RN102 in ReadyNASOS_V6.6.0_WW_src.zip.When i saw sourcecode i had a big facepalm and get mad to myself because have already soldered stock flash chip to box.

Anyway i get very motivated like candy seen childs and tried to compile stock u-boot without touching anyhing in code first.After reviewing readme files and downloading toolchain spesific for this u-boot i crossed my fingers and holded my breath:

jigsaw@whitepawn:~/u-boot-2011.12-armada370$ export PATH=$PATH:/opt/armv7-marvell-linux-gnueabi-softfp_i686_64K_Dev_20131002/bin/
jigsaw@whitepawn:~/u-boot-2011.12-armada370$ export CROSS_COMPILE=/opt/armv7-marvell-linux-uclibcgnueabi-softfp_i686_64K_Dev_20131002/bin/arm-marvell-linux-uclibcgnueabi-
jigsaw@whitepawn:~/u-boot-2011.12-armada370$ export CROSS_COMPILE_BH=/opt/armv7-marvell-linux-uclibcgnueabi-softfp_i686_64K_Dev_20131002/bin/arm-marvell-linux-uclibcgnueabi-

jigsaw@whitepawn:~/u-boot-2011.12-armada370$ ./build_rn102-nand.pl -v 2.0 -d ../armada-370-netgear-rn102.dtb
No secure boot option selected

**** [Cleaning Make]	*****

Configuring for armada_370_db - Board: armada_370, Options: DB_88F6710_BP

**** [Setting Macros]	*****

Boot from NAND
** Little ENDIAN ** 
Enable NAND controller NFC
Support flash: NAND 
Project: RN102 
**** [Building U-BOOT]	*****

Generating include/generated/asm-offsets.h
/home/jigsaw/u-boot-2011.12-armada370/lib/sha1.c:389:19: warning: ‘_sha1_src’ defined but not used [-Wunused-const-variable=]
  389 | static const char _sha1_src[] = "_sha1_src";
      |                   ^~~~~~~~~
In file included from aisimage.c:29:
/home/jigsaw/u-boot-2011.12-armada370/include/image.h:534:12: warning: inline function ‘fit_parse_subimage’ declared but never defined
  534 | inline int fit_parse_subimage(const char *spec, ulong addr_curr,
      |            ^~~~~~~~~~~~~~~~~~
/home/jigsaw/u-boot-2011.12-armada370/include/image.h:532:12: warning: inline function ‘fit_parse_conf’ declared but never defined
  532 | inline int fit_parse_conf(const char *spec, ulong addr_curr,
      |            ^~~~~~~~~~~~~~
In file included from default_image.c:31:
/home/jigsaw/u-boot-2011.12-armada370/include/image.h:534:12: warning: inline function ‘fit_parse_subimage’ declared but never defined
  534 | inline int fit_parse_subimage(const char *spec, ulong addr_curr,
      |            ^~~~~~~~~~~~~~~~~~
/home/jigsaw/u-boot-2011.12-armada370/include/image.h:532:12: warning: inline function ‘fit_parse_conf’ declared but never defined
  532 | inline int fit_parse_conf(const char *spec, ulong addr_curr,
      |            ^~~~~~~~~~~~~~
In file included from fit_image.c:31:
/home/jigsaw/u-boot-2011.12-armada370/include/image.h:534:12: warning: inline function ‘fit_parse_subimage’ declared but never defined
  534 | inline int fit_parse_subimage(const char *spec, ulong addr_curr,
      |            ^~~~~~~~~~~~~~~~~~
/home/jigsaw/u-boot-2011.12-armada370/include/image.h:532:12: warning: inline function ‘fit_parse_conf’ declared but never defined
  532 | inline int fit_parse_conf(const char *spec, ulong addr_curr,
      |            ^~~~~~~~~~~~~~
In file included from /home/jigsaw/u-boot-2011.12-armada370/common/image.c:73:
/home/jigsaw/u-boot-2011.12-armada370/include/image.h:534:12: warning: inline function ‘fit_parse_subimage’ declared but never defined
  534 | inline int fit_parse_subimage(const char *spec, ulong addr_curr,
      |            ^~~~~~~~~~~~~~~~~~
/home/jigsaw/u-boot-2011.12-armada370/include/image.h:532:12: warning: inline function ‘fit_parse_conf’ declared but never defined
  532 | inline int fit_parse_conf(const char *spec, ulong addr_curr,
      |            ^~~~~~~~~~~~~~
In file included from imximage.c:32:
/home/jigsaw/u-boot-2011.12-armada370/include/image.h:534:12: warning: inline function ‘fit_parse_subimage’ declared but never defined
  534 | inline int fit_parse_subimage(const char *spec, ulong addr_curr,
      |            ^~~~~~~~~~~~~~~~~~
/home/jigsaw/u-boot-2011.12-armada370/include/image.h:532:12: warning: inline function ‘fit_parse_conf’ declared but never defined
  532 | inline int fit_parse_conf(const char *spec, ulong addr_curr,
      |            ^~~~~~~~~~~~~~
In file included from kwbimage.c:29:
/home/jigsaw/u-boot-2011.12-armada370/include/image.h:534:12: warning: inline function ‘fit_parse_subimage’ declared but never defined
  534 | inline int fit_parse_subimage(const char *spec, ulong addr_curr,
      |            ^~~~~~~~~~~~~~~~~~
/home/jigsaw/u-boot-2011.12-armada370/include/image.h:532:12: warning: inline function ‘fit_parse_conf’ declared but never defined
  532 | inline int fit_parse_conf(const char *spec, ulong addr_curr,
      |            ^~~~~~~~~~~~~~
In file included from mkimage.c:25:
/home/jigsaw/u-boot-2011.12-armada370/include/image.h:534:12: warning: inline function ‘fit_parse_subimage’ declared but never defined
  534 | inline int fit_parse_subimage(const char *spec, ulong addr_curr,
      |            ^~~~~~~~~~~~~~~~~~
/home/jigsaw/u-boot-2011.12-armada370/include/image.h:532:12: warning: inline function ‘fit_parse_conf’ declared but never defined
  532 | inline int fit_parse_conf(const char *spec, ulong addr_curr,
      |            ^~~~~~~~~~~~~~
In file included from omapimage.c:37:
/home/jigsaw/u-boot-2011.12-armada370/include/image.h:534:12: warning: inline function ‘fit_parse_subimage’ declared but never defined
  534 | inline int fit_parse_subimage(const char *spec, ulong addr_curr,
      |            ^~~~~~~~~~~~~~~~~~
/home/jigsaw/u-boot-2011.12-armada370/include/image.h:532:12: warning: inline function ‘fit_parse_conf’ declared but never defined
  532 | inline int fit_parse_conf(const char *spec, ulong addr_curr,
      |            ^~~~~~~~~~~~~~
In file included from ublimage.c:36:
/home/jigsaw/u-boot-2011.12-armada370/include/image.h:534:12: warning: inline function ‘fit_parse_subimage’ declared but never defined
  534 | inline int fit_parse_subimage(const char *spec, ulong addr_curr,
      |            ^~~~~~~~~~~~~~~~~~
/home/jigsaw/u-boot-2011.12-armada370/include/image.h:532:12: warning: inline function ‘fit_parse_conf’ declared but never defined
  532 | inline int fit_parse_conf(const char *spec, ulong addr_curr,
      |            ^~~~~~~~~~~~~~
  CC    aes.c
  CC    arc4.c
hdrparser.c: In function ‘parse_main_header’:
hdrparser.c:195:19: warning: too many arguments for format [-Wformat-extra-args]
  195 |   fprintf(stdout, "[15:12]Source address (LBA):      0x%08X\n",
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hdrparser.c:198:19: warning: too many arguments for format [-Wformat-extra-args]
  198 |   fprintf(stdout, "[15:12]Source address:            0x%08X\n",
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hdrparser.c: In function ‘parse_bin_header’:
hdrparser.c:295:18: warning: too many arguments for format [-Wformat-extra-args]
  295 |  fprintf(stdout, "[0005:0005]Reserved:              0x%02X\n",
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
hdrparser.c:297:18: warning: too many arguments for format [-Wformat-extra-args]
  297 |  fprintf(stdout, "[0007:0005]Reserved:              0x%04X\n",
      |                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  CC    base64.c
  CC    bignum.c
  CC    certs.c
  CC    debug.c
  CC    des.c
  CC    dhm.c
  CC    havege.c
  CC    md2.c
  CC    md4.c
  CC    md5.c
  CC    net.c
  CC    padlock.c
  CC    rsa.c
  CC    sha1.c
  CC    sha2.c
  CC    sha4.c
  CC    ssl_cli.c
  CC    ssl_srv.c
  CC    ssl_tls.c
  CC    timing.c
  CC    x509parse.c
  CC    xtea.c
  CC    camellia.c
  CC    mvMemPool.c
  AR    libpolarssl.a
ar: creating libpolarssl.a
  RL    libpolarssl.a
  CC    aes/aescrypt2.c
  CC    hash/hello.c
  CC    hash/md5sum.c
  CC    hash/sha1sum.c
  CC    hash/sha2sum.c
  CC    pkey/dh_client.c
  CC    pkey/dh_genprime.c
  CC    pkey/dh_server.c
  CC    pkey/mpi_demo.c
  CC    pkey/rsa_genkey.c
  CC    pkey/rsa_sign.c
pkey/rsa_sign.c: In function ‘main’:
pkey/rsa_sign.c:104:17: warning: implicit declaration of function ‘sha4_file’; did you mean ‘sha1_file’? [-Wimplicit-function-declaration]
  104 |     if( ( ret = sha4_file( argv[1], hash, 0 ) ) != 0 )
      |                 ^~~~~~~~~
      |                 sha1_file
  CC    pkey/rsa_verify.c
  CC    ssl/ssl_client1.c
pkey/rsa_verify.c: In function ‘main’:
pkey/rsa_verify.c:129:17: warning: implicit declaration of function ‘sha4_file’; did you mean ‘sha1_file’? [-Wimplicit-function-declaration]
  129 |     if( ( ret = sha4_file( argv[1], hash, 0 ) ) != 0 )
      |                 ^~~~~~~~~
      |                 sha1_file
  CC    ssl/ssl_client2.c
  CC    ssl/ssl_server.c
  CC    test/benchmark.c
  CC    test/selftest.c
  CC    test/ssl_test.c
test/selftest.c: In function ‘main’:
test/selftest.c:143:17: warning: implicit declaration of function ‘camellia_self_test’; did you mean ‘xtea_self_test’? [-Wimplicit-function-declaration]
  143 |     if( ( ret = camellia_self_test( v ) ) != 0 )
      |                 ^~~~~~~~~~~~~~~~~~
      |                 xtea_self_test
Building linker script for board a370, Non-secure mode
Building linker script for board a370, Secure mode
a - uboot_drv.o
a - uboot_skb.o
a - sky2.o
a - skge.o
a - sky2le.o
a - skdim.o
a - skaddr.o
a - skgehwt.o
a - skgeinit.o
a - skgesirq.o
a - sktwsi.o
a - sklm80.o
a - skqueue.o
a - skrlmt.o
a - sktimer.o
a - skvpd.o
a - skxmac2.o
a - skcsum.o

**** [Creating Image]	*****


 Ext. headers = 1, Header size = 76160 bytes Hdr-to-Img gap = 0 bytes
New image size = 0xbdfc4[778180] Source image size = 0xbdfc4[778180]
====>>>> u-boot-a370-2.0-nand-db-uart.bin was created

 Ext. headers = 1, Header size = 81920 bytes Hdr-to-Img gap = 0 bytes
New image size = 0xc5fc8[810952] Source image size = 0xbdfc4[778180]
failed to open '../armada-370-netgear-rn102.dtb'
Error writing u-boot-a370-2.0-nand-db.bin file 

 *** Error: Doimage failed


 *** Error: Build u-boot boot from NAND failed

jigsaw@whitepawn:~/u-boot-2011.12-armada370$

It failed in nand image because of dtb file but it doesn't matter now we can deal this later.I can try my u-boot on box with serial anyway since it generated u-boot-a370-2.0-nand-db-uart.bin.
I soldered back 8GB flash and tried my u-boot on box with my xeon machine:

root@whitepawnxeon:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b u-boot-a370-2.0-nand-db-uart.bin -p
Sending boot message. Please reboot the target...-
Sending boot image...
  0 % [......................................................................]
  1 % [......................................................................]
  2 % [......................................................................]
  3 % [......................................................................]
  4 % [......................................................................]
  5 % [......................................................................]
  6 % [......................................................................]
  7 % [......................................................................]
  8 % [......................................................................]
  9 % [......................................................................]
 10 % [......................................................................]
 11 % [......................................................................]
 12 % [......................................................................]
 13 % [......................................................................]
 14 % [......................................................................]
 15 % [......................................................................]
 16 % [......................................................................]
 17 % [......................................................................]
 18 % [......................................................................]
 19 % [......................................................................]
 20 % [......................................................................]
 22 % [......................................................................]
 23 % [......................................................................]
 24 % [......................................................................]
 25 % [......................................................................]
 26 % [......................................................................]
 27 % [......................................................................]
 28 % [......................................................................]
 29 % [......................................................................]
 30 % [......................................................................]
 31 % [......................................................................]
 32 % [......................................................................]
 33 % [......................................................................]
 34 % [......................................................................]
 35 % [......................................................................]
 36 % [......................................................................]
 37 % [......................................................................]
 38 % [......................................................................]
 39 % [......................................................................]
 40 % [......................................................................]
 41 % [......................................................................]
 43 % [......................................................................]
 44 % [......................................................................]
 45 % [......................................................................]
 46 % [......................................................................]
 47 % [......................................................................]
 48 % [......................................................................]
 49 % [......................................................................]
 50 % [......................................................................]
 51 % [......................................................................]
 52 % [......................................................................]
 53 % [......................................................................]
 54 % [......................................................................]
 55 % [......................................................................]
 56 % [......................................................................]
 57 % [......................................................................]
 58 % [......................................................................]
 59 % [......................................................................]
 60 % [......................................................................]
 61 % [......................................................................]
 62 % [......................................................................]
 63 % [......................................................................]
 65 % [......................................................................]
 66 % [......................................................................]
 67 % [......................................................................]
 68 % [......................................................................]
 69 % [......................................................................]
 70 % [......................................................................]
 71 % [......................................................................]
 72 % [......................................................................]
 73 % [......................................................................]
 74 % [......................................................................]
 75 % [......................................................................]
 76 % [......................................................................]
 77 % [......................................................................]
 78 % [......................................................................]
 79 % [......................................................................]
 80 % [......................................................................]
 81 % [......................................................................]
 82 % [......................................................................]
 83 % [......................................................................]
 84 % [......................................................................]
 86 % [......................................................................]
 87 % [......................................................................]
 88 % [......................................................................]
 89 % [......................................................................]
 90 % [......................................................................]
 91 % [......................................................................]
 92 % [......................................................................]
 93 % [......................................................................]
 94 % [......................................................................]
 95 % [......................................................................]
 96 % [......................................................................]
 97 % [......................................................................]
 98 % [......................................................................]
 99 % [.........................]
[Type Ctrl-\ + c to quit]

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


U-Boot 2011.12 (Sep 16 2020 - 23:34:16) 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:0x1ff9efc4
       BSS:		0x1ffef4a0
       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 (Sep 16 2020 - 23:34:16) 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:0x1ff9efc4
       BSS:		0x1ffef4a0
       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 (Sep 16 2020 - 23:34:16) 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:0x1ff9efc4
       BSS:		0x1ffef4a0
       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]

When i saw the todays date on u-boot i had a pretty nasty smile on my face:)
Then i made some online search for flash chip IDs in u-boot.It seems /u-boot-2011.12-armada370/drivers/mtd/nand/nand_ids.c does this ID stuff.I have added this to code:
/* 64 Gigabit */
{"NAND 8GiB 1,8V 8-bit",  0xAE, 8192, LP_OPTIONS},
{"NAND 8GiB 3,3V 8-bit",  0xDE, 8192, LP_OPTIONS},
{"NAND 8GiB 1,8V 16-bit", 0xBE, 8192, LP_OPTIONS16},
{"NAND 8GiB 3,3V 16-bit", 0xCE, 8192, LP_OPTIONS16},
Compiled u-boot and tried again but it seems i have to find another config option in this file.Still investigating the NAND ID i just wanted to share updates with you guys.Will post results if i succeeded.

Btw I have uploaded toolchain and u-boot source code to my dropbox folder if anyone interested.

https://www.dropbox.com/sh/v2wsgzx6kk0b76c/AAB6DKBMaxJQNqwMxVNLDH-Ra?dl=0

Regards.
Re: Debian on Netgear RN102
September 16, 2020 04:46PM
whitepawn,

> U-Boot 2011.12 (Sep 16 2020 - 23:34:16) Marvell
> version: v2011.12 2014_T2.0p1
> 06/23/2015 ReadyNAS-102 V2.0


Cool!

You should tried this kwboot with the original NAND before desolder/solder new NAND :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
tme
Re: Debian on Netgear RN102
September 17, 2020 01:09AM
Quote
whitepawn
When I saw today's date on u-boot I had a pretty nasty smile on my face :)

Wonderful! Congratulation! This is great news.

To me, the most annoying shortcoming of the stock u-boot is its inability to boot from a memory stick or an SSD attached to the rear connectors, so USB3 and SATA support are on the top of my wish list for a new u-boot implementation. I understand you have support for large SPI eeproms on your wish list.

What else should be aimed for? Eliminating the incompatibility between the u-boot's serial console and the default Linux' serial console physical addresses? Support for separate DTBs? Adding a tftp boot mode to the boot menu?

I imagine the right way to proceed is to extract the ReadyNAS specific patches from the Marvell u-boot version v2011.12, and modify these patches so they can be applied seamlessly to a recent main stream u-boot implementation. What are the candidates for the "recent main stream u-boot implementation"?

Regards,
Trond Melen
Re: Debian on Netgear RN102
September 17, 2020 01:23AM
> To me, the most annoying shortcoming of the stock
> u-boot is its inability to boot from a memory
> stick or an SSD attached to the rear connectors,

Unfortunately booting with USB 3.0 port will probably not easy to achieve with stock u-boot (of course, it depends on how extensive the Netgear patch is, too). But that booting option is not a priority for NAS vendors so usually they don't botther adding code for it.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Netgear RN102
September 17, 2020 05:15AM
bodhi Wrote:
-------------------------------------------------------
> whitepawn,
>
> > U-Boot 2011.12 (Sep 16 2020 - 23:34:16)
> Marvell
> > version: v2011.12 2014_T2.0p1
> > 06/23/2015 ReadyNAS-102 V2.0

>
> Cool!
>
> You should tried this kwboot with the original
> NAND before desolder/solder new NAND :)
Bodhi,
Yes you are right but "i also like to live dangerously"
I modified nand_ids.c code to
{"NAND 8GiB 3,3V 8-bit Custom",	0x64, 0, 8192, 0, LP_OPTIONS},
since 0x64 is my nand id and 2c is manufacturer micron flash id according to here but it cannot id correctly.What am i missing?Are there anymore files to patch?
@tme
I think USB 3.0 boot is not possible because i couldn't find any code regarding fresco FL1009 USB 3.0 controller in stock u-boot.Front USB 2.0 is directly hardwired to Armada CPU on the other hand USB 3.0 is wired to fresco contoller then which is wired to cpu via pci interface since my aim is booting whole system on nand (because of usb reset problems i have) so i didn't investigated deeply.I can try to add fresco driver to stock u-boot but as i said i am a hardware guy more then software so i even don't know what i am doing.
Tftp boot is already in stock u-boot i guess.
Regards.
Re: Debian on Netgear RN102
September 17, 2020 05:53AM
whitepawn,

Look for

./board/mv_ebu/common/mv_hal/nfc/mvNfc.c

Regarding USB 3.0, yes, it is the PCI bus.

Trond,

Quote

I imagine the right way to proceed is to extract the ReadyNAS specific patches from the Marvell u-boot version v2011.12, and modify these patches so they can be applied seamlessly to a recent main stream u-boot implementation. What are the candidates for the "recent main stream u-boot implementation"?

In theory, that's an ideal situation. But U-boot has gone through architectural changes a few times. The Marvell u-boot that is used in these NAS is quite old (its software architecture is at least twice removed from the current mainline u-boot).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Netgear RN102
September 17, 2020 06:08AM
All,

Could you guys describe how you connect serial console. Where is the header and what is the pinouts?


It is for AkkJaa in this thread:

https://forum.doozan.com/read.php?3,106724,107619#msg-107619

Seems like the RN102 and RN104 have the same board.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Netgear RN102
September 17, 2020 06:30AM
Bodhi,
Please see this about serial pinout.TX and RX is enough for console.GND and VCC are not used if AkkJaa uses USB to serial adapter which is self powered by itself in his case.
Also board itself has 4 pinheader internally but i havent tested yet.
I can upload my own connection photos if you are needed.
Regards.
Re: Debian on Netgear RN102
September 17, 2020 06:38AM
whitepawn,

> Also board itself has 4 pinheader internally but i
> havent tested yet.

That's the J7 header, the 2nd UART port. So you have UART0 and UART1.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
tme
Re: Debian on Netgear RN102
September 17, 2020 08:43AM
Quote
whitepawn
TX and RX is enough for console.

Maybe. Add GND for reliable communication. But I agree to leave 3.3 V VCC unconnected.

RX of the USB-to-serial adapter should be connected to TX of the box, and vice versa. Trial and error is the easiest approach since it is harmless to get this wrong. Make sure to get GND right every time - getting this wrong may harm the box or adapter.
Attachments:
open | download - RN102-serial-console-reduced.jpeg (304.8 KB)
Re: Debian on Netgear RN102
September 17, 2020 09:56AM
Tme,
If you are using isolated power bricks or using plugs without earth (which always connects GND) GND must be connected.
If your PC and Nas power brick connects same outlet with earthing you don't need to connect GND because it is connected Via earthing internally so you won't need to connect extra ground.
Regards.
Re: Debian on Netgear RN102
September 17, 2020 04:02PM
Quote

If you are using isolated power bricks or using plugs without earth (which always connects GND) GND must be connected.
If your PC and Nas power brick connects same outlet with earthing you don't need to connect GND because it is connected Via earthing internally so you won't need to connect extra ground.

Yes. And it does not hurt to connect GND in either cases and keep it simple for someone is using this the 1st time.

Quote

RX of the USB-to-serial adapter should be connected to TX of the box, and vice versa.

Not for certain module converter like the CP2012. This converter is already crossed. So RXD to RXD and TXD to TXD is the right connection. OTOH, the Prolific PL3xxx must be connected crossed wire.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Netgear RN102
September 17, 2020 04:15PM
Bodhi,
I managed to detect 8gb flash with your recommendation:
Quote
Bodhi
whitepawn,

Look for

./board/mv_ebu/common/mv_hal/nfc/mvNfc.c

I have edited nand_ids.c

{"NAND 8GiB 3,3V 16-bit Custom",	0x64, 0, 8192, 0, LP_OPTIONS16},
First it complained about 8 bit config which is LP_OPTIONS then i changed it to LP_OPTIONS16 no more complains from u-boot.

And edited mnNfc.c to:
{			/* Micron 64Gb */
	 .tADL = 0,		/* tADL, Address to write data delay */
	 .tCH = 20,		/* tCH, Enable signal hold time */
	 .tCS = 20,		/* tCS, Enable signal setup time */
	 .tWC = 90,		/* tWC, ND_nWE cycle duration */
	 .tWH = 45,		/* tWH, ND_nWE high duration */
	 .tWP = 45,		/* tWP, ND_nWE pulse time */
	 .tRC = 90,		/* tWC, ND_nRE cycle duration */
	 .tRH = 45,		/* tRH, ND_nRE high duration */
	 .tRP = 45,		/* tRP, ND_nRE pulse width */
	 .tR = 0,		/* tR = data transfer from cell to register */
	 .tWHR = 90,		/* tWHR, ND_nWE high to ND_nRE low delay for status read */
	 .tAR = 65,		/* tAR, ND_ALE low to ND_nRE low delay */
	 .tRHW = 32,		/* tRHW, ND_nRE high to ND_nWE low delay */
	 .pgPrBlk = 256,	/* Pages per block - detected */
	 .pgSz = 8192,		/* Page size */
	 .oobSz = 448,		/* Spare size */
	 .blkNum = 4096,	/* Number of blocks/sectors in the flash */
	 .id = 0x642C,		/* Device ID 0xDevice,Vendor */
	 .model = "Micron 64Gb 8bit",
	 .bb_page = 0,		/* Manufacturer Bad block marking page in block */
	 .flags = NFC_CLOCK_UPSCALE_200M
	 },
Now it detects flash as 8192 megabytes.Yes!

root@whitepawnxeon:/home/jigsaw/Downloads# kwboot -t -B 115200 /dev/ttyUSB0 -b u-boot-a370-2.1WP-nand-db-uart.bin -p
Sending boot message. Please reboot the target...\
Sending boot image...
  0 % [......................................................................]
  1 % [......................................................................]
  2 % [......................................................................]
  3 % [......................................................................]
  4 % [......................................................................]
  5 % [......................................................................]
  6 % [......................................................................]
  7 % [......................................................................]
  8 % [......................................................................]
  9 % [......................................................................]
 10 % [......................................................................]
 11 % [......................................................................]
 12 % [......................................................................]
 13 % [......................................................................]
 14 % [......................................................................]
 15 % [......................................................................]
 16 % [......................................................................]
 17 % [......................................................................]
 18 % [......................................................................]
 19 % [......................................................................]
 20 % [......................................................................]
 22 % [......................................................................]
 23 % [......................................................................]
 24 % [......................................................................]
 25 % [......................................................................]
 26 % [......................................................................]
 27 % [......................................................................]
 28 % [......................................................................]
 29 % [......................................................................]
 30 % [......................................................................]
 31 % [......................................................................]
 32 % [......................................................................]
 33 % [......................................................................]
 34 % [......................................................................]
 35 % [......................................................................]
 36 % [......................................................................]
 37 % [......................................................................]
 38 % [......................................................................]
 39 % [......................................................................]
 40 % [......................................................................]
 41 % [......................................................................]
 43 % [......................................................................]
 44 % [......................................................................]
 45 % [......................................................................]
 46 % [......................................................................]
 47 % [......................................................................]
 48 % [......................................................................]
 49 % [......................................................................]
 50 % [......................................................................]
 51 % [......................................................................]
 52 % [......................................................................]
 53 % [......................................................................]
 54 % [......................................................................]
 55 % [......................................................................]
 56 % [......................................................................]
 57 % [......................................................................]
 58 % [......................................................................]
 59 % [......................................................................]
 60 % [......................................................................]
 61 % [......................................................................]
 62 % [......................................................................]
 63 % [......................................................................]
 65 % [......................................................................]
 66 % [......................................................................]
 67 % [......................................................................]
 68 % [......................................................................]
 69 % [......................................................................]
 70 % [......................................................................]
 71 % [......................................................................]
 72 % [......................................................................]
 73 % [......................................................................]
 74 % [......................................................................]
 75 % [......................................................................]
 76 % [......................................................................]
 77 % [......................................................................]
 78 % [......................................................................]
 79 % [......................................................................]
 80 % [......................................................................]
 81 % [......................................................................]
 82 % [......................................................................]
 83 % [......................................................................]
 84 % [......................................................................]
 86 % [......................................................................]
 87 % [......................................................................]
 88 % [......................................................................]
 89 % [......................................................................]
 90 % [......................................................................]
 91 % [......................................................................]
 92 % [......................................................................]
 93 % [......................................................................]
 94 % [......................................................................]
 95 % [......................................................................]
 96 % [......................................................................]
 97 % [......................................................................]
 98 % [......................................................................]
 99 % [........................]
[Type Ctrl-\ + c to quit]

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


U-Boot 2011.12 (Sep 17 2020 - 23:05:36) 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:0x1ff9ef5c
       BSS:		0x1ffef0a0
       Stack:		0x1f9eeef8
       Heap:		0x1f9ef000:0x1feef000

NAND:  (ID 0x642c)	8192 MiB
MMC:   MRVL_MMC: 0
Bad block table not found for chip 0
Bad block table not found for chip 0
Bad block table written to 0x0001ffff0000, version 0x01
Bad block table written to 0x0001fffe0000, version 0x01
*** Warning - bad CRC, 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...
Writing to Nand... done
Power On!

Updating env to v3...
Saving Environment to NAND...
Erasing Nand...
Writing to Nand... done
Loading FDT from NAND 0xEC000 to 0x1000000 failed!
Saving Environment to NAND...
Erasing Nand...
Writing to Nand... done
Hit any key to stop autoboot:  0 

NAND read: device 0 offset 0x200000, size 0x400000
Skipping bad block 0x00210000
Skipping bad block 0x00320000
Skipping bad block 0x00380000
Skipping bad block 0x003d0000
Skipping bad block 0x00400000
Skipping bad block 0x00410000
Skipping bad block 0x00420000
Skipping bad block 0x00430000
Skipping bad block 0x00440000
Skipping bad block 0x00450000
Skipping bad block 0x00460000
Skipping bad block 0x00470000
Skipping bad block 0x00480000
Skipping bad block 0x00490000
Skipping bad block 0x004a0000
Skipping bad block 0x004b0000
Skipping bad block 0x004c0000
Skipping bad block 0x004d0000
Skipping bad block 0x004e0000
Skipping bad block 0x004f0000
Skipping bad block 0x00500000
Skipping bad block 0x00510000
Skipping bad block 0x00520000
Skipping bad block 0x00530000
Skipping bad block 0x00540000
Skipping bad block 0x00550000
Skipping bad block 0x00560000
Skipping bad block 0x00570000
Skipping bad block 0x00580000
Skipping bad block 0x00590000
Skipping bad block 0x005a0000
Skipping bad block 0x005b0000
Skipping bad block 0x005c0000
Skipping bad block 0x005d0000
Skipping bad block 0x005e0000
Skipping bad block 0x005f0000
Skipping bad block 0x00600000
Skipping bad block 0x00610000
Skipping bad block 0x00620000
Skipping bad block 0x00630000
Skipping bad block 0x00640000
Skipping bad block 0x00650000
Skipping bad block 0x00660000
Skipping bad block 0x00670000
Skipping bad block 0x00680000
Skipping bad block 0x00690000
Skipping bad block 0x006a0000
Skipping bad block 0x006b0000
Skipping bad block 0x006c0000
Skipping bad block 0x006d0000
Skipping bad block 0x006e0000
Skipping bad block 0x006f0000
Skipping bad block 0x00700000
Skipping bad block 0x00710000
Skipping bad block 0x00720000
Skipping bad block 0x00730000
Skipping bad block 0x00740000
Skipping bad block 0x00750000
Skipping bad block 0x00760000
Skipping bad block 0x00770000
Skipping bad block 0x00780000
Skipping bad block 0x00790000
Skipping bad block 0x007a0000
Skipping bad block 0x007b0000
Skipping bad block 0x007c0000
Skipping bad block 0x007d0000
Skipping bad block 0x007e0000
Skipping bad block 0x007f0000
Skipping bad block 0x00800000
Skipping bad block 0x00810000
Skipping bad block 0x00820000
Skipping bad block 0x00830000
Skipping bad block 0x00840000
Skipping bad block 0x00850000
Skipping bad block 0x00860000
Skipping bad block 0x00870000
Skipping bad block 0x00880000
Skipping bad block 0x00890000
Skipping bad block 0x008a0000
Skipping bad block 0x008b0000
Skipping bad block 0x008c0000
Skipping bad block 0x008d0000
Skipping bad block 0x008e0000
Skipping bad block 0x008f0000
Skipping bad block 0x00900000
Skipping bad block 0x00910000
Skipping bad block 0x00920000
Skipping bad block 0x00930000
Skipping bad block 0x00940000
Skipping bad block 0x00950000
Skipping bad block 0x00960000
Skipping bad block 0x00970000
Skipping bad block 0x00980000
Skipping bad block 0x00990000
Skipping bad block 0x009a0000
Skipping bad block 0x009b0000
Skipping bad block 0x009c0000
Skipping bad block 0x009d0000
Skipping bad block 0x009e0000
Skipping bad block 0x009f0000
Skipping bad block 0x00a00000
Skipping bad block 0x00a10000
Skipping bad block 0x00a20000
Skipping bad block 0x00a30000
Skipping bad block 0x00a40000
Skipping bad block 0x00a50000
Skipping bad block 0x00a60000
Skipping bad block 0x00a70000
Skipping bad block 0x00a80000
Skipping bad block 0x00a90000
Skipping bad block 0x00aa0000
Skipping bad block 0x00ab0000
Skipping bad block 0x00ac0000
Skipping bad block 0x00ad0000
Skipping bad block 0x00ae0000
Skipping bad block 0x00af0000
Skipping bad block 0x00b00000
Skipping bad block 0x00b10000
Skipping bad block 0x00b20000
Skipping bad block 0x00b30000
Skipping bad block 0x00b40000
Skipping bad block 0x00b50000
Skipping bad block 0x00b60000
Skipping bad block 0x00b70000
Skipping bad block 0x00b80000
Skipping bad block 0x00b90000
Skipping bad block 0x00ba0000
Skipping bad block 0x00bb0000
Skipping bad block 0x00bc0000
Skipping bad block 0x00bd0000
Skipping bad block 0x00be0000
Skipping bad block 0x00bf0000
Skipping bad block 0x00c00000
Skipping bad block 0x00c10000
Skipping bad block 0x00c20000
Skipping bad block 0x00c30000
Skipping bad block 0x00c40000
Skipping bad block 0x00c50000
Skipping bad block 0x00c60000
Skipping bad block 0x00c70000
Skipping bad block 0x00c80000
Skipping bad block 0x00c90000
Skipping bad block 0x00ca0000
Skipping bad block 0x00cb0000
Skipping bad block 0x00cc0000
Skipping bad block 0x00cd0000
Skipping bad block 0x00ce0000
Skipping bad block 0x00cf0000
Skipping bad block 0x00d00000
Skipping bad block 0x00d10000
Skipping bad block 0x00d20000
Skipping bad block 0x00d30000
Skipping bad block 0x00d40000
Skipping bad block 0x00d50000
Skipping bad block 0x00d60000
Skipping bad block 0x00d70000
Skipping bad block 0x00d80000
Skipping bad block 0x00d90000
Skipping bad block 0x00da0000
Skipping bad block 0x00db0000
Skipping bad block 0x00dc0000
Skipping bad block 0x00dd0000
Skipping bad block 0x00de0000
Skipping bad block 0x00df0000
 4194304 bytes read: OK

NAND read: device 0 offset 0x800000, size 0x400000
Skipping bad block 0x00800000
Skipping bad block 0x00810000
Skipping bad block 0x00820000
Skipping bad block 0x00830000
Skipping bad block 0x00840000
Skipping bad block 0x00850000
Skipping bad block 0x00860000
Skipping bad block 0x00870000
Skipping bad block 0x00880000
Skipping bad block 0x00890000
Skipping bad block 0x008a0000
Skipping bad block 0x008b0000
Skipping bad block 0x008c0000
Skipping bad block 0x008d0000
Skipping bad block 0x008e0000
Skipping bad block 0x008f0000
Skipping bad block 0x00900000
Skipping bad block 0x00910000
Skipping bad block 0x00920000
Skipping bad block 0x00930000
Skipping bad block 0x00940000
Skipping bad block 0x00950000
Skipping bad block 0x00960000
Skipping bad block 0x00970000
Skipping bad block 0x00980000
Skipping bad block 0x00990000
Skipping bad block 0x009a0000
Skipping bad block 0x009b0000
Skipping bad block 0x009c0000
Skipping bad block 0x009d0000
Skipping bad block 0x009e0000
Skipping bad block 0x009f0000
Skipping bad block 0x00a00000
Skipping bad block 0x00a10000
Skipping bad block 0x00a20000
Skipping bad block 0x00a30000
Skipping bad block 0x00a40000
Skipping bad block 0x00a50000
Skipping bad block 0x00a60000
Skipping bad block 0x00a70000
Skipping bad block 0x00a80000
Skipping bad block 0x00a90000
Skipping bad block 0x00aa0000
Skipping bad block 0x00ab0000
Skipping bad block 0x00ac0000
Skipping bad block 0x00ad0000
Skipping bad block 0x00ae0000
Skipping bad block 0x00af0000
Skipping bad block 0x00b00000
Skipping bad block 0x00b10000
Skipping bad block 0x00b20000
Skipping bad block 0x00b30000
Skipping bad block 0x00b40000
Skipping bad block 0x00b50000
Skipping bad block 0x00b60000
Skipping bad block 0x00b70000
Skipping bad block 0x00b80000
Skipping bad block 0x00b90000
Skipping bad block 0x00ba0000
Skipping bad block 0x00bb0000
Skipping bad block 0x00bc0000
Skipping bad block 0x00bd0000
Skipping bad block 0x00be0000
Skipping bad block 0x00bf0000
Skipping bad block 0x00c00000
Skipping bad block 0x00c10000
Skipping bad block 0x00c20000
Skipping bad block 0x00c30000
Skipping bad block 0x00c40000
Skipping bad block 0x00c50000
Skipping bad block 0x00c60000
Skipping bad block 0x00c70000
Skipping bad block 0x00c80000
Skipping bad block 0x00c90000
Skipping bad block 0x00ca0000
Skipping bad block 0x00cb0000
Skipping bad block 0x00cc0000
Skipping bad block 0x00cd0000
Skipping bad block 0x00ce0000
Skipping bad block 0x00cf0000
Skipping bad block 0x00d00000
Skipping bad block 0x00d10000
Skipping bad block 0x00d20000
Skipping bad block 0x00d30000
Skipping bad block 0x00d40000
Skipping bad block 0x00d50000
Skipping bad block 0x00d60000
Skipping bad block 0x00d70000
Skipping bad block 0x00d80000
Skipping bad block 0x00d90000
Skipping bad block 0x00da0000
Skipping bad block 0x00db0000
Skipping bad block 0x00dc0000
Skipping bad block 0x00dd0000
Skipping bad block 0x00de0000
Skipping bad block 0x00df0000
 4194304 bytes read: OK
Wrong Image Format for bootm command
ERROR: can't get kernel image!
Marvell>>

Then i booted debian to just to see if it works.Attached full log in post.


First of all is it safe to erase all chip with "nand erase.chip" command?If you say yes then i must use "nand scrub.chip" to mark false positive bad blocks right?

Here is my mtd partition plan:
mtd0 is u-boot 1.5megs
mtd1 is u-boot envs 128k
mtd2 is rootfs rest of flash

Is this the right way to do it?I just want to use your kernel and rootfs i don't need stock os anymore.
Is there any tutorial how to partition nand?After partitioning i will make an image of mtd2 size on pc and dd it to box.I don't know if my taughts are true or this is the right way i am just making speculation.
Regards.
Attachments:
open | download - Firstbootrn102with8gbnand.txt (173.6 KB)
Re: Debian on Netgear RN102
September 17, 2020 04:59PM
whitepawn,

> NAND:  (ID 0x642c)	8192 MiB
[    4.957071][    T1] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0x64
[    4.963573][    T1] nand: Micron MT29F64G08CBABAWP
[    4.969041][    T1] nand: 8192 MiB, MLC, erase size: 2048 KiB, page size: 8192, OOB size: 744
Neutron
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
Debian 10.5
Thu Sep 17 13:34:00 PDT 2020 up 2 minutes

Congrats! looks very nice.

> First of all is it safe to erase all chip with
> "nand erase.chip" command?If you say yes then i
> must use "nand scrub.chip" to mark false positive
> bad blocks right?

Yes. I would do that nand scrub the first time. After that the mtd system will mark the real bad blocks for you.

> Here is my mtd partition plan:
> mtd0 is u-boot 1.5megs
> mtd1 is u-boot envs 128k
> mtd2 is rootfs rest of flash
>
> Is this the right way to do it?I just want to use
> your kernel and rootfs i don't need stock os
> anymore.
> Is there any tutorial how to partition nand?After
> partitioning i will make an image of mtd2 size on
> pc and dd it to box.I don't know if my taughts are
> true or this is the right way i am just making
> speculation.

There are 2 things to do.

1. Define the mtdparts variable, and possibly also 2 other variables if needed

Example (this is my definition for NSA325 box, adjust them to your real definition)
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env)
partition=nand0,2

You must keep the u-boot and u-boot envs mtds exactly the way they were in stock.

$ cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00180000 00020000 "u-boot"
mtd1: 00020000 00020000 "u-boot-env"
mtd2: 00600000 00020000 "uImage"
mtd3: 00400000 00020000 "minirootfs"
mtd4: 07400000 00020000 "ubifs"

And the remaining space could be anything you want. Something like this:

setenv mtdparts mtdparts=orion-nand:0x180000@0(u-boot),0x20000@0x180000(u-boot-env),-(rootfs)
And then boot into Debian.

And use nandwrite to populate the first 2 mtds inside Debian (always better to do it in Linux to take advantage of better MTD sysem software).

1. U-boot image can be flashed directly to mtd0 (pay attention to image size and mtd0 size). But still better to pad the rest to fit exactly to mtd0.

2. The easy way to populate the envs mtd is to save it in serial console after the u-boot was flashed and reboot (The harder way is format it as an u-boot image of 128K before flashing).

3. mtd2 UBIFS device needs to be attached before you can create a volume, mount, and then tar the rootfs tarball to it.

Note: mtd2 does not need to be UBIFS, if you just want to populate uImage and uInitrd to boot the USB rootfs. If the goal is to have a real rootfs on NAND then yes, UBIFS is the best option. But this configuration is flexible. There are many alternatives. If you want to real rootfs on USB 3.0 then you need mtd2 and mtd3 to be where the uImage and uInitrd reside.

All 3 steps above need to be filled in (please post questions if you are not sure which commands to use).

========

Food for thought: my rootfs on the Mirabox is on USB 3.0 in the back. My kernel files uImage and uInitrd are on SD card /boot folder. I'm still testing so don't want to flash uImage and uInitrd to MTDs.

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



Edited 2 time(s). Last edit at 09/17/2020 05:55PM by bodhi.
Re: Debian on Netgear RN102
September 17, 2020 07:05PM
Bodhi,
Thank you for your fast reply.
I have scrubbed then erased whole NAND.After scrubbing, my placebo "bad blocks" are gone.I still have some of them but i assume it is normal in such big NAND.Attached log in attachment.

After clearing NAND issues i have set up my envs like below:

Marvell>> mtdparts=pxa3xx_nand-0:0x180000@0(u-boot),0x20000@0x180000(u-boot-env)
Marvell>> mtdids=nand0=pxa3xx
Marvell>> partition=nand0,2
Marvell>> setenv mtdparts 'mtdparts=pxa3xx_nand-0:0x180000@0(u-boot),0x20000@0x180000(u-boot-env),-(rootfs)'
Marvell>> setenv usb_set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial'
Marvell>> setenv load_uimage 'ext2load usb 0:1 0x2000000 /boot/uImage'
Marvell>> setenv load_uinitrd 'ext2load usb 0:1 0x3000000 /boot/uInitrd'
Marvell>> setenv usb_boot 'run load_uimage; if run load_uinitrd; then bootm 0x2000000 0x3000000; else bootm 0x2000000; fi'
Marvell>> setenv usb_bootcmd 'run usb_set_bootargs; run usb_boot'
Marvell>> setenv bootcmd 'usb start; run usb_bootcmd; usb stop; reset'
Marvell>> setenv fdt_skip_update yes
Marvell>> boot

Booted debian on USB drive.Attached log in attachment.
It complains about error correction system, how can i fix this?:

T1] nand: WARNING: pxa3xx_nand-0: the ECC used on your system (16b/2048B) is too weak compared to the one required by the NAND chip (40b/1024B)


Checked mtd parts, seems right:


root@Neutron:~# lsblk
NAME      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda         8:0    0  7.5G  0 disk 
`-sda1      8:1    0  7.5G  0 part /
mtdblock0  31:0    0  1.5M  1 disk 
mtdblock1  31:1    0  128K  1 disk 
mtdblock2  31:2    0    8G  1 disk 
root@Neutron:~# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00180000 00200000 "u-boot"
mtd1: 00020000 00200000 "u-boot-env"
mtd2: 1ffe60000 00200000 "rootfs"
root@Neutron:~#

But when i used nandwrite to test if i can write mtd1 it says permission denied:

root@Neutron:/media# nandwrite -p /dev/mtd1 mtd1  
nandwrite: error!: /dev/mtd1
           error 13 (Permission denied)
root@Neutron:/media# flash_eraseall -j /dev/mtd1
flash_eraseall has been replaced by `flash_erase <mtddev> 0 0`; please use it
flash_erase: error!: /dev/mtd1
             error 13 (Permission denied)

Also could you please make dtb for this layout?Or your linux-5.8.5-mvebu-370xp-tld-1-bodhi archive dtb is enough?I needed it to build U-boot nand image, right now i am using uart image as you know:
Ext. headers = 1, Header size = 81920 bytes Hdr-to-Img gap = 0 bytes
New image size = 0xc5f48[810824] Source image size = 0xbdf44[778052]
failed to open '../armada-370-netgear-rn102.dtb'
Error writing u-boot-a370-2.1WP-nand-db.bin file 

 *** Error: Doimage failed


 *** Error: Build u-boot boot from NAND failed

Quote
Bodhi
1. U-boot image can be flashed directly to mtd0 (pay attention to image size and mtd0 size). But still better to pad the rest to fit exactly to mtd0.
I can take my original mtd0 backup fill it with ff and insert new nand uboot code in it then i can dd it (unsafe maybe because not verified i think) or nandwrite(much safer?)

Quote
Bodhi
2. The easy way to populate the envs mtd is to save it in serial console after the u-boot was flashed and reboot (The harder way is format it as an u-boot image of 128K before flashing).
Since i have original mtd1 backup (which has serial number and my original mac) for this i think i will format partition and dd or nandwrite it.I think i will use hard way.

Quote
Bodhi
3. mtd2 UBIFS device needs to be attached before you can create a volume, mount, and then tar the rootfs tarball to it.

Note: mtd2 does not need to be UBIFS, if you just want to populate uImage and uInitrd to boot the USB rootfs. If the goal is to have a real rootfs on NAND then yes, UBIFS is the best option. But this configuration is flexible. There are many alternatives. If you want to real rootfs on USB 3.0 then you need mtd2 and mtd3 to be where the uImage and uInitrd reside.

Actually i didn't quite understand this question.(Sorry it is late in here and my iq level is dropping.)I want to boot all my system on NAND i will set it and forget it no USB devices needed.I know using system like this will wear out NAND flash but i don't care if it brokes some day i can always solder new one.So is UBIFS the right choice for this purpose right?

Thanks again for your great support.
Regards.
Attachments:
open | download - Nand_scrub.txt (44 KB)
open | download - bootlog.txt (30.8 KB)
Re: Debian on Netgear RN102
September 17, 2020 07:45PM
whitepawn,

I will be back. You need to get some sleep:)

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

> It complains about error correction system, how
> can i fix this?

It is ony a warning, it is OK ignore it. To make it perfect, iirc somewhere in the DTS must be modified for this chip. The DTS currently being used works for all MVEBU boxes stock NAND chips.

> But when i used nandwrite to test if i can write
> mtd1 it says permission denied:

Looks like there was error in the initializtion so they are read-only.

[   10.037570][    T1] mtd: partition "u-boot" doesn't end on an erase/write block -- force read-only
[   10.048169][    T1] 0x000000180000-0x0000001a0000 : "u-boot-env"
[   10.053714][    T1] mtd: partition "u-boot-env" doesn't start on an erase/write block boundary -- force read-only
[   10.066049][    T1] 0x0000001a0000-0x000200000000 : "rootfs"
[   10.071274][    T1] mtd: partition "rootfs" doesn't start on an erase/write block boundary -- force read-only

So I need to take a look at this a bit closer.

> Also could you please make dtb for this layout?Or
> your linux-5.8.5-mvebu-370xp-tld-1-bodhi archive
> dtb is enough?

Yes. The current DTB in kernel linux-5.8.5-mvebu-370xp-tld-1 is good. The MTDs definition actually is from the bootargs mtdparts. The mtd partitions definition in the DTS is not relevant.

> I can take my original mtd0 backup fill it with ff
> and insert new nand uboot code in it then i can dd
> it (unsafe maybe because not verified i think) or
> nandwrite(much safer?)

Not dd (never use dd to flash u-boot or envs). nandwrite is the tool. And don't manually fill with ff(s) either.

Either use the -p option to let nandwrite pad the empty space for you. Or do it in 2 steps: use dd to write the new u-boot image to a new file which has the size of 0x00180000 (1.5 MB), and then use nandwrite to flash.

> Since i have original mtd1 backup (which has
> serial number and my original mac) for this i
> think i will format partition and dd or
> nandwrite it.I think i will use hard way.

Yeah, I forgot that you have mtd1 backup! that's the better way, use nandwrite to flash.

> Actually i didn't quite understand this
> question.(Sorry it is late in here and my iq level
> is dropping.)I want to boot all my system on NAND
> i will set it and forget it no USB devices
> needed.I know using system like this will wear out
> NAND flash but i don't care if it brokes some day
> i can always solder new one.So is UBIFS the right
> choice for this purpose right?

Yes, UBIFS is the right choice. So to do that, you need to check to see if ubifs commands are available in u-boot. And the env will let the kernel know such file system is used (in the bootargs).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
tme
Re: Debian on Netgear RN102
September 18, 2020 01:29AM
Hi All,

To assess the amount of work involved in extracting the patches from the stock RN102 U-Boot and apply them to a recent U-Boot, I downloaded the mainline v2011.12 release and the Marwell/Netgear implementation to create the diff-file (attached):
wget https://gitlab.denx.de/u-boot/u-boot/-/archive/v2011.12/u-boot-v2011.12.tar.bz2
tar xf u-boot-v2011.12.tar.bz2 
wget https://www.downloads.netgear.com/files/GPL/ReadyNASOS_V6.6.0_WW_src.zip
mkdir ReadyNASOS_V6.6.0_WW_src && (cd ReadyNASOS_V6.6.0_WW_src && unzip -q ../ReadyNASOS_V6.6.0_WW_src.zip)
ln -s ReadyNASOS_V6.6.0_WW_src/u-boot-2011.12-armada370 u-boot-v2011.12-armada370
diff --recursive --ignore-all-space --ignore-blank-lines u-boot-v2011.12/ u-boot-v2011.12-armada370/ > u-boot-v2011-12.diff

Number of patches:
egrep '^[0-9]' u-boot-v2011-12.diff | wc -l
630

Number of source code lines modified or removed:
egrep '^<' u-boot-v2011-12.diff | wc -l
622

Number of source code lines modified or added:
egrep '^>' u-boot-v2011-12.diff | wc -l
3698

Number of files modified:
egrep '^diff' u-boot-v2011-12.diff | wc -l
97

Number of files added:
egrep '^Only in u-boot-v2011.12-armada370/' u-boot-v2011-12.diff | wc -l
39

Number of files deleted:
egrep '^Only in u-boot-v2011.12/' u-boot-v2011-12.diff | wc -l
16
egrep '^Only in u-boot-v2011.12/' u-boot-v2011-12.diff | egrep -v .gitignore | wc -l
0

My conclusion: The Marwell/Neatgear U-Boot implementaion is very different from the original v2011.12 version. It makes little sense to try to apply the 630 patches to a recent version.

Quote
bodhi
In theory, that's an ideal situation. But U-boot has gone through architectural changes a few times.

Which makes it insane. All work and no play makes Jack a dull boy.

It may make more sense to add support for RN102 in the upcoming U-Boot v2020.10. Support for Marvell Armada 370 and XP SoC was added to mainline U-Boot already in 2015 and was aligned with the Linux 5.x device tree last year. "This file contains the definitions that are common to the Armada 370 and Armada XP SoC". So maybe it's no big deal to add support for RN102 (and RN104). Any thoughts?

Regards,
Trond Melen
Attachments:
open | download - u-boot-v2011-12.diff (163.8 KB)
Re: Debian on Netgear RN102
September 18, 2020 05:59PM
Bodhi,
Quote
Bodhi
Looks like there was error in the initializtion so they are read-only.

[ 10.037570][ T1] mtd: partition "u-boot" doesn't end on an erase/write block -- force read-only
[ 10.048169][ T1] 0x000000180000-0x0000001a0000 : "u-boot-env"
[ 10.053714][ T1] mtd: partition "u-boot-env" doesn't start on an erase/write block boundary -- force read-only
[ 10.066049][ T1] 0x0000001a0000-0x000200000000 : "rootfs"
[ 10.071274][ T1] mtd: partition "rootfs" doesn't start on an erase/write block boundary -- force read-only

So I need to take a look at this a bit closer.

I think i have figured it out by changing partition sizes on mtd0 and mtd1 but i am not sure if it is the right way to do it.According to here it must be a multiple of the block-size of the flash chip so i have used this bootenvs:
Marvell>> mtdparts=pxa3xx_nand-0:0x200000@0(u-boot),0x200000@0x200000(u-boot-env)
Marvell>> mtdids=nand0=pxa3xx
Marvell>> partition=nand0,2
Marvell>> setenv mtdparts 'mtdparts=pxa3xx_nand-0:0x200000@0(u-boot),0x200000@0x200000(u-boot-env),-(ubifs)'
Marvell>> setenv usb_set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial'
Marvell>> setenv load_uimage 'ext2load usb 0:1 0x2000000 /boot/uImage'
Marvell>> setenv load_uinitrd 'ext2load usb 0:1 0x3000000 /boot/uInitrd'
Marvell>> setenv usb_boot 'run load_uimage; if run load_uinitrd; then bootm 0x2000000 0x3000000; else bootm 0x2000000; fi'
Marvell>> setenv usb_bootcmd 'run usb_set_bootargs; run usb_boot'
Marvell>> setenv bootcmd 'usb start; run usb_bootcmd; usb stop; reset'
Marvell>> setenv fdt_skip_update yes
Marvell>> boot

I let the kernel boot, it didn't complain about read-only stuff this time.Log is attached to post.
Then i checked if mtd sizes are correct:

root@Neutron:~# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00200000 00200000 "u-boot"
mtd1: 00200000 00200000 "u-boot-env"
mtd2: 1ffc00000 00200000 "ubifs"
root@Neutron:~# mtd_debug info /dev/mtd0
mtd.type = MTD_MLCNANDFLASH
mtd.flags = MTD_CAP_NANDFLASH
mtd.size = 2097152 (2M)
mtd.erasesize = 2097152 (2M)
mtd.writesize = 8192 (8K)
mtd.oobsize = 744 
regions = 0

root@Neutron:~# mtd_debug info /dev/mtd1
mtd.type = MTD_MLCNANDFLASH
mtd.flags = MTD_CAP_NANDFLASH
mtd.size = 2097152 (2M)
mtd.erasesize = 2097152 (2M)
mtd.writesize = 8192 (8K)
mtd.oobsize = 744 
regions = 0

root@Neutron:~# mtd_debug info /dev/mtd2
mtd.type = MTD_MLCNANDFLASH
mtd.flags = MTD_CAP_NANDFLASH
mtd.size = 4290772992 (3G)
mtd.erasesize = 2097152 (2M)
mtd.writesize = 8192 (8K)
mtd.oobsize = 744 
regions = 0

root@Neutron:~# lsblk
NAME      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda         8:0    1 14.3G  0 disk 
`-sda1      8:1    1 14.3G  0 part 
sdb         8:16   1  7.5G  0 disk 
`-sdb1      8:17   1  7.5G  0 part /
mtdblock0  31:0    0    2M  0 disk 
mtdblock1  31:1    0    2M  0 disk 
mtdblock2  31:2    0    8G  0 disk

Mounted another USB drive which contains my compiled nand u-boot and stock u-boot-envs:

root@Neutron:/# mount /dev/sda1 /media/
[  374.166223][ T3373] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[  374.207261][ T3373] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
root@Neutron:/# cd /media/

Tried to erase and flash mtd0 and mtd1 but flash_eraseall seems doesn't work with MLC nand only ubifs seems to work, I may be wrong on this:

root@Neutron:/media# flash_eraseall -j /dev/mtd0
flash_eraseall has been replaced by `flash_erase <mtddev> 0 0`; please use it
flash_erase: error!: JFFS2 cannot support MLC NAND.
root@Neutron:/media# nandwrite -p /dev/mtd1 ubootenvsstockmtd1.bin 
Writing data to block 0 at offset 0x0
root@Neutron:/media# nandwrite -p /dev/mtd0 u-boot-rn102-nandwithdtbmtd0.bin
Writing data to block 0 at offset 0x0

After this process i checked if nandtest works:

root@Neutron:/media# nandtest -k /dev/mtd1
ECC corrections: 0
ECC failures   : 0
Bad blocks     : 0
BBT blocks     : 0
00000000: reading (1 of 4)...
 845 bit(s) ECC corrected at 00000000
00000000: reading (2 of 4)...
 719 bit(s) ECC corrected at 00000000
00000000: reading (3 of 4)...
 734 bit(s) ECC corrected at 00000000
00000000: reading (4 of 4)...
 756 bit(s) ECC corrected at 00000000
00000000: reading (1 of 1)...
 624 bit(s) ECC corrected at 00000000
00000000: checking...
Finished pass 1 successfully
root@Neutron:/media# nandtest -k /dev/mtd0
ECC corrections: 0
ECC failures   : 0
Bad blocks     : 0
BBT blocks     : 0
00000000: reading (1 of 4)...
 793 bit(s) ECC corrected at 00000000

ECC failed at 00000000
00000000: reading (2 of 4)...
 683 bit(s) ECC corrected at 00000000
00000000: reading (3 of 4)...
 670 bit(s) ECC corrected at 00000000
00000000: reading (4 of 4)...
 694 bit(s) ECC corrected at 00000000
00000000: reading (1 of 1)...
 591 bit(s) ECC corrected at 00000000
00000000: checking...
Finished pass 1 successfully

Then i rebooted device but it seems nandwrite didn't write anything in mtd0 and mtd1.Any recommendations?Can u-boot and envs flashed with UBIFS instead of nandwrite(JFFS22)?


Quote
Bodhi
Yes. The current DTB in kernel linux-5.8.5-mvebu-370xp-tld-1 is good. The MTDs definition actually is from the bootargs mtdparts. The mtd partitions definition in the DTS is not relevant.

I have used your dtb while compilinf bootloader i compiled fine:

**** [Creating Image]	*****


 Ext. headers = 1, Header size = 76160 bytes Hdr-to-Img gap = 0 bytes
New image size = 0xbdf44[778052] Source image size = 0xbdf44[778052]
====>>>> u-boot-a370-2.1WP-nand-db-uart.bin was created

 Ext. headers = 1, Header size = 81920 bytes Hdr-to-Img gap = 0 bytes
New image size = 0xc5f48[810824] Source image size = 0xbdf44[778052]
====>>>> u-boot-a370-2.1WP-nand-db.bin was created
====> moved mv u-boot-a370-2.1WP-nand-db.bin u-boot-rn102-nand.bin


Quote
Bodhi
Yes, UBIFS is the right choice. So to do that, you need to check to see if ubifs commands are available in u-boot. And the env will let the kernel know such file system is used (in the bootargs).

In u-boot i have ubi command set so i think it works.

@tme
If you have any tutorial about porting u-boot or patching USB3.0 drivers to netgear stock u-boot i can try to compile and build something but i can't promise since i am a beginner in software stuff.

Regards.



Edited 1 time(s). Last edit at 09/18/2020 06:03PM by whitepawn.
Attachments:
open | download - kernellog.txt (30.5 KB)
Re: Debian on Netgear RN102
September 18, 2020 09:08PM
whitepawn,

Quote

1. I think i have figured it out by changing partition sizes on mtd0 and mtd1 but i am not sure if it is the right way to do it.According to here it must be a multiple of the block-size of the flash chip


OK, so comparing the 2 definitions. Keep in mind that the erase block size for this NAND is 2M (0x00200000).

Old:
dev:    size   erasesize  name
mtd0: 00180000 00200000 "u-boot"                # this is 1536k (1.5M)
mtd1: 00020000 00200000 "u-boot-env"         # this is 128K
mtd2: 1ffe60000 00200000 "rootfs"                 # this is the rest of NAND so we dont care where

So the total size needed for u-boot is 1664K. Rounding it up to 2M.

New:
dev:    size   erasesize  name
mtd0: 00200000 00200000 "u-boot"
mtd1: 00200000 00200000 "u-boot-env"
mtd2: 1ffc00000 00200000 "ubifs"

This new definition above is not going work. The envs area must start at 1536k, and it is 128K large.

What you should do here is defining mtd0 of 2M, and mtd1 of 128K. mtd1 should start at offset 1536k (it is OK to do that, like an overlay file system, where mtd1 is inside mtd0). And then keep mtd2 the same.

Therefore,

setenv mtdparts 'mtdparts=pxa3xx_nand-0:0x200000@0(u-boot),0x20000@0x00180000(u-boot-env),-(rootfs)'

And then, the /etc/fw_env.config will need to conform to the new definition. But we will worry about that later.

Quote

2. Then i rebooted device but it seems nandwrite didn't write anything in mtd0 and mtd1.Any recommendations?Can u-boot and envs flashed with UBIFS instead of nandwrite(JFFS22)?

No, UBIFS cannot be used for u-boot and envs. They are raw, i.e. must be flashed as binary. The BootROM expects u-boot to be a raw binary. And u-boot also expects the envs area to be raw.

Unfortunately, I think it is the NAND chip type MLC that might be the issue here. However, I need to see the bootlog if you have one. Don't worry about the envs just yet.

Start kwboot, set the mtds:

setenv mtdparts 'mtdparts=pxa3xx_nand-0:0x200000@0(u-boot),0x20000@0x00180000(u-boot-env),-(rootfs)'

Boot into Debian, flash the u-boot image

Flash u-boot with -p option:
nandwrite -p /dev/mtd0 u-boot-rn102-nandwithdtbmtd0.bin

And reboot. And post the boot log if there is any output at all.

NOTE:

I tend to conflate the term raw and JFFS2 here. But you get the meaning. OTOH, UBIFS is a real filesystem just like Ext2 or Ext3.

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



Edited 3 time(s). Last edit at 09/18/2020 09:40PM by bodhi.
Re: Debian on Netgear RN102
September 19, 2020 04:45AM
Bodhi,
Before starting to avoid any conflict previous writes i erased nand chip again.

I have tried with your mtd envs:
Marvell>> setenv mtdparts 'mtdparts=pxa3xx_nand-0:0x200000@0(u-boot),0x20000@0x00180000(u-boot-env),-(ubifs)'
Marvell>> mtdparts=pxa3xx_nand-0:0x200000@0(u-boot),0x20000@0x00180000(u-boot-env)
Marvell>> mtdids=nand0=pxa3xx
Marvell>> partition=nand0,2
Marvell>> setenv usb_set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial'
Marvell>> setenv load_uimage 'ext2load usb 0:1 0x2000000 /boot/uImage'
Marvell>> setenv load_uinitrd 'ext2load usb 0:1 0x3000000 /boot/uInitrd'
Marvell>> setenv usb_boot 'run load_uimage; if run load_uinitrd; then bootm 0x2000000 0x3000000; else bootm 0x2000000; fi'
Marvell>> setenv usb_bootcmd 'run usb_set_bootargs; run usb_boot'
Marvell>> setenv bootcmd 'usb start; run usb_bootcmd; usb stop; reset'
Marvell>> setenv fdt_skip_update yes
Marvell>> boot

Attached full log on post.

It didn't complain about u-boot mtd but complained about u-boot-envs and ubifs partitions:
3 cmdlinepart partitions found on MTD device pxa3xx_nand-0
[   10.020845][    T1] Creating 3 MTD partitions on "pxa3xx_nand-0":
[   10.026485][    T1] 0x000000000000-0x000000200000 : "u-boot"
[   10.034041][    T1] 0x000000180000-0x0000001a0000 : "u-boot-env"
[   10.040196][    T1] mtd: partition "u-boot-env" doesn't start on an erase/write block boundary -- force read-only
[   10.051943][    T1] 0x0000001a0000-0x000200000000 : "ubifs"
[   10.057735][    T1] mtd: partition "ubifs" doesn't start on an erase/write block boundary -- force read-only

Since we are going to write u-boot mtd0 and it mounted as r/w i proceeded:
root@Neutron:~# lsblk                
NAME      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda         8:0    1  7.5G  0 disk 
`-sda1      8:1    1  7.5G  0 part /
sdb         8:16   1 14.3G  0 disk 
`-sdb1      8:17   1 14.3G  0 part 
mtdblock0  31:0    0    2M  0 disk 
mtdblock1  31:1    0  128K  1 disk 
mtdblock2  31:2    0    8G  1 disk 
root@Neutron:~# mount /dev/sdb1 /media/
[  187.266245][ T3229] EXT4-fs (sdb1): mounting ext3 file system using the ext4 subsystem
[  187.308250][ T3229] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
root@Neutron:~# cd /media/
root@Neutron:/media# ls
.         firstbootrn102  u-boot-a370-2.1WP-nand-db-uart.bin
..        lost+found      u-boot-rn102-nandwithdtbmtd0.bin
.Trash-0  nandwrite       ubootenvsstockmtd1.bin
envsnew   scrub
root@Neutron:/media# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00200000 00200000 "u-boot"
mtd1: 00020000 00200000 "u-boot-env"
mtd2: 1ffe60000 00200000 "ubifs"
root@Neutron:/media# nandwrite -p /dev/mtd0 u-boot-rn102-nandwithdtbmtd0.bin
Writing data to block 0 at offset 0x0

Then i want to see if it writes something to nand:

root@Neutron:/media# dd if=/dev/mtd0 of=/media/mtd0afterwrite.bin
4096+0 records in
4096+0 records out
2097152 bytes (2.1 MB, 2.0 MiB) copied, 0.70359 s, 3.0 MB/s
root@Neutron:/media# cat mtd0afterwrite.bin 
�H_
   @@5[�_-���������-�6�����/��-��>������/��-�_��>�O������/��������O���/�������"��/ဵ���K{D{`�{h[h�G8`;h+�
                       ���K{DF
                              �[�{hF
                                    �V�
                                       K{DF
                                           �Q���{h{`{h[h+��O�F�F���3��������F��pG�����v�F+�������
                 ��K{DF
                       �"�O�F��\������O����O�`b���r�`O�s��@�2���`H�
                                                                   S��O��`O�s��O��`O�{`zhO�,��3`O�,{`zhN��N#`O�0{`zhO���`O���T�O���\�O�p��X�O�P��H�H�
                                                                     S��O��`O�s��O��`O����@�b���r�`�F��������x`{h�`�hF��F��pG���O�F�F��pG���H�0 ������F�+�O�BC���3�B����F�������F
                 F�q�qO�M�`O�;tO�{a�y�aO��a�
                                            �
                                             O�F�FO�
                                                    ��F+�O����zF� �F��������x`O�{bO���#0O�zp
            ���O�!�`O�;tO�{aO��aO��a�
                                     �!O�F�FO�
                                              ���F+�UK{DF
                                                         �$�{h��O�'�`O�;tO�{aO��aO��a�
      �"O�F�FO�
               ��F+�{jCS{bO�
                            ��#0��!0O��۲�+�+�+ �{jC�{b��#0C���#0�{jC�{b��#0C���#0

COMMENT:SOME GARBAGE IN HERE I SHORTED

                @ �
                   P� ���
                         @ 
                           P� ��
                                @ �
P� ���
@ 
P� ��
@ �	P� ���	@ 	P� ��	@ P� ��@P� �@ �P� ���@ P� ��@ �P� ���@ P� ��@ �P� ���@ P� ��@ �P� ���@ P� ��@ �P� ���@ P� ��@ �P� ���@ P� ��@ �P� ���@ P� ��@ �P� ���@ P� ��@ ���/����/�/o� b�0���/�P���Q����
@-����@���A��/��/���ƾGeneral initializationSERDES initializationDRAM initializationSuspend wake up

 **********           failed!   ********


General initialization - Version: 1.0.0
���mvBoardSerdesModulesScan: mvTwsiRead error, Using default serdes configuration ****mvCtrlHighSpeedSerdesPhyConfig: Board unknown.

High speed PHY - Version: 2.1.4 - 2nd boot - Skip 
 (COM-PHY-V20) 
Hight speed PHY Error #1
SATA port error for serdes line: 
Update PEX Device ID 0xHigh speed PHY - Ended Successfully
mvPexConfigRead: ERR. device number illigal %dmvPexConfigRead: ERR. functio
.
.
.
.
^C

It seems actually can write to mtd0.
Then i proceed to reboot:

root@Neutron:/media# reboot
INIT: Switching to rulevel: 6
INIT: Sending processes
Broadcast message from root@Neutron (ttyS0) (Sat Sep 19 01:57:11 2020):

The system is going down for reboot NOW!
[info] Using makefile-style concurrent boot in runlevel 6.
[ ok ] Stopping hotplug events dispatcher: systemd-udevd.
[ ok ] Stopping Avahi mDNS/DNS-SD Daemon: avahi-daemon.
[....] Stopping busybox' klogd implementation: klogd2676 (klogd)
Stopped klogd (pid 2676).
. ok 
[....] Stopping busybox' syslogd implementation: syslogd2649 (syslogd)
. ok 
[ ok ] Stopping Glances server: glances .
[ ok ] Stopping NFS kernel daemon: mountd nfsd.
[ ok ] Unexporting directories for NFS kernel daemon....
[ ok ] Asking all remaining processes to terminate...done.
[ ok ] All processes ended within 1 seconds...done.
[ ok ] Stopping NFS common utilities: idmapd statd.
[info] Saving the system clock.
[info] Hardware Clock updated to Sat Sep 19 01:57:19 PDT 2020.
[ ok ] Stopping RPC port mapper daemon: rpcbind.
[....] Deconfiguring network interfaces...Removed stale PID file
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/a6:d1:e3:46:5e:32
Sending on   LPF/eth0/a6:d1:e3:46:5e:32
Sending on   Socket/fallback
DHCPRELEASE of 192.168.2.105 on eth0 to 192.168.2.1 port 67
send_packet: Network is unreachable
send_packet: please consult README file regarding broadcast address.
dhclient.c:2878: Failed to send 300 byte long packet over fallback interface.
done.
[ ok ] Saving random seed...done.
[....] Will now unmount temporary filesystems:umount: /tmp unmounted
. ok 
[ ok ] Will now deactivate swap:.
[....] Will now unmount local filesystems:umount: /media (/dev/sdb1) unmounted
. ok 
[....] Mounting root filesystem read-only...[  370.683552][ T3765] EXT4-fs (sda1): re-mounted. Opts: (null)
done.
[info] Will now restart.
[  370.977296][ T3786] reboot: Restarting system

BootROM 1.08
Booting from NAND flash
BootROM: Invalid header checksum
BootROM: Bad header at offset 00010000
BootROM: Bad header at offset 00020000
BootROM: Bad header at offset 00030000
BootROM: Bad header at offset 00040000
BootROM: Bad header at offset 00050000
BootROM: Bad header at offset 00060000
BootROM: Bad header at offset 00070000
BootROM: Bad header at offset 00080000
BootROM: Bad header at offset 00090000
BootROM: Bad header at offset 000A0000
BootROM: Bad header at offset 000B0000
BootROM: Bad header at offset 000C0000
BootROM: Bad header at offset 000D0000
I SHORTED BAD HEADER MESSAGES
BootROM: Bad header at offset 03FD0000
BootROM: Bad header at offset 03FE0000
BootROM: Bad header at offset 03FF0000

BootROM 1.08
Booting from NAND flash
BootROM: Invalid header checksum
BootROM: Bad header at offset 00010000
BootROM: Bad header at offset 00020000
ISHORTED BAD HEADER MESSAGES
BootROM: Bad header at offset 03FD0000
BootROM: Bad header at offset 03FE0000
BootROM: Bad header at offset 03FF0000
SAME LOOP CONTINUES:
BootROM 1.08
Booting from NAND flash
BootROM: Invalid header checksum
BootROM: Bad header at offset 00010000
.......

It compains about header cheksum.
Now i will compare u-boot headers to stock one on a windows machine with hex compare.

Regards.
Attachments:
open | download - 1909fulllog.txt (473.1 KB)
Re: Debian on Netgear RN102
September 19, 2020 06:02AM
whitepawn,

Remove the env mtd.

setenv mtdparts 'mtdparts=pxa3xx_nand-0:0x200000@0(u-boot),-(ubifs)'

Flash:
nandwrite -p /dev/mtd0 u-boot-rn102-nandwithdtbmtd0.bin

Verify:
dd if=/dev/mtd0 of=/media/mtd0afterwrite.bin
diff u-boot-rn102-nandwithdtbmtd0.bin mtd0afterwrite.bin

And reboot.

If the header checksum is bad again, check how the u-boot image was created during the build.

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



Edited 1 time(s). Last edit at 09/19/2020 06:03AM by bodhi.
Re: Debian on Netgear RN102
September 19, 2020 01:24PM
Bodhi,
Wiped flash again and tried with your envs:
Marvell>> setenv mtdparts 'mtdparts=pxa3xx_nand-0:0x200000@0(u-boot),-(ubifs)'
Marvell>> mtdparts=pxa3xx_nand-0:0x200000@0(u-boot)
Marvell>> mtdids=nand0=pxa3xx
Kernel log:
T1] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0x64
[    4.953966][    T1] nand: Micron MT29F64G08CBABAWP
[    4.959436][    T1] nand: 8192 MiB, MLC, erase size: 2048 KiB, page size: 8192, OOB size: 744
[    4.967642][    T1] nand: WARNING: pxa3xx_nand-0: the ECC used on your system (16b/2048B) is too weak compared to the one required by the NAND chip (40b/1024B)
[    4.994114][    T1] Bad block table not found for chip 0
[    5.008822][    T1] Bad block table not found for chip 0
[    5.013719][    T1] Scanning device for bad blocks
[    5.256157][ T1198] ata2: SATA link down (SStatus 0 SControl 300)
[    5.266934][ T1194] ata1: SATA link down (SStatus 0 SControl 300)
[    5.277663][ T1209] ata3: SATA link down (SStatus 0 SControl F300)
[   10.003100][    T1] Bad block table written to 0x0001ffe00000, version 0x01
[   10.012026][    T1] Bad block table written to 0x0001ffc00000, version 0x01
[   10.018967][    T1] 2 cmdlinepart partitions found on MTD device pxa3xx_nand-0
[   10.025654][    T1] Creating 2 MTD partitions on "pxa3xx_nand-0":
[   10.031277][    T1] 0x000000000000-0x000000200000 : "u-boot"
[   10.038835][    T1] 0x000000200000-0x000200000000 : "ubifs"
Flashing routine:
root@Neutron:/media# nandwrite -p /dev/mtd0 u-boot-rn102-nandwithdtbmtd0.bin
Writing data to block 0 at offset 0x0
root@Neutron:/media# dd if=/dev/mtd0 of=/media/mtd0afterwrite.bin
4096+0 records in
4096+0 records out
2097152 bytes (2.1 MB, 2.0 MiB) copied, 0.70676 s, 3.0 MB/s
root@Neutron:/media# diff u-boot-rn102-nandwithdtbmtd0.bin mtd0afterwrite.bin
Binary files u-boot-rn102-nandwithdtbmtd0.bin and mtd0afterwrite.bin differ
root@Neutron:/media#
Rebooted system:
root@Neutron:/media# reboot
INIT: Sending processe[info] Using makefile-style concurrent boot in runlevel 6.
[ ok ] Stopping hotplug events dispatcher: systemd-udevd.
[ ok ] Stopping Avahi mDNS/DNS-SD Daemon: avahi-daemon.
[....] Stopping busybox' klogd implementation: klogd2690 (klogd)
Stopped klogd (pid 2690).
. ok 
[....] Stopping busybox' syslogd implementation: syslogd2663 (syslogd)
. ok 
[ ok ] Stopping Glances server: glances .
[ ok ] Stopping NFS kernel daemon: mountd nfsd.
[ ok ] Unexporting directories for NFS kernel daemon....
[ ok ] Asking all remaining processes to terminate...done.
[ ok ] All processes ended within 1 seconds...done.
[ ok ] Stopping NFS common utilities: idmapd statd.
[info] Saving the system clock.
[info] Hardware Clock updated to Sat Sep 19 10:18:05 PDT 2020.
[ ok ] Stopping RPC port mapper daemon: rpcbind.
[....] Deconfiguring network interfaces...Removed stale PID file
Internet Systems Consortium DHCP Client 4.4.1
Copyright 2004-2018 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/26:99:32:12:91:3e
Sending on   LPF/eth0/26:99:32:12:91:3e
Sending on   Socket/fallback
DHCPRELEASE of 192.168.2.105 on eth0 to 192.168.2.1 port 67
[  223.497875][   T20] mvneta d0074000.ethernet eth0: Link is Down
done.
[ ok ] Saving random seed...done.
[....] Will now unmount temporary filesystems:umount: /tmp unmounted
. ok 
[ ok ] Will now deactivate swap:.
[....] Will now unmount local filesystems:umount: /media (/dev/sda1) unmounted
. ok 
[....] Mounting root filesystem read-only...[  226.784121][ T3728] EXT4-fs (sdb1): re-mounted. Opts: (null)
done.
[info] Will now restart.
[  227.079011][ T3749] reboot: Restarting system

BootROM 1.08
Booting from NAND flash
BootROM: Invalid header checksum
BootROM: Bad header at offset 00010000
BootROM: Bad header at offset 00020000
BootROM: Bad header at offset 00030000
BootROM: Bad header at offset 00040000
BootROM: Bad header at offset 00050000
.....
....
..

I have already tested my NAND Image (u-boot-rn102-nandwithdtbmtd0.bin) with kwboot it boots fine and checked first byte which is 8b i checked it (wtarreau blog) and it points it is a NAND image so i think NAND image is fine.
But when i rebooted system after writing with nandflash line above and loaded u-boot uart and tried nand dump 0 it is all FF.

Marvell>> nand dump 0
Page 00000000 dump:
0000 - 000f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0010 - 001f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0020 - 002f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0030 - 003f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0040 - 004f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0050 - 005f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0060 - 006f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0070 - 007f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0080 - 008f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0090 - 009f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
00a0 - 00af: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
00b0 - 00bf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
00c0 - 00cf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
00d0 - 00df: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
00e0 - 00ef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
00f0 - 00ff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0100 - 010f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0110 - 011f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0120 - 012f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0130 - 013f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0140 - 014f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0150 - 015f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0160 - 016f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0170 - 017f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0180 - 018f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0190 - 019f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
01a0 - 01af: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
01b0 - 01bf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
01c0 - 01cf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
01d0 - 01df: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
01e0 - 01ef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
01f0 - 01ff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0200 - 020f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0210 - 021f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0220 - 022f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0230 - 023f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0240 - 024f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0250 - 025f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0260 - 026f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0270 - 027f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0280 - 028f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0290 - 029f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
02a0 - 02af: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
02b0 - 02bf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
02c0 - 02cf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
02d0 - 02df: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
02e0 - 02ef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
02f0 - 02ff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0300 - 030f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0310 - 031f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0320 - 032f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0330 - 033f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0340 - 034f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0350 - 035f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0360 - 036f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0370 - 037f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0380 - 038f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0390 - 039f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
03a0 - 03af: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
03b0 - 03bf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
03c0 - 03cf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
03d0 - 03df: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
03e0 - 03ef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
03f0 - 03ff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0400 - 040f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0410 - 041f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0420 - 042f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0430 - 043f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0440 - 044f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0450 - 045f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0460 - 046f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0470 - 047f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0480 - 048f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0490 - 049f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
04a0 - 04af: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
04b0 - 04bf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
04c0 - 04cf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
04d0 - 04df: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
04e0 - 04ef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
04f0 - 04ff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0500 - 050f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0510 - 051f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0520 - 052f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0530 - 053f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0540 - 054f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0550 - 055f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0560 - 056f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0570 - 057f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0580 - 058f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0590 - 059f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
05a0 - 05af: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
05b0 - 05bf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
05c0 - 05cf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
05d0 - 05df: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
05e0 - 05ef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
05f0 - 05ff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0600 - 060f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0610 - 061f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0620 - 062f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0630 - 063f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0640 - 064f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0650 - 065f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0660 - 066f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0670 - 067f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0680 - 068f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0690 - 069f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
06a0 - 06af: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
06b0 - 06bf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
06c0 - 06cf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
06d0 - 06df: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
06e0 - 06ef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
06f0 - 06ff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0700 - 070f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0710 - 071f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0720 - 072f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0730 - 073f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0740 - 074f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0750 - 075f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0760 - 076f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0770 - 077f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0780 - 078f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0790 - 079f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
07a0 - 07af: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
07b0 - 07bf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
07c0 - 07cf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
07d0 - 07df: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
07e0 - 07ef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
07f0 - 07ff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0800 - 080f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0810 - 081f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0820 - 082f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0830 - 083f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0840 - 084f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0850 - 085f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0860 - 086f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0870 - 087f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0880 - 088f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0890 - 089f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
08a0 - 08af: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
08b0 - 08bf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
08c0 - 08cf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
08d0 - 08df: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
08e0 - 08ef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
08f0 - 08ff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0900 - 090f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0910 - 091f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0920 - 092f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0930 - 093f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0940 - 094f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0950 - 095f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0960 - 096f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0970 - 097f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0980 - 098f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0990 - 099f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
09a0 - 09af: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
09b0 - 09bf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
09c0 - 09cf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
09d0 - 09df: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
09e0 - 09ef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
09f0 - 09ff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0a00 - 0a0f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0a10 - 0a1f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0a20 - 0a2f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0a30 - 0a3f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0a40 - 0a4f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0a50 - 0a5f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0a60 - 0a6f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0a70 - 0a7f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0a80 - 0a8f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0a90 - 0a9f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0aa0 - 0aaf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0ab0 - 0abf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0ac0 - 0acf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0ad0 - 0adf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0ae0 - 0aef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0af0 - 0aff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0b00 - 0b0f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0b10 - 0b1f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0b20 - 0b2f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0b30 - 0b3f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0b40 - 0b4f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0b50 - 0b5f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0b60 - 0b6f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0b70 - 0b7f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0b80 - 0b8f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0b90 - 0b9f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0ba0 - 0baf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0bb0 - 0bbf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0bc0 - 0bcf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0bd0 - 0bdf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0be0 - 0bef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0bf0 - 0bff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0c00 - 0c0f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0c10 - 0c1f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0c20 - 0c2f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0c30 - 0c3f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0c40 - 0c4f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0c50 - 0c5f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0c60 - 0c6f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0c70 - 0c7f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0c80 - 0c8f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0c90 - 0c9f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0ca0 - 0caf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0cb0 - 0cbf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0cc0 - 0ccf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0cd0 - 0cdf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0ce0 - 0cef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0cf0 - 0cff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0d00 - 0d0f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0d10 - 0d1f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0d20 - 0d2f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0d30 - 0d3f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0d40 - 0d4f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0d50 - 0d5f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0d60 - 0d6f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0d70 - 0d7f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0d80 - 0d8f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0d90 - 0d9f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0da0 - 0daf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0db0 - 0dbf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0dc0 - 0dcf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0dd0 - 0ddf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0de0 - 0def: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0df0 - 0dff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0e00 - 0e0f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0e10 - 0e1f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0e20 - 0e2f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0e30 - 0e3f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0e40 - 0e4f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0e50 - 0e5f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0e60 - 0e6f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0e70 - 0e7f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0e80 - 0e8f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0e90 - 0e9f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0ea0 - 0eaf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0eb0 - 0ebf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0ec0 - 0ecf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0ed0 - 0edf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0ee0 - 0eef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0ef0 - 0eff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0f00 - 0f0f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0f10 - 0f1f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0f20 - 0f2f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0f30 - 0f3f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0f40 - 0f4f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0f50 - 0f5f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0f60 - 0f6f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0f70 - 0f7f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0f80 - 0f8f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0f90 - 0f9f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0fa0 - 0faf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0fb0 - 0fbf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0fc0 - 0fcf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0fd0 - 0fdf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0fe0 - 0fef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
0ff0 - 0fff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1000 - 100f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1010 - 101f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1020 - 102f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1030 - 103f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1040 - 104f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1050 - 105f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1060 - 106f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1070 - 107f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1080 - 108f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1090 - 109f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
10a0 - 10af: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
10b0 - 10bf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
10c0 - 10cf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
10d0 - 10df: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
10e0 - 10ef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
10f0 - 10ff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1100 - 110f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1110 - 111f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1120 - 112f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1130 - 113f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1140 - 114f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1150 - 115f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1160 - 116f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1170 - 117f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1180 - 118f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1190 - 119f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
11a0 - 11af: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
11b0 - 11bf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
11c0 - 11cf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
11d0 - 11df: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
11e0 - 11ef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
11f0 - 11ff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1200 - 120f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1210 - 121f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1220 - 122f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1230 - 123f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1240 - 124f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1250 - 125f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1260 - 126f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1270 - 127f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1280 - 128f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1290 - 129f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
12a0 - 12af: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
12b0 - 12bf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
12c0 - 12cf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
12d0 - 12df: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
12e0 - 12ef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
12f0 - 12ff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1300 - 130f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1310 - 131f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1320 - 132f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1330 - 133f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1340 - 134f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1350 - 135f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1360 - 136f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1370 - 137f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1380 - 138f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1390 - 139f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
13a0 - 13af: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
13b0 - 13bf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
13c0 - 13cf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
13d0 - 13df: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
13e0 - 13ef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
13f0 - 13ff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1400 - 140f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1410 - 141f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1420 - 142f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1430 - 143f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1440 - 144f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1450 - 145f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1460 - 146f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1470 - 147f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1480 - 148f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1490 - 149f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
14a0 - 14af: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
14b0 - 14bf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
14c0 - 14cf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
14d0 - 14df: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
14e0 - 14ef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
14f0 - 14ff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1500 - 150f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1510 - 151f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1520 - 152f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1530 - 153f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1540 - 154f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1550 - 155f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1560 - 156f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1570 - 157f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1580 - 158f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1590 - 159f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
15a0 - 15af: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
15b0 - 15bf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
15c0 - 15cf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
15d0 - 15df: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
15e0 - 15ef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
15f0 - 15ff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1600 - 160f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1610 - 161f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1620 - 162f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1630 - 163f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1640 - 164f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1650 - 165f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1660 - 166f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1670 - 167f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1680 - 168f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1690 - 169f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
16a0 - 16af: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
16b0 - 16bf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
16c0 - 16cf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
16d0 - 16df: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
16e0 - 16ef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
16f0 - 16ff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1700 - 170f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1710 - 171f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1720 - 172f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1730 - 173f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1740 - 174f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1750 - 175f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1760 - 176f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1770 - 177f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1780 - 178f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1790 - 179f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
17a0 - 17af: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
17b0 - 17bf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
17c0 - 17cf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
17d0 - 17df: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
17e0 - 17ef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
17f0 - 17ff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1800 - 180f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1810 - 181f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1820 - 182f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1830 - 183f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1840 - 184f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1850 - 185f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1860 - 186f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1870 - 187f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1880 - 188f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1890 - 189f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
18a0 - 18af: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
18b0 - 18bf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
18c0 - 18cf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
18d0 - 18df: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
18e0 - 18ef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
18f0 - 18ff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1900 - 190f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1910 - 191f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1920 - 192f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1930 - 193f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1940 - 194f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1950 - 195f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1960 - 196f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1970 - 197f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1980 - 198f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1990 - 199f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
19a0 - 19af: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
19b0 - 19bf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
19c0 - 19cf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
19d0 - 19df: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
19e0 - 19ef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
19f0 - 19ff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1a00 - 1a0f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1a10 - 1a1f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1a20 - 1a2f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1a30 - 1a3f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1a40 - 1a4f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1a50 - 1a5f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1a60 - 1a6f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1a70 - 1a7f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1a80 - 1a8f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1a90 - 1a9f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1aa0 - 1aaf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1ab0 - 1abf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1ac0 - 1acf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1ad0 - 1adf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1ae0 - 1aef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1af0 - 1aff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1b00 - 1b0f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1b10 - 1b1f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1b20 - 1b2f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1b30 - 1b3f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1b40 - 1b4f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1b50 - 1b5f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1b60 - 1b6f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1b70 - 1b7f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1b80 - 1b8f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1b90 - 1b9f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1ba0 - 1baf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1bb0 - 1bbf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1bc0 - 1bcf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1bd0 - 1bdf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1be0 - 1bef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1bf0 - 1bff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1c00 - 1c0f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1c10 - 1c1f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1c20 - 1c2f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1c30 - 1c3f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1c40 - 1c4f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1c50 - 1c5f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1c60 - 1c6f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1c70 - 1c7f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1c80 - 1c8f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1c90 - 1c9f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1ca0 - 1caf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1cb0 - 1cbf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1cc0 - 1ccf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1cd0 - 1cdf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1ce0 - 1cef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1cf0 - 1cff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1d00 - 1d0f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1d10 - 1d1f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1d20 - 1d2f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1d30 - 1d3f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1d40 - 1d4f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1d50 - 1d5f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1d60 - 1d6f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1d70 - 1d7f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1d80 - 1d8f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1d90 - 1d9f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1da0 - 1daf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1db0 - 1dbf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1dc0 - 1dcf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1dd0 - 1ddf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1de0 - 1def: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1df0 - 1dff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1e00 - 1e0f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1e10 - 1e1f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1e20 - 1e2f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1e30 - 1e3f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1e40 - 1e4f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1e50 - 1e5f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1e60 - 1e6f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1e70 - 1e7f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1e80 - 1e8f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1e90 - 1e9f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1ea0 - 1eaf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1eb0 - 1ebf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1ec0 - 1ecf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1ed0 - 1edf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1ee0 - 1eef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1ef0 - 1eff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1f00 - 1f0f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1f10 - 1f1f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1f20 - 1f2f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1f30 - 1f3f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1f40 - 1f4f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1f50 - 1f5f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1f60 - 1f6f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1f70 - 1f7f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1f80 - 1f8f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1f90 - 1f9f: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1fa0 - 1faf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1fb0 - 1fbf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1fc0 - 1fcf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1fd0 - 1fdf: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1fe0 - 1fef: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
1ff0 - 1fff: ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff
OOB:
00 - 07: ff ff ff ff ff ff ff ff
08 - 0f: ff ff ff ff ff ff ff ff
10 - 17: ff ff ff ff ff ff ff ff
18 - 1f: ff ff ff ff ff ff ff ff
20 - 27: ff ff ff ff ff ff ff ff
28 - 2f: ff ff ff ff ff ff ff ff
30 - 37: ff ff ff ff ff ff ff ff
38 - 3f: ff ff ff ff ff ff ff ff
40 - 47: ff ff ff ff ff ff ff ff
48 - 4f: ff ff ff ff ff ff ff ff
50 - 57: ff ff ff ff ff ff ff ff
58 - 5f: ff ff ff ff ff ff ff ff
60 - 67: ff ff ff ff ff ff ff ff
68 - 6f: ff ff ff ff ff ff ff ff
70 - 77: ff ff ff ff ff ff ff ff
78 - 7f: ff ff ff ff ff ff ff ff
Marvell>>
How this could be happening?The diff says no difference, cat command also same case.

Another solution to this problem i think maybe we can write u-boot via tftp but i don't know which address must i load:

Quote
Willy Tarreau Blog Page Says:
Marvell>> tftpboot 0x7000000 mtd0
Marvell>> md.b 0x7000000 100
07000000: 8b 00 00 00 60 4e 0a 00 01 00 00 c0 00 c0 00 00 ....`N..........
07000010: 00 00 60 00 00 00 6a 00 00 02 01 00 00 00 01 0a ..`...j.........
...
070000f0: aa 25 ad 00 ed 19 2b 60 00 23 ab 20 80 00 c0 19 .%....+`.#. ....
Marvell>>

The contents look fine (note the 8b at the beginning which means that this is a NAND flash image). If everything looks OK and only in this case, you can write the memory contents down to the flash then control that it looks similar to the dump above :

Marvell>> nand write 0x7000000 0 0x00400000
Marvell>> nand dump 0

Then reset the device, it should reboot directly from the flash. If it fails, you just have to retry the procedure above and figure what you got wrong.

Marvell>> reset

Which address i must use for my box above Willy's example?
Regards.
Edit:
After reboot i checked mtd0 again if contents are changed:
root@Neutron:/media# dd if=/dev/mtd0 of=/media/mtd0afterwrite.bin
4096+0 records in
4096+0 records out
2097152 bytes (2.1 MB, 2.0 MiB) copied, 0.70676 s, 3.0 MB/s
root@Neutron:/media# diff u-boot-rn102-nandwithdtbmtd0.bin mtd0afterwrite.bin
Binary files u-boot-rn102-nandwithdtbmtd0.bin and mtd0afterwrite.bin differ
root@Neutron:/media#
Nothing has changed.
Edit2:
I just realized in u-boot nand info says:
Marvell>> nand info
Device 0: nand0, sector size 64 KiB
  Page size      8192 b
  OOB size        128 b
  Erase size    65536 b
But in kernel:
nand: 8192 MiB, MLC, erase size: 2048 KiB, page size: 8192, OOB size: 744

Erase size and oob sizes are different.Is this relevant in our case?



Edited 4 time(s). Last edit at 09/19/2020 04:25PM by whitepawn.
Re: Debian on Netgear RN102
September 19, 2020 05:04PM
whitepawn,

I forgot one step in verifying the nandwrite.

Make it 2MB even:
dd if=u-boot-rn102-nandwithdtbmtd0.bin of=u-boot-rn102-nandwithdtbmtd0.kwb bs=2048k conv=sync

So no padding is needed in writing:
nandwrite /dev/mtd0 u-boot-rn102-nandwithdtbmtd0.kwb

And verify. It should show the 2 binaries are identical:
dd if=/dev/mtd0 of=/media/mtd0afterwrite.kwb
diff u-boot-rn102-nandwithdtbmtd0.kwb mtd0afterwrite.kwb

Try booting one more time after the diff verification showed the write was OK.

===============

Regarding

Quote

Marvell>> nand info
Device 0: nand0, sector size 64 KiB
Page size 8192 b
OOB size 128 b
Erase size 65536 b

But in kernel:
nand: 8192 MiB, MLC, erase size: 2048 KiB, page size: 8192, OOB size: 744

Yes. It is a big difference. That's what I said above

Quote

Unfortunately, I think it is the NAND chip type MLC that might be the issue here.

The BootROM saw NAND with the info above. So it might choke at some point. But we have gone this far, so might as well trying all alternatives. (The BootROM code is proprietary so we don't really know how it detects NAND). And I hope that it can be corrected by u-boot (but not sure).

And you got the right idea to try flashing in serial console, if flashing in Linux does not get to a good boot. Let me look at the address and post the command later.

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



Edited 1 time(s). Last edit at 09/19/2020 05:27PM by bodhi.
Re: Debian on Netgear RN102
September 20, 2020 02:58AM
Bodhi,
Still no luck sir:

Neutron login: root
Password: 
Last login: Sat Sep 19 13:05:39 PDT 2020 on ttyS0
Linux Neutron 5.8.5-mvebu-370xp-tld-1 #1.0 SMP PREEMPT Mon Aug 31 00:00:32 PDT 2020 armv7l

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Neutron
192.168.2.105
NETGEAR ReadyNAS 102
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
Debian 10.5
Sun Sep 20 00:24:56 PDT 2020 up 2 minutes
root@Neutron:~# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00200000 00200000 "u-boot"
mtd1: 00020000 00200000 "u-boot-env"
mtd2: 1ffe60000 00200000 "ubifs"
root@Neutron:~# lsblk
NAME      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda         8:0    1  7.5G  0 disk 
└─sda1      8:1    1  7.5G  0 part /
sdb         8:16   1 14.3G  0 disk 
└─sdb1      8:17   1 14.3G  0 part 
mtdblock0  31:0    0    2M  0 disk 
mtdblock1  31:1    0  128K  1 disk 
mtdblock2  31:2    0    8G  1 disk 
root@Neutron:~# mount /dev/sdb1 /media/
[  176.136407][ T2135] EXT4-fs (sdb1): mounting ext3 file system using the ext4 subsystem
[  176.181281][ T2135] EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
root@Neutron:~# cd /media/
root@Neutron:/media# ls
.         firstbootrn102             scrub
..        lost+found                 u-boot-a370-2.1WP-nand-db-uart.bin
.Trash-0  mtd0afterwrite.bin         u-boot-rn102-nandwithdtbmtd0.bin
NAND.bin  mtd0compiledrampached.bin  u-boot-rn102-nandwithdtbmtd0.kwb
envsnew   nandwrite                  ubootenvsstockmtd1.bin
root@Neutron:/media# nandwrite /dev/mtd0 u-boot-rn102-nandwithdtbmtd0.kwb
Writing data to block 0 at offset 0x0
root@Neutron:/media# dd if=/dev/mtd0 of=/media/mtd0afterwrite.kwb
4096+0 records in
4096+0 records out
2097152 bytes (2.1 MB, 2.0 MiB) copied, 26.2412 s, 79.9 kB/s
root@Neutron:/media# diff u-boot-rn102-nandwithdtbmtd0.kwb mtd0afterwrite.kwb
Binary files u-boot-rn102-nandwithdtbmtd0.kwb and mtd0afterwrite.kwb differ
root@Neutron:/media# reboot
root@Neutron:/media#          Stopping Session 1 of user root.
[  OK  ] Stopped target Graphical Interface.
         Stopping pNFS block layout mapping daemon...
[  OK  ] Stopped target Multi-User System.
         Stopping Network Time Service...
[  OK  ] Stopped target Login Prompts.
         Stopping fan speed regulator...
         Stopping OpenBSD Secure Shell server...
         Stopping LSB: Starts klogd...
         Stopping Getty on tty1...
[  OK  ] Stopped target Timers.
[  OK  ] Stopped Daily Cleanup of Temporary Directories.
[  OK  ] Stopped Daily man-db regeneration.
[  OK  ] Stopped Daily apt upgrade and clean activities.
[  OK  ] Stopped Daily apt download activities.
         Stopping Serial Getty on ttyS0...
[  OK  ] Stopped target RPC Port Mapper.
[  OK  ] Stopped Daily rotation of log files.
[  OK  ] Stopped target System Time Synchronized.
         Stopping Glances...
         Stopping Avahi mDNS/DNS-SD Stack...
         Stopping Regular background program processing daemon...
[  OK  ] Stopped pNFS block layout mapping daemon.
[  OK  ] Stopped Avahi mDNS/DNS-SD Stack.
[  OK  ] Stopped fan speed regulator.
[  OK  ] Stopped Glances.
[  OK  ] Stopped Network Time Service.
[  OK  ] Stopped OpenBSD Secure Shell server.
[  OK  ] Stopped Regular background program processing daemon.
[  OK  ] Stopped Getty on tty1.
[  OK  ] Stopped Serial Getty on ttyS0.
[  OK  ] Stopped LSB: Starts klogd.
[  OK  ] Stopped Session 1 of user root.
         Stopping User Manager for UID 0...
         Stopping Login Service...
         Stopping LSB: Starts syslogd...
[  OK  ] Removed slice system-serial\x2dgetty.slice.
[  OK  ] Removed slice system-getty.slice.
[  OK  ] Stopped /etc/rc.local Compatibility.
[  OK  ] Stopped Login Service.
[  OK  ] Stopped User Manager for UID 0.
         Stopping User Runtime Directory /run/user/0...
[  OK  ] Unmounted /run/user/0.
[  OK  ] Stopped LSB: Starts syslogd.
[  OK  ] Stopped User Runtime Directory /run/user/0.
[  OK  ] Removed slice User Slice of UID 0.
         Stopping Permit User Sessions...
         Stopping D-Bus System Message Bus...
[  OK  ] Stopped D-Bus System Message Bus.
[  OK  ] Stopped Permit User Sessions.
[  OK  ] Stopped target Remote File Systems.
[  OK  ] Stopped target Remote File Systems (Pre).
         Stopping NFS server and services...
[  OK  ] Stopped target NFS client services.
[  OK  ] Stopped target Basic System.
[  OK  ] Stopped target Slices.
[  OK  ] Removed slice User and Session Slice.
[  OK  ] Stopped target Paths.
[  OK  ] Stopped target Sockets.
[  315.054541][ T1964] nfsd: last server has exited, flushing export cache
[  OK  ] Closed Avahi mDNS/DNS-SD Stack Activation Socket.
[  OK  ] Closed D-Bus System Message Bus Socket.
[  OK  ] Stopped target System Initialization.
         Stopping Update UTMP about System Boot/Shutdown...
[  OK  ] Stopped target Local Encrypted Volumes.
[  OK  ] Stopped Forward Password R…uests to Wall Directory Watch.
[  OK  ] Stopped Dispatch Password …ts to Console Directory Watch.
         Stopping Load/Save Random Seed...
[  OK  ] Stopped Update UTMP about System Boot/Shutdown.
[  OK  ] Stopped Load/Save Random Seed.
[  OK  ] Stopped NFS server and services.
         Stopping NFSv4 ID-name mapping service...
         Stopping NFS Mount Daemon...
[  OK  ] Stopped Create Volatile Files and Directories.
[  OK  ] Stopped NFSv4 ID-name mapping service.
[  OK  ] Stopped NFS Mount Daemon.
[  OK  ] Stopped target Network.
         Stopping Raise network interfaces...
         Unmounting RPC Pipe File System...
[  OK  ] Unmounted RPC Pipe File System.
[  318.022337][   T20] mvneta d0074000.ethernet eth0: Link is Down
[  OK  ] Stopped Raise network interfaces.
[  OK  ] Stopped Apply Kernel Variables.
[  OK  ] Stopped target Local File Systems.
         Unmounting /media...
         Unmounting /tmp...
[  OK  ] Stopped Load Kernel Modules.
[  OK  ] Unmounted /tmp.
[  OK  ] Unmounted /media.
[  OK  ] Reached target Unmount All Filesystems.
[  OK  ] Stopped target Swap.
[  OK  ] Stopped target Local File Systems (Pre).
[  OK  ] Stopped Create Static Device Nodes in /dev.
[  OK  ] Stopped Create System Users.
[  OK  ] Stopped Remount Root and Kernel File Systems.
[  OK  ] Reached target Shutdown.
[  OK  ] Reached target Final Step.
[  OK  ] Started Reboot.
[  OK  ] Reached target Reboot.
[  318.954722][    T1] printk: systemd-shutdow: 50 output lines suppressed due to ratelimiting
[  319.077659][    T1] systemd-shutdown[1]: Syncing filesystems and block devices.
[  322.532800][    T1] systemd-shutdown[1]: Sending SIGTERM to remaining processes...
[  322.564592][ T1534] systemd-journald[1534]: Received SIGTERM from PID 1 (systemd-shutdow).
[  322.593314][    T1] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
[  322.621645][    T1] systemd-shutdown[1]: Hardware watchdog 'Orion Watchdog', version 0
[  322.636410][    T1] systemd-shutdown[1]: Unmounting file systems.
[  322.651773][ T2256] [2256]: Remounting '/' read-only in with options 'errors=remount-ro'.
[  323.983795][ T2256] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
[  324.008447][    T1] systemd-shutdown[1]: All filesystems unmounted.
[  324.014503][    T1] systemd-shutdown[1]: Deactivating swaps.
[  324.020623][    T1] systemd-shutdown[1]: All swaps deactivated.
[  324.026136][    T1] systemd-shutdown[1]: Detaching loop devices.
[  324.032766][    T1] systemd-shutdown[1]: All loop devices detached.
[  324.069356][    T1] reboot: Restarting system

BootROM 1.08
Booting from NAND flash
BootROM: Invalid header checksum
BootROM: Bad header at offset 00010000
BootROM: Bad header at offset 00020000
BootROM: Bad header at offset 00030000
BootROM: Bad header at offset 00040000
BootROM: Bad header at offset 00050000
BootROM: Bad header at offset 00060000
BootROM: Bad header at offset 00070000
BootROM: Bad header at offset 00080000
BootROM: Bad header at offset 00090000
BootROM: Bad header at offset 000A0000
BootROM: Bad header at offset 000B0000

Are there any difference between nandwrite and tftp nand write?
Tftp write from u-boot is like dd so no control ecc or fancy stuff i guess.
Regards.
Re: Debian on Netgear RN102
September 20, 2020 04:26AM
whitepawn,

root@Neutron:/media# dd if=/dev/mtd0 of=/media/mtd0afterwrite.kwb
4096+0 records in
4096+0 records out
2097152 bytes (2.1 MB, 2.0 MiB) copied, 26.2412 s, 79.9 kB/s
root@Neutron:/media# diff u-boot-rn102-nandwithdtbmtd0.kwb mtd0afterwrite.kwb
Binary files u-boot-rn102-nandwithdtbmtd0.kwb and mtd0afterwrite.kwb differ

That flashing was not good. Look at the nandwrite command options (2.1 MB is not the expected dump file size).

Ok. Let's regroup.

Quote

> You should tried this kwboot with the original
> NAND before desolder/solder new NAND :)
Bodhi,
Yes you are right but "i also like to live dangerously"

Remember the previous posts above? that "living dangerously" has come back and bitten you in the rear :)

Testing should be very methodical and we'd want to eliminate as much variables if we can, in each step. We don't want to test new u-boot and new NAND at the same time.

So, now to eliminate the unknown variable about the new NAND, you should flash the mtd0 backup file to mtd0 (not the new u-boot kwb). And then reboot to see if the new NAND is working.

If you had kept the original NAND, then you would flash the new u-boot to it. And see if the new u-boot is working.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Debian on Netgear RN102
September 20, 2020 09:08PM
whitepawn,

Change nandwrite to explicitly specify --noecc

nandwrite --noecc /dev/mtd0 u-boot-rn102-nandwithdtbmtd0.kwb

-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: