Porteus Kernel Builder

Here is a place for your projects which are not officially supported by the Porteus Team. For example: your own kernel patched with extra features; desktops not included in the standard ISO like Gnome; base modules that are different than the standard ISO, etc...
neko
DEV Team
DEV Team
Posts: 2109
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

Porteus Kernel Builder

Post#736 by neko » 21 Nov 2019, 09:08

1. "Porteus Kernel Builder" was updated.
Version: 19.11.21
Kernel build prototype configs were updated.


2. Most recent versions of build examples were updated.
Kernel Version: 5.3.12, 4.19.85

Note : update the config of kernel 5.3.12/4.19.85 with "make menuconfig" command.
==5.3.12 64bit config==

Code: Select all

# diff ../../64bit.config .config
3c3
< # Linux/x86 5.3.11 Kernel Configuration
---
> # Linux/x86 5.3.12 Kernel Configuration
2531,2532c2531,2536
< # CONFIG_RTW88_8822BE is not set
< # CONFIG_RTW88_8822CE is not set
---
> CONFIG_RTW88_CORE=m
> CONFIG_RTW88_PCI=m
> CONFIG_RTW88_8822BE=y
> CONFIG_RTW88_8822CE=y
> # CONFIG_RTW88_DEBUG is not set
> # CONFIG_RTW88_DEBUGFS is not set
6375c6379
< CONFIG_CRYPTO_CRC32C_INTEL=m
---
> CONFIG_CRYPTO_CRC32C_INTEL=y
#
==5.3.12 32bit config==

Code: Select all

# diff ../../32bit.config .config
3c3
< # Linux/x86 5.3.11 Kernel Configuration
---
> # Linux/x86 5.3.12 Kernel Configuration
2510,2511c2510,2515
< # CONFIG_RTW88_8822BE is not set
< # CONFIG_RTW88_8822CE is not set
---
> CONFIG_RTW88_CORE=m
> CONFIG_RTW88_PCI=m
> CONFIG_RTW88_8822BE=y
> CONFIG_RTW88_8822CE=y
> # CONFIG_RTW88_DEBUG is not set
> # CONFIG_RTW88_DEBUGFS is not set
6337c6341
< CONFIG_CRYPTO_CRC32C_INTEL=m
---
> CONFIG_CRYPTO_CRC32C_INTEL=y
#
==4.19.85 64bit config==

Code: Select all

# diff ../../64bit.config .config
3c3
< # Linux/x86 4.19.84 Kernel Configuration
---
> # Linux/x86 4.19.85 Kernel Configuration
6005c6005
< CONFIG_CRYPTO_CRC32C_INTEL=m
---
> CONFIG_CRYPTO_CRC32C_INTEL=y
#
==4.19.84 32bit config==

Code: Select all

# diff ../../32bit.config .config
3c3
< # Linux/x86 4.19.84 Kernel Configuration
---
> # Linux/x86 4.19.85 Kernel Configuration
5981c5981
< CONFIG_CRYPTO_CRC32C_INTEL=m
---
> CONFIG_CRYPTO_CRC32C_INTEL=y
#
Please refer to the top article of this thread.
Porteus Kernel Builder


Thanks.

neko
DEV Team
DEV Team
Posts: 2109
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

Porteus Kernel Builder

Post#737 by neko » 24 Nov 2019, 14:53

Most recent versions of build examples were updated.
Kernel Version: 5.3.13, 4.19.86


Please refer to the top article of this thread.
Porteus Kernel Builder


Thanks.

neko
DEV Team
DEV Team
Posts: 2109
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

Porteus Kernel Builder

Post#738 by neko » 26 Nov 2019, 07:58

Kernel Version Line 5.4-rc was updated to 5.4.

-----------------------------------
Most recent version of build examples was updated.
Kernel Version: 5.4

Note : AUFS patch "5.4" is not yet ready, and
AUFS patch "5.x-rcN-20191021" is not yet ready for kernel version 5.4.

It was patched by manual as same as patching to kernel version 5.4.0-rc2.
Porteus Kernel Builder (Post by neko #74116)


Please refer to the top article of this thread.
Porteus Kernel Builder


Thanks.

peebee
Black ninja
Black ninja
Posts: 43
Joined: 13 Oct 2013, 15:31
Distribution: 4
Location: UK

Porteus Kernel Builder

Post#739 by peebee » 29 Nov 2019, 11:12

Hi @neko

Thank you for these cutting edge AUFS enabled kernels.

Would it be possible for you to make the 5.4 AUFS manually created patches available to download?

Many thanks in anticipation.
peebee

neko
DEV Team
DEV Team
Posts: 2109
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

Porteus Kernel Builder

Post#740 by neko » 29 Nov 2019, 13:09

@peebee
The procedure for applying the AUFS patch to kernel 5.4 is described below.

1. Get the latest version of the kernel builder.
Activate this.

mkKernel-19.11.21-noarch-1.xzm (5.5 M)
http://www.mediafire.com/file/gxkbg1js4 ... arch-1.xzm
md5sum: d90899f71d06045761cec3430e996ac8 mkKernel-19.11.21-noarch-1.xzm

2. Create the entry for version 5.4 as follows.

Code: Select all

% su
# ln -sf v5.4-rc /usr/local/share/mkKernel/lib/v5.4
#
3. Activate the 05-devel.xzm module.

4. Launch the builder and download 5.4 source.
Example Arch: 64bit
Example work directory: /work

[GUI]
Kernel Builder ---> [setting window]

Kernel Builder directory: /work
Kernel Version: 5.4
Build Kernel: 64Bit, download=on, expand&patch=off, compile=off, cleanup=off, Create FW=off

push OK button

5. Check the version of the AUFS patch.

Code: Select all

% grep VERSION v5.4/aufs.patch
+	if (!err && (flags & S_VERSION))
+MODULE_VERSION(AUFS_VERSION);
+	printk(KERN_INFO AUFS_NAME " " AUFS_VERSION "\n");
+	if (sb->s_flags & SB_I_VERSION)
+	sb->s_flags |= SB_I_VERSION; /* do we really need this? */
+#define AUFS_VERSION	"5.x-rcN-20191021"
$


If not updated, (If "AUFS_VERSION" is"5.x-rcN-20191021",) it needs this manual patching.

6. Apply the AUFS patch manually referring to the shell sources
/usr/local/share/mkKernel/bin/aufsBase.sh,
/usr/local/share/mkKernel/bin/aufsOption.sh

Code: Select all

% cat /usr/local/share/mkKernel/bin/aufsBase.sh /usr/local/share/mkKernel/bin/aufsOption.sh
#!/bin/sh
# arg1: "Kernel Builder" work directory
# arg2: kernel version: exp. 3.18.140, 4.19.57, 5.1.16, 5.2-rc7
# arg3: 32/64
KDIR=$1
KVER=$2
COMPARCH=$3

V3_4=${KVER%%.*}
SUB=${KVER#*.}
SUB=${SUB%%.*}
RCN=${SUB#*-}
SUB=${SUB%-*}
if [ "$SUB" = "$RCN" ]
then
	RCN=""
else
	SUB="${SUB}-rc"
	RCN=${RCN#rc}
fi
cd $KDIR/v$KVER/$COMPARCH/linux-${KVER}/

PATCHDIR=../../auf/aufs${V3_4}-standalone.git
if [ ! -d $PATCHDIR ]
then
	echo "Not yet get aufs${V3_4}-standalone.git"
	exit 1
fi

# [auf/aufs5-standalone.git/README]
#==== copy ./{Documentation,fs,include/uapi/linux/aufs_type.h} files to your
#  kernel source tree. Never copy $PWD/include/uapi/linux/Kbuild.
cp -r "$PATCHDIR"/fs ./
cp -r "$PATCHDIR"/Documentation ./
cp "$PATCHDIR"/include/uapi/linux/aufs_type.h ./include/uapi/linux

#==== apply ./aufsN-kbuild.patch to your kernel source files.
if [ ! -f "$PATCHDIR"/aufs${V3_4}-kbuild.patch ]
then
	exit 1
fi
echo "-------------------aufs${V3_4}-kbuild.patch"
ERROR=`cat "$PATCHDIR"/aufs${V3_4}-kbuild.patch | patch -p1 | grep FAILED`
if [ -n "$ERROR" ]
then
	echo "ERROR: aufs${V3_4}-kbuild.patch"
	mv "$PATCHDIR"/aufs${V3_4}-kbuild.patch "$PATCHDIR"/NG-aufs${V3_4}-kbuild.patch
	exit 1
fi

#==== apply ./aufsN-base.patch too.
if [ ! -f "$PATCHDIR"/aufs${V3_4}-base.patch ]
then
	exit 1
fi
echo "-------------------aufs${V3_4}-base.patch"
ERROR=`cat "$PATCHDIR"/aufs${V3_4}-base.patch | patch -p1 | grep FAILED`
if [ -n "$ERROR" ]
then
	echo "ERROR: aufs${V3_4}-base.patch"
	mv "$PATCHDIR"/aufs${V3_4}-base.patch "$PATCHDIR"/NG-aufs${V3_4}-base.patch
	exit 1
fi

#==== apply ./aufsN-mmap.patch too.
if [ ! -f "$PATCHDIR"/aufs${V3_4}-mmap.patch ]
then
	exit 1
fi
echo "-------------------aufs${V3_4}-mmap.patch"
ERROR=`cat "$PATCHDIR"/aufs${V3_4}-mmap.patch | patch -p1 | grep FAILED`
if [ -n "$ERROR" ]
then
	echo "ERROR: aufs${V3_4}-mmap.patch"
	mv "$PATCHDIR"/aufs${V3_4}-mmap.patch "$PATCHDIR"/NG-aufs${V3_4}-mmap.patch
	exit 1
fi

exit 0
#!/bin/sh
# arg1: "Kernel Builder" work directory
# arg2: kernel version: exp. 3.18.140, 4.19.57, 5.1.16, 5.2-rc7
# arg3: 32/64
KDIR=$1
KVER=$2
COMPARCH=$3

V3_4=${KVER%%.*}
SUB=${KVER#*.}
SUB=${SUB%%.*}
RCN=${SUB#*-}
SUB=${SUB%-*}
if [ "$SUB" = "$RCN" ]
then
	RCN=""
else
	SUB="${SUB}-rc"
	RCN=${RCN#rc}
fi
cd $KDIR/v$KVER/$COMPARCH/linux-${KVER}/

PATCHDIR=../../auf/aufs${V3_4}-standalone.git
if [ ! -d $PATCHDIR ]
then
	echo "Not yet get aufs${V3_4}-standalone.git"
	exit 1
fi

#- aufsN-loopback.patch
#  Supports a nested loopback mount in a branch-fs. This patch is
#  unnecessary until aufs produces a message like "you may want to try
#  another patch for loopback file".
#==== apply aufsN-loopback.patch to your kernel source files.
if [ ! -f "$PATCHDIR"/aufs${V3_4}-loopback.patch ]
then
	exit 1
fi
echo "-------------------aufs${V3_4}-loopback.patch"
ERROR=`cat "$PATCHDIR"/aufs${V3_4}-loopback.patch | patch -p1 | grep FAILED`
if [ -n "$ERROR" ]
then
	echo "ERROR: aufs${V3_4}-loopback.patch"
	mv "$PATCHDIR"/aufs${V3_4}-loopback.patch "$PATCHDIR"/NG-aufs${V3_4}-loopback.patch
	exit 1
fi

#- proc_mounts.patch
#  When there are many mountpoints and many mount(2)/umount(2) are
#  running, then /proc/mounts may not show the all mountpoints.  This
#  patch makes /proc/mounts always show the full mountpoints list.
#  If you don't want to apply this patch and meet such problem, then you
#  need to increase the value of 'ProcMounts_Times' make-variable in
#  aufs-util.git as a second best solution.

#- vfs-ino.patch
#  Modifies a system global kernel internal function get_next_ino() in
#  order to stop assigning 0 for an inode-number. Not directly related to
#  aufs, but recommended generally.

#- tmpfs-idr.patch
#  Keeps the tmpfs inode number as the lowest value. Effective to reduce
#  the size of aufs XINO files for tmpfs branch. Also it prevents the
#  duplication of inode number, which is important for backup tools and
#  other utilities. When you find aufs XINO files for tmpfs branch
#  growing too much, try this patch.

#- lockdep-debug.patch
#  Because aufs is not only an ordinary filesystem (callee of VFS), but
#  also a caller of VFS functions for branch filesystems, subclassing of
#  the internal locks for LOCKDEP is necessary. LOCKDEP is a debugging
#  feature of linux kernel. If you enable CONFIG_LOCKDEP, then you will
#  need to apply this debug patch to expand several constant values.
#  If don't know what LOCKDEP, then you don't have apply this patch.



exit 0
%
expand source file and then patch AUFS using
/usr/local/share/mkKernel/lib/v5.4/own.patch.fs+Kconfig
and
/usr/local/share/mkKernel/lib/v5.4/own.patch.fs+Makefile

Code: Select all

% su
# cd /work/v5.4/
# mkdir 64
# cd 64
# xz -dc ../linux-5.4.tar.xz | tar -x
# cd linux-5.4
# cp -r ../../auf/aufs5-standalone.git/fs ./
# cp -r ../../auf/aufs5-standalone.git/Documentation ./
# cp ../../auf/aufs5-standalone.git/include/uapi/linux/aufs_type.h ./include/uapi/linux
# cat ../../auf/aufs5-standalone.git/aufs5-base.patch | patch -p1
# cat ../../auf/aufs5-standalone.git/aufs5-mmap.patch | patch -p1
# cat ../../auf/aufs5-standalone.git/aufs5-loopback.patch | patch -p1
# cp /usr/local/share/mkKernel/lib/v5.4/own.patch.fs+Kconfig fs/Kconfig
# cp /usr/local/share/mkKernel/lib/v5.4/own.patch.fs+Makefile fs/Makefile
#
Note: Example Build Config is /usr/local/share/mkKernel/lib/v5.4/64bit.config


Thanks.

peebee
Black ninja
Black ninja
Posts: 43
Joined: 13 Oct 2013, 15:31
Distribution: 4
Location: UK

Porteus Kernel Builder

Post#741 by peebee » 30 Nov 2019, 09:10

@neko - many thanks.

neko
DEV Team
DEV Team
Posts: 2109
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

Porteus Kernel Builder

Post#742 by neko » 30 Nov 2019, 12:36

Most recent version of build examples was updated.
Kernel Version: 5.4.1, 5.3.14

Note : AUFS patch "5.4.1" is not yet ready, and
AUFS patch "5.x-rcN-20191021" is not yet ready for kernel version 5.4.1.
It was patched by manual.
Porteus Kernel Builder (Post by neko #74824)


Please refer to the top article of this thread.
Porteus Kernel Builder


Thanks.

peebee
Black ninja
Black ninja
Posts: 43
Joined: 13 Oct 2013, 15:31
Distribution: 4
Location: UK

Porteus Kernel Builder

Post#743 by peebee » 30 Nov 2019, 17:00

aufs-5.4 may be some time....

https://sourceforge.net/p/aufs/mailman/ ... /36794691/

> Ouch!
> My test machine is finally dead. It is Core2-duo, 4GB, 512GB HDD, 10
> year old...
> I have to get a new pc and replace it. Until then, all my development
> stops. Hopefully it will be within a week or two.

I cannot get the new pc until 18 Dec.
I am afraid that my aufs development, especially compile and tests are
done this year.

J. R. Okajima

neko
DEV Team
DEV Team
Posts: 2109
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

Porteus Kernel Builder

Post#744 by neko » 01 Dec 2019, 02:53

@peebee
Thank you for information about AUFS.
I would like to thank Mr. Okajima for his volunteer activities.


Thanks.

neko
DEV Team
DEV Team
Posts: 2109
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

Porteus Kernel Builder

Post#745 by neko » 01 Dec 2019, 13:57

Most recent versions of build examples were updated.
Kernel Version: 4.19.87


Thanks.

neko
DEV Team
DEV Team
Posts: 2109
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

Porteus Kernel Builder

Post#746 by neko » 05 Dec 2019, 10:43

Most recent version of build examples was updated.
Kernel Version: 5.4.2, 5.3.15, 4.19.88

Note : AUFS patch "5.4.2" is not yet ready, and
AUFS patch "5.x-rcN-20191021" is not yet ready for kernel version 5.4.
It was patched by manual.
Porteus Kernel Builder (Post by neko #74824)



Please refer to the top article of this thread.
Porteus Kernel Builder


Thanks.

neko
DEV Team
DEV Team
Posts: 2109
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

Porteus Kernel Builder

Post#747 by neko » 07 Dec 2019, 12:29

1. "Porteus Kernel Builder" was updated.
Version: 19.11.26

Kernel Version Line 5.4-rc was updated to 5.4.
Therefore the new entry for 5.4 is introduced into "Porteus Kernel Builder".


2. The example of replacement the kernel of another distri which uses OverlayFS/AUFS was updated.
austrumi 4.1.2 + kernel 5.4.2
(includes libreoffice 6.3.4.1, firefox 71.0 etc,.)

Please refer to the top article of this thread.
Porteus Kernel Builder


Thanks.

neko
DEV Team
DEV Team
Posts: 2109
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

Porteus Kernel Builder

Post#748 by neko » 10 Dec 2019, 00:14

1. A new kernel version series 5.5-rc was introduced.
The AUFS patch cannot be applied yet and was built with overlay FS.

Note 1: AUFS patch
AUFS patch is not yet ready for kernel v5.5-rc.
Applying AUFS patch "5.x-rcN-20191021" to kernel 5.5-rc has some patching errors.

Code: Select all

# patch -p1 < ../../aufs.patch
patching file Documentation/ABI/testing/debugfs-aufs
patching file Documentation/ABI/testing/sysfs-aufs
patching file Documentation/filesystems/aufs/README
patching file Documentation/filesystems/aufs/design/01intro.txt
patching file Documentation/filesystems/aufs/design/02struct.txt
patching file Documentation/filesystems/aufs/design/03atomic_open.txt
patching file Documentation/filesystems/aufs/design/03lookup.txt
patching file Documentation/filesystems/aufs/design/04branch.txt
patching file Documentation/filesystems/aufs/design/05wbr_policy.txt
patching file Documentation/filesystems/aufs/design/06dirren.dot
patching file Documentation/filesystems/aufs/design/06dirren.txt
patching file Documentation/filesystems/aufs/design/06fhsm.txt
patching file Documentation/filesystems/aufs/design/06mmap.txt
patching file Documentation/filesystems/aufs/design/06xattr.txt
patching file Documentation/filesystems/aufs/design/07export.txt
patching file Documentation/filesystems/aufs/design/08shwh.txt
patching file Documentation/filesystems/aufs/design/10dynop.txt
patching file fs/aufs/Kconfig
patching file fs/aufs/Makefile
patching file fs/aufs/aufs.h
patching file fs/aufs/branch.c
patching file fs/aufs/branch.h
patching file fs/aufs/conf.mk
patching file fs/aufs/cpup.c
patching file fs/aufs/cpup.h
patching file fs/aufs/dbgaufs.c
patching file fs/aufs/dbgaufs.h
patching file fs/aufs/dcsub.c
patching file fs/aufs/dcsub.h
patching file fs/aufs/debug.c
patching file fs/aufs/debug.h
patching file fs/aufs/dentry.c
patching file fs/aufs/dentry.h
patching file fs/aufs/dinfo.c
patching file fs/aufs/dir.c
patching file fs/aufs/dir.h
patching file fs/aufs/dirren.c
patching file fs/aufs/dirren.h
patching file fs/aufs/dynop.c
patching file fs/aufs/dynop.h
patching file fs/aufs/export.c
patching file fs/aufs/f_op.c
patching file fs/aufs/fhsm.c
patching file fs/aufs/file.c
patching file fs/aufs/file.h
patching file fs/aufs/finfo.c
patching file fs/aufs/fstype.h
patching file fs/aufs/hbl.h
patching file fs/aufs/hfsnotify.c
patching file fs/aufs/hfsplus.c
patching file fs/aufs/hnotify.c
patching file fs/aufs/i_op.c
patching file fs/aufs/i_op_add.c
patching file fs/aufs/i_op_del.c
patching file fs/aufs/i_op_ren.c
patching file fs/aufs/iinfo.c
patching file fs/aufs/inode.c
patching file fs/aufs/inode.h
patching file fs/aufs/ioctl.c
patching file fs/aufs/lcnt.h
patching file fs/aufs/loop.c
patching file fs/aufs/loop.h
patching file fs/aufs/magic.mk
patching file fs/aufs/module.c
patching file fs/aufs/module.h
patching file fs/aufs/mvdown.c
patching file fs/aufs/opts.c
patching file fs/aufs/opts.h
patching file fs/aufs/plink.c
patching file fs/aufs/poll.c
patching file fs/aufs/posix_acl.c
patching file fs/aufs/procfs.c
patching file fs/aufs/rdu.c
patching file fs/aufs/rwsem.h
patching file fs/aufs/sbinfo.c
patching file fs/aufs/super.c
patching file fs/aufs/super.h
patching file fs/aufs/sysaufs.c
patching file fs/aufs/sysaufs.h
patching file fs/aufs/sysfs.c
patching file fs/aufs/sysrq.c
patching file fs/aufs/vdir.c
patching file fs/aufs/vfsub.c
patching file fs/aufs/vfsub.h
patching file fs/aufs/wbr_policy.c
patching file fs/aufs/whout.c
patching file fs/aufs/whout.h
patching file fs/aufs/wkq.c
patching file fs/aufs/wkq.h
patching file fs/aufs/xattr.c
patching file fs/aufs/xino.c
patching file include/uapi/linux/aufs_type.h
patching file MAINTAINERS
Hunk #1 succeeded at 2874 (offset 52 lines).
patching file drivers/block/loop.c
Hunk #1 succeeded at 750 (offset 12 lines).
patching file fs/dcache.c
Hunk #1 succeeded at 1266 (offset 2 lines).
patching file fs/fcntl.c
patching file fs/inode.c
Hunk #1 succeeded at 1673 (offset 3 lines).
patching file fs/namespace.c
patching file fs/read_write.c
patching file fs/splice.c
Hunk #1 succeeded at 849 (offset 15 lines).
Hunk #2 succeeded at 866 (offset 15 lines).
patching file fs/sync.c
patching file include/linux/fs.h
Hunk #1 succeeded at 1349 (offset 18 lines).
Hunk #2 succeeded at 1843 (offset 32 lines).
Hunk #3 succeeded at 1914 (offset 32 lines).
Hunk #4 succeeded at 2340 (offset 34 lines).
Hunk #5 succeeded at 2629 (offset 34 lines).
patching file include/linux/lockdep.h
Hunk #1 succeeded at 331 (offset -3 lines).
Hunk #2 succeeded at 474 (offset -4 lines).
patching file include/linux/mnt_namespace.h
patching file include/linux/splice.h
patching file kernel/locking/lockdep.c
patching file fs/Kconfig
Hunk #1 FAILED at 261.
1 out of 1 hunk FAILED -- saving rejects to file fs/Kconfig.rej
patching file fs/Makefile
Hunk #1 FAILED at 130.
1 out of 1 hunk FAILED -- saving rejects to file fs/Makefile.rej
patching file drivers/block/loop.c
Hunk #1 succeeded at 635 (offset 10 lines).
Hunk #2 succeeded at 699 (offset 12 lines).
Hunk #3 succeeded at 719 (offset 12 lines).
Hunk #4 succeeded at 743 (offset 12 lines).
Hunk #5 succeeded at 757 (offset 12 lines).
Hunk #6 succeeded at 767 (offset 12 lines).
Hunk #7 succeeded at 973 (offset 12 lines).
Hunk #8 succeeded at 989 (offset 12 lines).
Hunk #9 succeeded at 1043 (offset 12 lines).
Hunk #10 succeeded at 1097 (offset 22 lines).
Hunk #11 succeeded at 1145 (offset 22 lines).
Hunk #12 succeeded at 1169 (offset 22 lines).
Hunk #13 succeeded at 1253 (offset 23 lines).
patching file drivers/block/loop.h
patching file fs/aufs/f_op.c
Hunk #1 succeeded at 369 (offset 10 lines).
patching file fs/aufs/loop.c
Hunk #1 succeeded at 146 (offset 13 lines).
patching file fs/aufs/loop.h
Hunk #1 succeeded at 39 (offset 13 lines).
Hunk #2 succeeded at 51 (offset 13 lines).
patching file fs/aufs/super.c
Hunk #1 succeeded at 857 (offset 13 lines).
patching file include/linux/fs.h
Hunk #1 succeeded at 1980 (offset 32 lines).
patching file fs/proc/base.c
patching file fs/proc/nommu.c
patching file fs/proc/task_mmu.c
Hunk #2 succeeded at 1822 with fuzz 2 (offset 12 lines).
patching file fs/proc/task_nommu.c
patching file include/linux/mm.h
Hunk #1 succeeded at 1495 (offset -43 lines).
patching file include/linux/mm_types.h
Hunk #1 succeeded at 267 (offset 5 lines).
Hunk #2 succeeded at 342 (offset 5 lines).
patching file kernel/fork.c
Hunk #1 succeeded at 565 (offset 12 lines).
patching file mm/Makefile
Hunk #1 succeeded at 42 (offset 3 lines).
patching file mm/filemap.c
Hunk #1 succeeded at 2675 (offset -46 lines).
patching file mm/mmap.c
Hunk #2 succeeded at 915 (offset -16 lines).
Hunk #3 succeeded at 1843 (offset -4 lines).
Hunk #4 succeeded at 2673 (offset -7 lines).
Hunk #5 succeeded at 2692 (offset -7 lines).
Hunk #6 succeeded at 2884 (offset -6 lines).
Hunk #7 succeeded at 2959 (offset -6 lines).
Hunk #8 succeeded at 3270 (offset -5 lines).
patching file mm/nommu.c
Hunk #1 succeeded at 563 (offset 11 lines).
Hunk #2 succeeded at 695 (offset 5 lines).
Hunk #3 succeeded at 1218 (offset 5 lines).
Hunk #4 succeeded at 1295 (offset 5 lines).
patching file mm/prfile.c
patching file fs/dcache.c
Hunk #1 succeeded at 1371 (offset 2 lines).
Hunk #2 succeeded at 2917 (offset 2 lines).
patching file fs/exec.c
Hunk #1 succeeded at 109 (offset -1 lines).
patching file fs/fcntl.c
patching file fs/file_table.c
Hunk #2 succeeded at 313 with fuzz 2 (offset -15 lines).
Hunk #3 succeeded at 377 (offset 1 line).
patching file fs/inode.c
Hunk #1 succeeded at 1682 (offset 3 lines).
patching file fs/namespace.c
Hunk #3 succeeded at 1905 (offset 3 lines).
patching file fs/notify/group.c
Hunk #2 FAILED at 109.
Hunk #3 FAILED at 138.
2 out of 3 hunks FAILED -- saving rejects to file fs/notify/group.c.rej
patching file fs/notify/mark.c
Reversed (or previously applied) patch detected!  Assume -R? [n] n
Apply anyway? [n] n
Skipping patch.
4 out of 4 hunks ignored -- saving rejects to file fs/notify/mark.c.rej
patching file fs/open.c
patching file fs/read_write.c
patching file fs/splice.c
Hunk #1 succeeded at 862 (offset 15 lines).
Hunk #2 succeeded at 892 (offset 15 lines).
patching file fs/sync.c
patching file fs/xattr.c
patching file kernel/locking/lockdep.c
patching file kernel/task_work.c
patching file security/device_cgroup.c
Hunk #1 FAILED at 824.
1 out of 1 hunk FAILED -- saving rejects to file security/device_cgroup.c.rej
patching file security/security.c
Hunk #1 succeeded at 1036 (offset 40 lines).
Hunk #2 succeeded at 1053 (offset 40 lines).
Hunk #3 succeeded at 1062 (offset 40 lines).
Hunk #4 succeeded at 1090 (offset 40 lines).
Hunk #5 succeeded at 1098 (offset 40 lines).
Hunk #6 succeeded at 1106 (offset 40 lines).
Hunk #7 succeeded at 1207 (offset 40 lines).
Hunk #8 succeeded at 1385 (offset 40 lines).
patching file include/linux/lockdep.h
patching file kernel/locking/lockdep.c
Hunk #1 succeeded at 4764 (offset 72 lines).
patching file kernel/locking/lockdep_internals.h
Hunk #1 FAILED at 93.
1 out of 1 hunk FAILED -- saving rejects to file kernel/locking/lockdep_internals.h.rej
patching file fs/mount.h
patching file fs/namespace.c
Hunk #1 succeeded at 1254 (offset 8 lines).
patching file fs/proc_namespace.c
patching file include/linux/shmem_fs.h
patching file mm/shmem.c
Hunk #1 succeeded at 128 (offset 15 lines).
Hunk #2 succeeded at 1115 (offset 15 lines).
Hunk #3 succeeded at 2249 (offset 20 lines).
Hunk #4 succeeded at 2299 (offset 20 lines).
Hunk #5 succeeded at 3323 (offset 20 lines).
Hunk #6 succeeded at 3343 (offset 20 lines).
Hunk #7 succeeded at 3359 (offset 20 lines).
Hunk #8 FAILED at 3411.
Hunk #9 FAILED at 3476.
Hunk #10 succeeded at 3605 (offset 80 lines).
Hunk #11 succeeded at 3629 (offset 80 lines).
Hunk #12 FAILED at 3569.
Hunk #13 succeeded at 3782 (offset 108 lines).
Hunk #14 succeeded at 3931 (offset 121 lines).
3 out of 14 hunks FAILED -- saving rejects to file mm/shmem.c.rej
patching file fs/inode.c
Hunk #1 succeeded at 885 (offset 3 lines).
Hunk #2 succeeded at 899 (offset 3 lines).
#
A compile error occurs even if the patch is applied in the same way as v5.4.

Code: Select all

fs/aufs/i_op.c: In function 'au_pin_hdir_release':
fs/aufs/i_op.c:659:65: error: macro "rwsem_release" passed 3 arguments, but takes just 2
  659 |   rwsem_release(&p->hdir->hi_inode->i_rwsem.dep_map, 1, _RET_IP_);
      |                                                                 ^
In file included from ./include/linux/rcupdate.h:29,
                 from ./include/linux/rculist.h:11,
                 from ./include/linux/pid.h:5,
                 from ./include/linux/sched.h:14,
                 from ././include/uapi/linux/aufs_type.h:31,
                 from <command-line>:
./include/linux/lockdep.h:613: note: macro "rwsem_release" defined here
  613 | #define rwsem_release(l, i)   lock_release(l, i)
      | 
fs/aufs/i_op.c:659:3: error: 'rwsem_release' undeclared (first use in this function); did you mean 'seq_release'?
  659 |   rwsem_release(&p->hdir->hi_inode->i_rwsem.dep_map, 1, _RET_IP_);
      |   ^~~~~~~~~~~~~
      |   seq_release
fs/aufs/i_op.c:659:3: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [scripts/Makefile.build:266: fs/aufs/i_op.o] Error 1
make[1]: *** [scripts/Makefile.build:503: fs/aufs] Error 2
make: *** [Makefile:1692: fs] Error 2

Note 2: kernel 5.5-rc config
==== Change the config from 5.4 to 5.5 by "make oldconfig" command with following spec. ====
[32bit]

Code: Select all

Processor family
  1. 486SX (M486SX) (NEW)
  2. 486DX (M486)
  3. 586/K5/5x86/6x86/6x86MX (M586)
  4. Pentium-Classic (M586TSC)
  5. Pentium-MMX (M586MMX)
> 6. Pentium-Pro (M686)
  7. Pentium-II/Celeron(pre-Coppermine) (MPENTIUMII)
  8. Pentium-III/Celeron(Coppermine)/Pentium-III Xeon (MPENTIUMIII)
  9. Pentium M (MPENTIUMM)
  10. Pentium-4/Celeron(P4-based)/Pentium-4 M/older Xeon (MPENTIUM4)
  11. K6/K6-II/K6-III (MK6)
  12. Athlon/Duron/K7 (MK7)
  13. Opteron/Athlon64/Hammer/K8 (MK8)
  14. Crusoe (MCRUSOE)
  15. Efficeon (MEFFICEON)
  16. Winchip-C6 (MWINCHIPC6)
  17. Winchip-2/Winchip-2A/Winchip-3 (MWINCHIP3D)
  18. AMD Elan (MELAN)
  19. GeodeGX1 (MGEODEGX1)
  20. Geode GX/LX (MGEODE_LX)
  21. CyrixIII/VIA-C3 (MCYRIXIII)
  22. VIA C3-2 (Nehemiah) (MVIAC3_2)
  23. VIA C7 (MVIAC7)
  24. Core 2/newer Xeon (MCORE2)
  25. Intel Atom (MATOM)
choice[1-25?]: 6
IOPERM and IOPL Emulation (X86_IOPL_IOPERM) [Y/n/?] (NEW) n
User Mode Instruction Prevention (X86_UMIP) [Y/n/?] (NEW) n
Enable firmware caching during suspend (FW_CACHE) [Y/n/?] (NEW) n
NVMe hardware monitoring (NVME_HWMON) [N/y/?] (NEW) n
Texas Instruments DP83869 Gigabit PHY (DP83869_PHY) [N/m/?] (NEW) n
IDT CLOCKMATRIX as PTP clock (PTP_1588_CLOCK_IDTCM) [N/m/y/?] (NEW) n

Intel Tiger Lake pinctrl and GPIO driver (PINCTRL_TIGERLAKE) [N/m/y/?] (NEW) y
Generic pinctrl and GPIO driver for Intel Lightning Mountain SoC (PINCTRL_EQUILIBRIUM) [N/m/y/?] (NEW) y

Analog Devices LTC2947 High Precision Power and Energy Monitor over I2C (SENSORS_LTC2947_I2C) [N/m/y/?] (NEW) n
Analog Devices LTC2947 High Precision Power and Energy Monitor over SPI (SENSORS_LTC2947_SPI) [N/m/y/?] (NEW) n
Bel PFE Compatible Power Supplies (SENSORS_BEL_PFE) [N/m/?] (NEW) n
Texas Instruments TMP513 and compatibles (SENSORS_TMP513) [N/m/y/?] (NEW) n
Enable refcount backtrace history in the DP MST helpers (DRM_DEBUG_DP_MST_TOPOLOGY_REFS) [N/y/?] (NEW) n
Enable HDCP support in DC (DRM_AMD_DC_HDCP) [N/y/?] (NEW) n

Interval between heartbeat pulses (ms) (DRM_I915_HEARTBEAT_INTERVAL) [2500] (NEW) 
Preempt timeout (ms, jiffy granularity) (DRM_I915_PREEMPT_TIMEOUT) [640] (NEW) 
Busywait for request completion (us) (DRM_I915_SPIN_REQUEST) [5] 5
How long to wait for an engine to quiesce gracefully before reset (ms) (DRM_I915_STOP_TIMEOUT) [100] (NEW) 
Scheduling quantum for userspace batches (ms, jiffy granularity) (DRM_I915_TIMESLICE_DURATION) [1] (NEW) 


Qualcomm PMIC WLED Driver (BACKLIGHT_QCOM_WLED) [N/m/y/?] (NEW) n
TI HD3SS3220 Type-C DRP Port controller driver (TYPEC_HD3SS3220) [N/m/?] (NEW) n
Sifive PDMA controller driver (SF_PDMA) [N/m/y/?] (NEW) n
Support for small TFT LCD display modules (FB_TFT) [N/m/y/?] (NEW) n
Silicon Labs wireless chips WF200 and further (WFX) [N/m/?] (NEW) n
System76 ACPI Driver (SYSTEM76_ACPI) [N/m/y/?] (NEW) n
Curve25519 algorithm (CRYPTO_CURVE25519) [N/m/y/?] (NEW) n

BLAKE2b digest algorithm (CRYPTO_BLAKE2B) [N/m/y/?] (NEW) m
  BLAKE2s digest algorithm (CRYPTO_BLAKE2S) [N/m/y/?] (NEW) m
  BLAKE2s hash function library (CRYPTO_LIB_BLAKE2S) [N/m/y/?] (NEW) m
ChaCha library interface (CRYPTO_LIB_CHACHA) [N/m/y/?] (NEW) m
Curve25519 scalar multiplication library (CRYPTO_LIB_CURVE25519) [N/m/y/?] (NEW) m
Poly1305 library interface (CRYPTO_LIB_POLY1305) [N/m/y/?] (NEW) m
ChaCha20-Poly1305 AEAD support (8-byte nonce library version) (CRYPTO_LIB_CHACHA20POLY1305) [N/m/y/?] (NEW) m
Support for amlogic cryptographic offloader (CRYPTO_DEV_AMLOGIC_GXL) [N/m/y/?] (NEW) m

Enable amlogic stats (CRYPTO_DEV_AMLOGIC_GXL_DEBUG) [N/y/?] (NEW) n
Support symbolic error names in printf (SYMBOLIC_ERRNAME) [Y/n/?] (NEW) n
KUnit - Enable support for unit tests (KUNIT) [N/y/?] (NEW) n
[64bit]

Code: Select all

IOPERM and IOPL Emulation (X86_IOPL_IOPERM) [Y/n/?] (NEW) n
User Mode Instruction Prevention (X86_UMIP) [Y/n/?] (NEW) n
Enable firmware caching during suspend (FW_CACHE) [Y/n/?] (NEW) n
NVMe hardware monitoring (NVME_HWMON) [N/y/?] (NEW) n
Texas Instruments DP83869 Gigabit PHY (DP83869_PHY) [N/m/?] (NEW) n
IDT CLOCKMATRIX as PTP clock (PTP_1588_CLOCK_IDTCM) [N/m/y/?] (NEW) n

Intel Tiger Lake pinctrl and GPIO driver (PINCTRL_TIGERLAKE) [N/m/y/?] (NEW) y
Generic pinctrl and GPIO driver for Intel Lightning Mountain SoC (PINCTRL_EQUILIBRIUM) [N/m/y/?] (NEW) y

Analog Devices LTC2947 High Precision Power and Energy Monitor over I2C (SENSORS_LTC2947_I2C) [N/m/y/?] (NEW) n
Analog Devices LTC2947 High Precision Power and Energy Monitor over SPI (SENSORS_LTC2947_SPI) [N/m/y/?] (NEW) n
Bel PFE Compatible Power Supplies (SENSORS_BEL_PFE) [N/m/?] (NEW) n
Texas Instruments TMP513 and compatibles (SENSORS_TMP513) [N/m/y/?] (NEW) n
Enable refcount backtrace history in the DP MST helpers (DRM_DEBUG_DP_MST_TOPOLOGY_REFS) [N/y/?] (NEW) n
Enable HDCP support in DC (DRM_AMD_DC_HDCP) [N/y/?] (NEW) n

Interval between heartbeat pulses (ms) (DRM_I915_HEARTBEAT_INTERVAL) [2500] (NEW) 
Preempt timeout (ms, jiffy granularity) (DRM_I915_PREEMPT_TIMEOUT) [640] (NEW) 
Busywait for request completion (us) (DRM_I915_SPIN_REQUEST) [5] 5
How long to wait for an engine to quiesce gracefully before reset (ms) (DRM_I915_STOP_TIMEOUT) [100] (NEW) 
Scheduling quantum for userspace batches (ms, jiffy granularity) (DRM_I915_TIMESLICE_DURATION) [1] (NEW) 

Qualcomm PMIC WLED Driver (BACKLIGHT_QCOM_WLED) [N/m/y/?] (NEW) n
TI HD3SS3220 Type-C DRP Port controller driver (TYPEC_HD3SS3220) [N/m/?] (NEW) n
Sifive PDMA controller driver (SF_PDMA) [N/m/y/?] (NEW) n
Support for small TFT LCD display modules (FB_TFT) [N/m/y/?] (NEW) n
Silicon Labs wireless chips WF200 and further (WFX) [N/m/?] (NEW) n
System76 ACPI Driver (SYSTEM76_ACPI) [N/m/y/?] (NEW) n
Curve25519 algorithm (CRYPTO_CURVE25519) [N/m/y/?] (NEW) n
x86_64 accelerated Curve25519 scalar multiplication library (CRYPTO_CURVE25519_X86) [N/m/y/?] (NEW) n

BLAKE2b digest algorithm (CRYPTO_BLAKE2B) [N/m/y/?] (NEW) m
BLAKE2s digest algorithm (CRYPTO_BLAKE2S) [N/m/y/?] (NEW) m
BLAKE2s digest algorithm (x86 accelerated version) (CRYPTO_BLAKE2S_X86) [N/m/y/?] (NEW) m
BLAKE2s hash function library (CRYPTO_LIB_BLAKE2S) [N/m/?] (NEW) m
ChaCha library interface (CRYPTO_LIB_CHACHA) [N/m/?] (NEW) m
Curve25519 scalar multiplication library (CRYPTO_LIB_CURVE25519) [N/m/y/?] (NEW) m
Poly1305 library interface (CRYPTO_LIB_POLY1305) [N/m/y/?] (NEW) m
ChaCha20-Poly1305 AEAD support (8-byte nonce library version) (CRYPTO_LIB_CHACHA20POLY1305) [N/m/?] (NEW) m
Support for amlogic cryptographic offloader (CRYPTO_DEV_AMLOGIC_GXL) [N/m/y/?] (NEW) m

Enable amlogic stats (CRYPTO_DEV_AMLOGIC_GXL_DEBUG) [N/y/?] (NEW) n
Support symbolic error names in printf (SYMBOLIC_ERRNAME) [Y/n/?] (NEW) n
KUnit - Enable support for unit tests (KUNIT) [N/y/?] (NEW) n
Please refer to the top article of this thread.
Porteus Kernel Builder


2. Overlayfs ISO: trial version

Porteus v5.0rc1 OPENBOX 64Bit + integrated initrd.xz + Kernel 5.5-rc1 without AUFS patch (= Overlayfs)

OV.Porteus-OPENBOX-v5.0rc1-k5.5-rc1-x86_64.iso (340 M)
http://www.mediafire.com/file/u6byigkbe ... x86_64.iso
md5sum: 59eefc755f30fc11d82244c6b60679c6 OV.Porteus-OPENBOX-v5.0rc1-k5.5-rc1-x86_64.iso


Thanks.

fulalas
DEV Team
DEV Team
Posts: 2050
Joined: 26 Oct 2016, 15:34
Distribution: Porteus
Location: Brazil

Porteus Kernel Builder

Post#749 by fulalas » 10 Dec 2019, 06:41

@neko, is there any limitation in the current 5.4.2 x64? Thanks!

neko
DEV Team
DEV Team
Posts: 2109
Joined: 09 Feb 2013, 09:55
Distribution: APorteus-FVWM-ja-x86_64.iso
Location: japan

Porteus Kernel Builder

Post#750 by neko » 10 Dec 2019, 11:14

@fulalas

==== 5.4.2 x64 kernel limitation ====
[about kernel function]
please refer the document on kernel 5.4.
example:
https://www.fosslinux.com/25050/linux-k ... upport.htm

And then check the correspond config parameter.
example: "exFAT Support"

Code: Select all

% grep EXFAT /usr/local/share/mkKernel/lib/v5.4/64bit.config
CONFIG_EXFAT_FS=y
CONFIG_EXFAT_DONT_MOUNT_VFAT=y
CONFIG_EXFAT_DISCARD=y
# CONFIG_EXFAT_DELAYED_SYNC is not set
# CONFIG_EXFAT_KERNEL_DEBUG is not set
# CONFIG_EXFAT_DEBUG_MSG is not set
CONFIG_EXFAT_DEFAULT_CODEPAGE=437
CONFIG_EXFAT_DEFAULT_IOCHARSET="utf8"
%

[about AUFS patch that was patched]
please refer the "aufs5-standalone.git/Documentation/filesystems/aufs/README"

Code: Select all

Aufs5 -- advanced multi layered unification filesystem version 5.x
http://aufs.sf.net
Junjiro R. Okajima


0. Introduction
----------------------------------------
In the early days, aufs was entirely re-designed and re-implemented
Unionfs Version 1.x series. Adding many original ideas, approaches,
improvements and implementations, it became totally different from
Unionfs while keeping the basic features.
Later, Unionfs Version 2.x series began taking some of the same
approaches to aufs1's.
Unionfs was being developed by Professor Erez Zadok at Stony Brook
University and his team.

Aufs5 supports linux-v5.0 and later, If you want older kernel version
support,
- for linux-v4.x series, try aufs4-linux.git or aufs4-standalone.git
- for linux-v3.x series, try aufs3-linux.git or aufs3-standalone.git
- for linux-v2.6.16 and later, try aufs2-2.6.git, aufs2-standalone.git
  or aufs1 from CVS on SourceForge.

Note: it becomes clear that "Aufs was rejected. Let's give it up."
      According to Christoph Hellwig, linux rejects all union-type
      filesystems but UnionMount.
<http://marc.info/?l=linux-kernel&m=123938533724484&w=2>

PS. Al Viro seems have a plan to merge aufs as well as overlayfs and
    UnionMount, and he pointed out an issue around a directory mutex
    lock and aufs addressed it. But it is still unsure whether aufs will
    be merged (or any other union solution).
<http://marc.info/?l=linux-kernel&m=136312705029295&w=1>


1. Features
----------------------------------------
- unite several directories into a single virtual filesystem. The member
  directory is called as a branch.
- you can specify the permission flags to the branch, which are 'readonly',
  'readwrite' and 'whiteout-able.'
- by upper writable branch, internal copyup and whiteout, files/dirs on
  readonly branch are modifiable logically.
- dynamic branch manipulation, add, del.
- etc...

Also there are many enhancements in aufs, such as:
- test only the highest one for the directory permission (dirperm1)
- copyup on open (coo=)
- 'move' policy for copy-up between two writable branches, after
  checking free space.
- xattr, acl
- readdir(3) in userspace.
- keep inode number by external inode number table
- keep the timestamps of file/dir in internal copyup operation
- seekable directory, supporting NFS readdir.
- whiteout is hardlinked in order to reduce the consumption of inodes
  on branch
- do not copyup, nor create a whiteout when it is unnecessary
- revert a single systemcall when an error occurs in aufs
- remount interface instead of ioctl
- maintain /etc/mtab by an external command, /sbin/mount.aufs.
- loopback mounted filesystem as a branch
- kernel thread for removing the dir who has a plenty of whiteouts
- support copyup sparse file (a file which has a 'hole' in it)
- default permission flags for branches
- selectable permission flags for ro branch, whether whiteout can
  exist or not
- export via NFS.
- support <sysfs>/fs/aufs and <debugfs>/aufs.
- support multiple writable branches, some policies to select one
  among multiple writable branches.
- a new semantics for link(2) and rename(2) to support multiple
  writable branches.
- no glibc changes are required.
- pseudo hardlink (hardlink over branches)
- allow a direct access manually to a file on branch, e.g. bypassing aufs.
  including NFS or remote filesystem branch.
- userspace wrapper for pathconf(3)/fpathconf(3) with _PC_LINK_MAX.
- and more...

Currently these features are dropped temporary from aufs5.
See design/08plan.txt in detail.
- nested mount, i.e. aufs as readonly no-whiteout branch of another aufs
  (robr)
- statistics of aufs thread (/sys/fs/aufs/stat)

Features or just an idea in the future (see also design/*.txt),
- reorder the branch index without del/re-add.
- permanent xino files for NFSD
- an option for refreshing the opened files after add/del branches
- light version, without branch manipulation. (unnecessary?)
- copyup in userspace
- inotify in userspace
- readv/writev


2. Download
----------------------------------------
There are three GIT trees for aufs5, aufs5-linux.git,
aufs5-standalone.git, and aufs-util.git. Note that there is no "5" in
"aufs-util.git."
While the aufs-util is always necessary, you need either of aufs5-linux
or aufs5-standalone.

The aufs5-linux tree includes the whole linux mainline GIT tree,
git://git.kernel.org/.../torvalds/linux.git.
And you cannot select CONFIG_AUFS_FS=m for this version, eg. you cannot
build aufs5 as an external kernel module.
Several extra patches are not included in this tree. Only
aufs5-standalone tree contains them. They are described in the later
section "Configuration and Compilation."

On the other hand, the aufs5-standalone tree has only aufs source files
and necessary patches, and you can select CONFIG_AUFS_FS=m.
But you need to apply all aufs patches manually.

You will find GIT branches whose name is in form of "aufs5.x" where "x"
represents the linux kernel version, "linux-5.x". For instance,
"aufs5.0" is for linux-5.0. For latest "linux-5.x-rcN", use
"aufs5.x-rcN" branch.

o aufs5-linux tree
$ git clone --reference /your/linux/git/tree \
	git://github.com/sfjro/aufs5-linux.git aufs5-linux.git
- if you don't have linux GIT tree, then remove "--reference ..."
$ cd aufs5-linux.git
$ git checkout origin/aufs5.0

Or You may want to directly git-pull aufs into your linux GIT tree, and
leave the patch-work to GIT.
$ cd /your/linux/git/tree
$ git remote add aufs5 git://github.com/sfjro/aufs5-linux.git
$ git fetch aufs5
$ git checkout -b my5.0 v5.0
$ (add your local change...)
$ git pull aufs5 aufs5.0
- now you have v5.0 + your_changes + aufs5.0 in you my5.0 branch.
- you may need to solve some conflicts between your_changes and
  aufs5.0. in this case, git-rerere is recommended so that you can
  solve the similar conflicts automatically when you upgrade to 5.1 or
  later in the future.

o aufs5-standalone tree
$ git clone git://github.com/sfjro/aufs5-standalone.git aufs5-standalone.git
$ cd aufs5-standalone.git
$ git checkout origin/aufs5.0

o aufs-util tree
$ git clone git://git.code.sf.net/p/aufs/aufs-util aufs-util.git
- note that the public aufs-util.git is on SourceForge instead of
  GitHUB.
$ cd aufs-util.git
$ git checkout origin/aufs5.0

Note: The 5.x-rcN branch is to be used with `rc' kernel versions ONLY.
The minor version number, 'x' in '5.x', of aufs may not always
follow the minor version number of the kernel.
Because changes in the kernel that cause the use of a new
minor version number do not always require changes to aufs-util.

Since aufs-util has its own minor version number, you may not be
able to find a GIT branch in aufs-util for your kernel's
exact minor version number.
In this case, you should git-checkout the branch for the
nearest lower number.

For (an unreleased) example:
If you are using "linux-5.10" and the "aufs5.10" branch
does not exist in aufs-util repository, then "aufs5.9", "aufs5.8"
or something numerically smaller is the branch for your kernel.

Also you can view all branches by
	$ git branch -a


3. Configuration and Compilation
----------------------------------------
Make sure you have git-checkout'ed the correct branch.

For aufs5-linux tree,
- enable CONFIG_AUFS_FS.
- set other aufs configurations if necessary.

For aufs5-standalone tree,
There are several ways to build.

1.
- apply ./aufs5-kbuild.patch to your kernel source files.
- apply ./aufs5-base.patch too.
- apply ./aufs5-mmap.patch too.
- apply ./aufs5-standalone.patch too, if you have a plan to set
  CONFIG_AUFS_FS=m. otherwise you don't need ./aufs5-standalone.patch.
- copy ./{Documentation,fs,include/uapi/linux/aufs_type.h} files to your
  kernel source tree. Never copy $PWD/include/uapi/linux/Kbuild.
- enable CONFIG_AUFS_FS, you can select either
  =m or =y.
- and build your kernel as usual.
- install the built kernel.
- install the header files too by "make headers_install" to the
  directory where you specify. By default, it is $PWD/usr.
  "make help" shows a brief note for headers_install.
- and reboot your system.

2.
- module only (CONFIG_AUFS_FS=m).
- apply ./aufs5-base.patch to your kernel source files.
- apply ./aufs5-mmap.patch too.
- apply ./aufs5-standalone.patch too.
- build your kernel, don't forget "make headers_install", and reboot.
- edit ./config.mk and set other aufs configurations if necessary.
  Note: You should read $PWD/fs/aufs/Kconfig carefully which describes
  every aufs configurations.
- build the module by simple "make".
- you can specify ${KDIR} make variable which points to your kernel
  source tree.
- install the files
  + run "make install" to install the aufs module, or copy the built
    $PWD/aufs.ko to /lib/modules/... and run depmod -a (or reboot simply).
  + run "make install_headers" (instead of headers_install) to install
    the modified aufs header file (you can specify DESTDIR which is
    available in aufs standalone version's Makefile only), or copy
    $PWD/usr/include/linux/aufs_type.h to /usr/include/linux or wherever
    you like manually. By default, the target directory is $PWD/usr.
- no need to apply aufs5-kbuild.patch, nor copying source files to your
  kernel source tree.

Note: The header file aufs_type.h is necessary to build aufs-util
      as well as "make headers_install" in the kernel source tree.
      headers_install is subject to be forgotten, but it is essentially
      necessary, not only for building aufs-util.
      You may not meet problems without headers_install in some older
      version though.

And then,
- read README in aufs-util, build and install it
- note that your distribution may contain an obsoleted version of
  aufs_type.h in /usr/include/linux or something. When you build aufs
  utilities, make sure that your compiler refers the correct aufs header
  file which is built by "make headers_install."
- if you want to use readdir(3) in userspace or pathconf(3) wrapper,
  then run "make install_ulib" too. And refer to the aufs manual in
  detail.

There several other patches in aufs5-standalone.git. They are all
optional. When you meet some problems, they will help you.
- aufs5-loopback.patch
  Supports a nested loopback mount in a branch-fs. This patch is
  unnecessary until aufs produces a message like "you may want to try
  another patch for loopback file".
- proc_mounts.patch
  When there are many mountpoints and many mount(2)/umount(2) are
  running, then /proc/mounts may not show the all mountpoints.  This
  patch makes /proc/mounts always show the full mountpoints list.
  If you don't want to apply this patch and meet such problem, then you
  need to increase the value of 'ProcMounts_Times' make-variable in
  aufs-util.git as a second best solution.
- vfs-ino.patch
  Modifies a system global kernel internal function get_next_ino() in
  order to stop assigning 0 for an inode-number. Not directly related to
  aufs, but recommended generally.
- tmpfs-idr.patch
  Keeps the tmpfs inode number as the lowest value. Effective to reduce
  the size of aufs XINO files for tmpfs branch. Also it prevents the
  duplication of inode number, which is important for backup tools and
  other utilities. When you find aufs XINO files for tmpfs branch
  growing too much, try this patch.
- lockdep-debug.patch
  Because aufs is not only an ordinary filesystem (callee of VFS), but
  also a caller of VFS functions for branch filesystems, subclassing of
  the internal locks for LOCKDEP is necessary. LOCKDEP is a debugging
  feature of linux kernel. If you enable CONFIG_LOCKDEP, then you will
  need to apply this debug patch to expand several constant values.
  If don't know what LOCKDEP is, then you don't have apply this patch.


4. Usage
----------------------------------------
At first, make sure aufs-util are installed, and please read the aufs
manual, aufs.5 in aufs-util.git tree.
$ man -l aufs.5

And then,
$ mkdir /tmp/rw /tmp/aufs
# mount -t aufs -o br=/tmp/rw:${HOME} none /tmp/aufs

Here is another example. The result is equivalent.
# mount -t aufs -o br=/tmp/rw=rw:${HOME}=ro none /tmp/aufs
  Or
# mount -t aufs -o br:/tmp/rw none /tmp/aufs
# mount -o remount,append:${HOME} /tmp/aufs

Then, you can see whole tree of your home dir through /tmp/aufs. If
you modify a file under /tmp/aufs, the one on your home directory is
not affected, instead the same named file will be newly created under
/tmp/rw. And all of your modification to a file will be applied to
the one under /tmp/rw. This is called the file based Copy on Write
(COW) method.
Aufs mount options are described in aufs.5.
If you run chroot or something and make your aufs as a root directory,
then you need to customize the shutdown script. See the aufs manual in
detail.

Additionally, there are some sample usages of aufs which are a
diskless system with network booting, and LiveCD over NFS.
See sample dir in CVS tree on SourceForge.


5. Contact
----------------------------------------
When you have any problems or strange behaviour in aufs, please let me
know with:
- /proc/mounts (instead of the output of mount(8))
- /sys/module/aufs/*
- /sys/fs/aufs/* (if you have them)
- /debug/aufs/* (if you have them)
- linux kernel version
  if your kernel is not plain, for example modified by distributor,
  the url where i can download its source is necessary too.
- aufs version which was printed at loading the module or booting the
  system, instead of the date you downloaded.
- configuration (define/undefine CONFIG_AUFS_xxx)
- kernel configuration or /proc/config.gz (if you have it)
- behaviour which you think to be incorrect
- actual operation, reproducible one is better
- mailto: aufs-users at lists.sourceforge.net

Usually, I don't watch the Public Areas(Bugs, Support Requests, Patches,
and Feature Requests) on SourceForge. Please join and write to
aufs-users ML.


6. Acknowledgements
----------------------------------------
Thanks to everyone who have tried and are using aufs, whoever
have reported a bug or any feedback.

Especially donators:
Tomas Matejicek(slax.org) made a donation (much more than once).
	Since Apr 2010, Tomas M (the author of Slax and Linux Live
	scripts) is making "doubling" donations.
	Unfortunately I cannot list all of the donators, but I really
	appreciate.
	It ends Aug 2010, but the ordinary donation URL is still available.
	<http://sourceforge.net/donate/index.php?group_id=167503>
Dai Itasaka made a donation (2007/8).
Chuck Smith made a donation (2008/4, 10 and 12).
Henk Schoneveld made a donation (2008/9).
Chih-Wei Huang, ASUS, CTC donated Eee PC 4G (2008/10).
Francois Dupoux made a donation (2008/11).
Bruno Cesar Ribas and Luis Carlos Erpen de Bona, C3SL serves public
	aufs2 GIT tree (2009/2).
William Grant made a donation (2009/3).
Patrick Lane made a donation (2009/4).
The Mail Archive (mail-archive.com) made donations (2009/5).
Nippy Networks (Ed Wildgoose) made a donation (2009/7).
New Dream Network, LLC (www.dreamhost.com) made a donation (2009/11).
Pavel Pronskiy made a donation (2011/2).
Iridium and Inmarsat satellite phone retailer (www.mailasail.com), Nippy
	Networks (Ed Wildgoose) made a donation for hardware (2011/3).
Max Lekomcev (DOM-TV project) made a donation (2011/7, 12, 2012/3, 6 and
11).
Sam Liddicott made a donation (2011/9).
Era Scarecrow made a donation (2013/4).
Bor Ratajc made a donation (2013/4).
Alessandro Gorreta made a donation (2013/4).
POIRETTE Marc made a donation (2013/4).
Alessandro Gorreta made a donation (2013/4).
lauri kasvandik made a donation (2013/5).
"pemasu from Finland" made a donation (2013/7).
The Parted Magic Project made a donation (2013/9 and 11).
Pavel Barta made a donation (2013/10).
Nikolay Pertsev made a donation (2014/5).
James B made a donation (2014/7 and 2015/7).
Stefano Di Biase made a donation (2014/8).
Daniel Epellei made a donation (2015/1).
OmegaPhil made a donation (2016/1, 2018/4).
Tomasz Szewczyk made a donation (2016/4).
James Burry made a donation (2016/12).
Carsten Rose made a donation (2018/9).
Porteus Kiosk made a donation (2018/10).

Thank you very much.
Donations are always, including future donations, very important and
helpful for me to keep on developing aufs.


7.
----------------------------------------
If you are an experienced user, no explanation is needed. Aufs is
just a linux filesystem.


Enjoy!

# Local variables: ;
# mode: text;
# End: ;
About "3. Configuration and Compilation" of the "README",
please refer to the patching process.
Porteus Kernel Builder (Post by neko #74824)


Thanks.

Post Reply