Jump to content
XPEnology Community

Automated RedPill Loader (ARPL)


fbelavenuto

Recommended Posts

4 hours ago, pocopico said:

@fbelavenuto Can you please explain the process of the module loading  ? I understand that the modules are now all in one bundle. Where the decision for loading or not takes place ? Is it based on the modules that are loaded in buildroot ? What if the modules are not included in buildroot ?

 

I think the most efficient way would be to use a yml file that will include PCIID and module so that it can be decided based to that. "modinfo" displays a list of device aliases, and the module name so there you have all your information.

 

Thats how the following is created.

https://github.com/pocopico/tinycore-redpill/blob/main/modules.alias.4.json.gz?raw=true

 

 

Hi pocopico, 

 

I used the kmod package which provides the "depmod" utility to create the dependencies and aliases files and dynamic libraries to facilitate other utilities to load the modules.

The buildroot already does the processes automatically, it installs the modules in the /lib/modules/<kver>/ directory, calls depmod to generate the dependencies and aliases (modules.dep[.bin] files, modules.aliases[.bin] ). Inside the .aliases contains all the PCIIDS extracted from the .ko files. The "eudev" project is compiled with the kmod libraries, receives from the kernel (via netlink socket) the PCIIDs of the devices, calls the "modprobe" via the library and the kmod project searches in the "modules.aliases.bin" file which module should be loaded and loads it if it exists. It also reads dependencies from the modules.dep file and loads them if they exist.

This whole process I applied to the DSM. I compiled the modules using synology's gpl source, others I compiled using the toolkit and others I took from their repository. I modified the kmod project to read the modules from the directory "/lib/modules", I compiled the eudev for the DSM and when creating the loader I unzip the ramdisk in a temporary folder, I unzip the modules in the folder "<tmp>/lib /modules" and call depmod in this folder to generate the necessary files. This way when starting the DSM kernel I call eudev manually which performs the same procedure explained above but within the DSM environment.

In short, buildroot and DSM have their own modules, independently of each other. As the buildroot uses a newer kernel, it may happen that a peripheral is recognized in the loader but not in the DSM!

I've configured the kernels to have the same modules, but it can happen that the buildroot module supports more PCIIDs than the DSM module.

Anyway, I believe I managed to explain, but if you have more questions (mainly due to my difficulty in the English language) you can ask.

  • Like 1
Link to comment
Share on other sites

3 hours ago, pocopico said:

@fbelavenuto Also one thing that worries me is the change in the partition scheme of the loader.P1 and P2 are always the same size even on original syno boxes.

 

Since we dont really know what scemd does and how it checks now or in the future for hardware integrity, i would keep the original loader scheme, move all required files to P3 and increase that size.

 

 

Noted! I never had the opportunity to have/access an original Synology product so I learn by reading the forum.

I will modify the files to use the third partition and keep the first two equal in size and smaller, to avoid this suggested problem.

Thanks again for your help.

 

(Alpha releases are just like that, they modify a lot until they reach a more stable point for beta release, so sorry for several changes)

  • Like 1
Link to comment
Share on other sites

10 hours ago, kekylin said:

I just found a problem when using alpha3, the IP displayed by arpl can only be the actual IP of the device. the IP address assigned to my device now is: 192.168.5.133, if I set the custom MAC address, the IP of the DSM system will become: 192.168.5.134, but arpl still shows: 192.168 .5.133. I can only use Synology Assistant to find the correct IP address.

 

DS920.jpg

 

I didn't anticipate this situation, thanks for the report, I'll fix it in a future release.

 

Link to comment
Share on other sites

1 hour ago, pocopico said:

 

I've noticed that after the initial install the IP always moved one digit forward. No matter what loader you are using.

 

In the next reboot it should be fixed.

 

In this specific case, the user modified the MAC Address, which is changed by the DSM scripts, so the loader receives an IP with the original MAC of the netcard and then receives another IP with the MAC manually defined. The correct thing is I change the MAC of the loader according to the MAC defined by the user so the DHCP server will provide the same IP for both environments.

 

Link to comment
Share on other sites

1 minute ago, fbelavenuto said:

 

In this specific case, the user modified the MAC Address, which is changed by the DSM scripts, so the loader receives an IP with the original MAC of the netcard and then receives another IP with the MAC manually defined. The correct thing is I change the MAC of the loader according to the MAC defined by the user so the DHCP server will provide the same IP for both environments.

 

 

Since i've got the same IP from DHCP server i thought you are already masking the mac address to the one in the user config at the buildroot level. 

Link to comment
Share on other sites

10 minutes ago, fbelavenuto said:

Hi pocopico, 

 

I used the kmod package which provides the "depmod" utility to create the dependencies and aliases files and dynamic libraries to facilitate other utilities to load the modules.

The buildroot already does the processes automatically, it installs the modules in the /lib/modules/<kver>/ directory, calls depmod to generate the dependencies and aliases (modules.dep[.bin] files, modules.aliases[.bin] ). Inside the .aliases contains all the PCIIDS extracted from the .ko files. The "eudev" project is compiled with the kmod libraries, receives from the kernel (via netlink socket) the PCIIDs of the devices, calls the "modprobe" via the library and the kmod project searches in the "modules.aliases.bin" file which module should be loaded and loads it if it exists. It also reads dependencies from the modules.dep file and loads them if they exist.

This whole process I applied to the DSM. I compiled the modules using synology's gpl source, others I compiled using the toolkit and others I took from their repository. I modified the kmod project to read the modules from the directory "/lib/modules", I compiled the eudev for the DSM and when creating the loader I unzip the ramdisk in a temporary folder, I unzip the modules in the folder "<tmp>/lib /modules" and call depmod in this folder to generate the necessary files. This way when starting the DSM kernel I call eudev manually which performs the same procedure explained above but within the DSM environment.

In short, buildroot and DSM have their own modules, independently of each other. As the buildroot uses a newer kernel, it may happen that a peripheral is recognized in the loader but not in the DSM!

I've configured the kernels to have the same modules, but it can happen that the buildroot module supports more PCIIDs than the DSM module.

Anyway, I believe I managed to explain, but if you have more questions (mainly due to my difficulty in the English language) you can ask.

 

That is great approach and to the right direction. Can you please think of why then i'm not getting modules loaded for instance for : 

 

0000:02:01.0 SCSI storage controller [0100]: Broadcom / LSI 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI [1000:0030] (rev 01)
 

Its the mptsas addon.

Link to comment
Share on other sites

2 hours ago, pocopico said:

 

That is great approach and to the right direction. Can you please think of why then i'm not getting modules loaded for instance for : 

 

0000:02:01.0 SCSI storage controller [0100]: Broadcom / LSI 53c1030 PCI-X Fusion-MPT Dual Ultra320 SCSI [1000:0030] (rev 01)
 

Its the mptsas addon.

 

for this peripheral the correct module is "mptspi.ko", which I recently added, update the modules or test with the latest image

Link to comment
Share on other sites

Hi,

great work! Baremetal HP Microserver gen8 is working fine.

one question at the moment. Is it possible to keep changes made at the model-configs files?

I removed all the "example" html links to restore the original function in DSM, but the file is somewhere in the building process replaced with the original one.

 

  • Like 1
Link to comment
Share on other sites

Can I add more than four drives to the DS920+ ?
I have an additional marvel controller.
In the loader, I can see the disks connected to it.
Unfortunately, when DSM starts, I do not see the disks connected to the additional controller.
How can I do it? :)

 

Does DS1621+ support transcoding?

 

Thank You

Edited by borobonos
Link to comment
Share on other sites

2 hours ago, mmkt said:

Hi,

great work! Baremetal HP Microserver gen8 is working fine.

one question at the moment. Is it possible to keep changes made at the model-configs files?

I removed all the "example" html links to restore the original function in DSM, but the file is somewhere in the building process replaced with the original one.

 

I'll change the method of work with synoinfo entries, then will be possible your request

  • Thanks 1
Link to comment
Share on other sites

58 minutes ago, borobonos said:

Can I add more than four drives to the DS920+ ?
I have an additional marvel controller.
In the loader, I can see the disks connected to it.
Unfortunately, when DSM starts, I do not see the disks connected to the additional controller.
How can I do it? :)

 

Does DS1621+ support transcoding?

 

Thank You

What is your controller model (complete chip number)?

Link to comment
Share on other sites

3 minutes ago, fbelavenuto said:

I'll change the method of work with synoinfo entries, then will be possible your request

 

😀👍 Thanks. Everbody can decide wether they will accept the little risk of automatic updates. But the loader will patch it on the fly anyway, untill ... I know 😉

 

Link to comment
Share on other sites

10 minutes ago, fbelavenuto said:

What is your controller model (complete chip number)?

 

On the ASRock J4105-ITX motherboard I have:
Intel SATA - 2 ports
ASM1062 - 2 ports

 

Additional SATA controller:
Marvell 88SE9215 - 4 ports

 

Can I use all 8 ports in the DS920+ model?

How do I configure the loader so that DSM can see all 8 disks?

Link to comment
Share on other sites

15 часов назад, kekylin сказал:

I can only use Synology Assistant to find the correct IP address.

 

Useless occupation. He doesn't see anything.
Waited about an hour and a half. The IP address is assigned, the network blinks, but is not revoked.
It started with v0.3-alpha1 version. We are waiting for corrections.
I myself am sitting on version v0.2-alpha4.
Edited by YARA
  • Like 1
Link to comment
Share on other sites

17 minutes ago, borobonos said:

 

On the ASRock J4105-ITX motherboard I have:
Intel SATA - 2 ports
ASM1062 - 2 ports

 

Additional SATA controller:
Marvell 88SE9215 - 4 ports

 

Can I use all 8 ports in the DS920+ model?

How do I configure the loader so that DSM can see all 8 disks?

Thanks.

There is an addon called maxdisks that adjusts the amount of disks automatically. You can set a value manually by going to the "synoinfo" menu, option "set maxdisks manually".

 

  • Like 1
Link to comment
Share on other sites

I can't find detect my hardware option.

using build as (3615xs 42661)

 

My LAN Marvell Yukon 2 Gigabit Ethernet not showing up after booting and no any lights, I'm noob can you please guide me how to add custom addon's?

 

Version I'm using is v0.3-alpha3

 

 In pocopico it use sky2 extension can't find any addons named as!

 

Would appreciate your help

Link to comment
Share on other sites

I can't find detect my hardware option.

using build as (3615xs 42661)

 

My LAN Marvell Yukon 2 Gigabit Ethernet not showing up after booting and no any lights, I'm noob can you please guide me how to add custom addon's?

 

Version I'm using is v0.3-alpha3

 

 In pocopico it use sky2 extension can't find any addons named as!

 

Would appreciate your help

Link to comment
Share on other sites

1 hour ago, Edward Page said:

@Orphée Not a chance! Same issue After DSM booting network lights goes off and never comes online!

 

Build (3622xs+ 42661) arpl v0.3 alpha3

 

I have tested most if not all of modules. Its strange that sky2 is not working. Can you please share your PCIID with the output of

 

lspci -nnq ?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...