neXus

[Need Info] Building kernel & synoboot

Recommended Posts

Hi,

 

First thanks for all the work done around XPenology.

 

I try to gather all the information about the building process to create a repack from scratch, I have found a lot of informations but I have some questions.

 

1/ Kernel building

 

Ok to clone the kernel 3.X sources from github but I was wondering how the tree has been build the first time (from where the sources are coming from, how do you match the kernel release with the modules inside the pat file to avoid symbols mismatch).

 

2/ Synoboot building

 

I guess the synoboot came from a valid MTD file from a NAS (mtd we don't have on real hardware or virtualmachine so we have to fake it with usb boot key). Can you detail a bit how did you process it (not the img creation which is clear but from where came the content).

 

The main idea is to focus all the receipe on formal document in order to build the all thing from scratch and also to make easy the 4.3 and next ports).

 

Thanks a lot for your time.

Share this post


Link to post
Share on other sites

First take a look on the building wiki : http://xpenology.com/wiki/en/building_xpenology

 

All Synology GPL sources are available here : http://sourceforge.net/projects/dsgpl/files/

 

Patch for kernel are from the amazing andy's git : https://github.com/andy928/xpenology

 

synoboot is just standard boot partition (grub) with the kernel (zImage) and the ramdrive (rd.gz)

Share this post


Link to post
Share on other sites

Thanks for that, I figure out myself some of the things you say. (But I have some difficulties to reach the forum to edit my post).

 

Regarding synoboot, you say that I can take the bZimage and rd.gz from my fresh compiled replaced firmware, put them on a USB disk, mixed them with grub and it will make my synoboot ?

 

On real syno the synoboot seems different with grub efi, GUID partition and some specific code in it like cksum for example.

 

So the question is, we don't really care about syno are booting, we just need to fire our replaked kernel with some args on boot to do the trick ?

Share this post


Link to post
Share on other sites

Yes syno use efi but it's hardware specific.

Open an existing synoboot.img and look inside ^^

vender file for s/n and mac adresses.

Share this post


Link to post
Share on other sites

Yes, I'm digging on it :smile:

 

I just figure out you are french as I am :smile: "Enchanté".

 

I will give a try on 4.3 to figure out what's going on with /dev/sd* removal countermeasure Syno add.

 

Looking the sources, I came accros all the MY_ABD_HERE/MY_DEV_HERE, so they "hide" when the ifdef statement are used (and there are a lot of them). I don't if they do that only for seeing the changes they made or if theses statement are really useful for us in xepenlogy case.

 

Thanks anyway !

Share this post


Link to post
Share on other sites

One more thing,

 

I can't find the sources for the grub stage1 / stage 2 used in synoboot. I don't find it on GPL sources provided by synology.

 

If I want to craft my own loader, can I just pass serial / mac as kernel arguments ?

Share this post


Link to post
Share on other sites