Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Compiling a custom kernel with unRAID 4.2.1

Featured Replies

Now that I'm a paid user of unRAID Pro, I wanted to set up a development system to test some additional applications and packages.  But I can't get the code in unraid.c disrtributed with 4.2.1 to compile ... it throws this error:

 

drivers/md/unraid.c:1419: error: too many arguments to function 'kmem_cache_create'

 

the offending line of source code is:

conf->slab_cache = kmem_cache_create("unraid/md", sizeof(*sh), 0, 0, NULL, NULL);

 

However according to the kernel API, the function kmem_cache_create is supposed to have six parameters. 

 

I tried compiling under both current stable 2.6.23.9 kernel and slack 12 distro of 2.6.21.5.

 

If anyone has successfully set up a development system with the unRAID mods, please let me know if you have any tips to duplicate your efforts.

 

I've not tried to set up a development environment, but...

 

I count 6 arguments to the kmem_cache_create() call in your "offending line" so whay is the compiler complaining?

 

Assuming the API doc is correct, If the compiler is complaining, it must have encountered an earlier call to the same function with fewer parameters.  Perhaps a function prototype in a header file?

 

Joe L.

 

 

  • Author

I count 6 arguments to the kmem_cache_create() call in your "offending line" so why is the compiler complaining?

 

I know... confused me too.  That's why I posted the question in case there was something else involved that had modified the prototype.  I hate wading though other people's code w/o knowing what little things are going on behind the scenes, what compiler or switches were used, etc. 

  • Author

I never could figure out was was stepping on the function prototype, so I diffed back to kernel subversion 2.6.22.5, disabled SMP and changed MD support to module rather than built-in and got it to compile.

 

I rebuilt the kernel and booted it from USB .... and unRAID is working.  ;D  Now to throw a couple of spare drives into it and test it out.

 

Being able to build my own kernel and initramfs opens up lots of possibilities for me now.... Christmas has come early this year!  I have a new toy to play with now.

  • Author

It took about 20 tries, but I was finally able to tweak a kernel config with appropriate options and drivers to compile using gcc version 4.1.2, and boot a working unRAID server with it.

 

Comparing the syslogs from my custom build to the stock build, they are essentially identical.  After parity was built, I did a 60 GB copy to and back from, and all files compared with no bit errors.

 

It is not for the feint of heart, but if anyone wants the directions to repeat this process and get a development system u p and running to build a custom kernel with unRAID, let me know.  The hard part is the initial config file which I can give you.  After you get it set up, it is just one script to compile, build the initramfs, and copy it all to the usb stick... so it is pretty easy to test out new kernels.

Sorry for the "newbie" question, but what is the actual point of doing that?

 

(except the perfectly understandable "because I can")

 

 

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.