Custom Kernel and Gadged Snap Issue for Eragon410 board based on Dragonboard410c and other build related issues
Sunny Bhayani
sunny.bhayani at einfochips.com
Mon Feb 6 14:09:47 UTC 2017
Hi Oliver,
Thank you for your time.
> > We are using Eragon410 board to use the Ubuntu-Core OS on it. The Eragon410 board is based on Dragonboard410c board.
> >
> > We have tried to follow all the steps mentioned by the Canonical Team, to build our gadget snap and kernel snap (based on the Dragonboard410c). Thereby, we are able to generate the Ubuntu Core OS snap. We have applied the security patches to our kernel (for AppArmour, and other security related stuff).
> >
> > Earlier we had issue on the first console-conf setup screen, which we figured out that, IPv4 and IPv6 needs to be setup (in our case DHCP) in order for the first console-conf to be configured successfully. After that we were able to do a ssh and configure the password for the board as below:
> >
> > sudo passwd $USER
> >
> > and we were able to also login to the Eragon410 board natively from serial terminal interface.
> >
> > ISSUE 1:
> >
> > We are not able to get the Wifi interface listed in the ifconfig. We compared our boot logs with the Dragonboard410c (precompiled images) boot log, but were not able to get much difference. Then we extracted the firmware.tar (having the firmware binaries for wcnss, venus, a300_pfp, and a300_pm4, obtained from Dragonboard410c release for linux) to the "<kernel_source>/firmware" path, and modifying the firmware plugin of the snapcraft.yaml file as below:
> >
> > firmware:
> > plugin: tar-content
> > source: firmware.tar
> > destination: firmware
> >
> > We are able to see the firmware binaries for Wifi in the rootfs at "/lib/firmware" where they are expected. But we are not able to see the Wifi interface (wlan0).
> >
> > > does lsmod show you the module for your wlan device loaded ? do you see
> > > any errors in dmesg if you load it manually ?
> > >
lsmod just shows us the squashfs module.
We manually tried to copy the Wifi kernel module (wcnss.ko) to the "/home" directory (by re-mounting the "/home" folder with read-write permissions) via scp, and did a insmod of the Wifi Module. It got inserted and we are able to see that in the lsmod. However, we are not getting the wlan0 interface when we use the ifconfig. Dmesg also does not show any initialization logs when the module is inserted.
> > > ISSUE 2:
> > >
> > > When we do "snap list", we are getting the below error:
> > > ---- Error Start ----
> > > user at localhost:~$ snap list
> > > No snaps are installed yet. Try "snap install hello-world".
> > > ---- Error End ----
> > obviously your board has not been initialized correctly, did you
> > properly sign your model assertion with a valid key and are gadget and
> > kernel in the store yet (edge channel will be sufficient for this if
> > you tell ubuntu-image to use the edge channel) and signed with the same
> > key ?
Yes. We have used our brand-id and authority-id obtained from the Ubuntu store to sign the assertion model. We used the below command to create the Ubuntu OS Image:
sudo /snap/bin/ubuntu-image -d --channel edge --image-size 1G --extra-snaps dragonboard_16.04-0.18_armhf.snap --extra-snaps 96boards-kernel_4.4.0_arm64.snap -o dragonboard.img dragonboard.model
> > > whereas, in the Dragonboard410c (precompiled binary), we are able to see the Ubuntu core snap, kernel snap and gadget snap listed in the output.
> > >
> > > ISSUE 3:
> > >
> > > Installing the hello-world snap gives the below error:
> > > http://pastebin.com/h9nDtk06
> > >
> > if the image has not been initialized correctly using a signed model
> > assertion snapd thinks you are on a classic install and tries to
> > install a new core snap on top of the running system, this wont work
> > unless the firstboot setup of snapd succeeded.
We are successfully able to configure the firstboot screen and got the ssh login details. After that, we did ssh and configured the user password to login to the board natively. Will these steps suffice for the snapd to succeed ?
> > > ISSUE 4:
> > > We built the Dragonboard410c kernel source, Gadget snap and thereby created the Ubuntu OS snap. But when we boot the Ubuntu Core, we get this error:
> > > http://pastebin.com/h2eJG1yw
> > did you properly list the required firmware to be included with the
> > initrd in the "kernel-initrd-fws:" option of your kernel snap
> > snapcraft.yaml ?
We have followed the below link for the Dragonboard Gadget snap and the uboot.env.in file:
https://github.com/snapcore/dragonboard-gadget
Our custom uboot.env.in file is at, which is also based on the above Dragonboard Gadget file:
http://pastebin.com/1055z6UA
> > > ISSUE 5:
> > > For the "Model Assertion", if we do not rename our Gadget snap to "dragonboard_16.04-0.18_armhf.snap", and Kernel snap to "96boards-kernel_4.4.0_arm64.snap", then we are not able to generate the Ubuntu Core OS snap. It seems that these names (Dragonboard related names) are hardcoded in the "ubuntu-image" tool.
> > did you follow
> > https://docs.ubuntu.com/core/en/guides/build-device/image-building
> > to create your model assertion ?
> >
> > it might also be helpful to get a pointer to your kernel snap and
> > gadget snap source.
Yes. We followed the link that you have mentioned, and tried to provide different "gadget" and "kernel" names to the model assertion. But when we try to generate the Ubuntu OS Image, we get the below error:
http://pastebin.com/fnR700Kr
We have followed the below link to generate our snapcraft.yaml:
http://blog.sergiusens.org/posts/Snapcrafting-a-kernel/
Our kernel is version 4.4.23 and is downloaded from: https://builds.96boards.org/releases/dragonboard410c/linaro/debian/16.09/
We have done some custom changes in the kernel for our board.
Thanks,
Sunny
************************************************************************************************************************************************************* eInfochips Business Disclaimer: This e-mail message and all attachments transmitted with it are intended solely for the use of the addressee and may contain legally privileged and confidential information. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, copying, or other use of this message or its attachments is strictly prohibited. If you have received this message in error, please notify the sender immediately by replying to this message and please delete it from your computer. Any views expressed in this message are those of the individual sender unless otherwise stated. Company has taken enough precautions to prevent the spread of viruses. However the company accepts no liability for any damage caused by any virus transmitted by this email. *************************************************************************************************************************************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20170206/55a66aa8/attachment.html>
More information about the Snapcraft
mailing list