SynoCommunity / spksrc

Cross compilation framework to create native packages for the Synology's NAS
https://synocommunity.com
Other
3.02k stars 1.23k forks source link

[Question] How do I create a package for NZBGET on DSM7 for my DS220j #4304

Closed Calimerorulez closed 2 years ago

Calimerorulez commented 3 years ago

Hi,

I would like to help building/updating packages, but it's not clear to me how I can build a package, like NZBGET, for DSM7 for my DS220j.

I saw the toolchain folders, which go to 6.2.3. Can I simply add 7.0 and create a Makefile accordingly?

Does anyone have any suggestions?

Thanks :-)

hgy59 commented 3 years ago

Hi @Calimerorulez As you can see in #4215 DSM7 support is still under development. There are several breaking changes from DSM6 to DSM7 regarding the package creation. On the dsm7 branch in this repo you can try to build nzbget. As for now only the x64 toolchain is added there and you will need to add the toolchain for rtd1296 (aka aarch64) to build packages for DS220j.

Calimerorulez commented 3 years ago

Hi @hgy59

Thank you for answer.

I managed to create a package with the 7.0 toolchain :)

Problem now is installing the package due to (of course) a permissions issue in the nzbget-installer script that is running on the synology:

su ${EFF_USER} -s /bin/sh -c "${NZBGET_INSTALLER} --destdir ${SYNOPKG_PKGDEST}/bin" >> ${INST_LOG} 2>&1

The su command asks for a password. I have looked for the github repo maintainer, Safihre, but his repo for nzbget apparently is deleted.

Calimerorulez commented 3 years ago

Well, I managed getting it installed by removing the su ${EFF_USER} -s /bin/sh part, and it runs, beside some copy errors, for the config files. Let's see if I can fix it :)

If it helps anyone, my digests file:

rtd1296-gcc730_glibc226_armv8-GPL.txz SHA1 5F4E8D3AF9B31110C6CD139DE51B662ECD3FE084
rtd1296-gcc730_glibc226_armv8-GPL.txz SHA256 54042300CDC3FF65E3A1093DF47238CF91F37D744592E594F685B46EAD73522B
rtd1296-gcc730_glibc226_armv8-GPL.txz MD5 349a6f674c4698df3b9d334ac5c86b5e

Makefile:

TC_ARCH = rtd1296
TC_VERS = 7.0
TC_KERNEL = 4.4.180+

TC_DIST = rtd1296-gcc730_glibc226_armv8-GPL
TC_DIST_SITE_PATH = Realtek%20RTD129x%20Linux%204.4.180
TC_DIST_SITE_URL =  https://sourceforge.net/projects/dsgpl/files/Tool%20Chain/DSM%207.0%20preview%20Tool%20Chains/

TC_TARGET = aarch64-unknown-linux-gnu
TC_SYSROOT = $(TC_TARGET)/sysroot

include ../../mk/spksrc.tc.mk