Building a custom cgminer for MT300N-V2

This is my first time attempting to build a custom package on my gl-inet MT300N-V2, and the software in question is not part of openwrt / packages.

I just want to build an .ipk for it.

From what I understood, I need gl-inet / sdk

$ git clone https://github.com/gl-inet/sdk glinet-sdk
$ cd glinet-sdk
$ ./download.sh ramips-1806

After that I try to understand what is meant in the gl-inet sdk README with

Place your package in sdk/<version>/<target>/package/

The software I want to build has a github project and a configure script, so I git clone it into sdk/<version>/<target>/package/

$ git clone -b r606 --depth 1 https://github.com/vthoang/cgminer.git sdk/1806/ramips/package/cgminer

Then I run the make command, which fails.

make[1]: *** No rule to make target 'package/cgminer/compile

Can anyone with more experience tell me how to make it work?
Or point me to useful resources? I’m lost, and have never done cross-compilation before. I was hoping the gl-inet/sdk would ease the process, but there’s evidently something missing in my understanding of how to use it.

First of all, why would you want to use CGMiner on your router? It will basically be a 100% waste of electricity and also a waste of your time.

Also unfortunately if what you want to build doesn’t have an “OpenWRT Package”, then it’s not as simple as in the SDK guide.

As an example, take a look at the OpenWRT Package structure here:

OpenWRT Packages have a special kind of Makefile, that will either download a remote package and build from the downloaded sources, or build locally. It will create the IPK package you can install on the router, and contains install locations, files and so on.

I found a package source for CGMiner here:

It will need to be modified since the person is using it for Avalon, i guess some specific miner hardware.

1 Like

Thank you for the pointers to external resources.

I’m well aware that this is a lost cause, but the whole point of the exercise was for me to run a low-power device around the clock with internet connectivity and a USB port for my NEWPAC miner. This is just a miner for luck, with intergalactically small odds of mining any block ever.

I knew all that when I was getting into this.

But I was getting nowhere with OpenWRT and so I wrote this question in the forum before giving up and throwing everything away. You took the time to respond and I’m thankful for that.

So I shall try. And it will be wasted time. And that is OK.