Page 1 of 1

Attempts to Compile Full Real Time Kernel 6.1.38 with AUFS

Posted: Thu Jul 20, 2023 9:15 pm
by rockedge

I have been attempting to compile a full real time kernel 6.1.38. The build run fails at the same point earlier kernel compile attempts also failed at.
The kernel build fails at different points and is not consistent where the compile stops. The patch process to add full real time capabilities is completely and successfully completed.

Below is the last lines of the build log.

Code: Select all

  CC [M]  drivers/comedi/drivers/amplc_dio200_common.o
  CC [M]  drivers/comedi/drivers/amplc_pc236_common.o
  LD [M]  drivers/hwmon/nct6775.o
  CC [M]  drivers/comedi/drivers/das08.o
  LD [M]  drivers/comedi/drivers/ni_routing.o
make: *** [Makefile:2012: .] Error 2
Error: failed to compile the kernel sources.

Re: Attempts to Compile Full Real Time Kernel 6.1.38 with AUFS

Posted: Fri Jul 21, 2023 5:07 am
by ozsouth

@rockedge - I made a PREEMPT 6.1.38 non-usrmerge 64bit kernel without issues. Briefly tested OK. Have links if interested. Or could send me your patches to try.


Re: Attempts to Compile Full Real Time Kernel 6.1.38 with AUFS

Posted: Fri Jul 21, 2023 6:22 am
by peebee

The actual error is usually a long way back in the log - lots of things are happening asynchronously in parallel and complete after the error has occurred.....


Re: Attempts to Compile Full Real Time Kernel 6.1.38 with AUFS

Posted: Fri Jul 21, 2023 2:38 pm
by rockedge
ozsouth wrote: Fri Jul 21, 2023 5:07 am

@rockedge - I made a PREEMPT 6.1.38 non-usrmerge 64bit kernel without issues. Briefly tested OK. Have links if interested. Or could send me your patches to try.

I thought the kernel would compile with out the patches applied which you've managed. This is a good sign. Will look closer at the build.log to check what peebee suggests!

Here are both forms of the real time patches for kernel 6.1.38 (monolithic and individual) :


Re: Attempts to Compile Full Real Time Kernel 6.1.38 with AUFS

Posted: Fri Jul 21, 2023 3:46 pm
by rockedge

Here is the build.log ->

It appears that the aufs6.1 builds the aufs-utils correctly....and during the kernel compile there is the error that bails out the build run.

Looking to try again to build it. I may also first try without the RT patches.


Re: Attempts to Compile Full Real Time Kernel 6.1.38 with AUFS

Posted: Fri Jul 21, 2023 4:42 pm
by rockedge

Tried a build using a Fossa woof-CE kernel-kit but the build fails at the exact same point as in the Jammy attempt. Both seem to build the AUFS features correctly.

Code: Select all

  CC [M]  drivers/comedi/drivers/amplc_pc236_common.o
  CC [M]  drivers/comedi/drivers/das08.o
  LD [M]  drivers/comedi/drivers/ni_routing.o
make: *** [Makefile:2012: .] Error 2
Error: failed to compile the kernel sources.

Re: Attempts to Compile Full Real Time Kernel 6.1.38 with AUFS

Posted: Sat Jul 22, 2023 2:16 am
by ozsouth

@rockedge - I won't get a chance to compile this for about 5 hours, but attached is the DOTconfig that didn't error immediately. [last word added later]. Note in it I used gcc 9.3.0.

LATER: refused to compile - see 3 posts down.


Re: Attempts to Compile Full Real Time Kernel 6.1.38 with AUFS

Posted: Sat Jul 22, 2023 2:23 am
by rockedge

Thanks, I will try it out without the RT patch first.

Earlier I tried a build on a Dell Optiplex 990 with F96-CE_4 but an error on another driver during kernel compile stopped it.


Re: Attempts to Compile Full Real Time Kernel 6.1.38 with AUFS

Posted: Sat Jul 22, 2023 5:46 am
by dimkr
rockedge wrote: Fri Jul 21, 2023 3:46 pm

Here is the build.log ->

Code: Select all

fs/aufs/i_op.c: In function ‘au_pin_hdir_set_owner’:
fs/aufs/i_op.c:639:45: error: ‘struct rw_semaphore’ has no member named ‘owner’
  639 |  atomic_long_set(&p->hdir->hi_inode->i_rwsem.owner, (long)task);
      |                                             ^
make[3]: *** [scripts/Makefile.build:250: fs/aufs/i_op.o] Error 1
make[2]: *** [scripts/Makefile.build:500: fs/aufs] Error 2
make[1]: *** [scripts/Makefile.build:500: fs] Error 2
make[1]: *** Waiting for unfinished jobs....

Re: Attempts to Compile Full Real Time Kernel 6.1.38 with AUFS

Posted: Sat Jul 22, 2023 7:27 am
by ozsouth

@rockedge - compiling now - definitely needed your 2nd patch (the one you used in kernel-kit), or DOTconfig reverts to non-RT.
15 mins later - 'failed to compile kernel sources'.


Re: Attempts to Compile Full Real Time Kernel 6.1.38 with AUFS

Posted: Sat Jul 22, 2023 9:06 am
by dimkr

Maybe try to change to CONFIG_RWSEM_SPIN_ON_OWNER=y? I think aufs breaks because you're building with CONFIG_RWSEM_SPIN_ON_OWNER=n.


Re: Attempts to Compile Full Real Time Kernel 6.1.38 with AUFS

Posted: Sat Jul 22, 2023 9:35 am
by ozsouth

@dimkr - perhaps that will help rockedge, but my DOTconfig has 'y' for that setting. I'm going to try an overlay-only version.

@rockedge -
LATER: Overlay-only 6.1.38 RT kernel with your 2nd patch & my earlier DOTconfig's PREEMPT RT entries (below), compiled successfully. Briefly tested OK.

CONFIG_HAVE_PREEMPT_LAZY=y
CONFIG_PREEMPT_LAZY=y
# CONFIG_PREEMPT_NONE is not set
# CONFIG_PREEMPT_VOLUNTARY is not set
# CONFIG_PREEMPT is not set
CONFIG_PREEMPT_RT=y
CONFIG_PREEMPT_COUNT=y
CONFIG_PREEMPTION=y
# CONFIG_SCHED_CORE is not set


Re: Attempts to Compile Full Real Time Kernel 6.1.38 with AUFS

Posted: Sat Jul 22, 2023 9:51 am
by jamesbond

Code: Select all

diff -ur aufs-standalone-orig/fs/aufs/i_op.c aufs-standalone/fs/aufs/i_op.c
--- aufs-standalone-orig/fs/aufs/i_op.c	2023-07-22 19:32:29.709725459 +1000
+++ aufs-standalone/fs/aufs/i_op.c	2023-07-22 19:48:32.215655970 +1000
@@ -636,7 +636,11 @@
 
 static void au_pin_hdir_set_owner(struct au_pin *p, struct task_struct *task)
 {
+#ifndef CONFIG_PREEMPT_RT
 	atomic_long_set(&p->hdir->hi_inode->i_rwsem.owner, (long)task);
+#else
+	atomic_long_set((atomic_long_t *)&p->hdir->hi_inode->i_rwsem.rwbase.rtmutex.owner, (long)task);
+#endif
 }
 
 void au_pin_hdir_acquire_nest(struct au_pin *p)

Re: Attempts to Compile Full Real Time Kernel 6.1.38 with AUFS

Posted: Sat Jul 22, 2023 12:38 pm
by ozsouth

@jamesbond - attempting 6.1.38 aufs RT kernel, using DOTconfig RT settings 2 posts up, with rockedge's 2nd patch then your patch above applied.
LATER: It compiled, got some interesting messages, but ran Ok in quick test. @rockedge - check your pm.


Re: Attempts to Compile Full Real Time Kernel 6.1.38 with AUFS

Posted: Sat Jul 22, 2023 4:54 pm
by rockedge

My attempt with without AUFS and only OverlayFS for the kernel also compiled.

I am looking forward to trying @jamesbond's patch to build the RT kernel with AUFS support.

UPDATE: the build failed after 25 minutes in. Using the AUFS 6.1 patch and the 2nd RT patch with @ jamesbond's patch applied afterwards and the DOT config from @ozsouth

Will be testing @ ozsouth's successful build of a 6.1.38-rt13 full real time kernel while attempting to successfully build one with the Timer frequency set to 1000 mhz


Re: Attempts to Compile Full Real Time Kernel 6.1.38 with AUFS

Posted: Sun Jul 23, 2023 4:05 am
by ozsouth

6.1.38 rt13c successfully built - no issues in brief test. Links pm'd to @rockedge.
Thanks @jamesbond - for your script which I ran after rockedge's 2nd patch
(which I renamed to patch-6.1.38.patch & made line 7032 just + symbol).
That fixed filename mismatch, within my 2018-Kernel-kit. My DOTconfig attached below.


Re: Attempts to Compile Full Real Time Kernel 6.1.38 with AUFS

Posted: Sun Jul 23, 2023 4:51 am
by jamesbond

:thumbup: You're welcome. Thanks for the confirmation.


Re: Attempts to Compile Full Real Time Kernel 6.1.38 with AUFS

Posted: Mon Jul 24, 2023 2:02 am
by rockedge

@ozsouth I had a successful build using your kernel-kit download package although with a slightly altered DOTconfig that includes builtin support for ext2, ext3 and NTFS read and write. Also Timer frequency is increased to 1000 mhz.

So 2018 kernel-kit components from @ozsouth and the DOTConfig for 6.1.38 mixed in a latest kernel-kit from Woof-CE repo. Used the @ rockedge 2nd RT patch then @jamesbond's patch is applied added into the /kernel-kit/patches directory created the right enviroment for a good build of this kernel.

The product is named huge-6.1.38-rock-rt13c.tar.bz2 and has kernel headers and kernel sources. There will be two versions, one for Puppy Linux and another for KLV-Airedale and KLV-Spectr OS's.

Between the version from @ozsouth and this recent full real time model, there will be a good choices for newer Puppy Linux's and KLV's to operate in audio recording, video editing work for example, using a solid and "newer" full real time kernel.


Re: Attempts to Compile Full Real Time Kernel 6.1.38 with AUFS

Posted: Mon Jul 24, 2023 2:42 am
by debianfan
rockedge wrote: Mon Jul 24, 2023 2:02 am

@ozsouth I had a successful build using your kernel-kit download package although with a slightly altered DOTconfig that includes builtin support for ext2, ext3 and NTFS read and write. Also Timer frequency is increased to 1000 mhz.

So 2018 kernel-kit components from @ozsouth and the DOTConfig for 6.1.38 mixed in a latest kernel-kit from Woof-CE repo. Used the @ rockedge 2nd RT patch then @jamesbond's patch is applied added into the /kernel-kit/patches directory created the right enviroment for a good build of this kernel.

The product is named huge-6.1.38-rock-rt13c.tar.bz2 and has kernel headers and kernel sources. There will be two versions, one for Puppy Linux and another for KLV-Airedale and KLV-Spectr OS's.

Between the version from @ozsouth and this recent full real time model, there will be a good choices for newer Puppy Linux's and KLV's to operate in audio recording, video editing work for example, using a solid and "newer" full real time kernel.

6.1.38 Where can I download it?
What are the differences between Puppy Linux and KLV Airdale? How do I know which kernel I should use?


Re: Attempts to Compile Full Real Time Kernel 6.1.38 with AUFS

Posted: Mon Jul 24, 2023 3:24 am
by ozsouth

Excellent - another forum collaborative effort rolled out.


Re: Attempts to Compile Full Real Time Kernel 6.1.38 with AUFS

Posted: Mon Jul 24, 2023 5:49 am
by rockedge

@debianfan Also both versions of 6.1.38-rt13 with both AUFS and OverlayFS are now also available here: https://rockedge.org/kernels/

Direct downloads :

ozsouth -> https://rockedge.org/kernels/data/Kerne ... T/ozsouth/

rockedge -> https://rockedge.org/kernels/data/Kerne ... /rockedge/