Issues while porting Ubuntu Core 16 image for Olimex Lime2 platform board

I am trying to build a custom ubuntu-core image for Olimex Lime2 platform board with a custom gadget snap and kernel snap(“linux-armhf” ) already available on store.

I signed the assertion and have a valid assertion model. Below is my assertion:
{
“type”: “model”,
“series”: “16”,
“model”: “olimex-a20-olinuxino-lime2”,
“architecture”: “armhf”,
“kernel”: “linux-armhf”,
“gadget”: “olimex-a20-olinuxino-lime2”,
“authority-id”: “authority-id removed”,
“brand-id”: “brand-id removed”,
“timestamp”: “2017-05-23T05:32:36+00:00”
}

I have used below command to create custom build image.
$ sudo /snap/bin/ubuntu-image -c edge --image-size 4G --extra-snaps olimex-a20-olinuxino-lime2_16.04-0.8_armhf.snap --extra-snaps linux-armhf -O olimex-a20-olinuxino-lime2.img model/Olimex-lime2.model

When above command is issued to build custom image using ubuntu-image tool then core and linux kernel Image file is fetched properly from ubuntu store.
But when tool try to use linux kernel image then it is throwing error “cannot use linux-armhf kernel”. Please find below snippet of error.

Fetching core
Fetching linux-armhf
error: cannot use kernel “linux-armhf” published by “vxj7EkYOlg15uAHRswTXIUpzWqO2sTBi” for model by “JBnNNIwM0UkIctEoX5NQZYvef4rFeUc2”
COMMAND FAILED: snap prepare-image --channel=edge --extra-snaps=olimex-a20-olinuxino-lime2_16.04-0.8_armhf.snap --extra-snaps=linux-armhf model/Olimex-lime2.model /tmp/tmpajmccdln/unpack

Any help would be greatly appreciated.

the --extra-snaps option needs a full *.snap package name (like you use for the gadget snap in the --extra-snaps option right before) and the snap needs to be found on disk with this.

i also belive that linux-armhf is an old leftover, i’m not sure it will actually be usable/bootable.

@ogra what if I need to use kernel snap already available on store i.e. “linux-armhf”, do I need a *.snap package name then also? Actually I have written a gadget snap for olimex lime2 platform board and someone suggested instead of writing a kernel snap, I can simply use “linux-armhf” available on store. But you are saying that Linux-armhf is an old leftover. Does it means that I cannot use this kernel snap and I have to write my custom kernel-snap. Kindly guide me.

if you use a snap from the store you do not need to use --extra-snaps …

as the option name says, the option is to add local extra snaps to the image (or to override a snap from the store with a local one). the linux-armhf was an unstable test kernel from @mvo which has been removed from the store now as far as i’m aware …

your default image content gets defined in the model assertion, if all snaps listed there are in the store yu do not need --extra-snaps at all.

is the olimex board supported in linux mainline ?

Yes Olimex board is supported in mainline kernel.

@ogra can you give me any pointer to someone who can confirm that “linux-armhf” has been removed from store and it is unstable kernel to be used to make an Ubuntu core image.

FYI, I am not able to find “linux-armhf” kernel snap using snap find. I am using snapcraft version 2.29.