Ancient Yocto enforced by board manufacturer - "repo init" doesn't work

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Hi,
I need to build Linux for Congatec QMX8 SMARC SBC.
The procedure is described here:
https://wiki.congatec.com/display/IMX8DOC/conga-QMX8+Yocto+2.5
It requires Ubuntu 2016.04, so I have created a virtual machine for it.
Unfortunately, the "repo init" doesn't work.

I get the following error:

gpg: keyring `/home/dev/.repoconfig/gnupg/secring.gpg' created
gpg: keyring `/home/dev/.repoconfig/gnupg/pubring.gpg' created
gpg: /home/dev/.repoconfig/gnupg/trustdb.gpg: trustdb created
gpg: Total number processed: 2
gpg:               imported: 2  (RSA: 1)
Get https://gerrit.googlesource.com/git-repo/clone.bundle
Get https://gerrit.googlesource.com/git-repo
From https://gerrit.googlesource.com/git-repo
   1469c28..0588f3d  main       -> origin/main
 * [new tag]         v2.11      -> v2.11
 * [new tag]         v2.11.1    -> v2.11.1
Traceback (most recent call last):
  File "/home/dev/yocto/input/.repo/repo/main.py", line 56, in <module>
    from subcmds.version import Version
  File "/home/dev/yocto/input/.repo/repo/subcmds/__init__.py", line 38, in <module>
    ['%s' % name])
  File "/home/dev/yocto/input/.repo/repo/subcmds/upload.py", line 27, in <module>
    from hooks import RepoHook
  File "/home/dev/yocto/input/.repo/repo/hooks.py", line 472
    file=sys.stderr)
        ^
SyntaxError: invalid syntax

So it looks, like "repo" performs autoupdate during the "repo init" and is not able to work any more, as it is not compatible with Python 2.7 (used by default in Ubuntu 2016.04.

When I try to enforce running "repo init" with python3, I get another error:

warning: Python 3 support is currently experimental. YMMV.
Please use Python 2.6 - 2.7 instead.
Traceback (most recent call last):
  File "/usr/bin/repo", line 860, in <module>
    main(sys.argv[1:])
  File "/usr/bin/repo", line 828, in main
    _Init(args, gitc_init=(cmd == 'gitc-init'))
  File "/usr/bin/repo", line 326, in _Init
    _CheckGitVersion()
  File "/usr/bin/repo", line 380, in _CheckGitVersion
    ver_act = ParseGitVersion(ver_str)
  File "/usr/bin/repo", line 350, in ParseGitVersion
    if not ver_str.startswith('git version '):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str

So the updated repo is not compatible neither with Python 2 nor with Python 3 in Ubuntu 2016.04.
Can I somehow block updating the repo, so that it remains at old 1.13 version (compatible with Python 2.7)
May I use Yocto without repo at all, just using the git commands?
--  
TIA & Regards,
Wojtek

Re: Ancient Yocto enforced by board manufacturer - "repo init" doesn't work

?(a):
Quoted text here. Click to load it
  
Quoted text here. Click to load it
" imported  
  
Quoted text here. Click to load it
<module>  
Quoted text here. Click to load it
odule>  
Quoted text here. Click to load it
s not able to work any more, as it is not compatible with Python 2.7 (used  
by default in Ubuntu 2016.04.  
Quoted text here. Click to load it
or:  
Quoted text here. Click to load it
r  
Quoted text here. Click to load it
on 3 in Ubuntu 2016.04.  
Quoted text here. Click to load it
sion (compatible with Python 2.7)  
Quoted text here. Click to load it

OK. I've checked the sources of /usr/bin/repo and found the "--repo-branch"
 option. Then i've checked the available branches at https://gerrit.googles
ource.com/git-repo .
Use of:
repo init --repo-branch repo-1 -u https://git.congatec.com/arm-nxp/imx8-fam
ily/yocto/manifest-imx8-family.git -b cgtimx8__sumo-4.14.98-2.3.2
does the trick.

Wojtek

Re: Ancient Yocto enforced by board manufacturer - "repo init" doesn't work
This is the Dockerfile, that I have used for compilation:
==============================
FROM ubuntu:16.04

RUN apt-get update && apt-get install -y gawk wget \
      git-core diffstat unzip texinfo gcc-multilib build-essential chrpath \
      socat  libsdl1.2-dev xterm  sed cvs subversion coreutils texi2html \
      docbook-utils python-pysqlite2 help2man make gcc g++ desktop-file-utils \
      libgl1-mesa-dev libglu1-mesa-dev mercurial autoconf automake groff curl \  
      lzop asciidoc repo python3-pip  
RUN apt-get install cpio locales

RUN rm /bin/sh && ln -s -f /bin/bash /bin/sh

RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LC_ALL en_US.UTF-8

ENV USER_NAME dev
ENV PROJECT dev
ARG host_uid10%02
ARG host_gid10%02
RUN groupadd -g $host_gid $USER_NAME && \
    useradd -g $host_gid -m -s /bin/bash -u $host_uid $USER_NAME


USER $USER_NAME

ENV BUILD_INPUT_DIR /home/$USER_NAME/yocto/input
ENV BUILD_OUTPUT_DIR /home/$USER_NAME/yocto/output
RUN mkdir -p $BUILD_INPUT_DIR $BUILD_OUTPUT_DIR

WORKDIR $BUILD_INPUT_DIR
RUN apt show repo
RUN repo init --repo-branch repo-1 -u https://git.congatec.com/arm-nxp/imx8-family/yocto/manifest-imx8-family.git -b cgtimx8__sumo-4.14.98-2.3.2
RUN repo sync
RUN EULA=y MACHINE='imx8qm-cgtqmx8' DISTRO=fsl-imx-wayland source ./fsl-setup-release.sh -b build-qmx8 ; bitbake fsl-image-qt5

Site Timeline