Custom Kernel and Gadged Snap Issue for Eragon410 board based on Dragonboard410c and other build related issues

Oliver Grawert ogra at ubuntu.com
Mon Feb 6 14:58:29 UTC 2017


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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/snapcraft/attachments/20170206/2bc7f2b8/attachment.sig>


More information about the Snapcraft mailing list