hubaiz / DslrDashboardServer

DslrDashboard Server for OpenWrt
GNU General Public License v3.0
159 stars 60 forks source link

Compile on GL.iNet GL-SFT1200 #38

Closed warwound closed 2 years ago

warwound commented 2 years ago

I'm trying to compile ddserver on my GL.iNet GL-SFT1200 router. https://docs.gl-inet.com/en/3/specification/gl-sft1200/ The router runs OpenWRT and has a MIPS SF19A28 CPU. https://www.siflower.com.cn/en/products/detail/7

git clone git://github.com/hubaiz/DslrDashboardServer package/DslrDashboardServer

fails but this next one works:

git clone https://github.com/hubaiz/DslrDashboardServer package/DslrDashboardServer

I then run:

make menuconfig

and get:

make: *** No rule to make target 'menuconfig'. Stop.

If I move into the 'package' directory I get the same result when I run the same command. And if I move into the 'DslrDashboardServer' directory and run the same command I get:

Makefile:13: /package.mk: No such file or directory make: *** No rule to make target '/package.mk'. Stop.

My 'package' directory in locate at: /root/package/DslrDashboardServer

Is OpenWRT expecting my package directory to be somewhere else and that is required in order for the 'make menuconfig' command to succeed?

hubaiz commented 2 years ago

You need to setup an OpenWrt development environment, here you find instructions for it: https://openwrt.org/docs/guide-developer/start

warwound commented 2 years ago

Ah that explains it!

Your link to the OpenWrt developer docs talks about installing a development environment on say a PC and using cross-compilation to compile a binary for the target device - my MIPS router. Is that the only way to proceed? Is that the recommended way to proceed?

Is the 'package' directory I mentioned above part of the OpenWrt source and I need to (re)compile OpenWrt with ddserver embedded in it (I hope this is not the case)?

Can I instead simply install some development packages on my router and compile on my router? This must be the most elegant solution.

hubaiz commented 2 years ago

Sorry but I'm not an OpenWrt expert. I installed the complete development environment and did the build that way. Eventually you could try the SDK and build with it but don't know if it will work and I can't help you with it as don't have any experience with the SDK.

warwound commented 2 years ago

OK thanks a lot - you've pointed me in the right direction. :-)

warwound commented 2 years ago

I got it working - far easier than I'd ever imagined... GL.iNET have their own version of the OpenWRT SDK in their github repo: https://github.com/gl-inet/sdk On my Mint laptop I installed a few dependencies (the above link shows Ubuntu 18.04 packages to install, one or two needed a rename). Cloned ddserver into the right folder: sdk/1806/siflower/package The command 'make menuconfig' now works. And the GL.iNET webpage shows how to compile a standalone binary for my GL-SFT1200:

cd sdk/1806/siflower/
make package/DslrDashboardServer/compile V=s

This needed a couple of tries before I got it working. The result was a file 'ddserver_0.2-14_mips_siflower.ipk' of less than 12KB which I transferred to my router and installed using the opkg command. Connected my Nikon D5300 and it works perfectly, I can abandon the Pi Zero I was previously using to run ddserver.