Jump to content
XPEnology Community

Patching DeviceTree to set port as eSATA?


Recommended Posts

I decided to try 1621+ on my N54L, and it worked well enough, but eSATA drive that I use for backups got recognized as internal. Before that, on 3622xs+, I used these lines in synoinfo:

"internalportcfg": "0x2f",
"esataportcfg": "0x10",
"usbportcfg": "0x1fc0",

I saw some mentions that "you'll have to patch/build device tree manually" but couldn't find any actual information on how to actually do that.

Link to comment
Share on other sites

  • 2 months later...

In the Device-Tree based model, it includes the following nodes
You need to configure the model.dtb file.

 

	esata_port@1 {

		ahci {
			pcie_root = "00:13.0,00.0";
			ata_port = <0x3>;
		};
	};

 

*portcfg related settings are only used in Non DT based models.

I looked at the addons of the current Redfill loaders.
I am applying and following most of the scripts in the disks addon.
However, parts related to esata nodes are not supported.

I will modify and test it in TCRP to provide support if possible.
I'll have to look for a laptop with eSATA first.

  • Like 1
Link to comment
Share on other sites

Reporting is a little late.
A few days ago, I purchased the product below and tried it out.

 

https://www.ebay.co.uk/itm/385760379322

 

2023-09-0710_37_31.thumb.png.202e27d41c3df7d94a2f3b68631611d5.png

 

Tested on DT-based ds920+.
esata does not separate it into a separate device tree.
It is considered one of the sata ports.


As a result as below, model.dts and model.dtb are converted via the dtbpatch add-on..
It has been confirmed that it is created automatically.


No separate work is required on synoinfo.conf or model.dtb.
The add-on maps the disk automatically.

 

 

SynologyNAS> ll /sys/block | grep -e sata -e sd
lrwxrwxrwx    1 root     root             0 Sep  7 13:32 sata1 -> ../devices/pci0000:00/0000:00:1f.2/ata5/host4/target4:0:0/4:0:0:0/block/sata1

 

 

Running "install.sh" for dtbpatch->on_boot->modules
dtbpatch - modules
'dtc' -> '/usr/sbin/dtc'
'readlink' -> '/usr/sbin/readlink'
Patching /etc.defaults/
ls: /sys/bus/usb/devices/usb*: No such file or directory
/dts-v1/;
/ {
    compatible = "Synology";
    model = "synology_geminilake_920+";
    version = <0x01>;
    internal_slot@1 {
        protocol_type = "sata";
        ahci {
            pcie_root = "00:1f.2";
            ata_port = <0x04>;
        };
    };
};
backup /etc.defaults/model.dtb to model_bak.dtb
'/etc.defaults/model.dtb' -> '/etc.defaults/model_bak.dtb'
/var/run/model.dts:6.21-12.7: Warning (unit_address_vs_reg): /internal_slot@1: node has a unit name, but no reg or ranges property
'/etc.defaults/model.dtb' -> '/run/model.dtb'
System Disk: (not supported in junior mode)
Internal Disk
01: /dev/sata1
02: 
03: 
04: 
05: 
06: 
07: 
08: 
09: 
10: 
11: 
12: 
13: 
14: 
15: 
16: 

Esata port count: 0
USB Device

Ran "install.sh" for dtbpatch->on_boot->modules - exit=0

 

Edited by Peter Suh
  • Like 2
Link to comment
Share on other sites

  • 4 weeks later...

Okay, reporting with my results (success). Used arpl-i18n 23.9.7. See general instructions here: https://github.com/wjz304/arpl-i18n/issues/226

 

First, grab device tree compiler https://github.com/wjz304/arpl-i18n/files/12665011/dtc_win.zip or, if using it in in DSM, from https://github.com/wjz304/arpl-addons/tree/main/disks/all/usr/bin

(probably recommended) Connect drive and reboot so it loads into device tree.

Download current device tree from your system as described in guide (decompile /etc/model.dtb and download resulting .dts)

For your eSATA drive replace internal_slot@N with esata_slot@1.

 

For example, with HP Microserver gen7 eSATA is #5 on controller (with #6 supposed to be ODD):

	internal_slot@4 {
		protocol_type = "sata";

		ahci {
			pcie_root = "00:11.0";
			ata_port = <0x03>;
		};
	};

	internal_slot@5 {
		protocol_type = "sata";
		ahci {
			pcie_root = "00:11.0";
			ata_port = <0x04>;
		};
	};
              

Change to:

	internal_slot@4 {
		protocol_type = "sata";

		ahci {
			pcie_root = "00:11.0";
			ata_port = <0x03>;
		};
	};

	esata_port@1 {
		ahci {
			pcie_root = "00:11.0";
			ata_port = <0x04>;
		};
	};

Then rebuild loader, in arpl-i18n in advanced config there's option to upload custom .dts.

 

That's it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...