New Kernel for Wandboard Quard

Hi, I am trying to follow the instructions on this page https://www.digikey.com/eewiki/display/linuxonarm/wandboard to build a new Kernel / SD boot disk for my Wandboard Quad. I am doing this in Ubuntu 18.04.1 on a x86-64 machine.

I am able to follow the instructions until I reach:

make ARCH=arm CROSS_COMPILE=${CC} wandboard_defconfig

When I execute the above, I get the following error:

HOSTCC scripts/basic/fixdep
/bin/sh: 1: cc: not found
scripts/Makefile.host:97: recipe for target ‘scripts/basic/fixdep’ failed
make[1]: *** [scripts/basic/fixdep] Error 127
Makefile:415: recipe for target ‘scripts_basic’ failed
make: *** [scripts_basic] Error 2

Would someone be able to help me? I can follow simple instructions, but otherwise am a Linux newbie. I am trying to build a new kernel so that my Wandboard Quad will have the latest patches. My current kernel does not fully support my DAC for USB Audio and DSD.

Thank you. Hammer8

@hammer8

First double check how you exported “cc/CC” as it’s not getting passed to the kernel build scripts… Second, you do have gcc installed for the host machine?

Regards,

Hi, I changed git checkout v2018.09 -b tmp to git checkout v2018.11 -b tmp

and got the rest of the procedure working. With the SD card that is created, I am able to boot my wandboard, but I am experiencing some issues. For example, it looks like the sound drivers are not installed. Do you have any instructions to get all the peripherals on the Wandboard Quad working? Thank you! Hammer8

@hammer8, the snd drivers are installed, you just need to properly select which output device, thru alsamixer/aplay

 voodoo@w1-imx6q-wandboard-2gb:~$ uname -r ; dmesg | grep spdif ; lsmod | grep snd_soc ; aplay -l
4.19.9-armv7-x13
[    9.791224] imx-spdif sound-spdif: ASoC: CPU DAI (null) not registered
[    9.791238] imx-spdif sound-spdif: snd_soc_register_card failed: -517
[    9.847701] imx-spdif sound-spdif: ASoC: CPU DAI (null) not registered
[    9.847712] imx-spdif sound-spdif: snd_soc_register_card failed: -517
[    9.947043] imx-spdif sound-spdif: ASoC: CPU DAI (null) not registered
[    9.947062] imx-spdif sound-spdif: snd_soc_register_card failed: -517
[    9.990388] imx-spdif sound-spdif: ASoC: CPU DAI (null) not registered
[    9.990406] imx-spdif sound-spdif: snd_soc_register_card failed: -517
[   10.037378] imx-spdif sound-spdif: snd-soc-dummy-dai <-> 2004000.spdif mapping ok
[   10.037395] imx-spdif sound-spdif: ASoC: no DMI vendor name!
snd_soc_sgtl5000       32768  1
snd_soc_fsl_ssi        20480  2
snd_soc_imx_sgtl5000    16384  0
imx_pcm_fiq            16384  1 snd_soc_fsl_ssi
snd_soc_fsl_spdif      24576  2
imx_pcm_dma            16384  2 snd_soc_fsl_ssi,snd_soc_fsl_spdif
snd_soc_imx_spdif      16384  0
snd_soc_core          167936  7 snd_soc_fsl_ssi,snd_soc_imx_sgtl5000,snd_soc_fsl_spdif,snd_soc_sgtl5000,imx_pcm_dma,snd_soc_imx_spdif,imx_pcm_fiq
snd_pcm_dmaengine      16384  1 snd_soc_core
snd_pcm                86016  6 snd_soc_fsl_ssi,snd_pcm_dmaengine,dw_hdmi_ahb_audio,snd_soc_sgtl5000,snd_soc_core,imx_pcm_fiq
snd_soc_imx_audmux     16384  1 snd_soc_imx_sgtl5000
snd                    69632  4 dw_hdmi_ahb_audio,snd_timer,snd_soc_core,snd_pcm
**** List of PLAYBACK Hardware Devices ****
card 0: DWHDMI [DW-HDMI], device 0: DW HDMI [dw-hdmi-ahb-audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: imx6wandboardsg [imx6-wandboard-sgtl5000], device 0: HiFi sgtl5000-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: imxspdif [imx-spdif], device 0: S/PDIF PCM snd-soc-dummy-dai-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

PS, if you don’t see any modules loaded with “lsmod” just run:

sudo depmod -a

and reboot…

Regards,

Hi, when I do that, I get

root@arm:/home/debian# uname -r ; dmesg | grep spdif ; lsmod | grep snd_soc ; aplay -l
4.19.9-armv7-x13
aplay: device_list:270: no soundcards found…

Yeap, run:

sudo depmod -a

Your version of kmod on your x86 machine is too old for the xz compressed modules, so the depmod files are out of date on your wandboard…

Regards,

Thanks…I tried that, but still when I do that, I get

root@arm:/home/debian# sudo depmod -a
root@arm:/home/debian# uname -r ; dmesg | grep spdif ; lsmod | grep snd_soc ; aplay -l
4.19.9-armv7-x13
aplay: device_list:270: no soundcards found…

Do I need to do something on the x86 machine that I used to build the SD card and then try again?

Thank you

No it should work, also give this a try:

sudo update-initramfs -uk `uname -r`

You may have to reboot…

Are the modules installed and around this size?

voodoo@w1-imx6q-wandboard-2gb:~$ du -sh /lib/modules/4.19.9-armv7-x13/*.dep
236K	/lib/modules/4.19.9-armv7-x13/modules.dep
voodoo@w1-imx6q-wandboard-2gb:~$ du -sh /lib/modules/4.19.9-armv7-x13/
27M	/lib/modules/4.19.9-armv7-x13/

Regards,

Hi,

root@arm:/home/debian# sudo update-initramfs -uk uname -r
/boot/initrd.img-4.19.9-armv7-x13 does not exist. Cannot update.

root@arm:/home/debian# du -sh /lib/modules/4.19.9-armv7-x13/*.dep
236K /lib/modules/4.19.9-armv7-x13/modules.dep
root@arm:/home/debian# du -sh /lib/modules/4.19.9-armv7-x13/
27M /lib/modules/4.19.9-armv7-x13/

Sizes look okay…after I reboot, I try:

root@arm:/home/debian# sudo update-initramfs -uk uname -r
/boot/initrd.img-4.19.9-armv7-x13 does not exist. Cannot update.

So still same issue, but now, I see the soundcards. So, is the missing /boot/initrd.img-4.19.9-armv7-x13 okay?

Thanks again.

[ 7.487418] imx-spdif sound-spdif: ASoC: CPU DAI (null) not registered
[ 7.504408] imx-spdif sound-spdif: snd_soc_register_card failed: -517
[ 7.638627] imx-spdif sound-spdif: ASoC: CPU DAI (null) not registered
[ 7.645311] imx-spdif sound-spdif: snd_soc_register_card failed: -517
[ 7.701623] imx-spdif sound-spdif: ASoC: CPU DAI (null) not registered
[ 7.708274] imx-spdif sound-spdif: snd_soc_register_card failed: -517
[ 7.769985] imx-spdif sound-spdif: snd-soc-dummy-dai <-> 2004000.spdif mappin g ok
[ 7.777754] imx-spdif sound-spdif: ASoC: no DMI vendor name!
snd_soc_imx_sgtl5000 16384 0
snd_soc_sgtl5000 32768 1
snd_soc_imx_spdif 16384 0
snd_soc_imx_audmux 16384 1 snd_soc_imx_sgtl5000
snd_soc_fsl_ssi 20480 2
snd_soc_fsl_spdif 24576 2
imx_pcm_dma 16384 2 snd_soc_fsl_ssi,snd_soc_fsl_spdif
imx_pcm_fiq 16384 1 snd_soc_fsl_ssi
snd_soc_core 167936 7 snd_soc_fsl_ssi,snd_soc_imx_sgtl5000,snd_soc_fsl _spdif,snd_soc_sgtl5000,imx_pcm_dma,snd_soc_imx_spdif,imx_pcm_fiq
snd_pcm_dmaengine 16384 1 snd_soc_core
snd_pcm 86016 6 snd_soc_fsl_ssi,snd_pcm_dmaengine,dw_hdmi_ahb_au dio,snd_soc_sgtl5000,snd_soc_core,imx_pcm_fiq
snd 69632 4 dw_hdmi_ahb_audio,snd_timer,snd_soc_core,snd_pcm
**** List of PLAYBACK Hardware Devices ****
card 0: DWHDMI [DW-HDMI], device 0: DW HDMI [dw-hdmi-ahb-audio]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 1: imx6wandboardsg [imx6-wandboard-sgtl5000], device 0: HiFi sgtl5000-0
Subdevices: 1/1
Subdevice #0: subdevice #0
card 2: imxspdif [imx-spdif], device 0: S/PDIF PCM snd-soc-dummy-dai-0
Subdevices: 1/1
Subdevice #0: subdevice #0

Correct, missing /boot/initrd.img-4.19.9-armv7-x13 isn’t a big deal for the wandboard’s…

For reference it’s the “-c” that creates, “-u” updates…

sudo update-initramfs -ck uname -r

Regards,

Thanks. It’s working…should I still do

sudo update-initramfs -ck uname -r

to create the file?

I really appreciate all your help. Would you allow me to paypal you something as a token of my appreciation? What is your address?

Thank you.

@RobertCNelson, I have the same problem here down the road. I’m a HW guy resurrecting an old B1 Wandboard for some work. I’m not good at SW, but your instructions are easy enough till now. I don’t want to go back to the older mentioned by hammer8. I believe I’ve followed the setting of the CC variable correctly. You didn’t provided details on how to confirm. GCC version shows correctly.

hart@ubuntu:~$ export CC=`pwd`/gcc-linaro-6.5.0-2018.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-
hart@ubuntu:~$ cd u-boot/
hart@ubuntu:~/u-boot$ git checkout v2019.04 -b tmp (from prior steps so tmp is this already)
fatal: A branch named 'tmp' already exists.
hart@ubuntu:~/u-boot$ make ARCH=arm CROSS_COMPILE=${CC} distclean
hart@ubuntu:~/u-boot$ make ARCH=arm CROSS_COMPILE=${CC} wandboard_defconfig
  HOSTCC  scripts/basic/fixdep
/bin/sh: 1: cc: not found
make[1]: *** [scripts/Makefile.host:97: scripts/basic/fixdep] Error 127
make: *** [Makefile:422: scripts_basic] Error 2

hart@ubuntu:~/u-boot$ ${CC}gcc --version
arm-linux-gnueabihf-gcc (Linaro GCC 6.5-2018.12) 6.5.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Thoughts?

@hart

 /bin/sh: 1: cc: not found

The u-boot building scripts are looking for a host gcc to build a few scripts used to build u-boot native binaries.

sudo apt update ; sudo apt install gcc

Regards,

@RobertCNelson - ok serious HW guy, not good at SW. Had to also install bison and flex. Next snag… I installed ubuntu 20.04 on VM. Maybe not a good choice? I can drop back to something else and install a new VM. What would you recommend? I sent the bug report show in this capture.

hart@ubuntu:~/u-boot/armv7-multiplatform$ ./build_kernel.sh
+ Detected build host [Ubuntu 20.04 LTS]
+ host: [x86_64]
+ git HEAD commit: [de50bc4b02ea1db7ed9b0d6da2d49d152b2db1c0]
Dependency check skipped, you are on your own.
-----------------------------
Unrecognized deb based system:
-----------------------------
Please cut, paste and email to: bugs@rcn-ee.com
-----------------------------
git: [de50bc4b02ea1db7ed9b0d6da2d49d152b2db1c0]
git: [url=https://github.com/RobertCNelson/armv7-multiplatform]
uname -m: [x86_64]
lsb_release -a:
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04 LTS
Release:	20.04
Codename:	focal
-----------------------------
* Failed dependency check

@hart, already fixed… :wink:

The biggest got-cha you will run into ubuntu 20.04 lts, was the dropping of much of the 32bit builds:

For most things you get in source form this would be fine… But just watch-out for anything you get in pre-built form.

Regards,

@RobertCNelson thank you for the quick response. HW guy reached a right of passage, have Debian 10 booted. Another snag trying to install the xserver…

debian@arm:~$ sudo apt-get update
Hit:1 http://deb.debian.org/debian buster InRelease
Hit:2 http://deb.debian.org/debian buster-updates InRelease
Hit:3 http://deb.debian.org/debian-security buster/updates InRelease
Hit:4 http://repos.rcn-ee.com/debian buster InRelease
Reading package lists... Done                   
debian@arm:~$ sudo apt-get install xserver-xorg-video-armada-etnaviv
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package xserver-xorg-video-armada-etnaviv

Can you help?

Hi @hart, i’ll take a look at this tomorrow… It looks like Debian still hasn’t merged in the etnaviv video driver…

I’ll port the driver i did for Debian Stretch and Ubuntu 18.04… ( i guess now would be a good time to get it working on Ubuntu 20.04 too .:wink: ) Should have it working sometime tomorrow…

Regards,

@hart i just pushed an update of xserver-xorg-video-armada-etnaviv for both Debian 10 and Ubuntu 20.04:

sudo apt update
sudo apt install xserver-xorg-video-armada-etnaviv
debian@arm:~$ cat /etc/X11/xorg.conf 

Section "Monitor"
        Identifier      "Builtin Default Monitor"
EndSection
Section "Device"
        Identifier      "Builtin Default fbdev Device 0"
        Driver          "armada"
EndSection
Section "Screen"
        Identifier      "Builtin Default fbdev Screen 0"
        Device          "Builtin Default fbdev Device 0"
        Monitor         "Builtin Default Monitor"
EndSection
Section "ServerLayout"
        Identifier      "Builtin Default Layout"
        Screen          "Builtin Default fbdev Screen 0"
EndSection
debian@arm:~$ cat /var/log/Xorg.0.log | grep armada
[    10.429] (II) LoadModule: "armada"
[    10.433] (II) Loading /usr/lib/xorg/modules/drivers/armada_drv.so
[    10.442] (II) Module armada: vendor="X.Org Foundation"
[    10.442] (II) armada: Support for Marvell LCD Controller: 88AP510
[    10.442] (II) armada: Support for Freescale IPU: i.MX6
[    10.504] (WW) Falling back to old probe method for armada
[    10.786] (II) armada(0): hardware: imx-drm
[    10.787] (II) armada(0): Creating default Display subsection in Screen section
[    10.787] (==) armada(0): Depth 24, (--) framebuffer bpp 32
[    10.787] (==) armada(0): RGB weight 888
[    10.787] (==) armada(0): Default visual is TrueColor
[    10.852] (II) armada(0): Output HDMI1 using monitor section Builtin Default Monitor
[    10.854] (II) armada(0): EDID for output HDMI1
[    10.855] (II) armada(0): Printing probed modes for output HDMI1
[    10.855] (II) armada(0): Modeline "1024x768"x60.0   65.00  1024 1048 1184 1344  768 771 777 806 -hsync -vsync (48.4 kHz e)
[    10.855] (II) armada(0): Modeline "800x600"x60.3   40.00  800 840 968 1056  600 601 605 628 +hsync +vsync (37.9 kHz e)
[    10.855] (II) armada(0): Modeline "800x600"x56.2   36.00  800 824 896 1024  600 601 603 625 +hsync +vsync (35.2 kHz e)
[    10.855] (II) armada(0): Modeline "848x480"x60.0   33.75  848 864 976 1088  480 486 494 517 +hsync +vsync (31.0 kHz e)
[    10.855] (II) armada(0): Modeline "640x480"x59.9   25.18  640 656 752 800  480 490 492 525 -hsync -vsync (31.5 kHz e)
[    10.855] (II) armada(0): Output HDMI1 connected
[    10.855] (II) armada(0): Using exact sizes for initial modes
[    10.855] (II) armada(0): Output HDMI1 using initial mode 1024x768 +0+0
[    10.855] (==) armada(0): Using gamma correction (1.0, 1.0, 1.0)
[    10.855] (==) armada(0): DPI set to (96, 96)
[    10.935] (==) armada(0): Backing store enabled
[    10.935] (==) armada(0): Silken mouse enabled
[    10.951] (--) armada(0): Vivante GC320 GPU revision 5007 (etnaviv) 2d PE2.0
[    10.951] (II) armada(0): [DRI2] Setup complete
[    10.951] (II) armada(0): [DRI2]   DRI driver: etnaviv
[    10.951] (II) armada(0): direct rendering: DRI2 enabled
[    10.969] (==) armada(0): DPMS enabled
[    10.970] (==) armada(0): hotplug detection enabled
[    10.970] (II) armada(0): etnaviv: Xv: using YUY2 format intermediate YUV target
[    13.095] (II) armada(0): etnaviv: A8 target not supported
[    13.096] (II) armada(0): Setting screen physical size to 270 x 203

Regards,

@RobertCNelson, thank you so much! Loaded right into XFCE4. No other images out there would load and run a monitor using HDMI to DVI converter, but this one does as I had read about and felt worth trying. I still have to configure WIFI, but drivers appear to be working. When that works, all goals have been met.

Do you have a recommended network manager to install that is known to work? Debian documentation suggests NM or Wicd for modern managing of networks. Wasn’t sure what you have tested. Alt is legacy ifupdown().