Progress on cross-compilation

Holds topics that document the NAS box's features and any related procedures. Stuff in here should eventually make it into a specification or the user guide.
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Progress on cross-compilation

Post by hamishmb »

I think I'm quite near building a working cross compiler for the NAS box, finally. There are definitely still issues - the builds are still failing at the moment - but I think we're getting close. If I completely fail to get this working, we can always fall back to D-Link's old (surprise!) bundled compiler, but we will probably be able to get a newer version of GCC working than they ship.

In terms of things we could build with it, I was thinking:
  • Python 3 - for running any custom Python scripts to eg generate charts.
  • A newer version of PHP (if possible).
  • MariaDB (if possible).
  • Some core utilities like the "file" and "nano" programs that are missing from the NAS at the moment.
I can probably put all of these on the HDDs, in a special folder, and add the binaries to the PATH variable so we can use them. I believe the NAS box has cron, so we also may be able to schedule tasks for it to perform (eg chart generation).
Hamish
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Progress on cross-compilation

Post by hamishmb »

The first vaguely-working cross compiler configuration is now complete. Many things are still wrong with it, but it does produce a working ddrescue binary. See the relevant thread for details and configuration.
Hamish
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Progress on cross-compilation

Post by hamishmb »

A reasonably-correct version of the cross compiler is now working. It does have the following remaining issues:
  • It builds against binutils v2.19.1a, instead of 2.19, which is what the NAS box uses.
    • This doesn't seem to matter, but we will see what happens.
    • It doesn't build against v2.18a, so currently this is the best I can do.
  • It builds against glibc/eglibc 2.9 instead of 2.8.
    • This is more likely to be a problem, but it can be solved by statically linking everything, which I was going to do anyway.
    • As above, glibc 2.8 isn't building at the moment, so this is the best I can do.
I will now try to get it building on newer, 64-bit versions of Ubuntu. This is serious progress - we might well be able to install our own custom applications and scripts to run on the NAS box.
Hamish
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Progress on cross-compilation

Post by hamishmb »

The cross compiler also works on 64-bit Ubuntu 14.04. Unfortunately, it doesn't work on any newer releases of Ubuntu.
Hamish
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Progress on cross-compilation

Post by TerryJC »

Hamish,

As mentioned in my email to you last evening, I wasn't aware of this Sub-forum at all. I remember you mentioning that you were planning to create a new sub-forum for the NAS work, but unfortunately I wasn't subscribed by default, even though I'm subscribed to the Software Discussion Forum....

Having said that, I'm truly impressed with the amount of work that you've done. If this all works, then it will be a triumph :!:

In your email to me you said:
As you probably saw on the forum, I have successfully created a cross-compilation environment for the NAS box in a Virtual Machine. I was wondering if you would like a copy of this for experimentation, or to put on your website for download (it's 2.4GB - far too big for the forum)?
I'm focused on building Gate Valves at the moment, so won't have much time to play around with a cross-compiler. Making the environment available for download isn't a bad idea though so I'll put it up on my website as you suggested. Have you any ideas about how to get it to me? Do you have a Dropbox or Google Drive account that you could put the file on temporarily?
Terry
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Progress on cross-compilation

Post by hamishmb »

Yeah, I don't why why it does that, the subscription feature is a bit finicky. I have uploaded it to my dropbox, and it is available at https://www.dropbox.com/s/r0c7f293sl170 ... v.ova?dl=0. Let me know when you've downloaded it - it's usuing up all my free dropbox space :)
Hamish
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Progress on cross-compilation

Post by TerryJC »

Hamish,

I have downloaded the file and it is currently being uploaded to http://hadrian-way.co.uk/WMT_River_Syst ... iguration/.

Give it a while to be fully uploaded and then you can delete the file from your Dropbox account. It probably needs about 10 or 15 more minutes.
Terry
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Progress on cross-compilation

Post by hamishmb »

Okay, I've finally got this building against glibc 2.8 like we need. I have also enabled building some debug tools like gdb and strace. Should be good to go to start building things now. I will post a link to the new OVA file once uploaded to dropbox tomorrow, so you can replace the one currently on your website Terry.
Hamish
hamishmb
Posts: 1891
Joined: 16/05/2017, 16:41

Re: Progress on cross-compilation

Post by hamishmb »

Okay, successfully tested and working. I also had to disable hardware floating-point stuff, which is a bit annoying but won't stop anything from working. Here's the link to the new compiler: https://www.dropbox.com/s/qs53g218z5ir5 ... v.ova?dl=0.
Hamish
TerryJC
Posts: 2616
Joined: 16/05/2017, 17:17

Re: Progress on cross-compilation

Post by TerryJC »

I'm downloading it now. Can I safely delete the original .ova file?

When you say it's working, does that mean that you have been able to upload it to the NAS?
Terry
Post Reply