ReadyNASDuoSparc
Binaries, scripts for Netgear ReadyNASDuo v1
Install / Use
/learn @mfe-/ReadyNASDuoSparcREADME
ReadyNASDuoSparc
This repository contains information, binaries, scripts regarding the readynas duo v1 sparc machine from netgear.</p> "The ReadyNAS RAIDiator 4.1.x firmware is a 32-bit SPARC Debian derivative mated to a Linux 2.6.17 kernel with numerous proprietary drivers"
Qemu image of readynas https://community.netgear.com/t5/Community-Add-ons/Sparc-platform-development-envrionment-using-Qemu/td-p/720841 (dev version)
Hints
- If there is no space left on the root partition you can workaround the issue with:
mount --bind /path/to/dir/with/plenty/of/space /tmp - Better create a symlink for /usr/local/ -> /c/usr/local/
- create dpkg packages with
checkinstall --dpkgflags=--force-overwrite --exclude /usr/local/share/ make install - use
dpkg -i --force-overwrite whatever.debto install debian packages from this repository. - If you retriev error messages like
debian-sparc:~# curl --version curl: error while loading shared libraries: libnettle.so.6: cannot open shared object file: No such file or directorywhen executing an installed application (in this case it would be curl), make sure you installed the required library (in this example it would be libnettle) and exported the enviroment variable LD_LIBRARY_PATH with the proper paths.
Start
- Download this github repository with
wget --no-check-certificate https://github.com/mfe-/ReadyNASDuoSparc/archive/master.zip - Unzip and install your required software
- You can execute steps 1 to 12 of init.
- It makes sense to export some enviroment variables when logging into bash.
a. You can make use of
.bashrcb. add the following lines to export some paths
export PATH=$PATH:/opt/rfw/bin/:/usr/local/ssl/bin/:/opt/git-2.21.0/bin/
export PATH=$HOME/.local/bin:$PATH
export LD_LIBRARY_PATH=/opt/gcc-4.6.0/lib/:/usr/local/ssl/lib/:/usr/local/lib/
curl https://curl.se/ca/cacert.pem -k -o cacert.pemsudo mkdir -p /opt/git-2.21.0/etc touch /opt/git-2.21.0/etc/gitconfig/opt/git-2.21.0/bin/git config --global http.sslCAInfo /etc/ssl/certs/cacert.pem
Init
I reset my readynas and did the following steps:
Because netgear turned off there package repository you can't get the customized netgear packages like libc6-dev for the debian system. You can get the contained files from the libc6-dev folder. You only need to copy them to the system root partion /.
- Remove netgear sources from apt.sources
- apt-get update
Fix some broken stuff on the readynas
-
apt-get install grep --reinstall (rly important this was related to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81421)
-
Apt-get install nano -y
-
apt-get install less --reinstall -y
-
useradd -s /bin/false man
-
apt-get install man-db
-
apt-get install manpages-dev
-
apt-get install --reinstall perl
-
Apt-get install screen
-
Apt-get install less
-
ln -s /usr/bin/less /usr/bin/sensible-pager
-
Apt-get install checkinstall
Do not execute the underneath steps. Those are only for documentation purposes. Install gcc 3.3.5 with apt
- apt-get install gcc
- gcc --v Reading specs from /usr/lib/gcc-lib/sparc-linux/3.3.5/specs Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --enable-__cxa_atexit --with-system-zlib --enable-nls --without-included-gettext --enable-clocale=gnu --enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --with-cpu=v7 --enable-objc-gc sparc-linux Thread model: posix gcc version 3.3.5 (Debian 1:3.3.5-13)
Install gcc 4.0.4 from source
- download mpc-0.9.tar.gz, gmp-4.3.2.tar, mpfr-3.1.1.tar.gz and extract them
- download and extract gcc-4.0.4.tar.gz
- rename the extracted folder to mpc, gmp, mpfr and move them to into the extracted gcc source folder
- create a new folder outside of the gcc sourcefolder called gcc-4.0.4-compiled
- cd to gcc-4.0.4-compiled
- ../gcc-4.0.4/configure --prefix=/opt/gcc-4.0.4 --mandir=/usr/share/man --infodir=/usr/share/info --with-cpu=v7 --enable-objc-gc --enable-shared --enable-__cxa_atexit --with-system-zlib --enable-nls --without-included-gettext --enable-clocale=gnu --enable-languages=c,c++ --build=sparc-linux --host=sparc-linux
- make && make install
- export LD_LIBRARY_PATH=/opt/gcc-4/lib:/usr/local/lib/ or add it to /root/.bashrc
- checkinstall --dpkgflags=--force-overwrite make install #create .deb package Use the new gcc by setting CC and CXX. For example ./configure CC=/opt/gcc-4/bin/gcc CXX=/opt/gcc-4/bin/g++
Install last gnu enviroment libraries
- install with dpkg -i -f perl-base_5.8.8-7.infrant2_sparc.deb, perl-modules_5.8.8-7.infrant2_all.deb, perl_5.8.8-7.infrant2_sparc.deb from this repository
- install last make
- install last automake
- install last m4
- install last gmp, mpfr, mpc
- install libiconv
- install Bison
- install libtool
- install ncurse
- install expat
- install libxml
- install gettext
- install texinfo version <5 otherwise you can't compile gcc 4.6
- install ils
Install gcc 4.6
- install gcc 4.6 with gcc-4.6-compiled# ../gcc-4.6/configure CC=/opt/gcc-4/bin/gcc CXX=/opt/gcc-4/bin/g++ --enable-languages=c,c++ --prefix=/opt/gcc-4.6 --enable-shared --enable-__cxa_atexit --with-system-zlib --enable-nls --enable-clocale=gnu --enable-debug --with-cpu=v7 --enable-objc-gc sparc-linux --with-system-zlib=/usr/local --with-mpc=/usr/local --with-mpfr=/usr/local --with-gmp=/usr/local --with-isl=/usr/local/
Compile kernel modules
- Download last firmware from Netgear ReadyNAS devices running RAIDiator 4.1 (NV / NV+ / 1100 / Duo) GPL Bundle, RAIDiator 4.1.16
Issues
<br>https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81579 sanitizer_platform_limits_linux.cc:37:15: error: conflicting declaration ‘typedef __gid_t__kernel_gid_t’ </br> <br>https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81451 - missing futex check - libgo/runtime/thread-linux.c:12:0 futex.h:13:12: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘long’</br> <br>https://gcc.gnu.org/bugzilla/show_bug.cgi?id=56827 Building Go support for gcc 4.8.0 fails on Linux: undefined type ‘SockFilter’ </br> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81449 - runtime.inc:782:28: error: field ‘__sem_lock’ has incomplete type </br> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82043 - error: redefinition of ... </br> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82208 - exec_linux.go:197:27: error: reference to undefined name 'SYS_UNSHARE' </br> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82348 - math.lo.dep bytes.gox dependency dropped </br> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87013 -gcc8 </br> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88060 - [Bug go/88060] ../../../gcc-8.2.0/libgo/go/syscall/libcall_linux_utimesnano.go:17:18: error: reference to undefined name ‘_AT_FDCWD’ </br> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88135 - Bug 88135 - error: reference to undefined identifier ‘syscall.WEXITED’ </br> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90527 - gcc9.1 alloc.c:72:7: error: implicit declaration of function ‘posix_memalign’
init
apt-get update
mkdir /c/opt
mkdir /c/usr
mkdir /c/usr/local
mv /opt/* /c/opt/
rm /opt/ -Rf
ln -s /c/opt/ /opt
mv /usr/local/* /c/usr/local/
rm /usr/local/ -R
ln -s /c/usr/local/ /usr/local
apt-get install grep --reinstall
apt-get install nano -y
apt-get install less -y
useradd -s /bin/false man
apt-get install man-db -y
apt-get install less -y
ln -s /usr/bin/less /usr/bin/sensible-pager
apt-get install screen -y
apt-get install gcc g++ -y
About Readynas duo
Since the page http://wiki.dietpc.org/index.php/DIET-PC_on_SPARC_ReadyNAS is down, I used the timemachine to go back in time and "save" the content of the "dietpc" page in this markdown file.
Introduction
Well, I never thought that I'd have an opportunity to put my 32-bit SPARC port of DIET-PC to actual use, but then this Netgear ReadyNAS Duo hardware fell in my lap! Very popular in its day, but a bit of an underperforming relic nowadays. Let's see if we can put it to slightly better use with more modern software (for the most part, at least - I am limited by the development environments that I use as far as glibc and Xorg baselines are concerned, so in these respects I can at best upgrade the ReadyNAS from a Sarge-like machine (glibc 2.3.2, no udev) to an Etch-like machine (glibc 2.3.6, with udev)). The 2.6.17 kernel is a pretty elderly, but it's good enough for inotify, udev and GPT.
The Hardware
ReadyNASDuo.jpg
It's a strange little beast, based on a custom Infrant IT3107 ASIC with a 280 MHz SPARC (32-bit) CPU, quite unlike anything else I've seen in the NAS market. It has a PCI bus, but the only thing on it are the Via USB chipsets; everything else is on proprietary platform busses. The platform is named "Padre".
The ergonomic design of this unit is rather nice, although how often you are going to replace hard disks in a two-disk unit? Do we really need hot-swap drive bays? The variable speed 60mm fan is unusual and much appreciated, as it keeps the noise down fairly well.
| Type | MAke/Model | Properties | |---|---|---| | CPU| Infrant IT3107 (sparcv8) |280 MHz, XOR offload engine, DES crypto engine| |RAM| Unigen DDR400 SODIMM |256 MiB| |NIC| Padre GMac (custom) |Gigabit ethernet| |Storage| Hynix NAND MTD |64 GiB| |Storage |Controller Unknown (custom) |2x SATA (<= 1.5 Gbit/s) presenting as IDE| |USB Controller |Via VT82xxxxx 1.1 / Via 2.0 |2x UHCI (1.1) ports, 1x EHCI
