Booting Linux from PCI card

AmigaOne X5000 platform specific issues related to Linux only.
Post Reply
User avatar
Amiguy
Posts: 93
Joined: Mon May 15, 2017 8:01 pm
Location: France

Booting Linux from PCI card

Post by Amiguy »

Hello dear Linux friends,

If I want to boot a Linux SSD from my sii3512 PCI card, what would be my UBoot environment variable settings to enter? Instead of sata 0: 1 or sata 1: 1, I write... what?
Amiga 1200 2Mb Chip - PiStorm32 lite - CF 128Gb - Indivision MK3 - GOEX Drive - WB 3.2.2.1
AmigaOne X5000 2Ghz / 8Gb Ram - SSD 2x4Tb - Radeon RX 580 4Gb - Sound Blaster Audigy FX 5.1 SBX - AmigaOS4.1 FE
User avatar
Amiguy
Posts: 93
Joined: Mon May 15, 2017 8:01 pm
Location: France

Re: Booting Linux from PCI card

Post by Amiguy »

When we try to understand the UBoot variables, in particular the pci variable, we understand that any pci port is identified by an identifier code. As with the identification of the sata ports, it should be possible to boot an SSD disk from a correctly identified pci port.

The problem now is to know which port of my pci device corresponds to the correct identifier detected by UBoot. In my case, my sii3512 device has two pci ports. I deduce that my pci device is assigned to bus 1 which is the only one to have the two ports of my sii3512 device, identified respectively 0x683d and 0xaab0.
IMG_20211006_193909.jpg
I wouldn't want to do any damage and would prefer to have confirmation of my reasoning...
Amiga 1200 2Mb Chip - PiStorm32 lite - CF 128Gb - Indivision MK3 - GOEX Drive - WB 3.2.2.1
AmigaOne X5000 2Ghz / 8Gb Ram - SSD 2x4Tb - Radeon RX 580 4Gb - Sound Blaster Audigy FX 5.1 SBX - AmigaOS4.1 FE
Spectre660
Posts: 1525
Joined: Sat Jun 18, 2011 2:16 pm
Location: Montserrat

Re: Booting Linux from PCI card

Post by Spectre660 »

@ Amiguy

I am very rusty but let me attempt to point you in the right direction.

The important thing is booting the kernel.
The kernel needs to be booted from a device supported by the X5000.
So USB thumbdrive, Onboard MicroSD card or drive attached to the onboard p5020sata.device or TFTP server .

The device to boot the linux installation from once the kernel is booted is passed to the linux kernel
via a U-Boot variable in the format "root=/dev/sdx1" were x is the letter assigned to the SATA controller
that you want to boot from.
To find that controller letter you would have to boot in the usual manner with the controller card
that you will want to boot from in the future installed.

Of course the kernel that you are booting from will have to have support for the other SATA controller
built in. I used a PCIex1 SATA 3 controller and it worked well.
Sam460ex : Radeon Rx550 Single slot Video Card : SIL3112 SATA card
User avatar
Amiguy
Posts: 93
Joined: Mon May 15, 2017 8:01 pm
Location: France

Re: Booting Linux from PCI card

Post by Amiguy »

Thank you for considering my question. There is surely something obvious that I do not understand. Let's try to see things more clearly...

My goal is to connect a Linux SSD drive to one of the ports on my PCI card and boot the Linux kernel from my card. The PCI card is connected to the motherboard via a port marked "PCI 1". This card has two connection ports marked "J1" and "J2" (see photo).
IMG_20211015_165000.jpg
When I use one of the ports on the motherboard marked SATA0 (the other is marked SATA1), I run Linux boot via the commands :

X5000> setenv linuxboot 'setenv bootargs root=/dev/sda2 ; load sata 0:1 1000000 uImage-4.18 ; load sata 0:1 2000000 cyrus.dtb ; bootm 1000000 - 2000000'

X5000> run linuxboot

But if I want to boot from the PCI card and assume that my "load sata 0:1" instruction is for the SATA port on my motherboard, what would be the instructions for the PCI card?
Amiga 1200 2Mb Chip - PiStorm32 lite - CF 128Gb - Indivision MK3 - GOEX Drive - WB 3.2.2.1
AmigaOne X5000 2Ghz / 8Gb Ram - SSD 2x4Tb - Radeon RX 580 4Gb - Sound Blaster Audigy FX 5.1 SBX - AmigaOS4.1 FE
User avatar
xeno74
Posts: 9348
Joined: Fri Mar 23, 2012 7:58 am

Re: Booting Linux from PCI card

Post by xeno74 »

You can’t load and boot a kernel from a connected HD to your PCI card. You can load and boot the kernel from a USB stick, onboard MicroSD card or a drive attached to the onboard SATA device and use a root file system from a HD connected to your PCI card.

The dtb file has to load from a USB stick, onboard MicroSD card or a drive attached to the onboard SATA device too.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
Amiguy
Posts: 93
Joined: Mon May 15, 2017 8:01 pm
Location: France

Re: Booting Linux from PCI card

Post by Amiguy »

OK, clear answer : booting from PCI card does not work on Linux.

Thank you my friend.
Amiga 1200 2Mb Chip - PiStorm32 lite - CF 128Gb - Indivision MK3 - GOEX Drive - WB 3.2.2.1
AmigaOne X5000 2Ghz / 8Gb Ram - SSD 2x4Tb - Radeon RX 580 4Gb - Sound Blaster Audigy FX 5.1 SBX - AmigaOS4.1 FE
Roland
Posts: 825
Joined: Tue May 02, 2017 7:23 am

Re: Booting Linux from PCI card

Post by Roland »

Amiguy wrote: Sat Oct 16, 2021 7:20 am OK, clear answer : booting from PCI card does not work on Linux.
Booting Linux from a Sii3512 would not be wise anyway as these old Sii cards are only Sata1! They are working 50% slower than the onboard Sata2 controller, and as Linux is very disk intensive OS that would make it slow to load and sluggish to use.

The best boot option for X5000 is to buy a fast PCIe Sata3 controller (see viewtopic.php?p=52922#p52922) and load the Linux partition from a 6G SSD connected to it, and the Kernel from the BootSD (you need a X5040 to get the full speed of a Sata3 controller, though). The onboard Sata2 controller can then be freely used with AmigaOS and MorphOS.
- Roland -
User avatar
Amiguy
Posts: 93
Joined: Mon May 15, 2017 8:01 pm
Location: France

Re: Booting Linux from PCI card

Post by Amiguy »

Hi Roland,
Roland wrote: Sat Oct 16, 2021 10:19 am Booting Linux from a Sii3512 would not be wise anyway as these old Sii cards are only Sata1!
Yes, indeed, this card is so slow that it can do a lot of damage. I experienced it again this weekend. This PCI card is absolutely to be banned.
Roland wrote: Sat Oct 16, 2021 10:19 am The best boot option for X5000 is to buy a fast PCIe Sata3 controller
Unfortunately the Delock card is no longer available in France. I will therefore be content to use the link with the motherboard. So I will have to swap the cables between the Linux and Amiga disks. It's safer, but less comfortable :( .
Amiga 1200 2Mb Chip - PiStorm32 lite - CF 128Gb - Indivision MK3 - GOEX Drive - WB 3.2.2.1
AmigaOne X5000 2Ghz / 8Gb Ram - SSD 2x4Tb - Radeon RX 580 4Gb - Sound Blaster Audigy FX 5.1 SBX - AmigaOS4.1 FE
Roland
Posts: 825
Joined: Tue May 02, 2017 7:23 am

Re: Booting Linux from PCI card

Post by Roland »

Amiguy wrote: Sun Oct 17, 2021 7:20 pm Yes, indeed, this card is so slow that it can do a lot of damage. I experienced it again this weekend. This PCI card is absolutely to be banned.
You are right. The sad thing is that there is not yet AmigaOS drivers for any other Sata cards :-(.
Roland wrote: Sat Oct 16, 2021 10:19 am Unfortunately the Delock card is no longer available in France. I will therefore be content to use the link with the motherboard. So I will have to swap the cables between the Linux and Amiga disks. It's safer, but less comfortable :( .
Have you looked at the pages of Kalea-informatique...? Their products should be well available in France. This one is probably closest to the Delock card mentioned (both has a Marvell controller chip):

https://www.kalea-informatique.com/cart ... 0-naa2.htm

I would have wanted to buy from them a combined Sata3 - USB 6G card but they are currently out of stock. It would be nice to have a couple of fast USB ports, too...
- Roland -
User avatar
Amiguy
Posts: 93
Joined: Mon May 15, 2017 8:01 pm
Location: France

Re: Booting Linux from PCI card

Post by Amiguy »

Wouaou, thank you very much for your research :D . I had not seen the Kalea site.

I wonder though. I was using this card to plug in my DVD player. However, I probably could not get the player to work on the Amiga anymore, since I would not have a driver for the card.
Amiga 1200 2Mb Chip - PiStorm32 lite - CF 128Gb - Indivision MK3 - GOEX Drive - WB 3.2.2.1
AmigaOne X5000 2Ghz / 8Gb Ram - SSD 2x4Tb - Radeon RX 580 4Gb - Sound Blaster Audigy FX 5.1 SBX - AmigaOS4.1 FE
Post Reply