Page 1 of 1

Update for NAS

Posted: Mon Jul 07, 2014 11:28 pm
by dmod
So as some of you guys might be aware of the people who own a netgear NAS or ReadyNAS 100 series only have a very old version available through netgear's app market. Can you point me into the right direction for altering the code for the ARM os using Rasberry Pi? Can I use the same as the Qt or Q4? Sorry if that seems like an dumb or odd question. I started developing just recently and just need a point in the right direction so I don't use all my time looking at one language and realizing it wont help my situation. Thanks guys. I love Qbittorrent and what you guys are doing here; it is the only torrent program I use and I don't want to have to use something else because Netgear is aterrible company. Thanks again

Re: Update for NAS

Posted: Tue Jul 22, 2014 1:07 am
by dmod
So about 50 people have looked at this and I didnt get a response. If anyone can take a minute to throw in their 2 cents, I would really appreciate it. I'd appreciate a link to where I can find the answer or even telling me no way. To summarize my first post I want to manually update qbittorrent for my netgear NAS by changing the code because the newest version offered by netgear is 2.9.8 webui. I have the RN104 which uses an ARM processor, loads apps through .deb format, and has the 2.9.8 as a starting bases. All I want to know is if I can change the code in the 2.9.8 version with the code from some other qbittorrent version? I.e.can I use another ARM platform version and copy parts of it or any other version or code found on github? I will do the research into it, I am interested in learning about modifying or building code for programs. I want to know if it is even possible so I know if I'm wasting me by looking further into it. I just want a point in the right direction, someone to tell me where to start from. Thank you guys for your help.

Re: Update for NAS

Posted: Tue Jul 22, 2014 1:28 am
by dmod
To make it very simple....

If I package the qbittorrent-nox from squeeze into a deb file will it work on my Netgear RN104 NAS with an ARM processor?

Thank you

Re: Update for NAS

Posted: Tue Jul 22, 2014 6:31 am
by loki
I have no way of knowing what Netgear uses as their OS base for one, (I don't even own anything ARM for another), best you could do is try it and see if it works. .deb is pretty much just a container format, could contain files for anything from ubuntu to debian, or any debian based which is literally thousands of variations that are probably not compatible between each other, or are very difficult or impossible to make compatible  (and not recommended if it even does).

Have you asked this question at Netgear forums? Since they or whoever was in charge at the time apparently made the version you have now, they could push an update?

Re: Update for NAS

Posted: Tue Jul 22, 2014 3:07 pm
by sledgehammer_999
Is it's arm processor arm7+ ? If yes, then you can use the "armhf" architecture.
If your distro is debian based and you know some linux basics, do the following (or google on how to do it)
1. Edit /etc/apt/sources.list and add Debian's "testing" branch repos for the armhf arch.
2. sudo apt-get update
3. sudo apt-get install qbittorrent

It should pull the additional libs required. After that remove the line from sources.list and redo sudo apt-get update. It will prevent the autoupdate mechanism from picking up wrong packages for the rest of the system.

The alternative is to use the official source for the .deb packages from the Debian project BUT rebuild them on your nas manually.

Re: Update for NAS

Posted: Wed Jul 23, 2014 6:55 am
by dmod
Thank you guys for your help and I know my first question was extremely vague. So thank you for taking the time to go step by step with me and answer all my dumb questions. I tried to figure out the OS and what is required to develop software for it. This is what I came up with so far; some of it might be useless but I figure the more info the better right?

The NAS uses a btrfs, file system, which was used on the Oracle Linux OS. Oracle Linux uses an Unbreakable Enterprise Kernel, UEK, but is also Red Hat Kernal compatible. My understanding is that the Kernel being used isn't a big deal though.  A previous Linux Kernel can be used without major problems, there might just be minor compatiblity errors. Besides Oracle Linux, the SUSE Linux Enterprise OS uses btrfs as it's root file system. Some of that was the overkill information that I was talking about, I think the most important info is...  A build should use chroot under a wheezy 64 bits linux environment.Netgear recommend using NML command line utility, but I read,from a non-netgear source, that TRIM command can be used. I need to read up more about this because I don't quite know what this means, actually I don't know anything about TRIM vs NML.The main library being used for applications is the gnome library or glibc 2.11.1 and the sudo  package needs to be installed. The libxml2 can be installed, actually any other package that is needed can be added to the root.Applications can also be created using a SAMBA VFS module.Finally the programs need to be packaged into an amd64 deb package. Also Arch is used to make an armel and amd64 deb package.

So to answer sledgehammer nothing that I read used armhf; I read arm arch ( no "hf" at the end) and 'arm-linux-gnueab' so IDK if that is still an option? When you say use the official source for the .deb package; does that mean that I can copy the source and just repackage it for my needs?  I'm not sure about why you said rebuild it on the NAS though, I guess that's the next thing I need to look up. I ask because origionally I wanted to copy the source from github and repackage it but didnt know if the OS, library, or package effected what could and could not be used.

Hopefully my post answered your questions loki about the OS. As far as Netgear actually being helpful, I highly doubt that will happen anytime soon. I usually buy Netgear products but I regret buying their NAS and if I could get 75% of the asking price I would sell it in an instant.

Thank you guys for all your help again, I really appreciate it!

Re: Update for NAS

Posted: Wed Jul 23, 2014 11:34 am
by sledgehammer_999
It's clear that you are a rookie on linux stuff. I don't where you got the info you are giving but:
1. You are mentioning 4-5 different distros
2. If you need amd64 deb then you aren't running on an arm processor but on an x86 based one.
3. Debian also builds packges for the armel arch. The difference between armel and armhf is the hardware floating point capabilities of the binaries. The armhf does hardware floating point arithmetic for ARMv7+ processors. While armel does software based floating point arithmetic for all(?) ARM processors.
4. Your problem is more general. You need to learn a) how to build something on linux b)how to do it for your NAS. Then you can do it for qbittorrent too.
5. Search for "build packages from debian source". Debian source packages contain the necessary scripts for the debian tools that help you build and package a program into a .deb.

I cannot further help.

Re: Update for NAS

Posted: Thu Jul 24, 2014 11:32 am
by dmod
I said in the beginning that I am new to this, that's why I was asking to be pointed in the right direction and maybe have a couple simple questions answered to save me hours of mindless searching.
1.My first post had no information that could be used to help understand my situattion so I listed absolutely everything I could find about the NAS last time. I figured that most of it was useless from what I understood but hey at least i covered all the grounds.
2. My device uses what Netgear calls OS6 and and all I could find with information about it was the SDK readme. It starts by telling how to compile an environment for amd64 and a few pages later there is one small box stating how to cross compile for armel. Then at the very end it talks about making both deb packages for armel and amd64. I forgot the the x86 NAS also uses the OS6 and assumed that to use the 64 was what I needed to use for my NAS. Thank you for pointing that out, things make a little more sense now :)
3.Ok. Well I never saw armhf and I believe it uses a different architecture, I can't give exact details off the top of my head and I'm too tired to look at the moment. I know were find building the package and that shouldn't be a problem, especially becuase of what you pointed out at bullet 1. lol
4. Not sure what to say, I dont see why I cant kill three birds with one stone. It may not be the best way to learn or do it right but if I get the result I want that's all that matters to me.
5. I had already done that and was reading into it, also I'm not quite sure why debian tools is bold.....

If you cant help further then I'd like to thank you for helping and coming this far.

Well I think Im heading towards the right direction and have a better what I need to do, but who knows maybe I'm completely off. Like I said in the beginning all I want to do is update qbittorrent  that my NAS uses since Netgear doesn't send out updates. I just wanted to make sure I wasn't going to break it or was completely wasting my time looking into this. My question wasn't answered really, but at least I think I know where to look for some answers. I set up the webui, set up a dns so I could easily access it with my phone, made a SSL, but the qbittorrent I'm using lacks the options that I like such as RSS, and other advance settings( the config file doesn't offer much) I'm just trying to improve it and make it the great program I know it is capable of being. I keep trying and looking into it, thanks for the help

Re: Update for NAS

Posted: Thu Jul 24, 2014 1:26 pm
by sledgehammer_999
Don't expect much from the newer version if you don't run the GUI version. qbittorrent-nox (headless version) doesn't expose rss in the webui IIRC.
Maybe you should point to the SDK here and note where it states about building. Maybe some other member will give time to help you.
Here is the debian qbittorrent package page: https://packages.debian.org/sid/qbittorrent
From the right side you can quick grab the debian source package (you need all 3 files).

I suggest you install in a VM debian. Then try to build the above source package from the terminal, using the commands you find in the debian wiki. After you successfully do it, you can search on how to "crosscompile" the a debian package. Target the armel arch. The resulting .deb should install on your NAS, if the rest of the dependencies are satisfied ie libtorrent version (and libboot).

Re: Update for NAS

Posted: Wed Jul 30, 2014 8:27 am
by dmod
Thanks for all the suggestions and help. Also thanks for spelling it all out for me lol I'll if I get it all figured out and working properly I'll let you know. Sorry I took awhile to respond, I went out of state for work for a few days.

Here is the SDK if anyone feels like helping or just wants to give their 2 cents. The README link has all the infomation on the build.
http://apps.readynas.com/pages/?page_id=68
All the help is appreciate guys. Thank you

Re: Update for NAS

Posted: Wed Jul 30, 2014 11:25 am
by sledgehammer_999
From a quick read: The commands it uses are available on debian-based distros. So your best bet is to install Debian Stable in your pc(or in a VM) and then follow the instructions for crosscompiling armel on amd64. (assuming you are building for ARM processors).