A suggestion for the Linux version of DTC

Have an idea how to make KryoFlux even better? Let us know...
Post Reply
Rixa
Posts: 52
Joined: Mon Dec 12, 2011 12:09 pm

A suggestion for the Linux version of DTC

Post by Rixa »

While patiently :? waiting for an update to the Linux version of DTC, I would like to suggest a little bit more flexibility in the location of the firmware.

Currently it looks for it in /usr/local/share/dtc/ which is problematic from a packaging point of view, since packages are usually expected not to rely on /usr/local being writable (it might well be a read-only shared network disk). I don't know if you ever plan to build official packages (theres many distros out there), but since there's additional system setup required for DTC to work, I'd like to at least wrap it all up neatly for myself.

The easiest way to get around this would be to just add /usr/share/dtc/ in the list of places to look for firmware in.
If you want to have even more flexibility, you could even have it read /etc/dtc.conf for some sort of a site config..

User avatar
Malvineous
Posts: 156
Joined: Sun Oct 31, 2010 10:57 pm
Location: Brisbane, Australia
Contact:

Re: A suggestion for the Linux version of DTC

Post by Malvineous »

I agree this would be good, I'll see what I can do when next updating the Linux port. At the moment there is a ./configure script and you pass the directory to that, and I chose /usr/local as the prefix given that most people would be installing DTC by hand. (Because /usr/share is kind of off limits for manually installed files.) But of course while DTC is closed source, the ./configure method isn't very flexible.

I'm not so keen on adding a configuration file as then the code will diverge quite a bit from the primary/Windows codebase, but would an environment variable work for you? This isn't too bad as it's only one function call. An alternative would be to release a separate version for package maintainers with the prefix set to /usr instead.

I'm experimenting with making my own (non-Kryoflux) packages for Arch Linux and Debian, so I'm also considering releasing packages for those platforms. I might post another thread to get some indication of what Linux distributions people are using, to see if there's particular ones worth targeting.

Rixa
Posts: 52
Joined: Mon Dec 12, 2011 12:09 pm

Re: A suggestion for the Linux version of DTC

Post by Rixa »

An environment variable would certainly be an improvement. It would make a wrapper script possible, and I can also think of ways how it could be used for an easy way to select between the slow and the fast firmware.

A small concern about loading firmware from user-selectable location, though .. is it possible to damage the board by sending a random file for a firmware by accident (or a specially crafted one by malice)? It's already looking in the current directory, of course, so nothing new there..

User avatar
mr.vince
Posts: 2127
Joined: Tue Oct 05, 2010 5:48 pm

Re: A suggestion for the Linux version of DTC

Post by mr.vince »

The firmware is not flashed, it's loaded into the board's ram. It will only crash the processor, thus needing a reboot.

Worst case could be sending commands to the drive (VERY unlikely) and bang the head against a stop, but that would mean accidentially pulling the correct lines etc. VERY VERY unlikely.

Post Reply