Aigor

[Dev Questiion ]

Recommended Posts

Hi, i would like compile my own kernel and modules, i'v already downloaded last bootloader source, but i have a question.

Compilation start but stuck ask me someting about rd.cpio that i suppose to be a iniramfs file, where i can find this file? can i use a stock rd.gz from .PAT file with some patch applied ?

Where i can find patches?

Many thanks

Share this post


Link to post
Share on other sites

Depending on what you want to do you can either delete the rd.gz from the .config file or the one extracted from the bootloader (https://mega.nz/#!rIk2BYYI!2a5_fZzyfqH7YUvmOyUXSniQeNe9nB9TkmI4qL680H0).

If you want to only compile kernel modules and use the original kernel then you can just delete rd.gz from the .config.

After the kernel module has been compiled you have to create a new init ram rd.gz and then add to the iso/usb and append the following argument to the kernel

initrd=rd.gz

, which it seems to work as a sort of overlay.

If you want to run your own kernel then you have to specify the path of your rd,gz in your .config file. In theory, this latter method should work, I got an error while installing the pat file. According to this post http://xpenology.com/forum/viewtopic.php?f=2&t=13076 the source code might not contain be complete.

 

Best

D.

Edited by Guest

Share this post


Link to post
Share on other sites
Depending on what you want to do you can either delete the rd.gz from the .config file or the one extracted from the bootloader (https://mega.nz/#!rIk2BYYI!2a5_fZzyfqH7YUvmOyUXSniQeNe9nB9TkmI4qL680H0).

Thanks for your work, but i would like to know howto extract.

I'm trying to add Fiber Channel Support to synology, but i need to use SCST subsystem that involve compile new QLA module, doing using .config extracted from /proc i get an error when i try to load module, so i suspect that i need to use kernel compiled with modules, but without rd.cpio o can't try

if i can load module that recognize card i can try write an Howto .

Share this post


Link to post
Share on other sites

To extract the rd.gz you should use the script contained in the linux kernel tree then binwalk

linux/scripts/extract-vmlinux 
binwalk vmlinux

So compile your fiber-channel-driver.ko and rename it to e100.ko, then pack it in rd.gz, and finally boot it with the xpenology bootloader with initrd=rd.gz.

Share this post


Link to post
Share on other sites
To extract the rd.gz you should use the script contained in the linux kernel tree then binwalk

linux/scripts/extract-vmlinux 
binwalk vmlinux

So compile your fiber-channel-driver.ko and rename it to e100.ko, then pack it in rd.gz, and finally boot it with the xpenology bootloader with initrd=rd.gz.

Thank you for info, but i need to test if compiled module is ok, i'v already compiled modules against running kernel, but when try to load i get a error.

Suspecting something strange i try to compile inside kernel-tree qla module to test, same result, so there is something wrong, my suspect is that i must use same kernel compiled instead running one , so i need to recompile whole kernel and modules, pack new .img file to test my theory

Share this post


Link to post
Share on other sites

You can find the compiler version with the following command.

cat /proc/version

If you describe the error more precisely, I might be able to help you.

Share this post


Link to post
Share on other sites
You can find the compiler version with the following command.

cat /proc/version

If you describe the error more precisely, I might be able to help you.

I'm using same compiler as toolchain to compile SCST subsystem.

My kernel won't boot it stuck after booting kernel with blank screen , assistant can't found any synology

 

Another question, when i use binwalk -e vmlinux, i get a lot of files but i don't know if i have to add them into new image or not

Share this post


Link to post
Share on other sites

Good news,modules are ok with running kernel,my own kernel still stuck,maybe i need to substitute all modules into rd.cpio with my own,tomorrow i will try

 

Inviato dal mio Redmi Note 3 utilizzando Tapatalk

Share this post


Link to post
Share on other sites