What is the minimal kernel config patch for all kernel release to use ubuntu-core?

Hello sir:
I am building my own gadget snap, kernel snap and core snap to adapt my own hardware platform.
I have two questions on kernel config patchs while building my kernal snap.
I know five extra configs should be added when building the kernel zImage.
My question is:
1. Apparmor patche have many versions to adapt kernel version from 2.6.36 to 4.15 according to latest apparmor-2.13.4. But I can find only one version of kernel config patch. So does kernel config patch really exist only one version for all kernel version and all target device platform?
2. What is the minimal kernel config modify to achive ubuntu-core? I mean what are the minimal kernel config change?

despite being old, see the “Kernel Config” paragraph in the README at:

here is the whole thing as a single patch:

take a look at the override-pull: step and at the kdefconfig: line to see how to apply/use them:

the required configs have largely not changed in a while so you should be safe just using them as is …

2 Likes

Got that. Thank you, ogra.
One more question is: can I change CONFIG_BLK_DEV_LOOP_MIN_COUNT from 256 to 200 or 128 or 64?
You know that CONFIG_BLK_DEV_LOOP_MIN_COUNT is changed from default value 8 to 256 according to snappy/snappy.config

well, snap packages are loop mounted squashfs files.

limiting the number of availabe loop devices effectively limits the number of snap packages you can install … (though this is just the minimal number indeed… )

1 Like

Got that. Thanks.
CONFIG_BLK_DEV_LOOP_MIN_COUNT=256 caused my first question posted here.
64, 128 or even 200 will not cause the problem but 256 will cause the problem.
So I will change it from 256 to 128 without any concern according to your reply.

I have two arm64 board(not raspi), only difference is ram size, 2GB and 4GB. if CONFIG_BLK_DEV_LOOP_MIN_COUNT=256 the 4GB board work fine, but 2GB board hang at starting kernel… if CONFIG_BLK_DEV_LOOP_MIN_COUNT=128, both work fine. kernel version is 4.9

Does anyone have the same issue on raspi 2GB board or other arm64 board? what is the root cause?