Custom Kernel and Gadged Snap Issue for Eragon410 board based on Dragonboard410c and other build related issues
Sunny Bhayani
sunny.bhayani at einfochips.com
Tue Feb 7 11:47:00 UTC 2017
Hi Oliver,<mailto:snapcraft%40lists.snapcraft.io?Subject=Re%3A%20Custom%20Kernel%20and%20Gadged%20Snap%20Issue%20for%20Eragon410%20board%20based%0A%20on%20Dragonboard410c%20and%20other%20build%20related%20issues&In-Reply-To=%3C1486393109.11948.43.camel%40ubuntu.com%3E>
Please find our answers inline below:
> hi,
> Am Montag, den 06.02.2017, 14:09 +0000 schrieb Sunny Bhayani:
> >
> > > > > 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)
>
> hmm, the home dir for the user you create using console-conf is
> actually readwrite, you should not need to make anything writable, but
> it might be fallout of a broken uboot.env setup (and missing kernel
> cmdline args)...
You are correct. Home directory is not required to remount in-order to copy files there.
> > 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.
>
> this is kind of weird, what if you include it properly in your kernel
> snap instead ?
We tried to put the wifi config define (CONFIG_USB_NET_WCN36XX) in the snapcraft.yaml and also in the kernel defconfig as '=y'. But still we do not see the Wifi initialization logs.
> > > > 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 ?
>
> no, that is just the user and network setup, the firstboot
> initialization of snapd happens during the boot process, way before the
> console-conf UI tool starts ... you should actually see (red flagged)
> errors during boot on the console during boot if this bit fails.
We did not see any errors related to snapd during the first time boot, when we get the console-conf UI. Please see the logs at: http://pastebin.com/h2eJG1yw
It would be great if you can point to a snapd error in the above logs.
> > > > > 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
>
> did you also regenerate the uboot.env file from the uboot.env.in file
> as described in the README ?
Yes. We have generated the uboot.env file from the uboot.env.in file as described in the https://github.com/snapcore/dragonboard-gadget link.
> it does not look like all the bits from
> the snappy_boot script are run to set the cmdline properly.
> a typical snappy commmand line on a dragonboard looks like:
>
> ogra at dragon:~$ cat /proc/cmdline
> androidboot.emmc=true androidboot.serialno=25af71aa
> androidboot.baseband=apq mdss_mdp.panel=0:dsi:0:
> console=ttyMSM0,115200n8 console=tty0 root=/dev/disk/by-label/writable
> net.ifnames=0 init=/lib/systemd/systemd ro panic=-1 fixrtc
> snap_core=core_551.snap snap_kernel=dragonboard-kernel_16.snap
>
> (i.e. it is a lot longer)
Our cat /proc/cmdline is below:
androidboot.emmc=true androidboot.serialno=dae85161 androidboot.baseband=apq mdss_mdp.panel=0:dsi:0: console=ttyMSM0,115200n8 console=tty0 root=/dev/disk/by-label/writable net.ifnames=0 init=/lib/systemd/systemd ro panic=-1 fixrtc snap_core=core_1118.snap snap_kernel=410boards-kernel_x1.snap
The difference is in "androidboot.serialno", "snap_core" and the "snap_kernel" variables. Rest there is no difference.
> it looks like the "setenv mmcroot" and "run mmcargs" commands in your
> snappy_boot script do not get executed or your kernel does not want to
> read them. this might be the source of all your problems and should be
> the first thing to attack before you look at anything else.
>From the cat /proc/cmdline output, it seems that the "setenv mmcroot" and "run mmcargs" commands from snappy_boot are executed correctly. Please share your views.
Our uboot.env.in file is at: http://pastebin.com/aNrrVZif
> (did you set something like CONFIG_CMDLINE_OVERRIDE or
> CONFIG_CMDLINE_FORCE in your kernel config that would prevent it using
> the bootloader cmdline at all ?)
We confirmed from the kernel .config file, that the CONFIG_CMDLINE_OVERRIDE or CONFIG_CMDLINE_FORCE are not defined. The .config file is located at the below path:
<Ubuntu_Core_Source>/parts/kernel/build/.config
> >
> > Our custom uboot.env.in file is at, which is also based on the above
> > Dragonboard Gadget file:
> > http://pastebin.com/1055z6UA
> >
> ...
> > > > 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
>
> well, there seems to be a CRC error with one of your snaps or the
> assertion ...
> ...
> eragon-kernel already prepared, skipping
> error: bad CRC: 1869570677 != 1876078605
> ERROR:ubuntu-image:COMMAND FAILED:
> ...
We have tried to pull the 96boards Debian release 16.09 for Dragonboard from https://builds.96boards.org/releases/dragonboard410c/linaro/debian/16.09/.
We tried to build the Ubuntu OS image by building the kernel snap (applied the AppArmour Patches) and gadget snap. But for the dragonboard also we are getting the above CRC error.
So it would be great if you can give pointers to how the dragonboard pre-built image is built.
We have followed the kernel snapcraft.yaml and the gadget snapcraft.yaml from this link: https://github.com/snapcore/dragonboard-gadget
> > We have followed the below link to generate our snapcraft.yaml:
> > http://blog.sergiusens.org/posts/Snapcrafting-a-kernel/
>
> well, this blog post is nearly a year old i would suspect that the
> kernel team made some changes to the kernel plugin meanwhile ...
> perhaps someone from the kernel team can jump in here and take a look ?
It would be great if you can also point us to someone who has built the kernel and gadget snap from the 96board website.
We have found a new issue while building sources (kernel, gadget and Ubuntu Image) for Dragonboard. But we will post it in another thread, since this thread is already having other issues.
Thanks,
Sunny
________________________________
From: snapcraft-bounces at lists.snapcraft.io <snapcraft-bounces at lists.snapcraft.io> on behalf of Oliver Grawert <ogra at ubuntu.com>
Sent: Monday, February 6, 2017 8:28 PM
To: Snapcraft
Subject: Re: Custom Kernel and Gadged Snap Issue for Eragon410 board based on Dragonboard410c and other build related issues
hi,
Am Montag, den 06.02.2017, 14:09 +0000 schrieb Sunny Bhayani:
>
> > > > 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)
hmm, the home dir for the user you create using console-conf is
actually readwrite, you should not need to make anything writable, but
it might be fallout of a broken uboot.env setup (and missing kernel
cmdline args)...
> 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.
this is kind of weird, what if you include it properly in your kernel
snap instead ?
> > > 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 ?
no, that is just the user and network setup, the firstboot
initialization of snapd happens during the boot process, way before the
console-conf UI tool starts ... you should actually see (red flagged)
errors during boot on the console during boot if this bit fails.
>
> > > > 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
did you also regenerate the uboot.env file from the uboot.env.in file
as described in the README ? it does not look like all the bits from
the snappy_boot script are run to set the cmdline properly.
a typical snappy commmand line on a dragonboard looks like:
ogra at dragon:~$ cat /proc/cmdline
androidboot.emmc=true androidboot.serialno=25af71aa
androidboot.baseband=apq mdss_mdp.panel=0:dsi:0:
console=ttyMSM0,115200n8 console=tty0 root=/dev/disk/by-label/writable
net.ifnames=0 init=/lib/systemd/systemd ro panic=-1 fixrtc
snap_core=core_551.snap snap_kernel=dragonboard-kernel_16.snap
(i.e. it is a lot longer)
it looks like the "setenv mmcroot" and "run mmcargs" commands in your
snappy_boot script do not get executed or your kernel does not want to
read them. this might be the source of all your problems and should be
the first thing to attack before you look at anything else.
(did you set something like CONFIG_CMDLINE_OVERRIDE or
CONFIG_CMDLINE_FORCE in your kernel config that would prevent it using
the bootloader cmdline at all ?)
>
> Our custom uboot.env.in file is at, which is also based on the above
> Dragonboard Gadget file:
> http://pastebin.com/1055z6UA
>
...
> > > 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
well, there seems to be a CRC error with one of your snaps or the
assertion ...
...
eragon-kernel already prepared, skipping
error: bad CRC: 1869570677 != 1876078605
ERROR:ubuntu-image:COMMAND FAILED:
...
>
> We have followed the below link to generate our snapcraft.yaml:
> http://blog.sergiusens.org/posts/Snapcrafting-a-kernel/
well, this blog post is nearly a year old i would suspect that the
kernel team made some changes to the kernel plugin meanwhile ...
perhaps someone from the kernel team can jump in here and take a look ?
ciao
oli
************************************************************************************************************************************************************* 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/20170207/dcd02d51/attachment.html>
More information about the Snapcraft
mailing list