[Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-02-07 Thread Sunny Bhayani
Hi,

We are using Dragonboard410C to build kernel snap, gadget snap and Ubuntu OS
Image.

We got the linux kernel (Debian release 16.09) from:
https://builds.96boards.org/releases/dragonboard410c/linaro/debian/16.09/

Kernel snapcraft.yaml is at: http://pastebin.com/DcPe1TT2

and the gadget from:
https://github.com/snapcore/dragonboard-gadget

Gadget gadget.yaml is at: http://pastebin.com/ciygRRfC
Here we have done the below changes:
  - name, version and architecture changed to eragon.
  - after "volumes", changed the name to eragon.
  - changed the name of "sdappsboot.mdn" to "emmc_appsboot.mdn".

Gadget snapcraft.yaml is at: http://pastebin.com/QcLFF319

Ubuntu OS Image Bootlog is at: http://pastebin.com/vwbMKPiS

ISSUE 1:
When we try to generate the Ubuntu OS Image, by giving the Kernel and Gadget
snaps as input, we get the CRC error as below:

 Error Start 
96boards-kernel already prepared, skipping
error: bad CRC: 1869570677 != 1876078605
ERROR:ubuntu-image:COMMAND FAILED:
 Error End 

However, we are able to create the Ubuntu OS Image, if we rename our Gadget
snap to "dragonboard_16.04-0.18_armhf.snap", and Kernel snap to
"96boards-kernel_4.4.0_arm64.snap".

ISSUE 2:
Once we boot the above Ubuntu OS Image, and run "snap list", we get the below
output:
 Error Start 
localhost:~$ snap list
No snaps are installed yet. Try "snap install hello-world".
 Error End 

_OR_ we get the below output:
 Error Start 
localhost:~$ snap list
error: cannot list snaps: cannot communicate with server: Get 
http://localhost/v2/snaps: EOF
 Error End 

We get list of snaps (kernel, gadget, core), when we flash the pre-built
Dragonboard Ubuntu Core image.

ISSUE 3:
We do not get any firmware files at: /lib/firmware

We get list of firmware files when we flash the pre-built Dragonboard Ubuntu
Core image.

ISSUE 4:
We do not get any kernel modules at: /lib/modules

We get list of kernel modules when we flash the pre-built Dragonboard Ubuntu
Core image.

ISSUE 5:
When we run "snap install hello-world", we get the below error:
 Error Start 
@localhost:~$ snap install hello-world
error: cannot communicate with server: Post 
http://localhost/v2/snaps/hello-world: EOF
 Error End 

We can "snap install hello-world" when we flash the pre-built Dragonboard
Ubuntu Core image.

OBSERVATION(S):
When we prepare the Linux Bootimage from the below 96boards source for
Dragonboard410c:
https://builds.96boards.org/releases/dragonboard410c/linaro/debian/16.09/

we are able to get the Ethernet, Wifi properly. But when we use the same kernel
source to generate the Ubuntu OS Image, we see the above mentioned ISSUES(S).

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. 
*
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


[Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-02-08 Thread Sunny Bhayani
Hi,


We did one experiment today, wherein, we built the Kernel (Debian release 
16.09) from: 
https://builds.96boards.org/releases/dragonboard410c/linaro/debian/16.09/


On top of that we applied the Ubuntu Core (AppArmour patches).

Flashed this kernel along with the Rootfs (alip) from the 96boards.


With this combination, the Wifi (WCN) is working fine.


So, we are suspecting that, somehow, the Ubuntu-Core RootFS is not able to 
kickstart the remoteproc for WCN. Moreover, the /lib/modules is also not having 
any kernel modules.


I hope this pointer can help to investigate further for our issue.


Requesting the Canonical team to kindly let us know, if they are able to build 
and make the Wifi (WCN) working.


Awaiting reply.



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. 
*
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


[Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-02-08 Thread Sunny Bhayani
Hi Oliver / Paolo,

Thank you for your time.

> the work is going on here:
>
> https://github.com/snapcore/snapcraft/pull/1115

Is there a way, that we can come to know about an official fix, apart from the
above link that you mentioned.

Also, how did the build for the Dragonboard410C succeed for the pre-built
Ubuntu Core OS image ?

Since that is working properly, /lib/modules have the kernel modules and
/lib/firmware has the firmware binaries.

Also, the wifi interface (wlan0) is working.

Sorry, but I was just curious to know this.


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. 
*
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


[Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-02-16 Thread Sunny Bhayani
Hi Paolo,

Thank you for your reply.

> On Thu, Feb 09, 2017 at 06:13:15AM +, Sunny Bhayani wrote:
> >
> > > the work is going on here:
> > >
> > > https://github.com/snapcore/snapcraft/pull/1115
> >
> > Is there a way, that we can come to know about an official fix, apart from 
> > the
> > above link that you mentioned.
>
> If you don't want to wait for a release, you can clone the snapcraft
> repository[1] and apply the above fix locally:
>
> git clone https://github.com/snapcore/snapcraft.git

We are able to apply your fix locally, and now we are getting the /lib/firmware
and /lib/modules with the required files.

We are able to make our Wifi work by doing insmod wcn36xx.ko, and doing the
echo start > /sys/kernel/debug/remoteproc/remoteproc2/state.

We have a question regarding the above step. In the Dragonboard prebuilt rootfs,
there are scripts which actually inserts the Wifi module during boot. Those
scripts are located at /lib/systemd/system/wcnss-start.service.

These scripts actually start the wifi interface.

But in our case, we have to manually do this. So how can we add new scripts to
the RootFS in our case as compared to the prebuilt Dragonboard binary ?

One more observation is, that due to the above scripts present in the prebuilt
Dragonboard binary, during the first boot console config, we get to configure
the wifi interface along with the eth0 interface, which is also missing in our
case.

> > Also, how did the build for the Dragonboard410C succeed for the pre-built
> > Ubuntu Core OS image ?
> >
> > Since that is working properly, /lib/modules have the kernel modules and
> > /lib/firmware has the firmware binaries.
> >
> > Also, the wifi interface (wlan0) is working.
> >
> > Sorry, but I was just curious to know this.
>
> The kernel snaps for the dragonboard (and the raspberry and pc), are generated
> from the deb packages in our archive, using this script:
>
> https://code.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux-snap/+git/xenial
>
> Starting from the snapdragon branch, the snapcraft.yaml there invokes the
> Makefile in the master branch.
>
> This was done to use the x86 signed kernels (required for trusted boot), and 
> the same mechanism
> was reused for arm.
>
> But for development, snapcratf and the kernel plugin are the way to go.
>
> 1: https://github.com/snapcore/snapcraft

So we understand the snapcraft and kernel plugin should be used for development.
But by applying the patches (fix) that you gave, we still are not able to do
"snap list" and "snap install hello-world".

It would be really great if you can help for both the RootFS (scripts) and the
snap list / install issues.

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. 
*
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


[Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-02-17 Thread Sunny Bhayani
Hi Ogra,

Thank you for your reply.

> hi,
> Am Donnerstag, den 16.02.2017, 10:16 + schrieb Sunny Bhayani:
> >
> > We are able to make our Wifi work by doing insmod wcn36xx.ko, and
> > doing the
> > echo start > /sys/kernel/debug/remoteproc/remoteproc2/state.
> >
> > We have a question regarding the above step. In the Dragonboard
> > prebuilt rootfs,
> > there are scripts which actually inserts the Wifi module during boot.
> > Those
> > scripts are located at /lib/systemd/system/wcnss-start.service.
> >
> > These scripts actually start the wifi interface.
> >
> > But in our case, we have to manually do this. So how can we add new
> > scripts to
> > the RootFS in our case as compared to the prebuilt Dragonboard binary
> > ?
> >
> you should not need to do that, we definitely do not have such scripts
> in our official images:
>
> ogra at dragonboard:~$ ls /lib/systemd/system/wcnss-start.service
> ls: cannot access '/lib/systemd/system/wcnss-start.service': No such
> file or directory
>
> the module should be auto-loaded during boot (this happens surely for
> us with the default ubuntu core images). there must be something wrong
> with your setup ...
> here is a boot log from a default ubuntu core dragonboard image http://
> paste.ubuntu.com/24006524/ there wcn36xx just gets auto-loaded, perhaps
> you miss a kernel configuration ?

Sorry for the wrong information. The above scripts are present in the Linaro
(Debian) release of Dragonboard.

You are correct that in the prebuilt image (Ubuntu OS) for Dragonboard, the Wifi
module is auto-loaded during boot. But in our case, this does not happen.

So can you please let us know, that in what part (plugin) of the snapcraft.yaml
do we need to mention the kernel modules that needs to be auto-loaded during the
kernel boot.

We tried to add the kernel module in the snapcraft.yaml as below:

  kernel-initrd-modules:
 - squashfs
 - wcn36xx

This did not auto-insert / auto-load the Wifi module during the first boot.

Also, we went through the kernel-initrd-modules description:
https://snapcraft.io/docs/reference/plugins/kernel

and there it is mentioned that the "kernel-initrd-modules" plugin is used to
mention the modules required to mount the rootfs.

So can you please help us out for the same.

Also, if we want to add any scripts to the rootfs while building / compiling the
Ubuntu OS Image, is there a way in which we can do that ?

> > One more observation is, that due to the above scripts present in the
> > prebuilt
> > Dragonboard binary, during the first boot console config, we get to
> > configure
> > the wifi interface along with the eth0 interface, which is also
> > missing in our
> > case.
>

It would be great if you can please help us out on this front as well for the
snap list / snap install for the Ubuntu OS.

> there is no ethernet device on a dragonboard, do you use an addon board
> ?

Yes. We are using a USB to Ethernet module on dragonboard to use the Ethernet.

While using the prebuilt image for Dragonboard, we are able to configure the
access point for Wifi interface in the first boot screen, but then while doing
ssh to the board, it is asking for password (during first boot). How can we
resolve this ?

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. 
*
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


[Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-02-21 Thread Sunny Bhayani
Hi Ogra,

Appreciate for your help.

> hi,
> Am Freitag, den 17.02.2017, 10:06 + schrieb Sunny Bhayani:
> >
> >
> > You are correct that in the prebuilt image (Ubuntu OS) for
> > Dragonboard, the Wifi
> > module is auto-loaded during boot. But in our case, this does not
> > happen.
> >
> > So can you please let us know, that in what part (plugin) of the
> > snapcraft.yaml
> > do we need to mention the kernel modules that needs to be auto-loaded
> > during the
> > kernel boot.
> >
> > We tried to add the kernel module in the snapcraft.yaml as below:
> >
> >   kernel-initrd-modules:
> >  - squashfs
> >  - wcn36xx
>
> this would just pull the module into the initrd which would be useless,
> since we do not ship any userspace bits for WIFI support in there.
> if you can modprobe it it is obviously already in the right place in
> your /lib/modules dir on the booted system, so first of all remove it
> from the list above. having it already loaded from the initrd on boot
> might make it miss the right initialization since it wont find all the
> userspace bits that it needs in the initrd.
>
> also make sure you have the firmware in the right place on the booted
> rootfs, this is how it looks like on the official dragoboard image:
>
> http://paste.ubuntu.com/24012991/
>
Yes, we have the /lib/modules and /lib/firmware populated as you have mentioned
above.

> >
> > Also, we went through the kernel-initrd-modules description:
> > https://snapcraft.io/docs/reference/plugins/kernel
> >
> > and there it is mentioned that the "kernel-initrd-modules" plugin is
> > used to
> > mention the modules required to mount the rootfs.
>
> this means filesystem or disk controller modules (squashfs, ext4 (if
> you do not compile it in), mmc support and the like), since your system
> boots to a rootfs already you should not need anything more than you
> currently have.
>
> > >
Yes, agreed as you have mentioned above for the "kernel-initrd-modules".

> >
> > It would be great if you can please help us out on this front as well
> > for the
> > snap list / snap install for the Ubuntu OS.
>
> this definitely means that snapd did not start for some reason, like i
> mentioned before this could be caused by the firstboot initialization
> of the board having failed or by some missing feature that snapd
> expects from your kernel.
>
> does sudo journalctl -u snapd.service reveal anything ?
> do you find anything interesting in syslog in general ?
>
We are seeing error related to AppArmor patches in journalctl log.
The log is at: http://pastebin.com/vG9DQfTf

> >
> >
> > Yes. We are using a USB to Ethernet module on dragonboard to use the
> > Ethernet.
> >
> did you check if  the behaviour of the WLAN device changes when booting
> without the USB dongle attached ?
>
This we have not checked. Will update for this.

> > While using the prebuilt image for Dragonboard, we are able to
> > configure the
> > access point for Wifi interface in the first boot screen, but then
> > while doing
> > ssh to the board, it is asking for password (during first boot). How
> > can we
> > resolve this ?
> >
>
> did console-conf (the first boot configuration UI) actually finish the
> user creation properly (did it tell you about it and give you info
> about how to ssh into the board) without any errors ?
>
> /var/log/console-conf/subiquity-debug.log might be informative here.
>
The subiquity-debug.log is at: http://pastebin.com/39zsb4nE

The AppArmor patches that we ported from the
http://kernel.ubuntu.com/git/ppisati/ubuntu-vivid.git/tree/arch/arm/configs/snappy?h=snappy_v3.10

are for the linux kernel 3.10.

But the kernel that we are referring to is from 96boards - linux kernel 4.4.

Moreover, the prebuilt image is also built for linux kernel 4.4.

So do you have a kernel source for AppArmor patches which are ported on linux
kernel 4.4 like the prebuilt Ubuntu Core Image for Dragonboard410c.

Please provide the patchset link for the latest kernel.

Awaiting your reply.

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 

[Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-02-28 Thread Sunny Bhayani
Hi Paolo / Oliver,


Thank you for your email.


> On Wed, Feb 22, 2017 at 10:19:25AM +0100, Oliver Grawert wrote:
> > > The AppArmor patches that we ported from the
> > > http://kernel.ubuntu.com/git/ppisati/ubuntu-vivid.git/tree/arch/arm/c
> > > onfigs/snappy?h=snappy_v3.10
> > >
> > > are for the linux kernel 3.10.
> > >
> > > But the kernel that we are referring to is from 96boards - linux
> > > kernel 4.4.
> >
> > this is definitely wrong, for 4.4 kernels you indeed need to use a 4.4
> > patch set, another thing for paolo to answer (i'm not even sure you
> > need any patches at all on a 4.4 kernel, all bits might be in-tree
> > already and just some config options might be enough)...
>
> Unfortunately he is not using our Xenial kernel, so he still needs some 
> patches
> for AA - here's a updated delta of patches on top of stable/linux-4.4.y:
>
> https://github.com/piso77/sample-kernels/commits/stable-4.4.y
>
We downloaded the kernel source from: 
https://github.com/piso77/sample-kernels.git

Checked out the "stable-4.4.y" branch. The kernel version is 4.4.50
(Blurry Fish Butt).

This kernel has all the latest patches that you have mentioned.

So, we just ran the below commands to merge our defconfig with snappy,
and distro.config:

ARCH=arm64 ./scripts/kconfig/merge_config.sh arch/arm64/configs/defconfig 
kernel/configs/distro.config

cp .config arch/arm64/configs/defconfig

ARCH=arm64 ./scripts/kconfig/merge_config.sh arch/arm64/configs/defconfig 
kernel/configs/snappy/*.config

cp .config arch/arm64/configs/defconfig

Then checked in the code.

Our snapcraft.yaml is at: http://pastebin.com/Na76t2ks

We are able to build the kernel snap 
successfully. Build
logs at: http://pastebin.com/fphxyh46

We are able to build the ubuntu os snap successfully by using the
kernel snap from your kernel and gadget snap from the older source
that we had got.

But when we boot the kernel, we are getting stuck in kernel boot. It
seems the kernel is not getting the initrd. The bootlogs are
at: http://pastebin.com/eF2sCiyJ

Can you please let us know if we are missing something ?

Also, the dts files are different as compared to the 4.4.23 kernel source.
So is there some work ongoing. Because the prebuilt binaries has already
SMP booting enabled, while the current latest kernel version has only a
primary core booting.

> depending of the 4.4.x revision you are using, if you apply all the patches
> above the "Linux 4.4.50" commit, you will  get all you need.
>
Are we missing any patches that you are referring to as we have
pulled the latest kernel ?

One more observation:
We are using the below command to build the kernel using snapcraft.yaml:
  sudo snapcraft --target-arch arm64 snap

So, if we want to do a incremental build for the kernel, how can we achieve 
that ?

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. 
*
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


[Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-03-04 Thread Sunny Bhayani
Hi Oliver,

Thank you for your reply.

> hi,
> Am Dienstag, den 28.02.2017, 13:03 + schrieb Sunny Bhayani:
> >
> > But when we boot the kernel, we are getting stuck in kernel boot. It
> > seems the kernel is not getting the initrd. The bootlogs are
> > at: http://pastebin.com/eF2sCiyJ
> >
> looks fine to me
>
> ...
> reading 96boards-kernel_x1.snap/initrd.img
> 4821121 bytes read in 1315 ms (3.5 MiB/s)
> ...
> Unpacking initramfs...
> Freeing initrd memory: 4708K (ffc00400 - ffc004499000)
> ...
>
> do you have a screen attached on HDMI ?
We tried both: attaching HDMI Display on cold boot and cold boot without the
HDMI out. But nothing comes on the display.

We tried on two different HDMI Displays.

> the kernel command line has:
>
> ... console=ttyMSM0,115200n8 console=tty0 ...
>
> which means that after firing up the kernel with serial console the
> system will switch to tty0 for any further boot output.
> (if everything works you should get a "please press enter" message
> after a while on serial though)

We waited for more than 30 minutes, but no message comes.

We have a question. In earlier reply, Paolo told that over kernel is not xenial
kernel.

So is there a way, wherein you can point us to the kernel where the Dragonboard
prebuilt images where built from, so that we can at least get to a point of the
already released prebuilt images, and proceed further.

Awaiting your reply.

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. 
*
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


[Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-03-16 Thread Sunny Bhayani
Hi John,

Thank you for the finding.

> note that in that log, snapd isn't running because
>
> snapd[2217]: fatal error: runtime: out of memory
>
But there is no process invoked explicitly from our end.

So is there something that we can check for this error ?

@paolo.pisati and 
@ogra:
We downloaded the xenial kernel that is used for Dragonboard410c prebuilt 
binaries as you mentioned earlier:
git clone 
git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/xenial

We added dtsi and firmware options in snapcraft.yaml.
Here is our snapcraft.yaml: http://pastebin.com/QBKLGkfu

We are getting wifi interface in the first boot console, and all the modules 
are automatically loaded (insmod) when rootfs is mounted.

It would be great if you can address the below issues / queries
(This would really get us going ahead):

1. "snap list" does not show any snaps.
However, we have observed that there are times when "snap list" shows
just core.snap. But this is very rare.

2. "snap install hello-world" gives this error: http://pastebin.com/HV4fWzGk

3. When we build the linaro linux kernel, once we generate the uImage,
we build the boot.img which has the DTB + uImage + cmdline args + initrd.

So if we want to change the cmdline arguments to kernel in Ubuntu-Core,
then how can we change it from snapcraft.yaml ?

Awaiting your reply.

Thanks & Regards,
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 ac
 cepts no liability for any damage caused by any virus transmitted by this 
email. 
*
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


[Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-03-17 Thread Sunny Bhayani
Hi John,

Thanks you for your reply.

> I don't understand what's going on with your system:
> * snapd is running out of memory. snapd should be using about 20MB of
> resident memory. How much was it trying to use when it ran out? How
> much is available? What does dmesg say about this crash?
We are not able to reproduce this error again. If we get this error,
we will post details for this.

While doing "snap install", it gives error. But doing "snap login" again,
from the command prompt (shell), we are able to install the application
via "snap install". But this method also is not 100% successful. Sometimes
we get error.

Here is the dmesg logs for the error case: http://pastebin.com/rAa8Zvfb
The above log has two trial logs. In the First trial, we have prepared the
SDCard and have setup the first boot console config. In the Second trial,
we did "snap login".

We obsereved that whenever we do a "snap install", irrespective of it
being successful or fail, we get the below message repeatedly and the
board reboots automatically after 15-20 minutes:

"Broadcast message from root@localhost.localdomain (Thu 2017-03-16 12:31:13 
UTC):

reboot scheduled to update the system - temporarily cancel with 'sudo 
shutdown -c'
The system is going down for reboot at Thu 2017-03-16 12:39:13 UTC!"

This is how it looks like when board is automatically reboot:
http://pastebin.com/e2s6y3qc

After the reboot is done (which takes around 5 minutes), thie above reboot
message does not come.

It would be great, if you can provide any comments.

> * snapd on a core system that doesn't list any snaps makes no sense at
> all. It needs to have at least three snaps at first boot: core,
> kernel, and gadget, otherwise you wouldn't get there.

Yes snapd on a core system does not list any snaps: http://pastebin.com/rAa8Zvfb

> How are you building the image that you are booting?

Here are the steps to building Ubuntu-Core Image: http://pastebin.com/0x52ATXi

> What's in /var/lib/snapd/state.json? (don't just pastebin that file if you 
> have
> credentials in it!) What's in /snap? What's in /var/lib/snapd/seed/?
> And in seed.yaml? What's in /var/lib/snapd/snaps? What's in
> /etc/os-release?

Here we listed various snaps directory as you asked:
http://pastebin.com/DRXDvAQQ

The state.json file is at: http://pastebin.com/0KyvECtz

It would be more helpful to us if you provide some pointers.

Thank you.
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 ac
 cepts no liability for any damage caused by any virus transmitted by this 
email. 
*
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


[Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-03-19 Thread Sunny Bhayani
Hi Oliver,

Thank you for your reply.

> hi,
> the image has not properly being initialized ... else you would only
> get the reboot notifications after the first upgrade of the core snap
> (i.e. your root filesystem)...
>
> normally a "snap list" should list the gadget (dragonboard), core and
> the kernel snap (ubuntu-snapdragon-kernel) you described in your model
> assertion, even before you installed anything.
>
We are not getting the above three snaps listed even though we get through
the initial conf setup. So can you point to a possible error ?

> > > How are you building the image that you are booting?
> >
> > Here are the steps to building Ubuntu-Core Image: http://pastebin.com
> > /0x52ATXi
> >
>
> ...and here we have your issue...
>
> you need to use a proper authority id and brand id in your assertion
> file, else the initial setup (before console-conf) will not happen, you
> used the:
>
> "authority-id": "",
> "brand-id": "",
>
> boilerplate values in your json file ...
>
> you can get the data for your auth-id from your account info via:
>
> https://myapps.developer.ubuntu.com/dev/account/
>
We are populating the "authority-id" and "brand-id" fields in the json file
from the above link that you have mentioned i.e.
https://myapps.developer.ubuntu.com/dev/account/

The "authority-id" field and "brand-id" is populated as "Account-Id" found
in the above link which is a 32-letter (Alpha-numeric).

Please do let us know if we are missing anything.

Also, as you mentioned that without proper authority id and brand id in the
assertion file, initial setup (before console-conf) will not happen. But we are
able to do the initial setup (profile setup) and then we get the shell prompt.

So can the initial setup be done if assertion model is not correct ?

If possible, this is to request you that if you can build the xenial sources 
(branch "snapdragon")
once and check if you are facing these errors like we are ?

We had only changed the snapcraft.yaml to get the dtb and firmware built.

Awaiting your reply.

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 ac
 cepts no liability for any damage caused by any virus transmitted by this 
email. 
*
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


[Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-03-20 Thread Sunny Bhayani
Hi Oliver,

Thank you for your reply.

> with that it should work if the account the assertion gets signed with
> is identical to the one in the store

We sign the assertion-model by the below command:
cat dragon-model.json | snap sign -k sh &> dragonboard.model

Is there a way where in we can check if the "snap sign" command failed ?

> yes, this is probably a usability bug a failed firstboot configuration
> should at least spill a readable error or show it failed in the
> console-conf UI.

Please advice if we can check any logs for this failure ?

> i'm a bit short on time this week but i'll see what i can do :)

Really appreciate and would eagerly wait if you can try it (if time
permits).

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 ac
 cepts no liability for any damage caused by any virus transmitted by this 
email. 
*
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


[Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-04-03 Thread Sunny Bhayani
Hi Oliver,

> > i'm a bit short on time this week but i'll see what i can do :)
>
> Really appreciate and would eagerly wait if you can try it (if time
> permits).
>
Sorry to bother you, but really looking forward for your time to check if you 
face the same error what we are facing after building the Xenial sources.

Awaiting your reply.

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 ac
 cepts no liability for any damage caused by any virus transmitted by this 
email. 
*
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: [Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-02-08 Thread Oliver Grawert
hi,
On Mi, 2017-02-08 at 11:55 +, Sunny Bhayani wrote:
> 
> So, we are suspecting that, somehow, the Ubuntu-Core RootFS is not
> able to kickstart the remoteproc for WCN. Moreover, the /lib/modules
> is also not having any kernel modules.

yes, i belive the snapcraft team together with the kernel team are
working on a fix for this [1], the snapcraft kernel plugin seems to put
the modules and firmware in a /lib subdir in the snap package which is
wrong [2] and will not make them end up in the final place on the
filesystem.

> 
> I hope this pointer can help to investigate further for our issue.
> 
> Requesting the Canonical team to kindly let us know, if they are able
> to build and make the Wifi (WCN) working.
> 
> Awaiting reply.
> 

ogra@dragon:~$ lsmod|grep wcn
wcn36xx77824  0
wcn36xx_platform   16384  0
ogra@dragon:~$ ifconfig wlan
wlan0 Link encap:Ethernet  HWaddr 02:00:25:af:71:aa  
  inet
addr:192.168.2.46  Bcast:192.168.2.255  Mask:255.255.255.0
  inet6 addr: fe80::25ff:feaf:71aa/64 Scope:Link
  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  RX packets:96274 errors:0 dropped:4 overruns:0 frame:0
  TX packets:47920 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:1000 
  RX bytes:21179590 (21.1 MB)  TX bytes:22684403 (22.6 MB)

this works just fine using the official ubuntu core 16 images from [3]
as well as the daily edge images from [4] ...

(note that we do not support any non-SD card installs with the default
setup at the moment)

ciao
oli

[1] https://bugs.launchpad.net/bugs/1658177
[2] https://github.com/snapcore/snapd/wiki/Kernel-snap
[3] http://releases.ubuntu.com/ubuntu-core/16/
[4] http://people.canonical.com/~ogra/snappy/all-snaps/daily/

signature.asc
Description: This is a digitally signed message part
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: [Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-02-08 Thread Paolo Pisati
On Wed, Feb 08, 2017 at 01:07:34PM +0100, Oliver Grawert wrote:
> 
> yes, i belive the snapcraft team together with the kernel team are
> working on a fix for this [1], the snapcraft kernel plugin seems to put
> the modules and firmware in a /lib subdir in the snap package which is
> wrong [2] and will not make them end up in the final place on the
> filesystem.

I hit [1] too when rebuilding an image for the dragonboard410c yesterday, and i
wrote a snapcraft patch that creates symlinks from /lib/modules to /modules and
from /lib/firmware to /firmware but it wasn't enough, because during the staging
phase, snapcraft complains that:

...
IsADirectoryError: [Errno 21] Is a directory:
'/home/flag/canonical/snapcraft/demos/96boards-kernel/snap/stage/modules'

And that is problably because symlinks are not maintained from build to stage
(and afterward).

Here is the python call trace and full log:
http://pastebin.ubuntu.com/23954641/

1: https://bugs.launchpad.net/snapcraft/+bug/1658177
-- 
bye,
p.

-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: [Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-02-08 Thread Oliver Grawert
hi,
Am Mittwoch, den 08.02.2017, 15:40 +0100 schrieb Paolo Pisati:
> On Wed, Feb 08, 2017 at 01:07:34PM +0100, Oliver Grawert wrote:
> > 
> > 
> > yes, i belive the snapcraft team together with the kernel team are
> > working on a fix for this [1], the snapcraft kernel plugin seems to
> > put
> > the modules and firmware in a /lib subdir in the snap package which
> > is
> > wrong [2] and will not make them end up in the final place on the
> > filesystem.
> I hit [1] too when rebuilding an image for the dragonboard410c
> yesterday, and i
> wrote a snapcraft patch that creates symlinks from /lib/modules to
> /modules and
> from /lib/firmware to /firmware but it wasn't enough, because during
> the staging
> phase, snapcraft complains that:
> 
> ...
> IsADirectoryError: [Errno 21] Is a directory:
> '/home/flag/canonical/snapcraft/demos/96boards-
> kernel/snap/stage/modules'
> 
> And that is problably because symlinks are not maintained from build
> to stage
> (and afterward).

the work is going on here:

https://github.com/snapcore/snapcraft/pull/1115

ciao
oli

signature.asc
Description: This is a digitally signed message part
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: [Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-02-09 Thread Paolo Pisati
On Thu, Feb 09, 2017 at 06:13:15AM +, Sunny Bhayani wrote:
> 
> > the work is going on here:
> >
> > https://github.com/snapcore/snapcraft/pull/1115
> 
> Is there a way, that we can come to know about an official fix, apart from the
> above link that you mentioned.

If you don't want to wait for a release, you can clone the snapcraft
repository[1] and apply the above fix locally:

git clone https://github.com/snapcore/snapcraft.git

> Also, how did the build for the Dragonboard410C succeed for the pre-built
> Ubuntu Core OS image ?
> 
> Since that is working properly, /lib/modules have the kernel modules and
> /lib/firmware has the firmware binaries.
> 
> Also, the wifi interface (wlan0) is working.
> 
> Sorry, but I was just curious to know this.

The kernel snaps for the dragonboard (and the raspberry and pc), are generated
from the deb packages in our archive, using this script:

https://code.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux-snap/+git/xenial

Starting from the snapdragon branch, the snapcraft.yaml there invokes the
Makefile in the master branch.

This was done to use the x86 signed kernels (required for trusted boot), and 
the same mechanism
was reused for arm.

But for development, snapcratf and the kernel plugin are the way to go.

1: https://github.com/snapcore/snapcraft
-- 
bye,
p.

-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: [Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-02-16 Thread Oliver Grawert
hi,
Am Donnerstag, den 16.02.2017, 10:16 + schrieb Sunny Bhayani:
> 
> We are able to make our Wifi work by doing insmod wcn36xx.ko, and
> doing the 
> echo start > /sys/kernel/debug/remoteproc/remoteproc2/state.
> 
> We have a question regarding the above step. In the Dragonboard
> prebuilt rootfs,
> there are scripts which actually inserts the Wifi module during boot.
> Those 
> scripts are located at /lib/systemd/system/wcnss-start.service.
> 
> These scripts actually start the wifi interface.
> 

> But in our case, we have to manually do this. So how can we add new
> scripts to 
> the RootFS in our case as compared to the prebuilt Dragonboard binary
> ?
> 
you should not need to do that, we definitely do not have such scripts
in our official images:

ogra@dragonboard:~$ ls /lib/systemd/system/wcnss-start.service
ls: cannot access '/lib/systemd/system/wcnss-start.service': No such
file or directory

the module should be auto-loaded during boot (this happens surely for
us with the default ubuntu core images). there must be something wrong
with your setup ... 
here is a boot log from a default ubuntu core dragonboard image http://
paste.ubuntu.com/24006524/ there wcn36xx just gets auto-loaded, perhaps
you miss a kernel configuration ?

> One more observation is, that due to the above scripts present in the
> prebuilt 
> Dragonboard binary, during the first boot console config, we get to
> configure 
> the wifi interface along with the eth0 interface, which is also
> missing in our 
> case.

there is no ethernet device on a dragonboard, do you use an addon board
?

ciao
oli

signature.asc
Description: This is a digitally signed message part
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: [Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-02-17 Thread Oliver Grawert
hi,
Am Freitag, den 17.02.2017, 10:06 + schrieb Sunny Bhayani:
> 
> 
> You are correct that in the prebuilt image (Ubuntu OS) for
> Dragonboard, the Wifi 
> module is auto-loaded during boot. But in our case, this does not
> happen.
> 
> So can you please let us know, that in what part (plugin) of the
> snapcraft.yaml
> do we need to mention the kernel modules that needs to be auto-loaded 
> during the 
> kernel boot.
> 
> We tried to add the kernel module in the snapcraft.yaml as below:
> 
>   kernel-initrd-modules:
>  - squashfs
>  - wcn36xx

this would just pull the module into the initrd which would be useless,
since we do not ship any userspace bits for WIFI support in there.
if you can modprobe it it is obviously already in the right place in
your /lib/modules dir on the booted system, so first of all remove it
from the list above. having it already loaded from the initrd on boot
might make it miss the right initialization since it wont find all the
userspace bits that it needs in the initrd.

also make sure you have the firmware in the right place on the booted
rootfs, this is how it looks like on the official dragoboard image:

http://paste.ubuntu.com/24012991/

> 
> Also, we went through the kernel-initrd-modules description:
> https://snapcraft.io/docs/reference/plugins/kernel
> 
> and there it is mentioned that the "kernel-initrd-modules" plugin is
> used to 
> mention the modules required to mount the rootfs.

this means filesystem or disk controller modules (squashfs, ext4 (if
you do not compile it in), mmc support and the like), since your system
boots to a rootfs already you should not need anything more than you
currently have.

> > 
> 
> It would be great if you can please help us out on this front as well
> for the 
> snap list / snap install for the Ubuntu OS.

this definitely means that snapd did not start for some reason, like i
mentioned before this could be caused by the firstboot initialization
of the board having failed or by some missing feature that snapd
expects from your kernel.

does sudo journalctl -u snapd.service reveal anything ?
do you find anything interesting in syslog in general ?

> 
> 
> Yes. We are using a USB to Ethernet module on dragonboard to use the
> Ethernet.
> 
did you check if  the behaviour of the WLAN device changes when booting
without the USB dongle attached ?

> While using the prebuilt image for Dragonboard, we are able to
> configure the 
> access point for Wifi interface in the first boot screen, but then
> while doing 
> ssh to the board, it is asking for password (during first boot). How
> can we 
> resolve this ?
> 

did console-conf (the first boot configuration UI) actually finish the
user creation properly (did it tell you about it and give you info
about how to ssh into the board) without any errors ?

/var/log/console-conf/subiquity-debug.log might be informative here.

ciao
oli

signature.asc
Description: This is a digitally signed message part
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: [Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-02-22 Thread Oliver Grawert
hi,
Am Mittwoch, den 22.02.2017, 07:52 + schrieb Sunny Bhayani:
> 
> > > 
> > > Also, we went through the kernel-initrd-modules description:
> > > https://snapcraft.io/docs/reference/plugins/kernel
> > > 
> > > and there it is mentioned that the "kernel-initrd-modules" plugin
> is
> > > used to 
> > > mention the modules required to mount the rootfs.
> > 
> > this means filesystem or disk controller modules (squashfs, ext4
> (if
> > you do not compile it in), mmc support and the like), since your
> system
> > boots to a rootfs already you should not need anything more than
> you
> > currently have.
> > 
> > > > 
> Yes, agreed as you have mentioned above for the "kernel-initrd-
> modules".

right, just make sure to not also have the WLAN module in there, you
only want to load that one from the rootfs where it can also find its
firmware and has all user space tools available.

> 
> > > 
> > > It would be great if you can please help us out on this front as
> well
> > > for the 
> > > snap list / snap install for the Ubuntu OS.
> > 
> > this definitely means that snapd did not start for some reason,
> like i
> > mentioned before this could be caused by the firstboot
> initialization
> > of the board having failed or by some missing feature that snapd
> > expects from your kernel.
> > 
> > does sudo journalctl -u snapd.service reveal anything ?
> > do you find anything interesting in syslog in general ?
> > 
> We are seeing error related to AppArmor patches in journalctl log.
> The log is at: http://pastebin.com/vG9DQfTf

yes, this definitely looks like apparmor is not working, i have to pass
to paolo (or the security team) for this one


> > did console-conf (the first boot configuration UI) actually finish
> the
> > user creation properly (did it tell you about it and give you info
> > about how to ssh into the board) without any errors ?
> > 
> > /var/log/console-conf/subiquity-debug.log might be informative
> here.
> > 
> The subiquity-debug.log is at: http://pastebin.com/39zsb4nE
> 
that looks fine regarding user creation, i dont see anything related to
network setup though (neither wired nor wireless), which is a bit
strange.

> The AppArmor patches that we ported from the 
> http://kernel.ubuntu.com/git/ppisati/ubuntu-vivid.git/tree/arch/arm/c
> onfigs/snappy?h=snappy_v3.10
> 
> are for the linux kernel 3.10.
> 
> But the kernel that we are referring to is from 96boards - linux
> kernel 4.4.

this is definitely wrong, for 4.4 kernels you indeed need to use a 4.4
patch set, another thing for paolo to answer (i'm not even sure you
need any patches at all on a 4.4 kernel, all bits might be in-tree
already and just some config options might be enough)...

ciao
oli

signature.asc
Description: This is a digitally signed message part
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: [Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-02-22 Thread Paolo Pisati
On Wed, Feb 22, 2017 at 10:19:25AM +0100, Oliver Grawert wrote:
> > The AppArmor patches that we ported from the 
> > http://kernel.ubuntu.com/git/ppisati/ubuntu-vivid.git/tree/arch/arm/c
> > onfigs/snappy?h=snappy_v3.10
> > 
> > are for the linux kernel 3.10.
> > 
> > But the kernel that we are referring to is from 96boards - linux
> > kernel 4.4.
> 
> this is definitely wrong, for 4.4 kernels you indeed need to use a 4.4
> patch set, another thing for paolo to answer (i'm not even sure you
> need any patches at all on a 4.4 kernel, all bits might be in-tree
> already and just some config options might be enough)...

Unfortunately he is not using our Xenial kernel, so he still needs some patches
for AA - here's a updated delta of patches on top of stable/linux-4.4.y:

https://github.com/piso77/sample-kernels/commits/stable-4.4.y

depending of the 4.4.x revision you are using, if you apply all the patches
above the "Linux 4.4.50" commit, you will  get all you need.
-- 
bye,
p.

-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: [Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-02-28 Thread Oliver Grawert
hi,
Am Dienstag, den 28.02.2017, 13:03 + schrieb Sunny Bhayani:
> 
> But when we boot the kernel, we are getting stuck in kernel boot. It 
> seems the kernel is not getting the initrd. The bootlogs are 
> at: http://pastebin.com/eF2sCiyJ
> 
looks fine to me

...
reading 96boards-kernel_x1.snap/initrd.img
4821121 bytes read in 1315 ms (3.5 MiB/s)
...
Unpacking initramfs...
Freeing initrd memory: 4708K (ffc00400 - ffc004499000)
...

do you have a screen attached on HDMI ?
the kernel command line has:

... console=ttyMSM0,115200n8 console=tty0 ...

which means that after firing up the kernel with serial console the
system will switch to tty0 for any further boot output.
(if everything works you should get a "please press enter" message
after a while on serial though)

ciao
oli

signature.asc
Description: This is a digitally signed message part
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: [Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-03-06 Thread Paolo Pisati
Here is the Xenial kernel src tree, checkout the snapdragon branch:

https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/xenial/

it already contains a snapcraft.yaml so you can generate a working
kernel snap (though the firmware files are missing here).


On Sat, Mar 4, 2017 at 2:55 PM, Sunny Bhayani
 wrote:
> Hi Oliver,
>
> Thank you for your reply.
>
>> hi,
>> Am Dienstag, den 28.02.2017, 13:03 + schrieb Sunny Bhayani:
>> >
>> > But when we boot the kernel, we are getting stuck in kernel boot. It
>> > seems the kernel is not getting the initrd. The bootlogs are
>> > at: http://pastebin.com/eF2sCiyJ
>> >
>> looks fine to me
>>
>> ...
>> reading 96boards-kernel_x1.snap/initrd.img
>> 4821121 bytes read in 1315 ms (3.5 MiB/s)
>> ...
>> Unpacking initramfs...
>> Freeing initrd memory: 4708K (ffc00400 - ffc004499000)
>> ...
>>
>> do you have a screen attached on HDMI ?
> We tried both: attaching HDMI Display on cold boot and cold boot without the
> HDMI out. But nothing comes on the display.
>
> We tried on two different HDMI Displays.
>
>> the kernel command line has:
>>
>> ... console=ttyMSM0,115200n8 console=tty0 ...
>>
>> which means that after firing up the kernel with serial console the
>> system will switch to tty0 for any further boot output.
>> (if everything works you should get a "please press enter" message
>> after a while on serial though)
>
> We waited for more than 30 minutes, but no message comes.
>
> We have a question. In earlier reply, Paolo told that over kernel is not
> xenial
> kernel.
>
> So is there a way, wherein you can point us to the kernel where the
> Dragonboard
> prebuilt images where built from, so that we can at least get to a point of
> the
> already released prebuilt images, and proceed further.
>
> Awaiting your reply.
>
> 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.
> *



-- 
bye,
p.

-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: [Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-03-07 Thread John Lenton
note that in that log, snapd isn't running because

snapd[2217]: fatal error: runtime: out of memory

On 22 February 2017 at 07:52, Sunny Bhayani
 wrote:
> Hi Ogra,
>
> Appreciate for your help.
>
>> hi,
>> Am Freitag, den 17.02.2017, 10:06 + schrieb Sunny Bhayani:
>> >
>> >
>> > You are correct that in the prebuilt image (Ubuntu OS) for
>> > Dragonboard, the Wifi
>> > module is auto-loaded during boot. But in our case, this does not
>> > happen.
>> >
>> > So can you please let us know, that in what part (plugin) of the
>> > snapcraft.yaml
>> > do we need to mention the kernel modules that needs to be auto-loaded
>> > during the
>> > kernel boot.
>> >
>> > We tried to add the kernel module in the snapcraft.yaml as below:
>> >
>> >   kernel-initrd-modules:
>> >  - squashfs
>> >  - wcn36xx
>>
>> this would just pull the module into the initrd which would be useless,
>> since we do not ship any userspace bits for WIFI support in there.
>> if you can modprobe it it is obviously already in the right place in
>> your /lib/modules dir on the booted system, so first of all remove it
>> from the list above. having it already loaded from the initrd on boot
>> might make it miss the right initialization since it wont find all the
>> userspace bits that it needs in the initrd.
>>
>> also make sure you have the firmware in the right place on the booted
>> rootfs, this is how it looks like on the official dragoboard image:
>>
>> http://paste.ubuntu.com/24012991/
>>
> Yes, we have the /lib/modules and /lib/firmware populated as you have
> mentioned
> above.
>
>> >
>> > Also, we went through the kernel-initrd-modules description:
>> > https://snapcraft.io/docs/reference/plugins/kernel
>> >
>> > and there it is mentioned that the "kernel-initrd-modules" plugin is
>> > used to
>> > mention the modules required to mount the rootfs.
>>
>> this means filesystem or disk controller modules (squashfs, ext4 (if
>> you do not compile it in), mmc support and the like), since your system
>> boots to a rootfs already you should not need anything more than you
>> currently have.
>>
>> > >
> Yes, agreed as you have mentioned above for the "kernel-initrd-modules".
>
>> >
>> > It would be great if you can please help us out on this front as well
>> > for the
>> > snap list / snap install for the Ubuntu OS.
>>
>> this definitely means that snapd did not start for some reason, like i
>> mentioned before this could be caused by the firstboot initialization
>> of the board having failed or by some missing feature that snapd
>> expects from your kernel.
>>
>> does sudo journalctl -u snapd.service reveal anything ?
>> do you find anything interesting in syslog in general ?
>>
> We are seeing error related to AppArmor patches in journalctl log.
> The log is at: http://pastebin.com/vG9DQfTf
>
>> >
>> >
>> > Yes. We are using a USB to Ethernet module on dragonboard to use the
>> > Ethernet.
>> >
>> did you check if  the behaviour of the WLAN device changes when booting
>> without the USB dongle attached ?
>>
> This we have not checked. Will update for this.
>
>> > While using the prebuilt image for Dragonboard, we are able to
>> > configure the
>> > access point for Wifi interface in the first boot screen, but then
>> > while doing
>> > ssh to the board, it is asking for password (during first boot). How
>> > can we
>> > resolve this ?
>> >
>>
>> did console-conf (the first boot configuration UI) actually finish the
>> user creation properly (did it tell you about it and give you info
>> about how to ssh into the board) without any errors ?
>>
>> /var/log/console-conf/subiquity-debug.log might be informative here.
>>
> The subiquity-debug.log is at: http://pastebin.com/39zsb4nE
>
> The AppArmor patches that we ported from the
> http://kernel.ubuntu.com/git/ppisati/ubuntu-vivid.git/tree/arch/arm/configs/snappy?h=snappy_v3.10
>
> are for the linux kernel 3.10.
>
> But the kernel that we are referring to is from 96boards - linux kernel 4.4.
>
> Moreover, the prebuilt image is also built for linux kernel 4.4.
>
> So do you have a kernel source for AppArmor patches which are ported on
> linux
> kernel 4.4 like the prebuilt Ubuntu Core Image for Dragonboard410c.
>
> Please provide the patchset link for the latest kernel.
>
> Awaiting your reply.
>
> 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 prohibit

Re: [Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-03-16 Thread John Lenton
Hi Sunny,

I don't understand what's going on with your system:
* snapd is running out of memory. snapd should be using about 20MB of
resident memory. How much was it trying to use when it ran out? How
much is available? What does dmesg say about this crash?
* snapd on a core system that doesn't list any snaps makes no sense at
all. It needs to have at least three snaps at first boot: core,
kernel, and gadget, otherwise you wouldn't get there. How are you
building the image that you are booting? What's in
/var/lib/snapd/state.json? (don't just pastebin that file if you have
credentials in it!) What's in /snap? What's in /var/lib/snapd/seed/?
And in seed.yaml? What's in /var/lib/snapd/snaps? What's in
/etc/os-release?



On 16 March 2017 at 07:17, Sunny Bhayani  wrote:
> Hi John,
>
> Thank you for the finding.
>
>> note that in that log, snapd isn't running because
>>
>> snapd[2217]: fatal error: runtime: out of memory
>>
> But there is no process invoked explicitly from our end.
>
> So is there something that we can check for this error ?
>
> @paolo.pisati and @ogra:
> We downloaded the xenial kernel that is used for Dragonboard410c prebuilt
> binaries as you mentioned earlier:
> git clone
> git://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/xenial
>
> We added dtsi and firmware options in snapcraft.yaml.
> Here is our snapcraft.yaml: http://pastebin.com/QBKLGkfu
>
> We are getting wifi interface in the first boot console, and all the modules
> are automatically loaded (insmod) when rootfs is mounted.
>
> It would be great if you can address the below issues / queries
> (This would really get us going ahead):
>
> 1. "snap list" does not show any snaps.
> However, we have observed that there are times when "snap list" shows
> just core.snap. But this is very rare.
>
> 2. "snap install hello-world" gives this error: http://pastebin.com/HV4fWzGk
>
> 3. When we build the linaro linux kernel, once we generate the uImage,
> we build the boot.img which has the DTB + uImage + cmdline args + initrd.
>
> So if we want to change the cmdline arguments to kernel in Ubuntu-Core,
> then how can we change it from snapcraft.yaml ?
>
> Awaiting your reply.
>
> Thanks & Regards,
> 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.
> *

-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: [Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-03-19 Thread Oliver Grawert
hi,
On Fr, 2017-03-17 at 12:18 +, Sunny Bhayani wrote:
> 
> The above log has two trial logs. In the First trial, we have
> prepared the 
> SDCard and have setup the first boot console config. In the Second
> trial,  
> we did "snap login".
> 
> We obsereved that whenever we do a "snap install", irrespective of
> it 
> being successful or fail, we get the below message repeatedly and
> the 
> board reboots automatically after 15-20 minutes: 
> 
>     "Broadcast message from root@localhost.localdomain (Thu 2017-03-
> 16 12:31:13 UTC):
...
> 
> It would be great, if you can provide any comments.
> 

the image has not properly being initialized ... else you would only
get the reboot notifications after the first upgrade of the core snap
(i.e. your root filesystem)...

normally a "snap list" should list the gadget (dragonboard), core and
the kernel snap (ubuntu-snapdragon-kernel) you described in your model
assertion, even before you installed anything.

> > How are you building the image that you are booting? 
> 
> Here are the steps to building Ubuntu-Core Image: http://pastebin.com
> /0x52ATXi
> 

...and here we have your issue...

you need to use a proper authority id and brand id in your assertion
file, else the initial setup (before console-conf) will not happen, you
used the: 

"authority-id": "",
"brand-id": "",

boilerplate values in your json file ...

you can get the data for your auth-id from your account info via:

https://myapps.developer.ubuntu.com/dev/account/

ciao
oli

signature.asc
Description: This is a digitally signed message part
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft


Re: [Dragonboard410c] Ubuntu OS Build Issues, and Support

2017-03-20 Thread Oliver Grawert
hi,
Am Montag, den 20.03.2017, 06:04 + schrieb Sunny Bhayani:
> Hi Oliver,
> 
> Thank you for your reply.
> 
> > hi,
> > the image has not properly being initialized ... else you would
> only
> > get the reboot notifications after the first upgrade of the core
> snap
> > (i.e. your root filesystem)...
> > 
> > normally a "snap list" should list the gadget (dragonboard), core
> and
> > the kernel snap (ubuntu-snapdragon-kernel) you described in your
> model
> > assertion, even before you installed anything.
> > 
> We are not getting the above three snaps listed even though we get
> through 
> the initial conf setup. So can you point to a possible error ?

yes, the broken assertion file will prevent the verification of the
snaps in the firstboot setup.
this happens during first boot way before you can interact with the
system. it will then (amongst other things) add these snaps to the
state.json file (which is why john asked for the content i guess).

> 
> We are populating the "authority-id" and "brand-id" fields in the
> json file 
> from the above link that you have mentioned i.e.
> https://myapps.developer.ubuntu.com/dev/account/
> 
> The "authority-id" field and "brand-id" is populated as "Account-Id"
> found 
> in the above link which is a 32-letter (Alpha-numeric).
> 
> Please do let us know if we are missing anything.

with that it should work if the account the assertion gets signed with
is identical to the one in the store 

> 
> Also, as you mentioned that without proper authority id and brand id
> in the 
> assertion file, initial setup (before console-conf) will not happen.
> But we are 
> able to do the initial setup (profile setup) and then we get the
> shell prompt.
> 
> So can the initial setup be done if assertion model is not correct ?

yes, this is probably a usability bug a failed firstboot configuration
should at least spill a readable error or show it failed in the
console-conf UI.

> 
> If possible, this is to request you that if you can build the xenial
> sources (branch "snapdragon")
> once and check if you are facing these errors like we are ?
> 
> We had only changed the snapcraft.yaml to get the dtb and firmware
> built.

i'm a bit short on time this week but i'll see what i can do :)

ciao
oli

signature.asc
Description: This is a digitally signed message part
-- 
Snapcraft mailing list
Snapcraft@lists.snapcraft.io
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/snapcraft