zeus-5.4.24-2.1.0 won't boot on my IMX8MNEVK board

cancel
Showing results for 
Search instead for 
Did you mean: 

zeus-5.4.24-2.1.0 won't boot on my IMX8MNEVK board

1,058 Views
Contributor II

Hi!

I'm trying to get the 5.4.24-2.1.0 release to run on my IMX8MNEVK board but I get the following error when trying to boot the image:

U-Boot SPL 2020.04-5.4.24-2.1.0+g4979a99482 (Jul 07 2020 - 07:18:12 +0000)
Can't find PMIC:PCA9450
DDRINFO: start DRAM init
DDRINFO: DRAM rate 3200MTS
Training FAILED

The steps I take are the following

1. Create a Dockerfile

FROM ubuntu:bionic

###################################################################
# The following is just because bitbake doesn't like runnig as root
ARG UID
ARG GID
ARG USER
RUN useradd -m -d /home/$USER -s /bin/bash -g $GID -u $UID $USER
WORKDIR /home/$USER
###################################################################

###################################################################
# These are the dependencies for running bitbake and the other
# openembedded tools
RUN DEBIAN_FRONTEND=noninteractive apt-get update -y \
    && DEBIAN_FRONTEND=noninteractive apt-get install -y \
        bc \
        build-essential \
        chrpath \
        cpio \
        debianutils \
        diffstat \
        gawk \
        gcc-multilib \
        git-core \
        iputils-ping \
        libegl1-mesa \
        libsdl1.2-dev \
        locales \
        parted \
        pylint3 \
        python \
        python3 \
        python3-git \
        python3-jinja2 \
        python3-pexpect \
        python3-pip \
        repo \
        rsync \
        socat \
        texinfo \
        u-boot-tools \
        unzip \
        wget \
        xterm \
        xz-utils \
      && rm -rf /var/lib/apt/lists/*
###################################################################

###################################################################
# Locale stuff, necessary boilerplate
ENV TZ=Europe/Amsterdam
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
###################################################################

USER $UID

2. Build

docker build --build-arg GID=$(id -g) \
    --build-arg UID=$(id -u) \
    --build-arg USER=$USER \
    -t yocto-build \
    .
mkdir build
docker run --rm -it -v$PWD/build:/home/$USER/build yocto-build /bin/bash
git config --global user.name "XXX YYY"
git config --global user.email "xxx.yyy@zzz.cc"
repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-zeus -m imx-5.4.24-2.1.0.xml
repo sync
MACHINE=imx8mnevk DISTRO=fsl-imx-wayland source imx-setup-release.sh -b build
bitbake core-image-minimal
exit # get out of docker

3. Install image to SD-card

cd build/tmp/deploy/images/imx8mnevk/
bzip2 -df core-image-minimal-imx8mnevk-2020*.wic.bz2
cat core-image-minimal-imx8mnevk-2020*.wic | sudo dd of=/dev/sda bs=1M iflag=fullblock oflag=direct conv=fsync

I've tried to build additional images but they all fail, for example the core-image-base image fails with

NOTE: Executing Tasks
NOTE: Setscene tasks completed
ERROR: nxp-wlan-sdk-git-r0 do_compile: oe_runmake failed
ERROR: nxp-wlan-sdk-git-r0 do_compile: Execution of '/home/starlord/build/tmp/work/aarch64-poky-linux/nxp-wlan-sdk/git-r0/temp/run.do_compile.644' failed with exit code 1:
make -C /lib/modules/5.4.49/build M=/home/starlord/build/tmp/work/aarch64-poky-linux/nxp-wlan-sdk/git-r0/git/mxm_wifiex/wlan_src modules
make[1]: *** /lib/modules/5.4.49/build: No such file or directory. Stop.
Makefile:412: recipe for target 'default' failed
make: *** [default] Error 2
WARNING: exit code 1 from a shell command.

ERROR: Logfile of failure stored in: /home/starlord/build/tmp/work/aarch64-poky-linux/nxp-wlan-sdk/git-r0/temp/log.do_compile.644
Log data follows:
| DEBUG: Executing shell function do_compile
| NOTE: make -j 12 build
| make -C /lib/modules/5.4.49/build M=/home/starlord/build/tmp/work/aarch64-poky-linux/nxp-wlan-sdk/git-r0/git/mxm_wifiex/wlan_src modules
| make[1]: *** /lib/modules/5.4.49/build: No such file or directory. Stop.
| Makefile:412: recipe for target 'default' failed
| make: *** [default] Error 2
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
| ERROR: Execution of '/home/starlord/build/tmp/work/aarch64-poky-linux/nxp-wlan-sdk/git-r0/temp/run.do_compile.644' failed with exit code 1:
| make -C /lib/modules/5.4.49/build M=/home/starlord/build/tmp/work/aarch64-poky-linux/nxp-wlan-sdk/git-r0/git/mxm_wifiex/wlan_src modules
| make[1]: *** /lib/modules/5.4.49/build: No such file or directory. Stop.
| Makefile:412: recipe for target 'default' failed
| make: *** [default] Error 2
| WARNING: exit code 1 from a shell command.
|
ERROR: Task (/home/starlord/sources/meta-imx/meta-sdk/recipes-connectivity/nxp-wlan-sdk/nxp-wlan-sdk_git.bb:do_compile) failed with exit code '1'

Tags (2)
9 Replies

618 Views
Contributor I

Simon,

I have a fix for this on WSL2 which I believe is also applicable to Docker.

The makefile for nxp-wlan-sdk uses:

KERNELDIR ?= /lib/modules/$(KERNELVERSION_X86)/build

on WSL2 that is resolving to 

/lib/modules/4.19.104-microsoft-standard/build

On my WSL2 machine there is nothing in /lib/modules

On a working Ubuntu VM, there is a folder: 5.4.0-26-generic which was probably already there or was installed at some point. They come from the package linux-headers-generic.

There aren't any Microsoft releases of this package so I installed the generic headers.

Installing linux-headers-generic in WSL2 resulted in an install of /lib/modules/5.4.0-40-generic

To fix this, I linked the generic version to the one the Makefile needs.

  • apt-get install linux-headers-generic
  • ln -s /lib/modules/5.4.0-40-generic /lib/modules/4.19.104-microsoft-standard

then the build worked.

In your case, I think you would need to link to 5.4.49 instead of 4.19.104-microsoft-standard

I hope this works for you.

-Dave

P.S. to the moderator, sorry about all of the edits but I am finding it impossible to format this message.

618 Views
Contributor I

I have successfully built and run a Docker image that fixed this issue.

I used:

FROM ubuntu:20.04

...

# Fix for nxp-wlan-sdk missing libraries
RUN apt-get install -y linux-headers-generic
RUN ln -s /lib/modules/5.4.0-40-generic /lib/modules/4.19.76-linuxkit

# Add "repo" 
...

618 Views
Contributor II

I also have encountered this issue when updating our imx6ull system from 4.9 /rocko to 5.4/zeus. I am running a Docker container that pulls in 19.10. Will see if it exists on 18.04 before I try the ln -s workaround.

cheers!

 -Tyler

0 Kudos

618 Views
Contributor II

18.04 has this as well, but nxp-wlan-sdk is looking for another version. My workaround mod to my Dockerfile for ubuntu 18.04 base image is :

# Fix for nxp-wlan-sdk missing libraries

RUN apt-get install -y linux-headers-generic

# for 18.04

RUN ln -s /lib/modules/4.15.0-112-generic /lib/modules/4.4.0-21-generic

0 Kudos

618 Views
Contributor IV

for my build under WSL2 Ubuntu 20.04 I had to do:

sudo apt-get install -y linux-headers-generic

sudo ln -s /lib/modules/5.4.0-42-generic /lib/modules/4.19.104-microsoft-standard

Note:4.19.104 is the Microsoft release version that may change see:

https://docs.microsoft.com/en-us/windows/wsl/kernel-release-notes

0 Kudos

618 Views
NXP TechSupport
NXP TechSupport

Hello Simon Pettersson,

I’m not very familiar with containers, but it could be that the host environment does not have all the requirements to build the BSP Release images. The core-image-minimal recipe is part of the Yocto Project and it does not have the same package dependencies as some of the other recipes from the BSP Release.

You will see that the recommended host configuration is Ubuntu 16.04 or 18.04 with a list of required packages. While Yocto can tun on many Linux Distributions, the BSP Release for i.MX requires Ubuntu of these specific versions. I see that the container is set to Ubuntu but I would first make sure that it is the right version and that all requires packages are installed. You can find more details on the i.MX Yocto Project User’s Guide that’s part of the BSP documentation.

I hope this helps!


Regards,

0 Kudos

618 Views
Contributor II

Hi!

That is a very good point. I use Ubuntu Bionic (18.04) as a base container and add the required packages plus a few more required to build, but as you mention there could be something missing that's not mentioned in the i.MX Yocto Porject User's Guide.

I backtracked to the 5.4.3-1.0.0 version and that core-image-minimal can boot, but it has the same problem to build the other images. I haven't tried the 5.4.3-2.0.0 version yet, I will report back to this thread as soon as I've tried it out.

0 Kudos

618 Views
NXP Employee
NXP Employee

Your boot environment settings indicate that you have the new 8M Nano EVK with LPDDR4 and the PCA9450 PMIC.

Is this the case?

Regards,

Bernhard.

618 Views
Contributor II

Yes that is correct.

0 Kudos