Jump to content
XPEnology Community

[QUESTION] Old hardware support


Recommended Posts

Hey guys!


I would need some help. Got a shiny old IBM desktop (Thinkcentre 8183) from my neighbour who decided to replace his old IT stuff with new gear, and decided, why not make a home NAS out of it, just for the heck of the thing?

So scavenging began. First thing I did was to get rid of the built-in floppy and CD drives, and to extend the memory to 1GB. Then I put my one of my 1TB data drives in there (SATA2 Samsung), plus kept the old 40GB IDE drive for the OS.


First played around with FreeNAS. It was great, but not Linux, unknown system, low support for things I need.

Then came OMV. It is great, but needs a lot more feature, more stability, and less resource-eating. Overall it was a good experience, but not exactly what I was looking for. I needed more, and less. More on the user interface end, and less on the backend.


After looking around, I found out about Synology, and their NAS systems. Shiny UI, lot of extensibility with features I want (torrent server, NAS function, media streaming, etc.), and seemingly easy installation.


First problem was, that this old P4 is not 64-bit enabled. So I searched, and found a REALLY old build for the DS411+, and it was 32bit. Flash to a flash drive, insert it, boot. Finally, no warning about the kernel being x86_64, while the hardware is i686 only. Network vender MACs seem to be in order too, so lets see what happens and how. Started up the Synology Assistant, and it began the search. Nothing found, so I looked a bit more into it, and turns out, the computer is not even connected to the network!


So booted back to Ubuntu, and checked the NIC. Of course it is a frakking old Intel 82562EZ 10/100, one that is not supported by default! So let's see: I have to recompile the kernel, so why not use 4.1 then. Grabbed the kernel source, the suggested toolchain, and began compiling. Got the modules (no synoboot.ko though? O.o), did all the changes said on the wiki, pushed it to my boot pendrive, and rebooted.


Of course, stupidity over everything, forgot to check the toolchain's version, and grabbed the x64 one. Of course even after setting up the x86 config and using that, it did not work.


So right now I'm back to the drawing board, and trying to compile some code on this ancient box, what will probably take hours. Concurrently working on the 4.1 and 4.2 trees, so maybe I can give birth to one working kernel and module combo.


I will check back later on, providing some more info about my success/failure, but I have a few questions too:

- Is the mentioned NIC in any way supported? Ubuntu 12.10 has working network with linux-3.5.x kernel, so it should be there by default, and the only module it uses for networking is the Intel e100 one, yet with that enabled the old kernel did not work (I presume it was enabled as so far all the kernel sources I checked had the e100 enabled by default, except NightHawk's tree).

- Is there any way to install the whole system, with synoboot, etc., into one flash drive? Following the tutorial, it said I have to use another drive as the boot drive would be overwritten if it is selected for installation. I would rather not sacrifice two of my flash drives, and I do not wish to have a third, IDE drive in my server (want to add my second 1TB data drive, to create a RAID0 array for more storage, and get rid of the IDE drive).



Tried compiling Andy's 4.1 and NightHawk's 4.2 kernels, with the x86 synoconfig and enabled all Intel drivers.


- 4.1 kernel, 4.1 toolchain, x86 config -- Dies on bzImage


Error in arch/x86/kernel/sys_i386_32.c, function sys_SYNOmmap
On line 51, implicit declaration of function 'sys_mmap2'

- 4.2 kernel, 4.2 toolchain, x86 config -- Dies on bzImage


Error in kernel/built-in.o, function kernel_power_off
(.text+0x1c48e) undefined reference to syno_schedule_power_on_prepare


If anyone has any idea how to fix it, please do share! No, it is not a problem with added modules, tried with a clean x86 defconfig, and same problem. BUT, with an x86_64 config (4.2 case), it skips that, and seemingly compiles properly. Still have to do the modules, but will report back how's it going.



Okay, the x86-64 config (without the "64 bit kernel" flag) failed too.

- 4.2 kernel source, 4.2 toolchain, x86-64 config -- Dies on bzImage

It goes through the built-in.o problem, but I get a new one:


Error in drivers/ata/sata_mv.o, function syno_sata_mv_gpio_write
sata_mv.c (.text+0x3a10): multiple definition of syno_sata_mv_gpio_write
drivers/ata/libata.o(.text+0xa80) first definied here
Warning: size of symbol 'syno_sata_mv_gpio_write' changed from 2 in drivers/ata/libata.o to 143 in drivers/ata/sata_mv.o

Link to comment
Share on other sites

Instead of editing, I'll add new posts of progress.

So, after some hackery, figured out a few things.

- The synoconfigs/x86 config file SUCKS. It won't compile, it is old, needs a lot of update. Grew tired, grabbed the x86_64, removed 64bit support and added 32bit.

- My network card needed the Intel e100 driver, and it should work now

- After a minimal patching around in the kernel tree, x86 now can be compiled easily. Will do a pull request later, but I cannot be arsed right now.

Using 4.1 x86_64 toolchain, x64 base OS, x86_64 modified config, base is 4.1 build 2668+

The root of the problem is the arch/x86/kernel/sys_i386_32.c file. While the sys_x86_64.c is nice and up-to-date, i386 received no love at all, is not working, compile dies. Given that my C skills are near nonexistent, I needed some time to figure it out.

First try was to make a copy of the 64bit version, remove 64bit stuff, and compile. While it did get through the initial problem, it caused another. In particular, both the 64 and 32 bit files were referenced, and as they were the same, there were colliding definitions of functions. So it had to go.

Second try was successful. Replaced the SYNO function in 32.c with the one in 64.c, and added the sys_mmap declaration too, from the same place. Now it compiles perfectly, without a hiccup!


So made a flash drive, replaced the zImage, and the modules in rd.gz. Had to move and resize the partitions though, as my new modules were a bit oversized. So a request to the guy who makes the synoboot.img - pretty please, make the grub boot partition a tad bit bigger! Let's have a standard 256MB image, 64MB for the boot partition, 192 for the system, and it should work!


So, replaced zImage and stuff, let's see this puppy. Smashed my drive into a port, booted from it. HAH! No more incompatible kernel message, it loads the zImage, then boots. At least it says so, because nothing happens, network does not come on, and it just hangs there. There is no network connection, so it does not get to load the compiled-in kernel modules, meaning it is definitely not one of the extra *.ko files.


If anyone has any kind of suggestion, please do share!

Link to comment
Share on other sites

  • 3 months later...

  • Create New...