Hi all,
It would be useful to know the real path that bring a new release of kernel for the canonical supported board.
It is interesting for help the effort for porting other board to the snappy framework.
As we know, there is a tight dependence between kernel snap and core snap:
Seccomp
Apparmor
Cggroup
Namespaces
I understood that the core is build from this snap code Core Snap, but it is not very clear the process that bring a working kernel for the canonical supported board.
Can i suppose the following things?
the supported kernel are the same as supported for the LTS 16.04: 4.4, 4.8, 4.10
the reference repository is git://kernel.ubuntu.com/ubuntu/ubuntu-xenial.git
If these two assumptions are correct, the question is:
any tags on this repo is ready for build a kernel compatible for snap core - it mean to be patched with correct apparmor patch etc etc ?
the core snap is actually the most minimal OS to bring up snapd and boot a basic system, you do not change it when porting to a new board, but use the provided core snap from the store. hardware specific bits have to happen in the kernel and gadget snap packages.
for the kernel we currently default to the 16.04.* source (i.e. 4.4). if you use your own kernel tree (i.e. a BSP one) there are a few places to obtain teh apparmor patches for it.
you might want to watch this webinar for a few more details about Core images and how to assemble them, there are also links to the apparmor trees in the presentation.
Hi @ogra,
thanks for your answer and your webinar about internals of ubuntu core.
About core snap the process is clear: I donāt need to changes it and I think that changing core snap for each board is very useless in any case.
About Apparmor and version of kernel to use it is very clear now.
About kernel configuration the understanding for me need another bit of information:
In your webinar slide your redirect for kernel configuration to a web resource placeholders with āhereā:
in this way i canāt know where this information is located because the presentation is not clickable.
The board enablement overview point to a sample kernel for the series 3.10,3.14,3.18 e 4.4.
It is correct to suppose that the information about kernel configuration is placed in kernel/configs/?
Yes, any Ubuntu kernel will work fine with Ubuntu core ( LTS 16.04[1]: 4.4, 4.8, 4.10), but we have sample kernels for older releases too[2]: 3.10, 3.14, 3.18 and 4.4.
With regards to the kernel config, if you are using an ubuntu kernel, you can use the config there:
alias fdr=āfakeroot debian/rulesā
fdr clean
fdr prepare-generic
cp debian/build/build-generic/.config .config
while the sample kernels have the config options to apply on top your defconfig in kernel/configs/snappy[3].
oh, sorry, when i prepared the webinar i wasnt aware that the presentation wont be provided as a klickable doc alongside the webinar videoā¦ the āhereā link actually points to https://github.com/snapcore/sample-kernels/blob/master/README.md which includes links to the branches paolo points to.
thanks @ogra@ppisati for the shared informations.
We double check our porting of u-boot with the your porting on raspberry 2/3.
What is the rationale of the following part of the patch?
+#define CONFIG_PREBOOT "usb start; if test ! \"mmc dev 0\"; then " \
+ "fatload usb 0:1 0x3000000 "FAT_ENV_FILE"; " \
+ "env import -b 0x3000000; " \
+ "fi;"
If the rationale of this patch is permit the board to boot from usb, we found the following facts:
if test ! \"mmc dev 0\"; [1]
return always true.
Furthermore, because it is not checked the existence of FAT_ENV_FILE, the command
env import -b 0x3000000;
is always execute, so we can load garbage memory in uboot env.
Moreover it is necessary to remove the CRC pad from the file generate from mkenvimage for placing it on USB support.
Is this feature strictly necessary for porting ubuntu core on a new board?
this only works if you toggled the ROM of the board to default to USB boot as i understand it (which is a non-reversible setting in the pi ROM) ā¦ probably @abeato can expand on that, it is his addition ā¦
indeed, since you boot with an SD card plugged in it will always be true ā¦ (see above, teh pi needs to be toggled to USB boot and indeed there needs to be no SD card inserted, then the bootloader will try booting from USB key)
Iām trying to port my board (which uses a 3.10 kernel) to Core. So far, I could merge my kernel with the appropriate sample-kernel, adapt the defconfig and generate a kernel snap. I couldnāt test it yet because I still need to figure out some aspects from the gadget part, but would be good to confirm if this is still up to date before going further.
If youāre targeting to UC16, then it should be similar to my works (refer https://github.com/xapp-le/SnappyUbuntuCore).
If youāre looking for UC18 porting, maybe you have to remodel assertion to fit the UC18 spec.