ravetam

DS918+ Bootloader - Help Needed

Recommended Posts

I'm trying to build a bootloader for DS918+. This synology version is based on Linux 4.4 and use ApolloLake CPU. The interesting thing is that since it is based on Linux 4.4, it contains newer GPU driver which supports up to KabyLake processor. The only CPU it won't support is CoffeLake which just came out. Anyway, this should enabled Hardware Transcoding for these newer processor.

 

Here's the progress so far. Original bootloader is from DS916+.

 

  • zImage - Using the default zImage from DS918+. 
  • rd.gz - Using the default zImage from DS918+.
  • extra.lmza
    • etc
      • jun.patch (done)
      • rc.modules (all emptied since the driver won't work for this bootloader anyway)
    • use
      • bin
        • patch (my guess is that this program is used to patch "jun.patch". I'm not sure if it is version specific since DS916 is based on Linux 3.10 and DS918 is based on Linux 4.4)
      • lib
        • firmware (all emptied)
        • modules (all emptied)
      • sbin
        • modprobe (this seems to be the file that write the USB PID VID, MAC and other values to the running kernel. It is version specific so it won't work now for this bootloader. It has to be recompiled for apollolake)

 

Right now, i can get to the screen where i upload the PAT file but i got this error Failed to install the file. The file is probably corrupted. (13)" . My guess is that it is missing a working modprobe. 

 

If anyone can provide me some insight or tips, i would really appreciate it.

Share this post


Link to post
Share on other sites

Both models have different kernel versions and architectures (braswell vs Apollolake). Jun's patch/hack needs to be customised for each specific model. Unless you are confortable with coding/hacking and able to come up with your own hack then Jun would need to create a loader for 918+. My understanding is that modprobe is the actual hack but it's a binary so you won't be able to see what's inside.

Share this post


Link to post
Share on other sites

Yes, the only variable is modprobe. If i can get my hands on the source code (I have PM'ed Jun), then i would be able to modify and recompile it using the GCC for the ApolloLake arch. I'm no C++ coder but i'm quite good with C# and JS.

Share this post


Link to post
Share on other sites

Jun hasn't shared the source code of his  hack with anyone and for a good reason. If he does with you then you will be the lucky first!

Share this post


Link to post
Share on other sites
4 hours ago, ravetam said:

Right now, i can get to the screen where i upload the PAT file but i got this error Failed to install the file. The file is probably corrupted. (13)" . My guess is that it is missing a working modprobe. 

 

that error is typical if there is a wrong vid/pid

also beside this stuff

in 3617 and probably other newer versions like 916+ and 918+ there is a chek about the bootloader (or serial device?) that checks for original sysnology hardware, after some time (~24h) it will disable services, it was called timebomb, that fix came (afair) with 1.2a2, same time as 916+ support

  • Like 1

Share this post


Link to post
Share on other sites

The hardware ID works fine for 916. And I saw that there's some code that mentioned pid and vid in modprobe.

 

Two of the test I did is removing modprobe and also replacing it in DS916 bootloader and I get do get the error 13 again. I'll have to search around what the modprobe does.

 

Thanks for the tips on the time bomb. I hope that code is in the public source code that synology uploaded. 

Share this post


Link to post
Share on other sites

That error 13 is actually irrelevant or at least secondary in this situation. The problem comes from what I have stated above.

 

You might want to read this: 

 

9 hours ago, ravetam said:

Guess i will just have to look around some old guide then. If anyone has any more information, please let me know (PM or reply). 

 

Some old guide

http://nanoboot.eu.org/source

https://github.com/sancome/DSM-5.0-4458_dsgpl-4418

 

To the extent of my knowledge pre-jun loaders (meaning nanoboot, xpenoboot) use a different hack mechanism but I guess it's always good to get acquainted with what was done in the past.

Share this post


Link to post
Share on other sites

That's great information. Thanks! I'll setup a VM for testing. I guess I'll just have to use ds916 for my bare metal for now.

Share this post


Link to post
Share on other sites

Tried to use VirtualBox and setup a serial output but unfortunately, nothing were outputted. I even tried to load just the zImage kernel but it's the same. In the previous version, when you do

linux /zImage

in Grub, there will be information available in the serial console. Without the console, it will be quite hard to work with.

 

I will try to unpack and repack rd.gz with all the patch and see if it works on my bare metal which seems to work better. Will also need to buy a Serial to USB cable to connect with my machine for viewing the console output.

Edited by ravetam

Share this post


Link to post
Share on other sites

hello all who are working on "kaby lake" or DS918+ Loader.

 

you will be my heros if you make that happen soon

 

As my NAS is still in status "waiting for Hardware transcoding support" i can work as an Beta-Tester if you want.

 

 

 

Share this post


Link to post
Share on other sites

I am the owner of ASRock J4205-ITX - 16GB or RAM + 128GB SSD + 2x 3TB. I was unsuccessful with Jun's v1.02b and DS916. I boot successfully, however load of pat fails with error 13. 

So I am trying to build Xpenology for DSM918+ (Apollo lake). I found kref's scripts, downloaded kernel & toolchain published by Synology on Sourceforge, I overcame some obstacles.

However generated image doesn't work for me. I tried to redirect console to tty0 by a kernel parameter - no success. I cannot even make kernel to be verbose on the serial port.

 

I wonder what kind of mods are needed for kernel. I noticed a lot of mentions of modprobe and I can see there are synobios binaries in sancome's repo. I guess mod is needed for passing SN & macs and maybe USB vid pid, but I don't understand what is a trick with sid pid. Does it somehow hide USB drive for Synology?

Are there somewhere mod patches for old linux, so I could be inspired for linux 4.4.x? 

 

Thanks!

Gabriel

Share this post


Link to post
Share on other sites

@Polanskiman, thanks! I will go through this info. I realized that vid pid settings resolved my problem with error 13. It was not clear to me vid & pid should be updated. However speed of the network card is bad. Copy over SMB/CIFS is like 3MB/sec, so it looks like module for network card is needed - RTL8111. 

Thanks,

Gabriel

 

   

Share this post


Link to post
Share on other sites

you can try my 916+ extra.lzma for better realtek drivers

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now