For XPEnology project we use DS3612xs firmware from DSM_DS3612xs_2668.pat file, which is, actually, a TAR archive with the following files inside:
checksum.syno // files' checksums
grub_cksum.syno // zImage and rd.gz checksums that are used in GRUB
hda1.tgz // system image
rd.gz // ram disk image
updater // WEB version of the installer (instead of Synology Assistent)
VERSION // DSM version
zImage // kernel image
复制代码
1。First, we need to replace synobios.ko file in RAM disk image. Unpack and mount RAM disk:
gunzip /tmp/rd.gz
sudo mount -t ext2 -o loop rd /mnt/ramdisk
复制代码
Now we must replace synobios.ko file in the /mnt/ramdisk/lib/modules folder with our previously patched one. Now we must unmount RAM disk and pack it back:
sudo umount /mnt/ramdisk
gzip /tmp/rd
复制代码
2.Secondly, we will replace synobios.ko file in system image. Mount hda1.tgz with archivemount:
sudo archivemount /tmp/hda1.tgz /mnt/hdd
复制代码
3.Thirdly, we will replace synobios.ko file again in the /mnt/hdd/lib/modules folder with the same patched file and then unmount it:
sudo umount /mnt/hdd
复制代码
Now we need to rename result file /tmp/hda1.tgz to /tmp/hda1 and pack it with XZ:
xz -z9 /tmp/hda1
复制代码
and rename it back to /tmp/hda1.tgz
4.Finally, we need to recalculate the checksums of updated files. Get a copy of checksum calculator: