In short, it works to the extent I've tested. Details below.
Assuming this is good enough for a pr and there is flexibility in the openwrt contributor identity requirements I can submit the PR. However, it seems to me that @hnyman and associates did the real work for the r7500v2 and should have the credit of the PR.
Details:
OpenWrt SNAPSHOT, r8467-dd02a19ff5 built with PR #1554.
I built all packages but had to disable kmod-openvswitch* mentioned here to complete the build.
Flashing the factory.img and filling /overlay as described above:
root@OpenWrt:/overlay# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 2.8M 2.8M 0 100% /rom
tmpfs 233.1M 1.1M 231.9M 0% /tmp
/dev/ubi0_1 79.3M 75.0M 188.0K 100% /overlay
overlayfs:/overlay 79.3M 75.0M 188.0K 100% /
tmpfs 512.0K 0 512.0K 0% /dev
root@OpenWrt:/overlay# cat /proc/mtd
dev: size erasesize name
mtd0: 00c80000 00020000 "qcadata"
mtd1: 00500000 00020000 "APPSBL"
mtd2: 00080000 00020000 "APPSBLENV"
mtd3: 00140000 00020000 "art"
mtd4: 00140000 00020000 "artbak"
mtd5: 00400000 00020000 "kernel"
mtd6: 06080000 00020000 "ubi"
mtd7: 00700000 00020000 "reserve"
No "netgear" partition this time.
Turning off the router and flashing stock OEM (R7500v2-V1.0.3.38.img) works. Basic router functionality works.
I'll add that my settings from the last time I did this (see above) persisted (in "reserve" based on @hnyman's post in here). I had to enter the password I used earlier and the VPN service set up above was enabled - I did not test the VPN so I don't know if it would have worked given the certs in "netgear" were regenerated - I'd guess (hope) not. Doing a reset while on stock OEM cleared out the password/VPN enabled settings.
Turning off the router and flashing back to stock 18.06.1:
-----------------------------------------------------
OpenWrt 18.06.1, r7258-5eb055306f
-----------------------------------------------------
root@OpenWrt:~# df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 3.0M 3.0M 0 100% /rom
tmpfs 233.6M 556.0K 233.0M 0% /tmp
/dev/ubi0_1 17.9M 52.0K 16.9M 0% /overlay
overlayfs:/overlay 17.9M 52.0K 16.9M 0% /
tmpfs 512.0K 0 512.0K 0% /dev
root@OpenWrt:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00c80000 00020000 "qcadata"
mtd1: 00500000 00020000 "APPSBL"
mtd2: 00080000 00020000 "APPSBLENV"
mtd3: 00140000 00020000 "art"
mtd4: 00140000 00020000 "artbak"
mtd5: 00400000 00020000 "kernel"
mtd6: 01c00000 00020000 "ubi"
mtd7: 04480000 00020000 "netgear"
mtd8: 00700000 00020000 "reserve"
root@OpenWrt:~# ubiattach -m 7
UBI device number 1, total 548 LEBs (69582848 bytes, 66.3 MiB), available 18 LEBs (2285568 bytes, 2.1 MiB), LEB size 126976 bytes (124.0 KiB)
root@OpenWrt:~# ubinfo /dev/ubi1
ubi1
Volumes count: 6
Logical eraseblock size: 126976 bytes, 124.0 KiB
Total amount of logical eraseblocks: 548 (69582848 bytes, 66.3 MiB)
Amount of available logical eraseblocks: 18 (2285568 bytes, 2.1 MiB)
Maximum count of volumes 128
Count of bad physical eraseblocks: 0
Count of reserved physical eraseblocks: 20
Current maximum erase counter value: 2
Minimum input/output unit size: 2048 bytes
Character device major/minor: 247:0
Present volumes: 0, 1, 2, 3, 4, 5
root@OpenWrt:~# ubinfo /dev/ubi1_0
Volume ID: 0 (on ubi1)
Type: dynamic
Alignment: 1
Size: 1 LEBs (126976 bytes, 124.0 KiB)
State: OK
Name: cert
Character device major/minor: 247:1
root@OpenWrt:~# cat /dev/ubi1_0 | gunzip -c | head -n 50
cert.info0000644000000000000000000000001613374347054011375 0ustar rootroot4ES66C5X000F4
ca.crt0000644000000000000000000000245213374346653010672 0ustar rootroot-----BEGIN CERTIFICATE-----
MIIDojCCAwugAwIBAgIJAMEl9VRMqrerMA0GCSqGSIb3DQEBCwUAMIGTMQswCQYD
VQQGEwJUVzELMAkGA1UECBMCVFcxDzANBgNVBAcTBlRhaXBlaTEQMA4GA1UEChMH
bmV0Z2VhcjEQMA4GA1UECxMHbmV0Z2VhcjETMBEGA1UEAxMKbmV0Z2VhciBDQTEQ
MA4GA1UEKRMHRWFzeVJTQTEbMBkGCSq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.pem0000644000000000000000000000036513374347053011176 0ustar rootroot-----BEGIN DH PARAMETERS-----
MIGHAoGBAJmln8bQKEkcZVV3hTrR8AxB0TjuLekDe0oMImb4ZO3zFLstEOFda/QP
JjZljxR+k+9n4DdXhdr6T2hjdFej+L4+/HfoecqxjHKn7DIXOMoEMv/l3vNg9JVJ
coCGPNY5ZkEmjIOjWzgHA3y0qNTeT6YNoqwXxHxCH65F2V9RTWTjAgEC
-----END DH PARAMETERS-----
client.crt0000644000000000000000000000746213374347054011567 0ustar rootrootCertificate:
Data:
Version: 3 (0x2)
Serial Number: 2 (0x2)
Signature Algorithm: sha256WithRSAEncryption
Issuer: C=TW, ST=TW, L=Taipei, O=netgear, OU=netgear, CN=netgear CA/name=EasyRSA/emailAddress=mail@netgear
Validity
Not Before: Nov 18 20:40:12 2018 GMT
Not After : Nov 13 20:40:12 2038 GMT
Subject: C=TW, ST=TW, L=Taipei, O=netgear, OU=netgear, CN=client/name=EasyRSA/emailAddress=mail@netgear
Subject Public Key Info:
Public Key Algorithm: rsaEncryption
Public-Key: (1024 bit)
Modulus:
00:c9:7c:05:bc:70:3d:8b:06:94:80:af:9b:66:9b:
18:4b:04:35:75:b9:71:1a:3e:61:b2:c3:c0:c0:5a:
eb:32:21:ba:7e:b9:c5:be:8c:63:01:8d:ee:f2:97:
6a:41:55:91:61:3e:64:a7:57:f2:8b:1f:36:72:bb:
4d:ba:a6:be:7d:d7:63:93:c6:eb:6f:f8:80:a9:a0:
fa:38:78:b9:86:24:22:ee:e8:79:72:50:9d:d4:d5:
8e:21:5b:61:47:24:15:9e:23:61:fe:61:13:16:14:
4d:64:91:94:12:79:92:f8:47:9c:69:9b:0e:fa:81:
Attempting to flash the sysupgrade.bin file from my OpenWrt SNAPSHOT, r8467-dd02a19ff5 with the dts mod (from luci, not tftp) while on stock 18.06.1 puts the router into a boot loop. TFTP flashing an openwrt factory.img (or presumably the stock OEM img - I didn't test stock OEM) recovers from this.