Re: (WIP) 2023.04 U-Boot Kirkwood - Synology DS411j (and possibly 413j) September 28, 2023 01:54PM |
Registered: 1 year ago Posts: 80 |
Re: (WIP) 2023.04 U-Boot Kirkwood - Synology DS411j September 29, 2023 01:57PM |
Admin Registered: 14 years ago Posts: 19,314 |
cat /etc/fw_env.config cat /proc/mtd mtdinfo -a
Re: (WIP) 2023.04 U-Boot Kirkwood - Synology DS411j September 29, 2023 03:30PM |
Registered: 1 year ago Posts: 80 |
root@debian:~# cat /etc/fw_env.config # MTD device name Device offset Env. size Flash sector size Number of sectors /dev/mtd0 0xc0000 0x20000 0x20000 root@debian:~#>cat /proc/mtd
root@debian:~# cat /proc/mtd dev: size erasesize name mtd0: 00400000 00010000 "uboot" root@debian:~#>mtdinfo -a
root@debian:~# mtdinfo -a Count of MTD devices: 1 Present MTD devices: mtd0 Sysfs interface supported: yes mtd0 Name: uboot Type: nor Eraseblock size: 65536 bytes, 64.0 KiB Amount of eraseblocks: 64 (4194304 bytes, 4.0 MiB) Minimum input/output unit size: 1 byte Sub-page size: 1 byte Character device major/minor: 90:0 Bad blocks are allowed: false Device is writable: true root@debian:~#
root@debian:~# root@debian:~# ls -la /dev/spi* ls: cannot access '/dev/spi*': No such file or directory root@debian:~# root@debian:~# realpath /sys/class/spi_master/spi0/device/driver /sys/bus/platform/drivers/orion_spi root@debian:~# root@debian:~# cat /sys/bus/spi/devices/spi0.0/modalias spi:m25p80 root@debian:~# root@debian:~# xxd -ps /sys/bus/spi/devices/spi0.0/driver_override 0a
Re: (WIP) 2023.04 U-Boot Kirkwood - Synology DS411j September 29, 2023 04:04PM |
Admin Registered: 14 years ago Posts: 19,314 |
[ 5.870794][ T1] spi-nor spi0.0: found m25p32, expected m25p80 [ 5.877088][ T1] spi-nor spi0.0: m25p32 (4096 Kbytes)
Re: (WIP) 2023.04 U-Boot Kirkwood - Synology DS411j September 29, 2023 04:19PM |
Admin Registered: 14 years ago Posts: 19,314 |
setenv ipaddr 192.168.2.14 ping 192.168.2.1 flinfo sf probe 0 sf probe 1
Re: (WIP) 2023.04 U-Boot Kirkwood - Synology DS411j September 29, 2023 05:05PM |
Registered: 1 year ago Posts: 80 |
sudo kwboot -t -B 115200 /dev/ttyUSB0 -b uboot.2023.04-tld-1.ds411j.kwb -p kwboot version 2022.01+dfsg-2ubuntu2.4 Patching image boot signature to UART Aligning image header to Xmodem block size Sending boot message. Please reboot the target...- Waiting 2s and flushing tty Sending boot image header (512 bytes)... 25 % [.... ] Done Sending boot image data (479812 bytes)... 0 % [......................................................................] [truncated] 98 % [....................................... ] Done Finishing transfer [Type Ctrl-\ + c to quit] U-Boot 2023.04-tld-1 (Sep 26 2023 - 16:24:37 -0700) Synology DS411j SoC: Kirkwood 88F6281_A1 DRAM: 128 MiB Core: 13 devices, 11 uclasses, devicetree: separate Loading Environment from SPIFlash... Invalid bus 0 (err=-19) *** Warning - spi_flash_probe_bus_cs() failed, using default environment Resetting console stdin/stdout/stderr to serial... In: serial Out: serial Err: serial Net: Warning: ethernet-controller@72000 (eth0) using random MAC address - 6e:bc:70:96:b1:64 eth0: ethernet-controller@72000 Hit any key to stop autoboot: 0 DS411J> setenv ipaddr 192.168.2.14 DS411J> ping 192.168.2.1 ethernet-controller@72000 Waiting for PHY auto negotiation to complete........ done Using ethernet-controller@72000 device host 192.168.2.1 is alive DS411J> flinfo Unknown command 'flinfo' - try 'help' DS411J> sf probe 0 Invalid bus 0 (err=-19) DS411J> sf probe 1 Invalid bus 0 (err=-19) DS411J>
Re: (WIP) 2023.04 U-Boot Kirkwood - Synology DS411j September 30, 2023 05:03PM |
Admin Registered: 14 years ago Posts: 19,314 |
printenv flinfo dm treeand then
boot
mtdinfo -a cat /proc/mtd
Re: (WIP) 2023.04 U-Boot Kirkwood - Synology DS411j September 30, 2023 05:59PM |
Registered: 1 year ago Posts: 80 |
Re: (WIP) 2023.04 U-Boot Kirkwood - Synology DS411j October 01, 2023 02:30PM |
Admin Registered: 14 years ago Posts: 19,314 |
printenv dm treeand then
boot
mtdinfo -a cat /proc/mtd
Re: (WIP) 2023.04 U-Boot Kirkwood - Synology DS411j October 01, 2023 03:01PM |
Registered: 1 year ago Posts: 80 |
Re: (WIP) 2023.04 U-Boot Kirkwood - Synology DS411j October 01, 2023 04:17PM |
Admin Registered: 14 years ago Posts: 19,314 |
dev: size erasesize name mtd0: 00080000 00010000 "u-boot" mtd1: 00010000 00010000 "u-boot-env" mtd2: 00300000 00010000 "data"
dd if=/dev/mtd0 of=mtd0.ds411j bs=512k conv=sync dd if=/dev/mtd1 of=mtd1.ds411j bs=64k conv=sync dd if=/dev/mtd2 of=mtd2.ds411j bs=3072k conv=sync
flashcp -v uboot.2023.04-tld-1.ds411j.kwb /dev/mtd0expected output
Erasing blocks: 8/8 (100%) Writing data: 512k/512k (100%) Verifying data: 512k/512k (100%)
echo "/dev/mtd1 0x00000 0x10000 0x10000" > /etc/fw_env.config
sync shutdown -r now
Re: (WIP) 2023.04 U-Boot Kirkwood - Synology DS411j October 02, 2023 06:37AM |
Registered: 1 year ago Posts: 80 |
root@debian:~# cat /proc/mtd dev: size erasesize name mtd0: 00080000 00010000 "u-boot" mtd1: 00010000 00010000 "u-boot-env" mtd2: 00300000 00010000 "data"
root@debian:~# dd if=/dev/mtd0 of=mtd0.ds411j bs=512k conv=sync 1+0 records in 1+0 records out 524288 bytes (524 kB, 512 KiB) copied, 0.863565 s, 607 kB/s root@debian:~# dd if=/dev/mtd1 of=mtd1.ds411j bs=64k conv=sync 1+0 records in 1+0 records out 65536 bytes (66 kB, 64 KiB) copied, 0.109435 s, 599 kB/s root@debian:~# dd if=/dev/mtd2 of=mtd2.ds411j bs=3072k conv=sync 1+0 records in 1+0 records out 3145728 bytes (3.1 MB, 3.0 MiB) copied, 5.17675 s, 608 kB/s
root@debian:~# scp 192.168.2.18:/srv/tftp/uboot.2023.04-tld-1.ds411j.kwb . root@debian:~# md5sum uboot.2023.04-tld-1.ds411j.kwb 77bffd254cb9c512b1fceca5c10be39b uboot.2023.04-tld-1.ds411j.kwb
root@debian:~# flashcp -v uboot.2023.04-tld-1.ds411j.kwb /dev/mtd0 Erasing blocks: 8/8 (100%) Writing data: 512k/512k (100%) Verifying data: 10k/512k (1%)File does not seem to match flash data. First mismatch at 0x00000000-0x00002800 root@debian:~# flashcp -v uboot.2023.04-tld-1.ds411j.kwb /dev/mtd0 Erasing blocks: 8/8 (100%) Writing data: 512k/512k (100%) Verifying data: 10k/512k (1%)File does not seem to match flash data. First mismatch at 0x00000000-0x00002800Might the flash be corrupted?
Re: (WIP) 2023.04 U-Boot Kirkwood - Synology DS411j October 02, 2023 01:42PM |
Admin Registered: 14 years ago Posts: 19,314 |
help flinfo
Re: (WIP) 2023.04 U-Boot Kirkwood - Synology DS411j October 02, 2023 02:13PM |
Registered: 1 year ago Posts: 80 |
> help > flinfo >
OPTIONS: I18n Port /dev/ttyUSB0, 21:11:37 Press CTRL-A Z for help on special keys � __ __ _ _ | \/ | __ _ _ ____ _____| | | | |\/| |/ _` | '__\ \ / / _ \ | | | | | | (_| | | \ V / __/ | | |_| |_|\__,_|_| \_/ \___|_|_| _ _ ____ _ | | | | | __ ) ___ ___ | |_ | | | |___| _ \ / _ \ / _ \| __| | |_| |___| |_) | (_) | (_) | |_ \___/ |____/ \___/ \___/ \__| ** LOADER ** ** MARVELL BOARD: Synology Disk Station LE U-Boot 1.1.4 (Jul 14 2010 - 20:36:08) Marvell version: 3.4.4 U-Boot code: 00600000 -> 0067FFF0 BSS: -> 0068B3B4 Soc: 88F6281 A1 (DDR2) CPU running @ 1200Mhz L2 running @ 480Mhz SysClock = 400Mhz , TClock = 200Mhz DRAM CAS Latency = 6 tRP = 6 tRAS = 18 tRCD=6 DRAM CS[0] base 0x00000000 size 128MB DRAM Total size 128MB 16bit width [4096kB@f8000000] Flash: 4 MB Addresses 8M - 0M are saved for the U-Boot usage. Mem malloc Initialization (8M - 7M): Done Using default environment CPU : Marvell Feroceon (Rev 1) Streaming disabled Write allocate disabled USB 0: host mode PCI 0: PCI Express Root Complex Interface PEX interface detected Link X1 Synology Model: DS411j Fan Status: Not Good Fan 1: Not Good Net: egiga0 [PRIME], egiga1 Hit any key to stop autoboot: 0 Marvell>> Marvell>> Marvell>> help ? - alias for 'help' SatR - sample at reset sub-system, relevent for DB only base - print or set address offset bootm - boot application image from memory bootp - boot image via network using BootP/TFTP protocol bubt - Burn an image on the Boot Flash. cmp - memory compare cp - memory copy cpumap - Display CPU memory mapping settings. crc32 - checksum calculation echo - echo args to console erase - erase FLASH memory flinfo - print FLASH memory information go - start application at address 'addr' help - print online help icrc32 - checksum calculation iloop - infinite loop on address range imd - i2c memory display imm - i2c memory modify (auto-incrementing) imw - memory write (fill) inm - memory modify (constant address) iprobe - probe to discover valid I2C chip addresses loop - infinite loop on address range md - memory display mm - memory modify (auto-incrementing) mtest - simple RAM test mw - memory write (fill) nm - memory modify (constant address) pci - list and access PCI Configuration Space ping - send ICMP ECHO_REQUEST to network host printenv- print environment variables protect - enable or disable FLASH write protection rarpboot- boot image via network using RARP/TFTP protocol reset - Perform RESET of the CPU resetenv - Return all environment variable to default. setenv - set environment variables sflash - read, write or erase the external SPI Flash. tftpboot- boot image via network using TFTP protocol version - print monitor version Marvell>> flinfo Bank # 1: Flash Base Address : 0xf8000000 Flash Model : ST M25P32 Manufacturer ID : 0x20 Device Id : 0x2016 Sector Size : 64K Number of sectors : 64 Page Size : 256 Write Protection : All Marvell>>
Re: (WIP) 2023.04 U-Boot Kirkwood - Synology DS411j October 02, 2023 03:03PM |
Admin Registered: 14 years ago Posts: 19,314 |
> Marvell>> flinfo > > Bank # 1: > Flash Base Address : 0xf8000000 > Flash Model : ST M25P32 > Manufacturer ID : 0x20 > Device Id : 0x2016 > Sector Size : 64K > Number of sectors : 64 > Page Size : 256 > Write Protection : All
Re: (WIP) 2023.04 U-Boot Kirkwood - Synology DS411j October 02, 2023 03:38PM |
Admin Registered: 14 years ago Posts: 19,314 |
Re: (WIP) 2023.04 U-Boot Kirkwood - Synology DS411j October 02, 2023 04:05PM |
Registered: 1 year ago Posts: 80 |
Re: (WIP) 2023.04 U-Boot Kirkwood - Synology DS411j October 02, 2023 04:53PM |
Admin Registered: 14 years ago Posts: 19,314 |
Re: (WIP) 2023.04 U-Boot Kirkwood - Synology DS411j October 02, 2023 10:15PM |
Admin Registered: 14 years ago Posts: 19,314 |
setenv ipaddr 192.168.0.100 setenv serverip 192.168.0.200 setenv bootargs 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial mtdparts=spi0.0:512K@0x0(u-boot),64K@0xC0000(u-boot-env),3M@0x100000(data)' mw 0x800000 0 1 tftpboot 0x800000 uImage tftpboot 0x2100000 uInitrd
printenv protect off all bootm 0x800000 0x2100000
Re: (WIP) 2023.04 U-Boot Kirkwood - Synology DS411j October 03, 2023 08:09AM |
Registered: 1 year ago Posts: 80 |
Re: (WIP) 2023.04 U-Boot Kirkwood - Synology DS411j October 03, 2023 01:47PM |
Admin Registered: 14 years ago Posts: 19,314 |
flinfo
reset
Re: 2023.04 U-Boot Kirkwood - Synology DS411j October 03, 2023 09:41PM |
Admin Registered: 14 years ago Posts: 19,314 |
md.l 0xF1010000 8 md.l 0xF1010100 1 md.l 0xF1010140 1
Re: (WIP) 2023.04 U-Boot Kirkwood - Synology DS411j October 04, 2023 08:42AM |
Registered: 1 year ago Posts: 80 |
> flinfo >>
> reset >
Marvell>> flinfo Bank # 1: Flash Base Address : 0xf8000000 Flash Model : ST M25P32 Manufacturer ID : 0x20 Device Id : 0x2016 Sector Size : 64K Number of sectors : 64 Page Size : 256 Write Protection : Off Marvell>> version U-Boot 1.1.4 (Jul 14 2010 - 20:36:08) Marvell version: 3.4.4 Marvell>>
Re: 2023.04 U-Boot Kirkwood - Synology DS411j October 04, 2023 08:47AM |
Registered: 1 year ago Posts: 80 |
> md.l 0xF1010000 8 > md.l 0xF1010100 1 > md.l 0xF1010140 1 >
Marvell>> md.l 0xF1010000 8 f1010000: 01002222 03303311 33330000 33003333 ""...30...3333.3 f1010010: 00005533 00000000 00000000 00000000 3U.............. Marvell>> md.l 0xF1010100 1 f1010100: 00011000 .... Marvell>> md.l 0xF1010140 1 f1010140: 0000baa3 ....
DS411J> md.l 0xF1010000 8 f1010000: 01111111 11113322 00001111 00100000 ...."3.......... f1010010: 00000000 00000000 00000000 00000000 ................ DS411J> md.l 0xF1010100 1 f1010100: 00000000 .... DS411J> md.l 0xF1010140 1 f1010140: 00000000 .... DS411J>
Re: (WIP) 2023.04 U-Boot Kirkwood - Synology DS411j October 04, 2023 12:40PM |
Admin Registered: 14 years ago Posts: 19,314 |
Re: 2023.04 U-Boot Kirkwood - Synology DS411j October 04, 2023 01:38PM |
Admin Registered: 14 years ago Posts: 19,314 |
> Marvell>> md.l 0xF1010000 8 > f1010000: 01002222 03303311 33330000 33003333 > ""...30...3333.3 > f1010010: 00005533 00000000 00000000 00000000 > 3U.............. > Marvell>> md.l 0xF1010100 1 > f1010100: 00011000 .... > Marvell>> md.l 0xF1010140 1 > f1010140: 0000baa3 .... > >>
> > DS411J> md.l 0xF1010000 8 > f1010000: 01111111 11113322 00001111 00100000 > ...."3.......... > f1010010: 00000000 00000000 00000000 00000000 > ................ > DS411J> md.l 0xF1010100 1 > f1010100: 00000000 > .... > DS411J> md.l 0xF1010140 1 > f1010140: 00000000 > .... > DS411J> > >
Re: 2023.04 U-Boot Kirkwood - Synology DS411j October 04, 2023 04:18PM |
Admin Registered: 14 years ago Posts: 19,314 |
Re: 2023.04 U-Boot Kirkwood - Synology DS411j October 05, 2023 02:06AM |
Registered: 1 year ago Posts: 80 |
DS411J> md.l 0xF1010000 8 f1010000: 01002222 03303311 00000000 00100000 ""...30......... f1010010: 00000000 00000000 00000000 00000000 ................ DS411J> md.l 0xF1010100 1 f1010100: 00010000 .... DS411J> md.l 0xF1010140 1 f1010140: 00000000 ....
Re: 2023.04 U-Boot Kirkwood - Synology DS411j October 05, 2023 02:36PM |
Admin Registered: 14 years ago Posts: 19,314 |
Re: 2023.04 U-Boot Kirkwood - Synology DS411j October 05, 2023 03:15PM |
Admin Registered: 14 years ago Posts: 19,314 |