Jump to content
XPEnology Community

TinyCore RedPill Loader (TCRP)


pocopico

Recommended Posts

21 hours ago, Peter Suh said:

 

The option auto is a mispropagated option that does not actually exist and is equivalent to the effect of using it without any option.

The difference between the three options is the list of each function below.

However, if you look closely, static and auto(none) have the same function.

Only manual excludes listmodules function.


The listmodules() function is the part that automatically detects and processes each device ID and exts.

 

    static)
        echo "Using static compiled redpill extension"
        getstaticmodule
        echo "Got $REDPILL_MOD_NAME "
        listmodules
        echo "Starting loader creation "
        buildloader
        [ $? -eq 0 ] && savesession
        ;;

    manual)

        echo "Using static compiled redpill extension"
        getstaticmodule
        echo "Got $REDPILL_MOD_NAME "
        echo "Manual extension handling,skipping extension auto detection "
        echo "Starting loader creation "
        buildloader
        [ $? -eq 0 ] && savesession
        ;;

    *)
        echo "No extra build option specified, using default <static> "
        echo "Using static compiled redpill extension"
        getstaticmodule
        echo "Got $REDPILL_MOD_NAME "
        listmodules
        echo "Starting loader creation "
        buildloader
        [ $? -eq 0 ] && savesession
        ;;

 

21 hours ago, Peter Suh said:

 

And if ext action is used with auto , the listmodules() function described above is used again.

 

ext)
    getvars $2
    checkinternet
    gitdownload

    if [ "$3" = "auto" ]; then
        listmodules
    else
        ext_manager $@ # instead of listmodules
    fi
    ;;
 

Thanks for the answer, just to clarify you are saying only build manual actually does something, and that is NOT to auto search and add needed ext drivers?

So doing a normal build will automatically search for needed ext drivers and add them automatically? (same with build static, auto or just build)

Link to comment
Share on other sites

1 hour ago, phone guy said:

 

Thanks for the answer, just to clarify you are saying only build manual actually does something, and that is NOT to auto search and add needed ext drivers?

So doing a normal build will automatically search for needed ext drivers and add them automatically? (same with build static, auto or just build)

 

The manual option builds only the boot-wait ext that is unconditionally added to the bundle with the ext directory list that exists

in ./redpill-load/custom/extensions prepared in advance as an ext action.

 

The auto(none) option additionally searches for the automatic device CLASS, adds the ext of this device once more, and builds everything at once.

 

Can you tell the difference between the two options?

  • Confused 1
Link to comment
Share on other sites

5 hours ago, hendry said:

which drivers should be loaded on the 1st, 2nd, etc sequence order ?

i've tried to combine all the drivers into 1 ext on my GH repo, but when building the loader it has errors. 

does the v9fs need to compile ? does all the virtio drivers including v9fs for 7.0.1 compatible to be used in 7.1 ?

would u please give me a clue ?

 

 

Hi @hendry, please use only v9fs ext. It now included all virtio drivers + v9fs. This should work for you.

 

https://raw.githubusercontent.com/pocopico/rp-ext/master/v9fs/rpext-index.json

 

 

Edited by pocopico
Link to comment
Share on other sites

2 hours ago, phone guy said:

 

Thanks for the answer, just to clarify you are saying only build manual actually does something, and that is NOT to auto search and add needed ext drivers?

So doing a normal build will automatically search for needed ext drivers and add them automatically? (same with build static, auto or just build)

 

There is no auto option for build switch. The valid options are :

 

compile -> runs through redpill-lkm compilation process (Not thoroughly tested though, likely to fail)

static -> uses the static redpill module from redpill extension and calls also the listmodules function.

manual -> uses the static redpill module from redpill extension and proceeds with the extensions you have manually added without running the listmodules function. DTS patching will need to be done manually, for platforms that require DTS patching.

default -> static

 

listmodules function will try to list your pci devices, query modules.alias.4.json.gz for a kernel module for your PCI-ID, and match and add an extension from the rpext-index.json. At the end, it will also try to patch the model.dts, for platforms that require DTS patching.

 

 

Edited by pocopico
  • Like 1
  • Thanks 2
Link to comment
Share on other sites

41 minutes ago, pocopico said:

 

Hi @hendry, please use only v9fs ext. It now included all virtio drivers + v9fs. This should work for you.

 

https://raw.githubusercontent.com/pocopico/rp-ext/master/v9fs/rpext-index.json

 

 

Hi @pocopico

Thanks for replying me..

I add your ext repo for bromolow-7.1.0-42661 and build it with success, but when it boot, it seems cannot load virtio_blk.ko

xpe              | ERROR: kernel extensions "virtio_blk.ko" from pocopico.v9fs failed to load
xpe              | Exit on error [99] rp ext init exec failure...
xpe              | Segmentation fault

 

I look inside 7.0.1 bromolow boot process, and found correct load sequence for 9pfs drivers. you can see it installing v9fs file system format.

xpenology        | Loading kmod #7 "9pnet.ko" for thethorgroup.virtio (args: )
xpenology        | [    5.286581] 9pnet: module has bad taint, not creating trace events
xpenology        | [    5.288025] 9pnet: Installing 9P2000 support
xpenology        | Loading kmod #8 "9pnet_virtio.ko" for thethorgroup.virtio (args: )
xpenology        | [    5.302424] virtio-pci 0000:00:05.0: irq 49 for MSI/MSI-X
xpenology        | [    5.303609] virtio-pci 0000:00:05.0: irq 50 for MSI/MSI-X
xpenology        | [    5.306783] virtio-pci 0000:00:06.0: irq 51 for MSI/MSI-X
xpenology        | [    5.307931] virtio-pci 0000:00:06.0: irq 52 for MSI/MSI-X
xpenology        | [    5.311441] virtio-pci 0000:00:07.0: irq 53 for MSI/MSI-X
xpenology        | [    5.312675] virtio-pci 0000:00:07.0: irq 54 for MSI/MSI-X
xpenology        | [    5.316117] virtio-pci 0000:00:08.0: irq 55 for MSI/MSI-X
xpenology        | [    5.317374] virtio-pci 0000:00:08.0: irq 56 for MSI/MSI-X
xpenology        | Loading kmod #9 "9p.ko" for thethorgroup.virtio (args: )
xpenology        | [    5.350122] 9p: Installing v9fs 9p2000 file system support

 

then i tried to add my ext repo on my GH, one by one load 9p drivers, but seems the 9p.ko cannot load completely, means cannot give v9fs file format. It says 9p already loaded. 

xpe              | Loading kmod #7 "9pnet.ko" for thethorgroup.virtio (args: )
xpe              | [    5.930714] 9pnet: module has bad taint, not creating trace events
xpe              | [    5.932074] 9pnet: Installing 9P2000 support
xpe              | Loading kmod #8 "9pnet_virtio.ko" for thethorgroup.virtio (args: )
xpe              | [    5.949663] virtio-pci 0000:00:05.0: irq 49 for MSI/MSI-X
xpe              | [    5.950937] virtio-pci 0000:00:05.0: irq 50 for MSI/MSI-X
xpe              | [    5.954133] virtio-pci 0000:00:06.0: irq 51 for MSI/MSI-X
xpe              | [    5.955318] virtio-pci 0000:00:06.0: irq 52 for MSI/MSI-X
xpe              | [    5.958305] virtio-pci 0000:00:07.0: irq 53 for MSI/MSI-X
xpe              | [    5.959497] virtio-pci 0000:00:07.0: irq 54 for MSI/MSI-X
xpe              | [    5.963428] virtio-pci 0000:00:08.0: irq 55 for MSI/MSI-X
xpe              | [    5.964713] virtio-pci 0000:00:08.0: irq 56 for MSI/MSI-X
xpe              | Loading kmod #9 "9p.ko" for thethorgroup.virtio (args: )
xpe              | Module 9p already loaded

 

why on 7.1 loader cannot load 9p completely ? 

the others drivers 9pnet.ko & 9pnet_virtio.ko i can see when i type "lsmod" on the xpe console.

then i cannot mount using 9p options.

such as 

/bin/mount -t 9p -o trans=virtio,version=9p2000.L,msize=262144 hostdata0 /volume1/music

 

 

 

Edited by hendry
Link to comment
Share on other sites

31 minutes ago, hendry said:

Hi @pocopico

Thanks for replying me..

I add your ext repo for bromolow-7.1.0-42661 and build it with success, but when it boot, it seems cannot load virtio_blk.ko


xpe              | ERROR: kernel extensions "virtio_blk.ko" from pocopico.v9fs failed to load
xpe              | Exit on error [99] rp ext init exec failure...
xpe              | Segmentation fault

 

I look inside 7.0.1 bromolow boot process, and found correct load sequence for 9pfs drivers. you can see it installing v9fs file system format.


xpenology        | Loading kmod #7 "9pnet.ko" for thethorgroup.virtio (args: )
xpenology        | [    5.286581] 9pnet: module has bad taint, not creating trace events
xpenology        | [    5.288025] 9pnet: Installing 9P2000 support
xpenology        | Loading kmod #8 "9pnet_virtio.ko" for thethorgroup.virtio (args: )
xpenology        | [    5.302424] virtio-pci 0000:00:05.0: irq 49 for MSI/MSI-X
xpenology        | [    5.303609] virtio-pci 0000:00:05.0: irq 50 for MSI/MSI-X
xpenology        | [    5.306783] virtio-pci 0000:00:06.0: irq 51 for MSI/MSI-X
xpenology        | [    5.307931] virtio-pci 0000:00:06.0: irq 52 for MSI/MSI-X
xpenology        | [    5.311441] virtio-pci 0000:00:07.0: irq 53 for MSI/MSI-X
xpenology        | [    5.312675] virtio-pci 0000:00:07.0: irq 54 for MSI/MSI-X
xpenology        | [    5.316117] virtio-pci 0000:00:08.0: irq 55 for MSI/MSI-X
xpenology        | [    5.317374] virtio-pci 0000:00:08.0: irq 56 for MSI/MSI-X
xpenology        | Loading kmod #9 "9p.ko" for thethorgroup.virtio (args: )
xpenology        | [    5.350122] 9p: Installing v9fs 9p2000 file system support

 

then i tried to add my ext repo on my GH, one by one load 9p drivers, but seems the 9p.ko cannot load completely, means cannot give v9fs file format. It says 9p already loaded. 


xpe              | Loading kmod #7 "9pnet.ko" for thethorgroup.virtio (args: )
xpe              | [    5.930714] 9pnet: module has bad taint, not creating trace events
xpe              | [    5.932074] 9pnet: Installing 9P2000 support
xpe              | Loading kmod #8 "9pnet_virtio.ko" for thethorgroup.virtio (args: )
xpe              | [    5.949663] virtio-pci 0000:00:05.0: irq 49 for MSI/MSI-X
xpe              | [    5.950937] virtio-pci 0000:00:05.0: irq 50 for MSI/MSI-X
xpe              | [    5.954133] virtio-pci 0000:00:06.0: irq 51 for MSI/MSI-X
xpe              | [    5.955318] virtio-pci 0000:00:06.0: irq 52 for MSI/MSI-X
xpe              | [    5.958305] virtio-pci 0000:00:07.0: irq 53 for MSI/MSI-X
xpe              | [    5.959497] virtio-pci 0000:00:07.0: irq 54 for MSI/MSI-X
xpe              | [    5.963428] virtio-pci 0000:00:08.0: irq 55 for MSI/MSI-X
xpe              | [    5.964713] virtio-pci 0000:00:08.0: irq 56 for MSI/MSI-X
xpe              | Loading kmod #9 "9p.ko" for thethorgroup.virtio (args: )
xpe              | Module 9p already loaded

 

why on 7.1 loader cannot load 9p completely ? 

the others drivers 9pnet.ko & 9pnet_virtio.ko i can see when i type "lsmod" on the xpe console.

then i cannot mount using 9p options.

such as 

/bin/mount -t 9p -o trans=virtio,version=9p2000.L,msize=262144 hostdata0 /volume1/music

 

 

 

 

I tested on broadwellnk, all drivers load correctly. should i test on bromolow or you are ok by switching to DS3622 ? 

 

Tested on bromolow as well, modules load correctly. 

Edited by pocopico
Link to comment
Share on other sites

30 minutes ago, pocopico said:

 

There is no auto option for build switch. The valid options are :

 

compile -> runs through redpill-lkm compilation process (Not thoroughly tested though, likely to fail)

static -> uses the static redpill module from redpill extension and calls also the listmodules function.

manual -> uses the static redpill module from redpill extension and proceeds with the extensions you have manually added without running the listmodules function. DTS patching will need to be done manually, for platforms that require DTS patching.

default -> static

 

listmodules function will try to list your pci devices, query modules.alias.4.json.gz for a kernel module for your PCI-ID, and match an extension from the rpext-index.json. At the end, it will also try to patch the model.dts, for platforms that require DTS patching.

 

 

So STATIC will add the ext drivers I add and also searches for ext drivers based on pci-id, but using static is the same thing as not appending anything to the builld command, so example:

./rploader.sh build <platform>

is the same as

./rploader.sh build <platform> static

same end result

 

I did not know that, I have used ext auto before giving build command, now I see that step is not needed because build does this anyway

Link to comment
Share on other sites

2 minutes ago, phone guy said:

So STATIC will add the ext drivers I add and also searches for ext drivers based on pci-id, but using static is the same thing as not appending anything to the builld command, so example:

./rploader.sh build <platform>

is the same as

./rploader.sh build <platform> static

same end result

 

I did not know that, I have used ext auto before giving build command, now I see that step is not needed because build does this anyway

 

It might have changed somewhere over the versions, i really cannot say for sure. I think though that it was always like that.

 

it will work like static, even if you type ./rploader.sh build <platform> bazinka

Edited by pocopico
  • Like 1
Link to comment
Share on other sites

Last question... how can I edit the grub config on a working tcrp loader? I need to play with satamap on a working system, because I just installed hba sas card and I want my drives to show in the correct slot order. I remember seeing it, but I didnt write it down or save it. I know I have to do a mnt/sdb (?) and that mounts the dir the grub file is in...?

 

The motherboard has 6 sata, and the hba card has 8... I think I need to change to satamap 68 and diskid 0060

Link to comment
Share on other sites

1 hour ago, phone guy said:

Last question... how can I edit the grub config on a working tcrp loader? I need to play with satamap on a working system, because I just installed hba sas card and I want my drives to show in the correct slot order. I remember seeing it, but I didnt write it down or save it. I know I have to do a mnt/sdb (?) and that mounts the dir the grub file is in...?

 

The motherboard has 6 sata, and the hba card has 8... I think I need to change to satamap 68 and diskid 0060

 

It doesn't seem to have anything to do with HBA and SATAportmap.
In my case, HBA is not considered
Even if set to satamap 6 and diskid 00, there is no problem in HBA recognition of HDD.

Link to comment
Share on other sites

2 hours ago, pocopico said:

 

I tested on broadwellnk, all drivers load correctly. should i test on bromolow or you are ok by switching to DS3622 ? 

 

Tested on bromolow as well, modules load correctly. 

 

how did u test ? did u just build img file or put it on kvm and see where it starting until can be find on synology assistant ?

i tried bromolow once again, but still same error..

i'm now trying on broadwellink.

broadwellink is working, but still 9p file system not loaded. 

 

PS: why on boot process when load 9p.ko message is "already loaded" ? it's not installing v9fs 9p2000 file system support.

 

lsmod | grep 9p
9pnet_virtio            6877  0
9pnet                  57359  1 9pnet_virtio
virtio_ring             6851  6 virtio_blk,virtio_net,virtio_pci,9pnet_virtio,virtio_mmio,virtio_scsi
virtio                  5529  6 virtio_blk,virtio_net,virtio_pci,9pnet_virtio,virtio_mmio,virtio_scsi

9p itself not loaded. 

@pocopicoany idea ?

 

Edited by hendry
Link to comment
Share on other sites

1 hour ago, hendry said:

 

how did u test ? did u just build img file or put it on kvm and see where it starting until can be find on synology assistant ?

i tried bromolow once again, but still same error..

i'm now trying on broadwellink.

broadwellink is working, but still 9p file system not loaded. 

 

PS: why on boot process when load 9p.ko message is "already loaded" ? it's not installing v9fs 9p2000 file system support.

 



lsmod | grep 9p
9pnet_virtio            6877  0
9pnet                  57359  1 9pnet_virtio
virtio_ring             6851  6 virtio_blk,virtio_net,virtio_pci,9pnet_virtio,virtio_mmio,virtio_scsi
virtio                  5529  6 virtio_blk,virtio_net,virtio_pci,9pnet_virtio,virtio_mmio,virtio_scsi

9p itself not loaded. 

@pocopicoany idea ?

 

 

what if you copy the modules inside the VM, ssh and try to load them with insmod ./9p.ko ?

 

Edit :  OK ! found the issue, re-build and try again

Edited by pocopico
Link to comment
Share on other sites

I'm a complete noob and I'm not able to change the DS3615xs version that is installed following your instructions.

I wanted to use your method but install DS920+ instead of DS3615xs.

I change the serial to the DS920+ version but I always had to install the DS3615xs. Help!

Edited by pedroj666
Link to comment
Share on other sites

2 hours ago, pocopico said:

 

what if you copy the modules inside the VM, ssh and try to load them with insmod ./9p.ko ?

 

Edit :  OK ! found the issue, re-build and try again

i've copied 9p.ko and insmod it. it loads, but when i try execute mount using 9p options, it works without errors. 

but i cannot access mount folder, it's access denied. 

have u tried to mount using 9p options and can u access mount folder?

so, u have fixed why 9p cannot load? please also try to mount using it.

Link to comment
Share on other sites

4 hours ago, Peter Suh said:

 

It doesn't seem to have anything to do with HBA and SATAportmap.
In my case, HBA is not considered
Even if set to satamap 6 and diskid 00, there is no problem in HBA recognition of HDD.

I think sata_remap is not working, I tried some times change hd position and not success.. that setting are ignoring or bypassed without efect. 

Link to comment
Share on other sites

tried to run broadwellink, it can load 9p.ko successfully but still mounting problem,

now back to apollolake but when building loader, it has some errors

[!] Failed to dump extension pocopico.v9fs for platform ds918p_42661 as its recipe file cannot be retrieved. Isn't the extension misspelled or not supported on that platform?

*** Process will exit ***

[!] Failed to dump all extensions for ds918p_42661 platform to /home/tc/redpill-load/build/1651575093/custom-initrd/exts - see errors above

*** Process will exit ***
FAILED : Loader creation failed check the output for any errors

 

on bromollow, build success but when boot process got halted because this error:

xpe        | ERROR: kernel extensions "virtio_blk.ko" from pocopico.v9fs failed to load
xpe        | Exit on error [99] rp ext init exec failure...

 

@pocopicoplease fix it.. 

i think on kernel 4.4 the 9p drivers cannot function properly.

 

Link to comment
Share on other sites

I create usb stick with latest TC

My NAS boots and can access TC Terminal

The Follow up on the tutorial https://xpenology.club/install-dsm-7-on-baremetal-or-vm/

 

After restart NAS boots up fine, says I can migrate from 6.1.3

And Asks for the Pat to be uploaded

Then choose the pat from https://global.download.synology.com/download/DSM/release/7.0.1/42218/DSM_DS3622xs%2B_42218.pat

 

When uploading ,  around 50% it fails.

 

Am I missing some step ??

Edited by VenimK
Link to comment
Share on other sites

2 hours ago, hendry said:

tried to run broadwellink, it can load 9p.ko successfully but still mounting problem,

now back to apollolake but when building loader, it has some errors


[!] Failed to dump extension pocopico.v9fs for platform ds918p_42661 as its recipe file cannot be retrieved. Isn't the extension misspelled or not supported on that platform?

*** Process will exit ***

[!] Failed to dump all extensions for ds918p_42661 platform to /home/tc/redpill-load/build/1651575093/custom-initrd/exts - see errors above

*** Process will exit ***
FAILED : Loader creation failed check the output for any errors

 

on bromollow, build success but when boot process got halted because this error:


xpe        | ERROR: kernel extensions "virtio_blk.ko" from pocopico.v9fs failed to load
xpe        | Exit on error [99] rp ext init exec failure...

 

@pocopicoplease fix it.. 

i think on kernel 4.4 the 9p drivers cannot function properly.

 

UPDATE :

 

After trial and errors, i finally success mounting host folder using 9p file system on DS3615xs 42661 still using kernel 3.10.108. 

Confirmed, 9p drivers not function properly on kernel 4.4.180.

 

Thanks @pocopicofor your help.

 

 

 

 

 

  • Like 2
Link to comment
Share on other sites

The whole process worked for once.

 

After I added the RAM (from 2GB to 16GB), it says my admin password not correct. OK. Mine is a testing server so I decided to start from scratch.

Everything when smooth until I upload the PAT file. It says failed to install the the files is probably corrupted. PAT file is SFTP from the Xpenology home/tc/.......

 

I repeated several times with different memory configuration (even back to 2GB) but still fail.

 

Any suggestion?

Link to comment
Share on other sites

Hi,

I have a Marvell 88SE9215 PCIE card with 6 SATA ports (pce6sat-m01) but in DSM I have only 4 ports available.

The satamap command in RePill find 4 ports. Nothing change with SataPortMap= "6"

 

In RedPill, during the build I have :

Found SATA Controller : pciid 1b4bd00009215  Required Extension :
No matching extension

 

What can I can do to have all the 6 ports available?

 

Regards.

Link to comment
Share on other sites

3 hours ago, Hong Kong said:

The whole process worked for once.

 

After I added the RAM (from 2GB to 16GB), it says my admin password not correct. OK. Mine is a testing server so I decided to start from scratch.

Everything when smooth until I upload the PAT file. It says failed to install the the files is probably corrupted. PAT file is SFTP from the Xpenology home/tc/.......

 

I repeated several times with different memory configuration (even back to 2GB) but still fail.

 

Any suggestion?

Please download PAT file from Synology and use it. 

https://archive.synology.com/download/Os/DSM/7.1-42661

Download the proper one for your model.

 

 

Link to comment
Share on other sites

3 hours ago, Bar1 said:

Hi everyone, i just restored my DSM vm from backup and for some reason i can't login.

i am 99% sure i am using the correct password....is there a way to reset the password ?

Is your VM based on TCRP ? Then yes you can. PM for more 

Link to comment
Share on other sites

59 minutes ago, Biocef said:

Hi,

I have a Marvell 88SE9215 PCIE card with 6 SATA ports (pce6sat-m01) but in DSM I have only 4 ports available.

The satamap command in RePill find 4 ports. Nothing change with SataPortMap= "6"

 

In RedPill, during the build I have :


Found SATA Controller : pciid 1b4bd00009215  Required Extension :
No matching extension

 

What can I can do to have all the 6 ports available?

 

Regards.


which platform are you using ? 

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...