📜 ⬆️ ⬇️

Resuscitation D-Link NAS DNS-325

Good day!

I want to share a story about how I repaired my primus home D-Link DNS-325 NAS.

The NAS itself is usually in the minimum power consumption mode with the WD Green hard drives turned off (fun_plug is installed on an external USB flash drive, there is an article on Habré about this “boosting”). One day, after the holidays, I turned on the power to the NAS to view / upload photos. He did not turn on. The power LED blinked cheerfully, the HDD soot lights turned on, but the blinking continued and continued without signs of life. Under normal conditions, blinking means the boot process, which should be completed with full initialization and the establishment of a stable power LED. After many attempts to start the device, disconnecting the hard drives, pressing the reset button (which, by the way, is useless until the download completes successfully), I realized with bitterness that this is not a trivial problem that I will have to cope with myself because of the expired warranty (12 months).

Inspection of the contents of the hard drives via USB-to-SATA showed that the data is in order, RAID1 is configured.
')
Jedi googling gave hope for connecting to the serial port DNS-325 and possible diagnostics. You need to get to the port, the board easily gets after disconnecting the hard drives and unscrewing the 4 screws at the back of the NAS (slots are under rubber plugs).

Details about pinout UART on the board and how to connect can be found here . There was one problem. A UART on the DNS-325 board requires TTL 3.3V and can burn at higher voltages. I did not have an RS-232-TTL 3.3V converter, and the ordered cable on eBay did not arrive on time. Having contacted the seller, I received the answer, they say, apparently lost, it happens. He returned the money, but it was necessary to look for another cable or ... The idea came to help using the stray Raspberry PI (or just Raspberry), which has 3.3V UART on board.

Perhaps, I repeat, talking about how to adjust Raspberry from scratch, but I myself would be happy to read about it in one place and consistently.

Configure Raspberry PI


Since my “Raspberry” was already at work, the minimum iron needed was:


So, download the finished image for the RASPBIAN SD card from the main site www.raspberrypi.org . Next, write the downloaded image to the SD card. In my case, I used the built-in card-reader in the laptop and the Win32DiskImager program. By default, the network interface in the distribution package requests the address via DHCP, so by connecting Malin to the home router, I could log in and configure the serial port using:

root@raspberrypi:~# raspi-config

Next, navigate through the menu: "8 Advanced Options" -> "A7 Serial":

Would you like a login shell to be accessible over serial? Current setting: yes

Choose “No” and reboot.

Install and configure the terminal


apt-get install minicom

We start the terminal emulator to work with the serial port:

minicom -D /dev/ttyAMA0 -b 115200 -8

After the corresponding pins of the DNS-325 serial port are connected to the Raspberry PI, the most awaited moment of turning on the device comes. Now, in fact, at least something will become clear why the NAS, after switching on, enters a “steep dive” and does not show signs of life. The port speed and other settings are set correctly, the device itself turned out to be “alive” and in the Raspberry console ran the download log.
Opening the spoiler, you can see the entire boot log:

Output loading messages to the terminal
** MARVELL BOARD: DB-88F6281A-BP LE

U-Boot 1.1.4 (May 16 2011 - 10:40:38) Marvell version: 3.4.14.DNS-325.03

U-Boot code: 00600000 -> 0067FFF0 BSS: -> 006CEE80

Soc: MV88F6281 Rev 3 (DDR2)
CPU running @ 1200Mhz L2 running @ 400Mhz
SysClock = 400Mhz, TClock = 200Mhz

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

CPU: Marvell Feroceon (Rev 1)

Streaming disabled
Write allocate disabled

USB 0: host mode
PEX 0: interface detected no Link.
Net: egiga0 [PRIME]
Hit any key to stop autoboot: 0

NAND read: device 0 offset 0x100000, size 0x300000
load addr ... = a00000

3145728 bytes read: OK

NAND read: device 0 offset 0x600000, size 0x300000
load addr ... = f00000

Bad block at 0x780000 in erase block from 0x780000 will be skipped
3145728 bytes read: OK
## Booting image at 00a00000 ...
Image Name: Linux-2.6.31.8
Created: 2012-06-26 3:38:43 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2565784 Bytes = 2.4 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... Bad Data CRC

NAND read: device 0 offset 0x7100800, size 0x500000
load addr ... = a00000

5242880 bytes read: OK
## Booting image at 00a00000 ...
Image Name: Linux-2.6.22.18
Created: 2011-05-25 7:23:15 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2214860 Bytes = 2.1 MB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
Ok
## Loading Ramdisk Image at 00d00000 ...
Image Name: Ramdisk
Created: 2011-07-11 5:47:12 UTC
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 1566183 Bytes = 1.5 MB
Load Address: 00e00000
Entry Point: 00e00000
Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux ... done ,.
Linux version 2.6.22.18 (jack @ swtest4) (gcc version 4.2.1) # 15 Wed May 25 15:23:11 CST 2011
CPU: ARM926EJ-S [56251311] revision 1 (ARMv5TE), cr = 00053977
Machine: Feroceon-KW
Using UBoot passing parameters structure
Memory policy: ECC disabled, Data cache writeback
CPU0: D VIVT write-back cache
CPU0: I cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
CPU0: D cache: 16384 bytes, associativity 4, 32 byte lines, 128 sets
Built 1 zonelists. Total pages: 65024
Kernel command line: root = / dev / ram console = ttyS0,115200 ::: DB88FXX81: egiga0: none
PID hash table entries: 1024 (order: 10, 4096 bytes)
Console: color dummy device 80x30
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 256MB 0MB 0MB 0MB = 256MB total
Memory: 253696KB available (4156K code, 252K data, 124K init)
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16

CPU Interface
- SDRAM_CS0 .... base 00000000, size 256MB
SDRAM_CS1 .... base 10000000, size 256MB
SDRAM_CS2 .... disable
SDRAM_CS3 .... disable
PEX0_MEM .... base e8000000, size 128MB
PEX0_IO .... base f2000000, size 1MB
INTER_REGS .... base f1000000, size 1MB
NFLASH_CS .... base fa000000, size 2MB
SPI_CS .... base f4000000, size 16MB
BOOT_ROM_CS .... no such
DEV_BOOTCS .... no such
CRYPT_ENG .... base f0000000, size 2MB

Marvell Development Board (LSP Version KW_LSP_4.3.4_patch30) - DB-88F6281A-BP Soc: 88F6281 A1 LE

Detected Tclk 200000000 and SysClk 400000000
MV Buttons Device Load
Marvell USB EHCI Host Controller # 0: c06de600
PEX0 interface detected no Link.
PCI: bus0: Fast back to back transfers enabled
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
NET: Registered protocol family 2
Time: kw_clocksource clocksource has been installed.
IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
TCP Established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
TCP reno registered
checking if image is initramfs ... it isn't (no cpio magic); looks like an initrd
Freeing initrd memory: 1529K
cpufreq: Init kirkwood cpufreq driver
XOR registered 1 NET_DMA over 4 channels
XOR 2nd invalidate WA enabled
cesadev_init (c00119d8)
mvCesaInit: sessions = 640, queue = 64, pSram = f0000000
Warning: TS unit is powered off.
MV Buttons Driver Load
VFS: Disk quotas dquot_6.5.1
Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
squashfs: version 3.3 (2007/10/31) Phillip Lougher
squashfs: LZMA suppport for slax.org by jro
Installing knfsd (copyright © 1996 okir@monad.swb.de).
JFFS2 version 2.2. (NAND) 2001-2006 Red Hat, Inc.
fuse init (API version 7.8)
SGI XFS with large block numbers, no debug enabled
io scheduler noop registered
io scheduler anticipatory registered (default)
Serial: 8250/16550 driver $ Revision: 1.1.1.1 $ 4 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xf1012000 (irq = 33) is a 16550A
serial8250.0: ttyS1 at MMIO 0xf1012100 (irq = 34) is a 16550A
RAMDISK driver initialized: 16 RAM disks of 10240K size 1024 blocksize
loop: module loaded
Loading Marvell Ethernet Driver:
o Cached descriptors in DRAM
o DRAM SW cache-coherency
o Single RX Queue support - ETH_DEF_RXQ = 0
o Single TX Queue support - ETH_DEF_TXQ = 0
o TCP segmentation offload enabled
o LRO support supported
o Receive checksum offload enabled
o Transmit checksum offload enabled
o Network Fast Processing (Routing) supported
o Driver ERROR statistics enabled
o Driver INFO statistics enabled
o Proc tool API enabled
o SKB Reuse supported
o SKB Recycle supported
o Rx descripors: q0 = 128
o Tx descripors: q0 = 532
o Loading network interface (s):
o register under egiga0 platform
o egiga0, ifindex = 1, GbE port = 0

Warning: Giga 1 is Powered Off

mvFpRuleDb (c0f2a000): 2048 entries, 8192 bytes
Integrated sata device found
scsi0: Marvell SCSI to SATA adapter
scsi1: Marvell SCSI to SATA adapter
NFTL driver: nftlcore.c $ Revision: 1.1.1.1 $, nftlmount.c $ Revision: 1.1.1.1 $
NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 60 at 0x00780000
Bad eraseblock 109 at 0x00da0000
Bad eraseblock 455 at 0x038e0000
Bad eraseblock 499 at 0x03e60000
Using static partition definition
Creating 6 MTD partitions on "nand_mtd":
0x00000000-0x00100000: "u-boot"
0x00100000-0x00600000: "uImage"
0x00600000-0x00b00000: "ramdisk"
0x00b00000-0x07100000: "image"
0x07100000-0x07b00000: "mini firmware"
0x07b00000-0x08000000: "config"
ehci_marvell ehci_marvell.70059: Marvell Orion EHCI
ehci_marvell ehci_marvell.70059: new USB bus registered, assigned bus number 1
ehci_marvell ehci_marvell.70059: irq 19, io base 0xf1050100
ehci_marvell ehci_marvell.70059: USB 2.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration # 1 chosen from 1 choice
hub 1-0: 1.0: USB hub found
hub 1-0: 1.0: 1 port detected
USB Universal Host Controller Interface driver v3.0
mice: PS / 2 mouse device for all mice
i2c / dev entries driver
md: linear personality registered for level -1
md: raid0 personality registered for level 0
md: raid1 personality registered for level 1
device-mapper: ioctl: 4.11.0-ioctl (2006-10-12) initialised: dm-devel@redhat.com
dm_crypt using the OCF package.
usbcore: registered new interface driver usbhid
drivers / hid / usbhid / hid-core.c: v2.6: USB HID core driver
TCP cubic registered
NET: Registered protocol family 1
NET: Registered protocol family 17
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
RAMDISK: Compressed image found at block 0
EXT2-fs warning: maximal mount count, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem).
Freeing init memory: 124K
init started: BusyBox v1.11.2 (2010-11-17 11:44:30 CST)
starting pid 276, tty '': '/etc/rc.sh'
** Mounting / etc / fstab
umount: proc: not mounted
umount: proc: not mounted
umount: / usr / local / modules: not mounted
umount: /usr/local/tmp/image.cfs: not found
umount: / usr / local / tmp: not mounted
first good block is 0
ECC failed: 0
ECC corrected: 0
Number of bad blocks: 3
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00000800 ...
image len = 36900864, ​​image checksum = 9a5bf12
ECC failed: 0
ECC corrected: 0
Number of bad blocks: 3
Number of bbt blocks: 0
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000800 and ending at 0x02d00000 ...
dump image checksum = 9a5bf12
SQUASHFS error: Major / Minor mismatch, trying to mount newer 4.0 filesystem
SQUASHFS error: Please update your kernel
mount: wrong fs type, bad option, bad superblock on / dev / loop0,
missing codepage or other error
In some cases, useful in syslog - try
dmesg | tail or so

/etc/rc.sh: line 17: system_init: not found
starting pid 302, tty '': '- / bin / sh'

BusyBox v1.11.2 (2010-11-17 11:44:30 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.


To access the shell, you must enter the code 5784468 .
After a cursory inspection in the console, it became clear that the NAS was booted into single-user mode. Nothing is mounted other than the root system.
Obviously, the boot process does not continue precisely because of problems with mounting the main file tree from the squash image:
SQUASHFS error: Major/Minor mismatch, trying to mount newer 4.0 filesystem
SQUASHFS error: Please update your kernel
mount: wrong fs type, bad option, bad superblock on /dev/loop0,

The file itself, in which the squash image is, is unloaded from the internal flash into the file /usr/local/tmp/image.cfs with the help of nanddump .
mount -o loop /usr/local/tmp/image.cfs /mnt resulted in the same error as when loading.

The first thing that came to mind was the idea of ​​possible damage to the image.cfs itself in flash memory. But another review of the download log, I noticed an error message, which was initially lost in the long text of the log:
Image Name: Linux-2.6.31.8
.....
Verifying Checksum ... Bad Data CRC

Then U-Boot loaded the image of another, older kernel: Image Name: Linux-2.6.22.18

 NAND read: device 0 offset 0x7100800, size 0x500000 load addr .... =a00000 5242880 bytes read: OK ## Booting image at 00a00000 ... Image Name: Linux-2.6.22.18 Created: 2011-05-25 7:23:15 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 2214860 Bytes = 2.1 MB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... OK 


Looking ahead, I would like to note that the "mini firmware" internal flash, from where the image with the kernel was booted in emergency mode, seems to be designed for such situations. If I had an earlier firmware, the download would be successful and I would not have learned about the damage. But in firmware 1.04, the new kernel 2.6.31.8 and therefore the mounting of the image by the compressed file system (again, the new format) on the old kernel ended in error.

Googling did not give a ready-made solution, but inspired jugaad , namely: using the capabilities of U-Boot to overwrite the uImage image in the internal flash memory using the cut out image from the stock firmware.

We get the image of uImage with the kernel from the firmware


Download the stock firmware from the site D-Link: DLINK_DNS325.1.04b05 (at that time I was named this version).
Somehow, it was necessary to get an image with the kernel and try to overwrite it in the damaged area.
A very useful tool turned out to be binwalk :



We will try to write the cut uImage image into the internal flash memory starting at address 0x100000 .

Install and configure Kermit


In order to transfer binary files to U-Boot, we need a rather old Kermit protocol.

apt-get install ckermit

Create a .kermrc with the following contents:
 set line /dev/ttyAMA0 set speed 115200 set carrier-watch off set handshake none set flow-control none robust set file type bin set rec pack 1000 set send pack 1000 set window 5 


Extended U-Boot Download


To get to the U-Boot command line, you need to have time to interrupt the boot process by pressing Space and "1" at the moment when 2 seconds are set minicom for this operation in the minicom console:
PEX 0: interface detected no Link.
Net: egiga0 [PRIME]
Hit any key to stop autoboot: 1

Unfortunately, I did not find the loadb , .
U-Boot .

:
apt-get install gcc

U-Boot:
git clone -b dns320_support github.com/lentinj/u-boot.git
:
make distclean && make dns325_config && make u-boot.kwb

( USB-Uart-TTL x86 , ARM-: export CROSS_COMPILE=arm-linux-gnueabi- )

U-Boot:
root@raspberrypi:~/u-boot# cd u-boot
root@raspberrypi:~/u-boot# ./tools/kwboot -p -b u-boot.kwb -B115200 -t /dev/ttyAMA0
Sending boot message. Please reboot the target.../

, NAS, 10 , u-boot.kwb .
. .
Hit any key to stop autoboot: 4 (. ).
Ctrl+/ "c"

flash
kermit uKernel, :
root@raspberrypi:~# kermit
:
(/root/) C-Kermit>connect Connecting to /dev/ttyAMA0, speed 115200 Escape character: Ctrl-\ (ASCII 28, FS): enabled Type the escape character followed by C to get back, or followed by ? to see other options. ----------------------------------------------------

, U-Boot, 0x000000 ( , ):

=> loadb 0x00000000

U-Boot , Kermit Ctrl+\ "c" :

(/root/) C-Kermit>send uKernel



flash:

=> nand erase 0x100000 0x300000 - flash 0x100000-0x300000
=> nand write 0x000000 0x100000 0x300000 - 0x000000

... .
NAS USB .
.

PS U-Boot flash , . , :

? uImage U-Boot' 0x300000; tftp uImage; USB flash uImage ( U-Boot USB); flash USB .
command in the stock U-Boot loadb , .
U-Boot .

:
apt-get install gcc

U-Boot:
git clone -b dns320_support github.com/lentinj/u-boot.git
:
make distclean && make dns325_config && make u-boot.kwb

( USB-Uart-TTL x86 , ARM-: export CROSS_COMPILE=arm-linux-gnueabi- )

U-Boot:
root@raspberrypi:~/u-boot# cd u-boot
root@raspberrypi:~/u-boot# ./tools/kwboot -p -b u-boot.kwb -B115200 -t /dev/ttyAMA0
Sending boot message. Please reboot the target.../

, NAS, 10 , u-boot.kwb .
. .
Hit any key to stop autoboot: 4 (. ).
Ctrl+/ "c"

flash
kermit uKernel, :
root@raspberrypi:~# kermit
:
(/root/) C-Kermit>connect Connecting to /dev/ttyAMA0, speed 115200 Escape character: Ctrl-\ (ASCII 28, FS): enabled Type the escape character followed by C to get back, or followed by ? to see other options. ----------------------------------------------------

, U-Boot, 0x000000 ( , ):

=> loadb 0x00000000

U-Boot , Kermit Ctrl+\ "c" :

(/root/) C-Kermit>send uKernel



flash:

=> nand erase 0x100000 0x300000 - flash 0x100000-0x300000
=> nand write 0x000000 0x100000 0x300000 - 0x000000

... .
NAS USB .
.

PS U-Boot flash , . , :

? uImage U-Boot' 0x300000; tftp uImage; USB flash uImage ( U-Boot USB); flash USB .
loadb , .
U-Boot .

:
apt-get install gcc


U-Boot:
git clone -b dns320_support github.com/lentinj/u-boot.git
:
make distclean && make dns325_config && make u-boot.kwb

( USB-Uart-TTL x86 , ARM-: export CROSS_COMPILE=arm-linux-gnueabi- )

U-Boot:
root@raspberrypi:~/u-boot# cd u-boot
root@raspberrypi:~/u-boot# ./tools/kwboot -p -b u-boot.kwb -B115200 -t /dev/ttyAMA0
Sending boot message. Please reboot the target.../

, NAS, 10 , u-boot.kwb .
. .
Hit any key to stop autoboot: 4 (. ).
Ctrl+/ "c"

flash
kermit uKernel, :
root@raspberrypi:~# kermit
:
(/root/) C-Kermit>connect Connecting to /dev/ttyAMA0, speed 115200 Escape character: Ctrl-\ (ASCII 28, FS): enabled Type the escape character followed by C to get back, or followed by ? to see other options. ----------------------------------------------------

, U-Boot, 0x000000 ( , ):

=> loadb 0x00000000

U-Boot , Kermit Ctrl+\ "c" :

(/root/) C-Kermit>send uKernel



flash:

=> nand erase 0x100000 0x300000 - flash 0x100000-0x300000
=> nand write 0x000000 0x100000 0x300000 - 0x000000

... .
NAS USB .
.

PS U-Boot flash , . , :

? uImage U-Boot' 0x300000; tftp uImage; USB flash uImage ( U-Boot USB); flash USB .

loadb , .
U-Boot .

:
apt-get install gcc


U-Boot:
git clone -b dns320_support github.com/lentinj/u-boot.git
:
make distclean && make dns325_config && make u-boot.kwb

( USB-Uart-TTL x86 , ARM-: export CROSS_COMPILE=arm-linux-gnueabi- )

U-Boot:
root@raspberrypi:~/u-boot# cd u-boot
root@raspberrypi:~/u-boot# ./tools/kwboot -p -b u-boot.kwb -B115200 -t /dev/ttyAMA0
Sending boot message. Please reboot the target.../

, NAS, 10 , u-boot.kwb .
. .
Hit any key to stop autoboot: 4 (. ).
Ctrl+/ "c"

flash
kermit uKernel, :
root@raspberrypi:~# kermit
:
(/root/) C-Kermit>connect Connecting to /dev/ttyAMA0, speed 115200 Escape character: Ctrl-\ (ASCII 28, FS): enabled Type the escape character followed by C to get back, or followed by ? to see other options. ----------------------------------------------------

, U-Boot, 0x000000 ( , ):

=> loadb 0x00000000

U-Boot , Kermit Ctrl+\ "c" :

(/root/) C-Kermit>send uKernel



flash:

=> nand erase 0x100000 0x300000 - flash 0x100000-0x300000
=> nand write 0x000000 0x100000 0x300000 - 0x000000

... .
NAS USB .
.

PS U-Boot flash , . , :

? uImage U-Boot' 0x300000; tftp uImage; USB flash uImage ( U-Boot USB); flash USB .

loadb , .
U-Boot .

:
apt-get install gcc


U-Boot:
git clone -b dns320_support github.com/lentinj/u-boot.git
:
make distclean && make dns325_config && make u-boot.kwb

( USB-Uart-TTL x86 , ARM-: export CROSS_COMPILE=arm-linux-gnueabi- )

U-Boot:
root@raspberrypi:~/u-boot# cd u-boot
root@raspberrypi:~/u-boot# ./tools/kwboot -p -b u-boot.kwb -B115200 -t /dev/ttyAMA0
Sending boot message. Please reboot the target.../

, NAS, 10 , u-boot.kwb .
. .
Hit any key to stop autoboot: 4 (. ).
Ctrl+/ "c"

flash
kermit uKernel, :
root@raspberrypi:~# kermit
:
(/root/) C-Kermit>connect Connecting to /dev/ttyAMA0, speed 115200 Escape character: Ctrl-\ (ASCII 28, FS): enabled Type the escape character followed by C to get back, or followed by ? to see other options. ----------------------------------------------------

, U-Boot, 0x000000 ( , ):

=> loadb 0x00000000

U-Boot , Kermit Ctrl+\ "c" :

(/root/) C-Kermit>send uKernel



flash:

=> nand erase 0x100000 0x300000 - flash 0x100000-0x300000
=> nand write 0x000000 0x100000 0x300000 - 0x000000

... .
NAS USB .
.

PS U-Boot flash , . , :

? uImage U-Boot' 0x300000; tftp uImage; USB flash uImage ( U-Boot USB); flash USB .
 loadb ,          . 
U-Boot .

:
apt-get install gcc


U-Boot:
git clone -b dns320_support github.com/lentinj/u-boot.git
:
make distclean && make dns325_config && make u-boot.kwb

( USB-Uart-TTL x86 , ARM-: export CROSS_COMPILE=arm-linux-gnueabi- )

U-Boot:
root@raspberrypi:~/u-boot# cd u-boot
root@raspberrypi:~/u-boot# ./tools/kwboot -p -b u-boot.kwb -B115200 -t /dev/ttyAMA0
Sending boot message. Please reboot the target.../

, NAS, 10 , u-boot.kwb .
. .
Hit any key to stop autoboot: 4 (. ).
Ctrl+/ "c"

flash
kermit uKernel, :
root@raspberrypi:~# kermit
:
(/root/) C-Kermit>connect Connecting to /dev/ttyAMA0, speed 115200 Escape character: Ctrl-\ (ASCII 28, FS): enabled Type the escape character followed by C to get back, or followed by ? to see other options. ----------------------------------------------------

, U-Boot, 0x000000 ( , ):

=> loadb 0x00000000

U-Boot , Kermit Ctrl+\ "c" :

(/root/) C-Kermit>send uKernel



flash:

=> nand erase 0x100000 0x300000 - flash 0x100000-0x300000
=> nand write 0x000000 0x100000 0x300000 - 0x000000

... .
NAS USB .
.

PS U-Boot flash , . , :

? uImage U-Boot' 0x300000; tftp uImage; USB flash uImage ( U-Boot USB); flash USB .
loadb , .
U-Boot .

:
apt-get install gcc


U-Boot:
git clone -b dns320_support github.com/lentinj/u-boot.git
:
make distclean && make dns325_config && make u-boot.kwb

( USB-Uart-TTL x86 , ARM-: export CROSS_COMPILE=arm-linux-gnueabi- )

U-Boot:
root@raspberrypi:~/u-boot# cd u-boot
root@raspberrypi:~/u-boot# ./tools/kwboot -p -b u-boot.kwb -B115200 -t /dev/ttyAMA0
Sending boot message. Please reboot the target.../

, NAS, 10 , u-boot.kwb .
. .
Hit any key to stop autoboot: 4 (. ).
Ctrl+/ "c"

flash
kermit uKernel, :
root@raspberrypi:~# kermit
:
(/root/) C-Kermit>connect Connecting to /dev/ttyAMA0, speed 115200 Escape character: Ctrl-\ (ASCII 28, FS): enabled Type the escape character followed by C to get back, or followed by ? to see other options. ----------------------------------------------------

, U-Boot, 0x000000 ( , ):

=> loadb 0x00000000

U-Boot , Kermit Ctrl+\ "c" :

(/root/) C-Kermit>send uKernel



flash:

=> nand erase 0x100000 0x300000 - flash 0x100000-0x300000
=> nand write 0x000000 0x100000 0x300000 - 0x000000

... .
NAS USB .
.

PS U-Boot flash , . , :

? uImage U-Boot' 0x300000; tftp uImage; USB flash uImage ( U-Boot USB); flash USB .
  1. loadb , .
    U-Boot .

    :
    apt-get install gcc


    U-Boot:
    git clone -b dns320_support github.com/lentinj/u-boot.git
    :
    make distclean && make dns325_config && make u-boot.kwb

    ( USB-Uart-TTL x86 , ARM-: export CROSS_COMPILE=arm-linux-gnueabi- )

    U-Boot:
    root@raspberrypi:~/u-boot# cd u-boot
    root@raspberrypi:~/u-boot# ./tools/kwboot -p -b u-boot.kwb -B115200 -t /dev/ttyAMA0
    Sending boot message. Please reboot the target.../

    , NAS, 10 , u-boot.kwb .
    . .
    Hit any key to stop autoboot: 4 (. ).
    Ctrl+/ "c"

    flash
    kermit uKernel, :
    root@raspberrypi:~# kermit
    :
    (/root/) C-Kermit>connect Connecting to /dev/ttyAMA0, speed 115200 Escape character: Ctrl-\ (ASCII 28, FS): enabled Type the escape character followed by C to get back, or followed by ? to see other options. ----------------------------------------------------

    , U-Boot, 0x000000 ( , ):

    => loadb 0x00000000

    U-Boot , Kermit Ctrl+\ "c" :

    (/root/) C-Kermit>send uKernel



    flash:

    => nand erase 0x100000 0x300000 - flash 0x100000-0x300000
    => nand write 0x000000 0x100000 0x300000 - 0x000000

    ... .
    NAS USB .
    .

    PS U-Boot flash , . , :

    ? uImage U-Boot' 0x300000; tftp uImage; USB flash uImage ( U-Boot USB); flash USB .
  2. loadb , .
    U-Boot .

    :
    apt-get install gcc


    U-Boot:
    git clone -b dns320_support github.com/lentinj/u-boot.git
    :
    make distclean && make dns325_config && make u-boot.kwb

    ( USB-Uart-TTL x86 , ARM-: export CROSS_COMPILE=arm-linux-gnueabi- )

    U-Boot:
    root@raspberrypi:~/u-boot# cd u-boot
    root@raspberrypi:~/u-boot# ./tools/kwboot -p -b u-boot.kwb -B115200 -t /dev/ttyAMA0
    Sending boot message. Please reboot the target.../

    , NAS, 10 , u-boot.kwb .
    . .
    Hit any key to stop autoboot: 4 (. ).
    Ctrl+/ "c"

    flash
    kermit uKernel, :
    root@raspberrypi:~# kermit
    :
    (/root/) C-Kermit>connect Connecting to /dev/ttyAMA0, speed 115200 Escape character: Ctrl-\ (ASCII 28, FS): enabled Type the escape character followed by C to get back, or followed by ? to see other options. ----------------------------------------------------

    , U-Boot, 0x000000 ( , ):

    => loadb 0x00000000

    U-Boot , Kermit Ctrl+\ "c" :

    (/root/) C-Kermit>send uKernel



    flash:

    => nand erase 0x100000 0x300000 - flash 0x100000-0x300000
    => nand write 0x000000 0x100000 0x300000 - 0x000000

    ... .
    NAS USB .
    .

    PS U-Boot flash , . , :

    ? uImage U-Boot' 0x300000; tftp uImage; USB flash uImage ( U-Boot USB); flash USB .
  3. loadb , .
    U-Boot .

    :
    apt-get install gcc


    U-Boot:
    git clone -b dns320_support github.com/lentinj/u-boot.git
    :
    make distclean && make dns325_config && make u-boot.kwb

    ( USB-Uart-TTL x86 , ARM-: export CROSS_COMPILE=arm-linux-gnueabi- )

    U-Boot:
    root@raspberrypi:~/u-boot# cd u-boot
    root@raspberrypi:~/u-boot# ./tools/kwboot -p -b u-boot.kwb -B115200 -t /dev/ttyAMA0
    Sending boot message. Please reboot the target.../

    , NAS, 10 , u-boot.kwb .
    . .
    Hit any key to stop autoboot: 4 (. ).
    Ctrl+/ "c"

    flash
    kermit uKernel, :
    root@raspberrypi:~# kermit
    :
    (/root/) C-Kermit>connect Connecting to /dev/ttyAMA0, speed 115200 Escape character: Ctrl-\ (ASCII 28, FS): enabled Type the escape character followed by C to get back, or followed by ? to see other options. ----------------------------------------------------

    , U-Boot, 0x000000 ( , ):

    => loadb 0x00000000

    U-Boot , Kermit Ctrl+\ "c" :

    (/root/) C-Kermit>send uKernel



    flash:

    => nand erase 0x100000 0x300000 - flash 0x100000-0x300000
    => nand write 0x000000 0x100000 0x300000 - 0x000000

    ... .
    NAS USB .
    .

    PS U-Boot flash , . , :

    ? uImage U-Boot' 0x300000; tftp uImage; USB flash uImage ( U-Boot USB); flash USB .
  4. loadb , .
    U-Boot .

    :
    apt-get install gcc


    U-Boot:
    git clone -b dns320_support github.com/lentinj/u-boot.git
    :
    make distclean && make dns325_config && make u-boot.kwb

    ( USB-Uart-TTL x86 , ARM-: export CROSS_COMPILE=arm-linux-gnueabi- )

    U-Boot:
    root@raspberrypi:~/u-boot# cd u-boot
    root@raspberrypi:~/u-boot# ./tools/kwboot -p -b u-boot.kwb -B115200 -t /dev/ttyAMA0
    Sending boot message. Please reboot the target.../

    , NAS, 10 , u-boot.kwb .
    . .
    Hit any key to stop autoboot: 4 (. ).
    Ctrl+/ "c"

    flash
    kermit uKernel, :
    root@raspberrypi:~# kermit
    :
    (/root/) C-Kermit>connect Connecting to /dev/ttyAMA0, speed 115200 Escape character: Ctrl-\ (ASCII 28, FS): enabled Type the escape character followed by C to get back, or followed by ? to see other options. ----------------------------------------------------

    , U-Boot, 0x000000 ( , ):

    => loadb 0x00000000

    U-Boot , Kermit Ctrl+\ "c" :

    (/root/) C-Kermit>send uKernel



    flash:

    => nand erase 0x100000 0x300000 - flash 0x100000-0x300000
    => nand write 0x000000 0x100000 0x300000 - 0x000000

    ... .
    NAS USB .
    .

    PS U-Boot flash , . , :

    ? uImage U-Boot' 0x300000; tftp uImage; USB flash uImage ( U-Boot USB); flash USB .
  5. loadb , .
    U-Boot .

    :
    apt-get install gcc


    U-Boot:
    git clone -b dns320_support github.com/lentinj/u-boot.git
    :
    make distclean && make dns325_config && make u-boot.kwb

    ( USB-Uart-TTL x86 , ARM-: export CROSS_COMPILE=arm-linux-gnueabi- )

    U-Boot:
    root@raspberrypi:~/u-boot# cd u-boot
    root@raspberrypi:~/u-boot# ./tools/kwboot -p -b u-boot.kwb -B115200 -t /dev/ttyAMA0
    Sending boot message. Please reboot the target.../

    , NAS, 10 , u-boot.kwb .
    . .
    Hit any key to stop autoboot: 4 (. ).
    Ctrl+/ "c"

    flash
    kermit uKernel, :
    root@raspberrypi:~# kermit
    :
    (/root/) C-Kermit>connect Connecting to /dev/ttyAMA0, speed 115200 Escape character: Ctrl-\ (ASCII 28, FS): enabled Type the escape character followed by C to get back, or followed by ? to see other options. ----------------------------------------------------

    , U-Boot, 0x000000 ( , ):

    => loadb 0x00000000

    U-Boot , Kermit Ctrl+\ "c" :

    (/root/) C-Kermit>send uKernel



    flash:

    => nand erase 0x100000 0x300000 - flash 0x100000-0x300000
    => nand write 0x000000 0x100000 0x300000 - 0x000000

    ... .
    NAS USB .
    .

    PS U-Boot flash , . , :

    ? uImage U-Boot' 0x300000; tftp uImage; USB flash uImage ( U-Boot USB); flash USB .

Source: https://habr.com/ru/post/239805/


All Articles