Modules missing on Dragonboard410c


#1

Hi,

We are using Linaro 16.09 Release from 96boards, which is based on kernel 4.4.23

We are using the above release to build Ubuntu-core Image for Dragonboard 410c. After flashing no modules are present in /lib/modules.

Even there are no firmware binaries in /lib/firmware.

lsmod shows ‘squashfs’.

Moreover WiFi interface is not present in ifconfig -a.

All the above mentioned issues are not present in prebuilt binary of Ubuntu-Core for Dragonboard.

Please give pointers regarding the same.

Thank you,
Megha


#2

16.09 is a Debian release (with /lib/modules and /lib/firmware included in the rootfs image) so presumably you are grabbing a boot image or kernel from the Debian release and trying to boot Ubuntu with it.

You will have to explain what you are doing that for us to have any chance to spot any problems with your approach.


#3

Hi danielt,
Thank you for the reply

We are using 16.09 Debian release source as specified from 96 Boards, on top of that applied Ubuntu-Core patches. Now if we manually compiled source and flashing the created boot image on to Dragon Board 410c. Then wifi is working properly.

After that on the same source we are just using snapcraft command to prepare kernel snap and gadget snap. And then generate one Ubuntu-core Image which is combination of Kernel, gadget and OS snap.

After flashing it on board, Board is booting successfully, Login prompt is also shown. After entering into command prompt, We are unable to see any modules under /lib/modules.

And also WiFi configuration is not seen in ifconfig -a.


#4

What you are doing should work (both /lib/modules and /lib/firmware is OK on both Debian, Canonical’s ubuntu-core image and OpenEmbedded/RPB) so it is likely you have made a mistake on one of the steps you have taken. Unfortunately you have not shared what those steps are. When you are asked for more detail it’s easy to get help if you reply focuses on the actual steps you are taking (at a command-by-command level).

It sounds as if you build the kernel using the kernel build system then everything works but if you build the kernel as a snap then the results are faulty. If that’s the case then the absolute minimal “how” is for you to share the contents of your snapcraft.yaml and how you have generated your Ubuntu rootfs image with the snap pre-integrated.


#5

Hi danielt,

Right. By kernel build system everything works fine, while build kernel as a snap then results are faulty.

For kernel snap generation command: 'snapcraft --target-arch arm64 snap’
snapcraft.yaml :
--------------------------------------------------START----------------------------------------------------
name: 96boards-kernel
version: 4.4.23
summary: 96boards reference kernel with qualcomm firmware
description: this is an example on how to build a kernel snap.
type: kernel

parts:
kernel:
plugin: kernel
source: kernel
source-type: git
kdefconfig: [defconfig, distro.config]
kconfigs:
- CONFIG_LOCALVERSION="-96boards"
- CONFIG_DEBUG_INFO=n
- CONFIG_SQUASHFS=m
- CONFIG_MISC_FILESYSTEMS=y
- CONFIG_SQUASHFS_XZ=y
kernel-initrd-modules:
- squashfs
kernel-image-target: Image
kernel-device-trees:
- qcom/apq8016-sbc
- qcom/msm8916-mtp
firmware:
plugin: tar-content
source: firmware.tar
destination: lib/firmware
--------------------------------------------------END------------------------------------------------------

For compilation, I used the steps as given below:

https://docs.ubuntu.com/core/en/guides/build-device/image-building

Please give some pointers to debug this issues.

Thank you,
Megha


#6

So firstly, you should probably see how you get on asking detailed questions (like the above) on the Ubuntu forums. To be honest, even now, there’s still a lot of detail lacking since you’ve offered no info about your model assertions or gadget files (which drive the construction of the final image).

The other option is to roll up to OpenHours since over the next three weeks @sdrobertw is hosting a series of shows focused on Ubuntu Core.


#7

Hi danielt, Thanks for your time.

I am able to list under /lib/modules and /lib/firmware.
for that I changed some files over snapcraft source package.

Now My question is how you are checking WiFi on Ubuntu-core?
And one more que is Using prebuilt Image, we are able to show wlan0 node in network setup.

while in our case, we are only seeing eth0 in network setup. However we are able to work wifi by manually.
But we have to make it automatically same as in prebuilt.

One more issue is hw address for wlan0 is 00:00:00:00:00:00. SO every time I have to change it manually.
Is there any way to fix it?

Awaiting for your reply.

Thanks,
Megha


#8

I never really tested WiFi explicitly, however I used the WiFi connection in order to register and fetch SSH keys (as well as to SSH to the board).

Regarding the wlan0 address, take a look at /usr/sbin/wcnss-gen-macaddr in the debian images. If the board doesn’t have a MAC address set (/lib/firmware/wlan/macaddr0) it will derive a (locally assigned) MAC address using the eMMC serial number to avoid collisions.


#9

Hi Danielt,

Thank you for your reply.

In the prebuilt image for Dragonboard Ubuntu Core OS, I am able to connect to the Wifi Access Point in the first boot screen. After this, I get the ssh info for the board.

But when I try to ssh to the board, I am being asked password. Can you please let me know as to how you fetched the SSH keys and did a ssh to the dragonboard.

I did a cat /lib/firmware/wlan/macaddr0 in our custom built Ubuntu Core OS Image and got the mac address.

But then how can I assign the mac address to the wifi interface (wlan0) in Ubuntu Core OS ?

I am already using the iw tools i.e. ifconfig, iw, wpa_passphrase, and wpa_supplicant to configure the wlan0 interface manually. But is there a way to automate these as done in the prebuilt image during the first boot screen ?

Thanks,
Megha


#10

Er… I registered my SSH public key with Canonical and everything “just worked”. With the pre-built images as soon as I registered I was able to SSH successfully (I never checked what the MAC address was).

I’m afraid I can’t really comment on the difference between a pre-built and self-built ubuntu image. I can’t see anything wrong on the kernel side and I’ve never tried to make my own ubuntu image (I’m a fairly experienced kernel hacker but I don’t usually use Ubuntu much).


#11

Hi megha,

firmware content which i gave as a tar content in kernel snapcraft yaml does not getting reflect under /lib after bootup.can you let us know what are the changes you made to reflect it under /lib.

Below is the part of my kernel snapcraft
firmware:
plugin: tar-content
source: firmware.tar
destination: lib/firmware

Thanks


#12

I think we need to include directly in firmware directory under kernel source before generating snap.we need not have to explicitly mention in yaml.

Thanks


#13

Hi danielt/megha,
i’m trying to bringup wifi and bluetooth on snappy ubuntu. Required firmware and modules were present in /lib
but wlan interface is not showing up with ifconfig .can you help me on this.

Regards,
Laxman