Upcoming Debian April release for DB410c-- call for testing


#1

hello,

I am trying something unusual this time… we will see how it goes :wink:

We are planning to make a Debian bug fix update this month for the DB410c, and I wanted to get users feedback before officially posting it. The candidate for the release is this build:

http://builds.96boards.org/snapshots/dragonboard410c/linaro/debian/80/

If you get a chance to try your typical workload and use cases on this build and report any feedback, that would be very helpful.

This is a bug fix release only, with no major new features. On the kernel side:

  • upgrade to Linux 4.4.8 kernel
  • address the SPI build/config issues reported on the forum
  • fix the cpufreq issue reported on this forum after 16.02 release was done
  • fix WLAN SoftAP mode

The user space image has been regenerated, so there are likely a few packages updates from Jessie security and/or backports. We also added libmraa and libsoc by default from now on.

We will keep testing on our side as well, and if there is no major issue , we will make a “16.04” release by the end of this week.

thanks a lot!


#2

Hi,

The main documentation of installing snapshot release is written here.

This is my short description of installing snapshot image.

(*)Download files.
http://builds.96boards.org/snapshots/dragonboard410c/linaro/debian/80/boot-linaro-jessie-qcom-snapdragon-arm64-20160425-80.img.gz
http://builds.96boards.org/snapshots/dragonboard410c/linaro/debian/80/linaro-jessie-alip-qcom-snapdragon-arm64-20160425-80.img.gz

()Assure that a micro USB cable is connected from the micro-USB port on the DB410c to the host PC
(
)Assure micro SD Card slot is empty on the DB410c
()Set the S6 switch on the DB410c to: 0-0-0-0 {SD Boot set to off}
(
)power on the DB410c into fastboot mode
Press and hold the Vol (-) button on the DB410c (S4)
While pressing S4 button, power up the DB410c. It will come up in fastboot mode

(*)From the host PC terminal window, run the following commands:
$ sudo fastboot devices
it should return something similar to bellow if the DragonBaoard is booted successfully on fastmode.
de82318 fastboot

(*)Write the bootloader and the Debian image to DragonBoard.
$ gunzip *.img.gz
$ sudo fastboot flash boot boot-linaro-jessie-qcom-snapdragon-arm64-BUILD#.img

power on the DB410c into fastboot mode again.
Press and hold the Vol (-) (S4) button on the DB410c.
While pressing S4 button, power up the DB410c. It will come up in fastboot mode.

$ sudo fastboot flash rootfs linaro-jessie-alip-qcom-snapdragon-arm64-BUILD#.img
Please be patient, this will take several ten minutes.

(*)Booting with new image.
Unplug the power to the DB410c.
Unplug the micro USB fastboot cable.
Plug the power back into the DB410c.


#3

thanks akira. I think most people use the ‘alip’ image, not the ‘developer’ image though.


#4

Thanks @ndec,

I just edited the instruction to flush ‘alip’ image.
:slight_smile:


#5

I have started testing with the candidate build.

First the WiFi - I initially connected to my router, and the link stopped after a few minutes. I reconnected and the link has stayed up for the last several hours.

Next I tried to follow the steps to setup the Sensors mezzanine board using the provided instructions that had worked fine under an earlier build https://www.96boards.org/products/mezzanine/sensors-mezzanine/ I got stuck on page 9 installing the mraa library. The cmake step fails with the message:
SWIG is 3.0.2. Please upgrade to 3.0.5+ to build nodejs addon
how do I install to latest version of SWIG?

When trying to build upm (also on page 9) it fails with the error:fatal error: jpeglib.h: No such file or directory #include <jpeglib.h>

Moving on, I wanted to use the Linker Mezzanine board. The ADC on the sensors mezzanine board uses spi for communication. I looked for /dev/spidev0.0 but it is not there. Do I need to recompile the kernel to enable spidev? I did see /sys/class/spi_master/spi0 but I am not familiar with how to use this interface, can you point me to a tutorial. I was hoping to access the spidev from python, has anyone tried https://pypi.python.org/pypi/spidev yet? Is there an easy way to install this package?

Full Disclosure: I am an employee of Qualcomm Canada, any opinions expressed in this or any other post may not reflect the opinions of my employer.


#6

Hi @ljking,

I’m looking at the SPI using Python also without any success.

To install spidev from pypi you need:


sudo apt-get install python3-pip
pip3 install spidev

I’m trying bus = 32766 and device = 0 and getting the error “No such file or directory”

Any suggestions welcome.


#7

@ljking: thanks for trying this out.

  • for the sensor mezzanine guide, i am not familiar with that. I am hoping akira can support that. The user space packages are fairly generic for all the linaro builds, and I know that we recently added libmraa package by default in our images, so maybe that conflicts with the instructions… e.g. I can see this:

libmraa0 0.10.1-1

  • for the mezzanine guide, can you confirm the instructions used to with the previous build you tried? If so which build was that?

  • for SPI, SPIDEV is enabled as module in our build now:
    CONFIG_SPI_SPIDEV=m
    However we do not have the DTS change to create the spidev node. As I think I mentioned here (at least I hope i did) such a change cannot be done in the DTS , which is expected to contain only nodes that represent ‘real’ devices. Our 96boards team is working on adding a specific DTS overlay config file that would contain the spidev node. Akira might have some pointers for that too, hopefully.


#8

Hi @barryb
Thank you for the instructions on how to install python spidev. The instructions worked no issues.

The bus=32766 is one of the issues that were resolved during the spi debugging that we did in this thread http://www.96boards.org/forums/topic/how-to-enable-spi-and-access-it-in-debian-os/, one of the patches Srini did resolves the numbering. I think you should be using bus=0 now. I haven’t tested it because I am still recompiling the kernel to turn on spidev.

Full Disclosure: I am an employee of Qualcomm Canada, any opinions expressed in this or any other post may not reflect the opinions of my employer.


#9

Hi @ndec,

I had the expectation that the libsoc library would be included in this release. I have not been able to find the Python bindings for the libsoc library. Should the Python bindings be there?

With reference to SPI, is there a way of enabling SPI on the board without needing to have a HostPC? I have a setup where I’m doing development directly on the DB410c.

Thanks


#10

hi,

as i said earlier, i am not familiar enough with libsoc… i will ask others for help here…

related to the host PC, yes everything is doable directly on the board… i know ljking builds his kernel on the board :wink: I wouldn’t recommend doing that to be honest… doing embedded Linux dev without a Linux PC (or VM) is a bit brave, i would say… the DB410c is a little ‘low’ on the performance , especially with its 1GB of RAM, so you might end up into some memory limitations … but you should still be able to get all instructions to work.


#11

Hi @barryb

as @ndec says I always do my builds on the 410c. You do need a SDCard with a swap space (1GB is enough) to get the download and compile to run. It’s not that slow, about 30 mins to rebuild the kernel and the device tree. The basic instructions are in this thread: http://www.96boards.org/forums/topic/rebuilding-the-boot-partition-on-410c/#post-8330

a couple minor differences for this build:

 git checkout -b build-80 6ee1ac74d8115fd050cb76a5e668f11ef0c8a266

and
make Image dtbs -j4 KERNELRELEASE=make kernelversion`-linaro-lt-qcom"

in the command above you need back-ticks around the make kernelversion, but the forum formatter mess them up.
No need to set up a cross compiler, the native compiler works just fine.


#12

Wrt UPM/MRAA, packages are available in the overlay repositories and should be included in the latest images. The relevant commit is:
https://git.linaro.org/ci/ubuntu-build-service.git/commitdiff/fd1bc6aa150f837300875c721bb12387f8aaa183

For libsoc, the package available is the latest release which doesn’t include the python bindings. An updated package with the python bindings enabled is coming shortly. The official 0.8 release should done in the next couple of weeks by upstream.

You should probably install libmraa-dev, libupm-dev and libsoc-dev if you want to build the examples.

I can’t comment on spidev as I haven’t tried but using python3 looks suspicious. The default python version is 2.7 so I suggest to use the default python.


#13

Hi,

This release is fantastic.

(1)
The USB-Sound card works.
This is really good!
$ sudo apt-get install vlc
and was able to play mp4 file. :slight_smile:
This is the dmesg.
[ 775.369177] usb 1-1.1: new full-speed USB device number 4 using msm_hsusb_host
[ 775.462848] usb 1-1.1: New USB device found, idVendor=0d8c, idProduct=000c
[ 775.462931] usb 1-1.1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 775.468805] usb 1-1.1: Product: C-Media USB Headphone Set
[ 775.514117] input: C-Media USB Headphone Set as /devices/platform/soc/78d9000.ehci/usb1/1-1/1-1.1/1-1.1:1.3/0003:0D82
[ 775.570144] hid-generic 0003:0D8C:000C.0001: input: USB HID v1.00 Device [C-Media USB Headphone Set ] on usb-78d9000.3

(2)
Supports Grove Starter Kit for 96Boards out of the box.
To install libmraa and libupm for using them. No more building them from source.
$ apt-get update
$ sudo apt-get install libmraa0
$ sudo apt-get install libmraa-dev
$ sudo apt-get install libupm-dev
$ wget https://github.com/96boards/Starter_Kit_for_96Boards/archive/master.zip
$ unzip master.zip
$ cd Starter_Kit_for_96Boards-master
$ cd rgb_lcd_demo
$ make
$ sudo ./rgb_lcd_demo
(this is the only minor changes, now it requires to use “sudo”)
Now you could see LCD working.
:slight_smile:


#14

So I’ve been fighting with the WIFI bug for the past couple of days on a dragonboard running :

https://bugs.96boards.org/show_bug.cgi?id=272

And was tempted to attempt to patch the WIFI bug myself and quickly realized it would be an all day project. Thus I took the plunge on this dev release and found that the same “hal_remove_bsskey” error occurring on network restart.

I did not find anything out of the ordinary in dmesg / journalctl other than the hal_remove_bsskey warning. I did find ssh sessions dropping and general Internet connectivity to be latent. Ping times, even to the local router, were sporadic, with the device sitting next to it. However, it did not disconnect at all. After updates, several reboots + trying different hotspots, the results were the same.

My assumption is that bug (id 272) has not been patched. Or it has been patched and I’m fighting something else.

All of my troubleshooting (prior to reading about the bug) pointed me to ipv6 & ssh/ssl issues. Everything I tried resulted in failure and continued intermittent connectivity. When I attempted to ssh or scp in or out of the box, the connection would become latent.

I installed vino & dconf-editor, enabled the vnc server and started vino-server, while running a continuous ping to the router. When I started vino-server, some packet loss occurred.

Between reboots, disabling ipv6 (set to local link only), setting a static IP, resetting the wifi router, running nm-applet as root, I ended up getting a stable connection. Now I’m using vino successfully for a good 20 minutes. I see these new errors in dmesg, related to qualcomm codec (I assume this is because I ran nm-applet as root):

[ 20.026361] msm8x16-wcd-codec 200f000.spmi:pm8916@1:codec@f000: msm8x16_wcd_hw_params: dai_name = msm8x16_wcd_i2s_rx1 DAI-ID 0 rate 48000 num_ch 2 format 2
[ 20.027991] msm8x16-wcd-codec 200f000.spmi:pm8916@1:codec@f000: msm8x16_wcd_hw_params: dai_name = msm8x16_wcd_i2s_tx1 DAI-ID 1 rate 48000 num_ch 2 format 2
[ 20.117127] msm8x16-wcd-codec 200f000.spmi:pm8916@1:codec@f000: msm8x16_wcd_codec_enable_dec(): widget = DEC1 MUX dec_name = DEC1 decimator = 1
[ 20.117187] msm8x16-wcd-codec 200f000.spmi:pm8916@1:codec@f000: msm8x16_wcd_codec_enable_dec(): widget = DEC1 MUX dec_name = DEC1 decimator = 1
[ 20.161051] msm8x16-wcd-codec 200f000.spmi:pm8916@1:codec@f000: msm8x16_wcd_codec_enable_dec(): widget = DEC1 MUX dec_name = DEC1 decimator = 1
[ 20.185116] msm8x16-wcd-codec 200f000.spmi:pm8916@1:codec@f000: msm8x16_wcd_codec_enable_dec(): widget = DEC1 MUX dec_name = DEC1 decimator = 1
[ 20.216710] msm8x16-wcd-codec 200f000.spmi:pm8916@1:codec@f000: msm8x16_wcd_hw_params: dai_name = msm8x16_wcd_i2s_rx1 DAI-ID 0 rate 48000 num_ch 2 format 2
[ 20.289797] msm8x16-wcd-codec 200f000.spmi:pm8916@1:codec@f000: msm8x16_wcd_hw_params: dai_name = msm8x16_wcd_i2s_tx1 DAI-ID 1 rate 48000 num_ch 2 format 2
[ 20.369117] msm8x16-wcd-codec 200f000.spmi:pm8916@1:codec@f000: msm8x16_wcd_codec_enable_dec(): widget = DEC1 MUX dec_name = DEC1 decimator = 1
[ 20.369170] msm8x16-wcd-codec 200f000.spmi:pm8916@1:codec@f000: msm8x16_wcd_codec_enable_dec(): widget = DEC1 MUX dec_name = DEC1 decimator = 1

I updated; upgraded & for shits & giggles, installed kodi. While typing this the vnc session is lagging, but still connected.

Nothing new in dmesg.

I ran kodi and it was surprisingly peppy; far more responsive than I have seen it on any other install. After adding digitally imported to music, the vnc session froze, presumably because of intermittent network. I restarted the network and was able to connect again. After some time, digitally imported finally loaded and was able to play. However, I do not have any speakers on the HDMI monitor, so I added a bluetooth speaker. The vnc session reconnected sporadically but functioned, even with kodi running.

Another error in dmesg:

1075.866789] msm8x16-wcd-codec 200f000.spmi:pm8916@1:codec@f000: msm8x16_wcd_hw_params: dai_name = msm8x16_wcd_i2s_rx1 DAI-ID 0 rate 48000 num_ch 2 format 2
li

sh: 1: nmblookup: not found
sh: 1: nmblookup: not found
sh: 1: nmblookup: not found

finally nothing working right, so…

reboot

now having a hard time connecting to any wifi…

I did manage to connect a bluetooth speaker, but without Internet did not get any noise. Seems once the bluetooth is up, the wifi won’t authenticate.

Does this release include the wifi patch?


#15

this release does not include fix for 272, but for 294 (e.g. SoftAP). we will make another update when 272 is fixed.


#16

Not sure if this is related to 272 or not, but I did confirm that once you install bluetooth, blueman, bluez, the wifi modem will continuously timeout while trying to authenticate (even with bluetooth modem down). Once you purge bluetooth, wifi instantly connects.


#17

I managed to get through testing the spi on the latest build. I have to make some changes to the device tree to enable /dev/spidev0.0, and a change to the spi driver to make the chip select work properly. Here are the changes. Add the block of code proceeded with a ‘+’ sign into the file arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi:

        spi@78b9000 {
	/* On Low speed expansion */
	label = “LS-SPI0”;
	status = <Okay>;
+		spidev@0 {
+			compatible = "spidev";
+			spi-max-frequency = <50000000>;
+			reg = <0>;
+		};
        };

In the file arch/arm64/boot/dts/qcom/msm8916-pins.dtsi near line 211 change the line marked with a + to:

        pinmux_cs {
+		function = “blsp_spi5”;
		pins = “gpio18”;
	};

In the file drivers/spi/spi-qup.c near line 549 add the line:

’ + control |= SPI_IO_C_MX_CS_MODE; ’

I think this should be added to the driver at all times.

Recompile the kernel, and rebuild the device tree and SPI works.

You can also access to spidev from Python by installing python spidev:


sudo apt-get install python-pip
pip install spidev’

and then write code to read the ADC on the linker board:


import spidev
spi=spidev.SpiDev()
spi.open(0,0)
spi.max_speed_hz=100000
channel_select=[0x01, 0x80, 0x00]
if name==’main’:
print(“welcome to the slide pot reader”)
try:
while True:
adc_data=spi.xfer(channel_select)
adc=((adc_data[1]<<8)&0x300)|(adc_data[2]&0xFF)
print(adc)
except KeyboardInterrupt:
print(“CTRL-C, Exiting”)’

I did not check that the SPI driver changes to allow packets larger than 16 bytes, I will leave this to @suicidaleggroll to check.


#18

what do you mean by ‘install bluetooth’ or ‘purge bluetooth’?

also, how did you install the release, did you use the SD card install or are you flashing the kernel and rootfs directly? If the latter, are you sure to use the latest ‘linux bootloader’ package, e.g.

http://builds.96boards.org/releases/dragonboard410c/linaro/rescue/16.02/dragonboard410c_bootloader_emmc_linux-46.zip

the sbl1 binary in this package contains a fix needed for the WLAN firmware.


#19

ndec, yes I am using the boot loader that was built on 2-10 and flashed to emmc.

When you have a connection to wifi, without bluetooth blueman bluez bluez-tools installed, and you install them:

sudo apt-get install bluetooth blueman bluez bluez-tools

And turn on bluetooth, make a connection to a device (bluetooth speaker in my case), the wifi stops working and times out while trying to re-authenticate.

Then typing:

sudo apt-get purge bluetooth blueman bluez bluez-tools

The wifi reconnects and authenticates on its own (but remains intermittent and latent).


#20

hi ndec -

I was able to stabilize the wifi connection by stopping NetworkManager from scanning using this:

sudo killall -STOP NetworkManager

Once it stops scanning, bug 272 goes away and it is stable.

Regardless of what I do, I cannot get the bluetooth modem & wifi modem to work simultaneously. As soon as bluetooth is loaded, regardless if the service is running or the modem on, the wifi disconnects and cannot re-authenticate (with network-manager on).

I’m using 16.04 every day with dragonboard410c_bootloader_emmc_linux-46.zip bootloader. Any suggestions on how to make bluetooth work as well is much appreciated.

Once the wifi is stable, everything else works well, other than bluetooth.