Re: Synology DS416 unbricking
July 04, 2022 09:20AM
bodhi,

zImage.5 and rd.bin.5 both came from the Synology website, I extracted them from DSM version 5 image, DSM_DS416_5644.pat, then extracted them with 7za. I then renamed them with the .5 suffix to differentiate between the different versions I had downloaded. I tried these files from DSM6 and DSM7 as well, but didn't get as far, those were giving me the 'invalid instruction' messages.

Just to confirm I did it right, here's the output from creating uImage:
09:12:25  msnyder  ~  ds416  cp -a zImage-5.18.6-armv7-tld-3 zImage.fdt
 09:12:34  msnyder  ~  ds416  cat /srv/tftp/alpine-db.dtb >> zImage.fdt
 09:12:46  msnyder  ~  ds416  mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.18.6-armv7-tld-3 -d zImage.fdt  uImage
Image Name:   Linux-5.18.6-armv7-tld-3
Created:      Mon Jul  4 09:12:54 2022
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    5198491 Bytes = 5076.65 KiB = 4.96 MiB
Load Address: 00008000
Entry Point:  00008000
 09:12:55  msnyder  ~  ds416  mv uImage /srv/tftp

Unfortunately, even with the image you compiled it still won't boot, see below. At this point I strongly suspect my DS416 has a hardware issue.

Thanks so much for all your help and time. Any other ideas?

Press Ctrl+C to abort autoboot in 3 second
ALPINE_DB> dhcp
al_eth0 Waiting for PHY auto negotiation to complete...... done
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
*** Unhandled DHCP Option in OFFER/ACK: 119
*** Unhandled DHCP Option in OFFER/ACK: 119
DHCP client bound to address 10.0.0.236
ALPINE_DB> setenv bootargs console=ttyS0,115200 earlyprintk=serial
ALPINE_DB> tftpboot 0x2000000 uImage
Using al_eth0 device
TFTP from server 10.0.0.17; our IP address is 10.0.0.236
Filename 'uImage'.
Load address: 0x2000000
Loading: T #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ##############################
         789.1 KiB/s
done
Bytes transferred = 5198555 (4f52db hex)
ALPINE_DB> bootm 0x2000000
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-5.18.6-armv7-tld-3
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5198491 Bytes = 5 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...

Re: Synology DS416 unbricking
July 04, 2022 03:12PM
mesnyder1,

> giving me the 'invalid instruction' messages.

That is quite suspect.

> Unfortunately, even with the image you compiled it
> still won't boot, see below.
> At this point I
> strongly suspect my DS416 has a hardware issue.

It could be HW problem. I expect it to pass the point of decompression. But I have never played with Alpine SoC before, so I can't say for certain.

Let's give it one last try with another version. I will upload another kernel.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Synology DS416 unbricking
July 04, 2022 03:27PM
In the mean time, please do this to check the zImage.5 to see what's inside.

file zImage.5
mkimage -l zImage.5

The entry points in the image would be telling us more info.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 07/04/2022 03:30PM by bodhi.
Re: Synology DS416 unbricking
July 04, 2022 03:33PM
$ file zImage.5
zImage.5: u-boot legacy uImage, Linux-3.2.40, Linux/ARM, OS Kernel Image (Not compressed), 2307304 bytes, Thu Nov 12 09:17:41 2015, Load Address: 0x00008000, Entry Point: 0x00008000, Header CRC: 0xBADB1C4A, Data CRC: 0xA418269E
$ mkimage -l zImage.5
Image Name:   Linux-3.2.40
Created:      Thu Nov 12 03:17:41 2015
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    2307304 Bytes = 2253.23 KiB = 2.20 MiB
Load Address: 00008000
Entry Point:  00008000
Re: Synology DS416 unbricking
July 04, 2022 03:57PM
Saw something interesting in the fdt print

https://forum.doozan.com/read.php?3,132471,132497#msg-132497

ALPINE_DB> fdt print

                uart0 {
                        compatible = "ns16550a";
                        reg = <0x00000000 0xfd883000 0x00000000 0x00001000>;
                        clock-frequency = <0x00000000>;
                        interrupts = <0x00000000 0x00000011 0x00000004>;
                        reg-shift = <0x00000002>;
                        reg-io-width = <0x00000004>;


So previous kernel Linux-5.18.6-armv7-tld-3 has an address conflict, i.e. no good.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Synology DS416 unbricking
July 04, 2022 09:40PM
mesnyder1,

I've uploaded the new armv7 kernel tld-4.

https://forum.doozan.com/read.php?2,132510

Please use these 2 files to prepare the kernel file to run tftp test.

zImage-5.18.6-armv7-tld-4
alpine-db.dtb

On a Linux box, download the tarball and extract the files. And then,

cp -a zImage-5.18.6-armv7-tld-4 zImage.fdt
cat alpine-db.dtb >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-5.18.6-armv7-tld-4 -d zImage.fdt  uImage

Use this uImage to boot with tftp.

setenv bootargs console=ttyS0,115200 earlyprintk=serial
tftpboot 0x2000000 uImage
bootm 0x2000000

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Synology DS416 unbricking
July 04, 2022 10:19PM
bodhi,

Unfortunately same results.

Press Ctrl+C to abort autoboot in 3 second
ALPINE_DB> dhcp
al_eth0 Waiting for PHY auto negotiation to complete....... done
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
*** Unhandled DHCP Option in OFFER/ACK: 119
*** Unhandled DHCP Option in OFFER/ACK: 119
DHCP client bound to address 10.0.0.236
ALPINE_DB> setenv bootargs console=ttyS0,115200 earlyprintk=serial
ALPINE_DB> tftpboot 0x2000000 uImage
Using al_eth0 device
TFTP from server 10.0.0.17; our IP address is 10.0.0.236
Filename 'uImage'.
Load address: 0x2000000
Loading: T #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ###################
         770.5 KiB/s
done
Bytes transferred = 5038563 (4ce1e3 hex)
ALPINE_DB> bootm 0x2000000
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-5.18.6-armv7-tld-4
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5038499 Bytes = 4.8 MiB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK

Starting kernel ...
Re: Synology DS416 unbricking
July 05, 2022 04:41PM
mesnyder1,

Given this:

Quote

zImage.5 and rd.bin.5 both came from the Synology website, I extracted them from DSM version 5 image, DSM_DS416_5644.pat, then extracted them with 7za. I then renamed them with the .5 suffix to differentiate between the different versions I had downloaded. I tried these files from DSM6 and DSM7 as well, but didn't get as far, those were giving me the 'invalid instruction' messages.

And the new kernel does not boot. It died silently even with earlyprintk, so I think it most likely hardware problem.

Last suggestions :)

1. Basically, load it to the location that stock uses, and run it there. Also since we don't know this u-boot, erase the fdtaddr in case it messes up the bootm. We don't want to use the DTB. We just want to see the kernel started and crash in a nice way.

setenv bootargs console=ttyS0,115200 earlyprintk=serial
setenv fdtaddr
tftpboot 0x08000000 zImage.5
bootm 0x08000000
.

2. This u-boot has mtest command. Try running it to test the RAM.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Synology DS416 unbricking
July 05, 2022 09:12PM
Thanks bodhi.

It is hanging occasionally on mtest, and giving me some errors, so I think the RAM is flaky. Unfortunately the RAM is soldered on this model, so I think I'm out of luck.

Thanks so much for all your help in helping me troubleshoot!
Re: Synology DS416 unbricking
July 05, 2022 09:43PM
mesnyder1,

You're welcome, too bad the result is not what we want to see.

-bodhi
===========================
Forum Wiki
bodhi's corner
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: