7 Replies Latest reply on Apr 27, 2018 4:49 PM by ramchyld

    Ryzen Raid Driver for Ubuntu 16.04.3 kernel 4.13

    ventman

      Been having good luck with the current driver that was posted when Ryzen launched (here), but now that kernel 4.13 releases for Ubuntu 16.04.3 with hardware enablement were introduced, the driver won't compile correctly on these new kernels. Below is the logfile snippet when I run the install script included in the "driver_sdk" folder with superuser. All the entries in black were previous kernels that were pruned, blue is a successful build, and red is a failed build.

       

      ./install: 24: ./install: source: not found

      ./install: 149: [: !=: unexpected operator

      ln: failed to create symbolic link 'src/rcblob.i686': File exists

      Make kernel for 4.10.0-27-generic

      make: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      make: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      make: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      ------------------------------------------------------------

      - building for kernel 4.10.0-27-generic

      ------------------------------------------------------------

      make -C /lib/modules/4.10.0-27-generic/build SUBDIRS=/home/ventman/Desktop/driver_sdk/src modules

      make[1]: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      make[1]: *** /lib/modules/4.10.0-27-generic/build: No such file or directory.  Stop.

      make[1]: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      Makefile:60: recipe for target 'all' failed

      make: *** [all] Error 2

      make: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      #

      # Driver module not built -- install aborted!

      #

      Make kernel for 4.10.0-28-generic

      make: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      make: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      make: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      ------------------------------------------------------------

      - building for kernel 4.10.0-28-generic

      ------------------------------------------------------------

      make -C /lib/modules/4.10.0-28-generic/build SUBDIRS=/home/ventman/Desktop/driver_sdk/src modules

      make[1]: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      make[1]: *** /lib/modules/4.10.0-28-generic/build: No such file or directory.  Stop.

      make[1]: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      Makefile:60: recipe for target 'all' failed

      make: *** [all] Error 2

      make: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      #

      # Driver module not built -- install aborted!

      #

      Make kernel for 4.10.0-30-generic

      make: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      make: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      make: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      ------------------------------------------------------------

      - building for kernel 4.10.0-30-generic

      ------------------------------------------------------------

      make -C /lib/modules/4.10.0-30-generic/build SUBDIRS=/home/ventman/Desktop/driver_sdk/src modules

      make[1]: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      make[1]: *** /lib/modules/4.10.0-30-generic/build: No such file or directory.  Stop.

      make[1]: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      Makefile:60: recipe for target 'all' failed

      make: *** [all] Error 2

      make: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      #

      # Driver module not built -- install aborted!

      #

      Make kernel for 4.10.0-32-generic

      make: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      make: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      make: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      ------------------------------------------------------------

      - building for kernel 4.10.0-32-generic

      ------------------------------------------------------------

      make -C /lib/modules/4.10.0-32-generic/build SUBDIRS=/home/ventman/Desktop/driver_sdk/src modules

      make[1]: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      make[1]: *** /lib/modules/4.10.0-32-generic/build: No such file or directory.  Stop.

      make[1]: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      Makefile:60: recipe for target 'all' failed

      make: *** [all] Error 2

      make: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      #

      # Driver module not built -- install aborted!

      #

      Make kernel for 4.10.0-33-generic

      make: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      make: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      make: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      ------------------------------------------------------------

      - building for kernel 4.10.0-33-generic

      ------------------------------------------------------------

      make -C /lib/modules/4.10.0-33-generic/build SUBDIRS=/home/ventman/Desktop/driver_sdk/src modules

      make[1]: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      make[1]: *** /lib/modules/4.10.0-33-generic/build: No such file or directory.  Stop.

      make[1]: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      Makefile:60: recipe for target 'all' failed

      make: *** [all] Error 2

      make: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      #

      # Driver module not built -- install aborted!

      #

      Make kernel for 4.10.0-35-generic

      make: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      make: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      make: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      ------------------------------------------------------------

      - building for kernel 4.10.0-35-generic

      ------------------------------------------------------------

      make -C /lib/modules/4.10.0-35-generic/build SUBDIRS=/home/ventman/Desktop/driver_sdk/src modules

      make[1]: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      make[1]: *** /lib/modules/4.10.0-35-generic/build: No such file or directory.  Stop.

      make[1]: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      Makefile:60: recipe for target 'all' failed

      make: *** [all] Error 2

      make: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      #

      # Driver module not built -- install aborted!

      #

      Make kernel for 4.10.0-37-generic

      make: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      make: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      make: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      ------------------------------------------------------------

      - building for kernel 4.10.0-37-generic

      ------------------------------------------------------------

      make -C /lib/modules/4.10.0-37-generic/build SUBDIRS=/home/ventman/Desktop/driver_sdk/src modules

      make[1]: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      make[1]: *** /lib/modules/4.10.0-37-generic/build: No such file or directory.  Stop.

      make[1]: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      Makefile:60: recipe for target 'all' failed

      make: *** [all] Error 2

      make: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      #

      # Driver module not built -- install aborted!

      #

      Make kernel for 4.10.0-38-generic

      make: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      make: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      make: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      ------------------------------------------------------------

      - building for kernel 4.10.0-38-generic

      ------------------------------------------------------------

      make -C /lib/modules/4.10.0-38-generic/build SUBDIRS=/home/ventman/Desktop/driver_sdk/src modules

      make[1]: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      make[1]: *** /lib/modules/4.10.0-38-generic/build: No such file or directory.  Stop.

      make[1]: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      Makefile:60: recipe for target 'all' failed

      make: *** [all] Error 2

      make: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      #

      # Driver module not built -- install aborted!

      #

      Make kernel for 4.10.0-42-generic

      make: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      make: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      make: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      ------------------------------------------------------------

      - building for kernel 4.10.0-42-generic

      ------------------------------------------------------------

      make -C /lib/modules/4.10.0-42-generic/build SUBDIRS=/home/ventman/Desktop/driver_sdk/src modules

      make[1]: Entering directory '/usr/src/linux-headers-4.10.0-42-generic'

        CC [M]  /home/ventman/Desktop/driver_sdk/src/rc_init.o

        CC [M]  /home/ventman/Desktop/driver_sdk/src/rc_msg.o

        CC [M]  /home/ventman/Desktop/driver_sdk/src/rc_mem_ops.o

        CC [M]  /home/ventman/Desktop/driver_sdk/src/rc_event.o

        CC [M]  /home/ventman/Desktop/driver_sdk/src/rc_config.o

        CC [M]  /home/ventman/Desktop/driver_sdk/src/vers.o

        LD [M]  /home/ventman/Desktop/driver_sdk/src/rcraid.o

        Building modules, stage 2.

        MODPOST 1 modules

        CC      /home/ventman/Desktop/driver_sdk/src/rcraid.mod.o

        LD [M]  /home/ventman/Desktop/driver_sdk/src/rcraid.ko

      make[1]: Leaving directory '/usr/src/linux-headers-4.10.0-42-generic'

      make: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      Make kernel for 4.13.0-26-generic

      make: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      make: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      make: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      ------------------------------------------------------------

      - building for kernel 4.13.0-26-generic

      ------------------------------------------------------------

      make -C /lib/modules/4.13.0-26-generic/build SUBDIRS=/home/ventman/Desktop/driver_sdk/src modules

      make[1]: Entering directory '/usr/src/linux-headers-4.13.0-26-generic'

        CC [M]  /home/ventman/Desktop/driver_sdk/src/rc_init.o

        CC [M]  /home/ventman/Desktop/driver_sdk/src/rc_msg.o

        CC [M]  /home/ventman/Desktop/driver_sdk/src/rc_mem_ops.o

      /home/ventman/Desktop/driver_sdk/src/rc_mem_ops.c: In function ‘rc_kthread’:

      /home/ventman/Desktop/driver_sdk/src/rc_mem_ops.c:179:2: error: implicit declaration of function ‘sigfillset’ [-Werror=implicit-function-declaration]

        sigfillset(&current->blocked);

        ^

      cc1: some warnings being treated as errors

      scripts/Makefile.build:308: recipe for target '/home/ventman/Desktop/driver_sdk/src/rc_mem_ops.o' failed

      make[2]: *** [/home/ventman/Desktop/driver_sdk/src/rc_mem_ops.o] Error 1

      Makefile:1550: recipe for target '_module_/home/ventman/Desktop/driver_sdk/src' failed

      make[1]: *** [_module_/home/ventman/Desktop/driver_sdk/src] Error 2

      make[1]: Leaving directory '/usr/src/linux-headers-4.13.0-26-generic'

      Makefile:60: recipe for target 'all' failed

      make: *** [all] Error 2

      make: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      #

      # Driver module not built -- install aborted!

      #

      Make kernel for 4.13.0-32-generic

      make: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      make: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      make: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      ------------------------------------------------------------

      - building for kernel 4.13.0-32-generic

      ------------------------------------------------------------

      make -C /lib/modules/4.13.0-32-generic/build SUBDIRS=/home/ventman/Desktop/driver_sdk/src modules

      make[1]: Entering directory '/usr/src/linux-headers-4.13.0-32-generic'

        CC [M]  /home/ventman/Desktop/driver_sdk/src/rc_init.o

        CC [M]  /home/ventman/Desktop/driver_sdk/src/rc_msg.o

        CC [M]  /home/ventman/Desktop/driver_sdk/src/rc_mem_ops.o

      /home/ventman/Desktop/driver_sdk/src/rc_mem_ops.c: In function ‘rc_kthread’:

      /home/ventman/Desktop/driver_sdk/src/rc_mem_ops.c:179:2: error: implicit declaration of function ‘sigfillset’ [-Werror=implicit-function-declaration]

        sigfillset(&current->blocked);

        ^

      cc1: some warnings being treated as errors

      scripts/Makefile.build:308: recipe for target '/home/ventman/Desktop/driver_sdk/src/rc_mem_ops.o' failed

      make[2]: *** [/home/ventman/Desktop/driver_sdk/src/rc_mem_ops.o] Error 1

      Makefile:1550: recipe for target '_module_/home/ventman/Desktop/driver_sdk/src' failed

      make[1]: *** [_module_/home/ventman/Desktop/driver_sdk/src] Error 2

      make[1]: Leaving directory '/usr/src/linux-headers-4.13.0-32-generic'

      Makefile:60: recipe for target 'all' failed

      make: *** [all] Error 2

      make: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      #

      # Driver module not built -- install aborted!

      #

      Make kernel for 4.4.0-112-generic

      make: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      make: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      make: Entering directory '/home/ventman/Desktop/driver_sdk/src'

      ------------------------------------------------------------

      - building for kernel 4.4.0-112-generic

      ------------------------------------------------------------

      make -C /lib/modules/4.4.0-112-generic/build SUBDIRS=/home/ventman/Desktop/driver_sdk/src modules

      make[1]: Entering directory '/usr/src/linux-headers-4.4.0-112-generic'

        CC [M]  /home/ventman/Desktop/driver_sdk/src/rc_init.o

        CC [M]  /home/ventman/Desktop/driver_sdk/src/rc_msg.o

        CC [M]  /home/ventman/Desktop/driver_sdk/src/rc_mem_ops.o

        CC [M]  /home/ventman/Desktop/driver_sdk/src/rc_event.o

        CC [M]  /home/ventman/Desktop/driver_sdk/src/rc_config.o

        CC [M]  /home/ventman/Desktop/driver_sdk/src/vers.o

        LD [M]  /home/ventman/Desktop/driver_sdk/src/rcraid.o

        Building modules, stage 2.

        MODPOST 1 modules

        CC      /home/ventman/Desktop/driver_sdk/src/rcraid.mod.o

        LD [M]  /home/ventman/Desktop/driver_sdk/src/rcraid.ko

      make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-112-generic'

      make: Leaving directory '/home/ventman/Desktop/driver_sdk/src'

      If I knew what to change to make rc_mem_ops.o compile, I would, but that's far beyond my current knowlege.

        • Re: Ryzen Raid Driver for Ubuntu 16.04.3 kernel 4.13
          aseymour

          Having this same problem (Ubuntu 4.13.0), clearly an issue with;

           

          error: implicit declaration of function ‘sigfillset’ [-Werror=implicit-function-declaration]
          

           

          Although, the drivers haven't been updated since March 2017 so I'm not holding out but, it would be good if there was a fix from AMD.

            • Re: Ryzen Raid Driver for Ubuntu 16.04.3 kernel 4.13
              ventman

              I'm hoping they're holding out for the next LTS release of 18.04, it would make the most sense support-wise to release an updated version.  It doesn't help that this isn't AMD's code to fix either, but subcontracted by an outside firm that was recently acquired by Seagate. This site hints at the problem, but as stated by the driver licence, the fix can't be shared implicitly.

              1 of 1 people found this helpful
                • Re: Ryzen Raid Driver for Ubuntu 16.04.3 kernel 4.13
                  ramchyld

                  Getting the same sigfillset error, but I was able to work out how to fix from the blog linked hinted since I do have some background in programming. However, I'm still having issues:

                   

                  1. NVMe RAID support is still not working, instead the kernel is seeing through the array and showing the devices as three individual but identical NVMe sticks.

                   

                  2. SATA RAID is working differently from what I expected, the array is presented as a physical SCSI device (/dev/sda) instead of as /dev/mapper/[mapper name and ID] which I expect from other RAID implementations. Don't know if this is a good thing or not in the long run, but in the short term at least Clonezilla sees the array and would happily image it.

                   

                  Instead of paying a firm to do it for them, they could've just handed the required documentation over to the Linux kernel and dmraid people and get it done for free.

                    • Re: Ryzen Raid Driver for Ubuntu 16.04.3 kernel 4.13
                      ventman

                      I'd be curious to know how you fixed it, I have no linux programming experience, so I'm not sure what or where to look here to get this to build right. I'd need to burn a weekend digging through kernel build instructions and procedures in order to get a clearer picture.

                       

                      As for the paying a firm for this functionality vs open sourcing it.  The unique nature of a hybrid software/hardware RAID solution opens way to many cans of worms.  If this were to be implemented in open source, you would need not only Kernel/dmraid support, but also something akin to Coreboot support as well. It mostly comes down to who's your target customer, and that will always be Windows users, and they will always want commercial support.

                        • Re: Ryzen Raid Driver for Ubuntu 16.04.3 kernel 4.13
                          ramchyld

                          > I'd be curious to know how you fixed it

                          Well, as it says, the module failed to build due to said source file not pointing to the linux/signal.h header. You need to add include "linux/signal.h" to the top of the mentioned file with the sigfillset error. Then do a make clean and make again, and it should build okay this time. You can then manually copy the file over to /lib/modules/<kernel version>/updates and depmod -aq, then build a new ramdisk. After that, update grub, reboot, go into BIOS, enable RAID, save, and it should work at least on the SATA side.

                           

                          As for open-sourcing, nah, I think Coreboot support isn't of importance, at least not until the Ryzen motherboards are supported and one can flash Coreboot over the UEFI BIOS on those. At this point Coreboot only supports a small handful of motherboards. As far as I know it's kernel support (via the dmraid module) that is of importance, since the dmraid module abstracts the controller into standardized bits (ie the mapper) and the dmraid and kpartx utilities (one handles mbr, the other gpt) takes this information from the mapper to reconstruct the partitions in the array into something the mount utility recognizes.

                           

                          I wish AMD had continued using the Promise Technology licensed controller that was widely used on their pre-Ryzen chipsets tho, since it would work much, much better as that one's fully supported by dmraid. I have no issues running the 990FX and A55 chipsets in RAID mode, dmraid worked right out of the box, and gpt-on-raid support can be added by throwing in kpartx.

                          1 of 1 people found this helpful
                            • Re: Ryzen Raid Driver for Ubuntu 16.04.3 kernel 4.13
                              ventman

                              > You need to add include "linux/signal.h" to the top of the mentioned file with the sigfillset error

                              That did the trick. Was able to get the driver to finally make on a 4.13 kernel.

                              > I wish AMD had continued using the Promise Technology licensed controller

                              Same here, Was running previously on a 990fx chipset just fine with Ubuntu detecting my Windows RAID automatically with dmraid.  Unfortunately, it seems that the landscape for host bus adapters has changed drastically in the past 5-7 years.  Promise no longer produces controllers.  And if you want RAID with UEFI booting, you have to pony up for expensive hardware RAID controllers, which most don't offer desktop/workstation power management features like S3 sleep or S4 hibernation.

                               

                              Now the big issue is now the driver won't build on 4.15 kernels due to this bug. What a mess.

                                • Re: Ryzen Raid Driver for Ubuntu 16.04.3 kernel 4.13
                                  ramchyld

                                  Ugh. I think that bug is the least of my problems tho- I still have multiple now-ancient nForce+AMD builds that run Linux and uses the 340 NVidia drivers because of the onboard GeForce 8200 baked into the southbridge not supporting anything newer that I was using for background CUDA chores (why I completely detest APUs) and that seems to be affected by this same issue as well. Looks like I won't be moving on to Bionic until the distros gets their game together.

                                   

                                  That said, I wonder how trivial it is to convert drivers that use init_timer() to use init_timers()? I see that work is underway to patch the older nvidia drivers, at least by the community, so maybe once we see their handiwork we can work out our own patches for this, assuming AMD doesn't fix this themselves first.