View this PageEdit this PageUploads to this PageVersions of this PageHomeRecent ChangesSearchHelp Guide

Generación de una imagen yocto para arm de kontron




Wednesday, 21 June 2023, 10:49:13 am
Compilo la imagen Siguiendo los tutoriales de 1, 2, 3

En uiharu, como root:
apt install gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev python3-subunit mesa-common-dev zstd liblz4-tool file locales
apt-get install python3-newt
sed -i "s/^# en_US.UTF-8/en_US.UTF-8/g" /etc/locale.gen
locale-gen en_US.UTF-8
apt install make python3-pip inkscape texlive-latex-extra
pip3 install sphinx sphinx_rtd_theme pyyaml
pip install kas
# NOTA: pyhton3 de uiharu es la 3.7.9 en vez de la 3.8 que necesita yocto. Por el habrá que instalar las buildtools 
# https://docs.yoctoproject.org/dev/ref-manual/system-requirements.html#system-requirements-buildtools
cd /src
mkdir kontron
chown metro:metro kontron
su metro
cd kontron
GIT_SSL_NO_VERIFY=1 git clone https://git.kontron-electronics.de/sw/ked/meta-ked-bsp.git
cd meta-ked-bsp
kas menu
# Elijo Kirk... y iMX8...
# ERROR: Necesita python 3.8 y no 3.7.9


NOTA: Vuelvo a hacer lo anterior en alejandria, esta vez en / en vez de en /src.

En el kas menu
1. Usando las flechas y el espacio, se selecciona "Kontron...iMX8MM"
2. Tab y "Save & Build".

NOTA2: Ha fallado compilando las qt, específicamente porque no encuentra https://github.com/mity/md4c, según
 /kontron/meta-ked-bsp$ cat ./build/tmp/work/cortexa53-crypto-imx-ked-linux/qtbase/5.15.9+gitAUTOINC+42e4ae042a-r0/build/config.log

Para reintentar compilar sólo eso (en alejandría):
cd /kontron/meta-ked-bsp
export BBPATH=/kontron/meta-ked-bsp/build
export BBDIR=/kontron/meta-ked-bsp/layers/poky/bitbake ; . /kontron/meta-ked-bsp/layers/poky/bitbake/contrib/bbdev.sh
export PATH=$PATH:$BBDIR/bin
/kontron/meta-ked-bsp/layers/poky/bitbake/bin/bitbake -c build image-ked-qt


Habría que hacer un workaround similar a este

Por si es algo que ha sido arreglado ya, hago lo siguiente (alejandria, como usuario metro; tener en cuenta que antiguamente era "git pull origin master", y lo han cambiado a "git pull origin main" para que sea políticamente correcto):
/kontron/meta-ked-bsp
git pull origin main


Pero resulta que no ha habido cambios en upstream

NOTA3: Vuelvo a hacerlo desde cero, pero esta vez, en el ked, activo la opción de "usar latest HEAD".

NOTA4: Con latest HEAD también ha fallado, dice que en el comando:
/kontron/meta-ked-bsp/layers/poky/bitbake/bin/bitbake -c build image-ked-qt

Y especificamente:
| compiling /kontron/meta-ked-bsp/build/tmp/work/cortexa53-crypto-imx-ked-linux/qtbase/5.15.9+gitAUTOINC+42e4ae042a-r0/git/examples/opengl/computegles31/main.cpp
| rcc /kontron/meta-ked-bsp/build/tmp/work/cortexa53-crypto-imx-ked-linux/qtbase/5.15.9+gitAUTOINC+42e4ae042a-r0/git/examples/opengl/computegles31/computegles31.qrc
| generating .moc/moc_predefs.h
| compiling .rcc/qrc_computegles31.cpp
| moc /kontron/meta-ked-bsp/build/tmp/work/cortexa53-crypto-imx-ked-linux/qtbase/5.15.9+gitAUTOINC+42e4ae042a-r0/git/examples/opengl/computegles31/glwindow.h
| compiling .moc/moc_glwindow.cpp
| linking computegles31
| make[3]: Leaving directory '/kontron/meta-ked-bsp/build/tmp/work/cortexa53-crypto-imx-ked-linux/qtbase/5.15.9+gitAUTOINC+42e4ae042a-r0/build/examples/opengl/computegles31'
| make[2]: Leaving directory '/kontron/meta-ked-bsp/build/tmp/work/cortexa53-crypto-imx-ked-linux/qtbase/5.15.9+gitAUTOINC+42e4ae042a-r0/build/examples/opengl'
| make[1]: Leaving directory '/kontron/meta-ked-bsp/build/tmp/work/cortexa53-crypto-imx-ked-linux/qtbase/5.15.9+gitAUTOINC+42e4ae042a-r0/build/examples'
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.
ERROR: Task (/kontron/meta-ked-bsp/build/../layers/meta-qt5/recipes-qt/qt5/qtbase_git.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1487 tasks of which 0 didn't need to be rerun and 1 failed.

Summary: 1 task failed:
  /kontron/meta-ked-bsp/build/../layers/meta-qt5/recipes-qt/qt5/qtbase_git.bb:do_compile
Summary: There were 3 WARNING messages.
Summary: There were 2 ERROR messages, returning a non-zero exit code.
2023-06-26 13:35:12 - ERROR    - Command "/kontron/meta-ked-bsp/layers/poky/bitbake/bin/bitbake -c build image-ked-qt" failed with error 1


NOTA5: Lo vuelvo a intentar comentando las examples:
sed -i "s/-make examples -compile-examples/-nomake examples/g" \
 /kontron/meta-ked-bsp/build/../layers/meta-qt5/recipes-qt/qt5/qtbase_git.bb
cd /kontron/meta-ked-bsp
export BBPATH=/kontron/meta-ked-bsp/build
export BBDIR=/kontron/meta-ked-bsp/layers/poky/bitbake ; . /kontron/meta-ked-bsp/layers/poky/bitbake/contrib/bbdev.sh
export PATH=$PATH:$BBDIR/bin
/kontron/meta-ked-bsp/layers/poky/bitbake/bin/bitbake -c build image-ked-qt




Descripción del proyecto