Linux source code built

What are the supported version of Ubuntu and Python to download the linux source code?

On ubuntu 18 with python 3 we see the below error message for linux source code download:

repo init -u ssh://git@github.com/legatoproject/manifest -m products/wp76xx/releases/Release13.xml -g default,-cache; repo sync
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 886, in
main(sys.argv[1:])
File “/usr/bin/repo”, line 854, in main
_Init(args, gitc_init=(cmd == ‘gitc-init’))
File “/usr/bin/repo”, line 340, in _Init
_CheckGitVersion()
File “/usr/bin/repo”, line 394, in _CheckGitVersion
ver_act = ParseGitVersion(ver_str)
File “/usr/bin/repo”, line 364, in ParseGitVersion
if not ver_str.startswith('git version '):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str
warning: Python 3 support is currently experimental. YMMV.
Please use Python 2.6 - 2.7 instead.
error: command ‘sync’ requires repo to be installed first.
Use “repo init” to install it here.

Downloading legato source code works fine? Python 2.6 is already out of support Python 2.7 and python3 are the latest version available with latest ubuntu distributiions any plans to support the ubuntu 18?

I used python3.6.12 in Ubuntu16 to download the yocto source for FX30.
Maybe you can give a try.

Can you please share your command log to check if there is some changes to the command used? I have tried with Python 2.7 and 3.7 , will install python 3.6 and verify.

You can see here

The issue does not seem to be with authentication but more with python version

I used python3.6.12 in Ubuntu16 to download the yocto source for FX30.
Maybe you can give a try.

python 3.6.9 o ubuntu 18.04 seems to be working
python --version
Python 3.6.9

One may have to try a few times with changing the python versions as in my case the first 2 attempts failed and it worked succcessfully on the third attempt

able to download the legato and linux src. Installed the toolchain and built the legato framework on commandline when building through VS code get the below error:

Executing task: mksys ${LEGATO_DEF_FILE} -s components -t ${LEGATO_TARGET} -w ${LEGATO_OBJECT_DIR} -o ${LEGATO_OUTPUT_DIR} <

/bin/bash: mksys: command not found
The terminal process “/bin/bash ‘-c’, ‘mksys ${LEGATO_DEF_FILE} -s components -t ${LEGATO_TARGET} -w ${LEGATO_OBJECT_DIR} -o ${LEGATO_OUTPUT_DIR}’” failed to launch (exit code: 127).

Terminal will be reused by tasks, press any key to close it.

Any idea on how to tell VScode to use the Legato src?

When trying to sync the workspace getting the below error:
~/Documents/fx30slegatosrcltem1$ leaf getsrc legato --workspace
Run sync steps for fx30-catm-legato-src_18.09.4
Traceback (most recent call last):
File “/home/pankaj/.leaf/swi-cloneutils_5.0.210118/swi-clone”, line 11, in
from leaf.api import WorkspaceManager
ImportError: No module named ‘leaf’
Error while sync operation on fx30-catm-legato-src_18.09.4
Error during sync step for fx30-catm-legato-src_18.09.4 (command returned 1)
Run sync steps for fx30-catm-linux-src_R11.0.0.007
Traceback (most recent call last):
File “/home/pankaj/.leaf/swi-cloneutils_5.0.210118/swi-clone”, line 11, in
from leaf.api import WorkspaceManager
ImportError: No module named ‘leaf’
Error while sync operation on fx30-catm-linux-src_R11.0.0.007
Error during sync step for fx30-catm-linux-src_R11.0.0.007 (command returned 1)

“leaf shell” should point to the correct path.

Can you let me know how to point to the correct path? the path for the legato source ? Do we have a leaf command or we need to change a script?

I just use

leaf shell
make wp76xx

will try for the legato build for linux source build for FX30S 11 I see the below error:

ERROR: legato-tools-git-r0 do_unpack: Function failed: do_unpack (log file is located at /home/pankaj/Documents/fx30slegatosrcltem1/swi-linux-src/build_bin/tmp/work/x86_64-linux/legato-tools/git-r0/temp/log.do_unpack.16148)
ERROR: Logfile of failure stored in: /home/pankaj/Documents/fx30slegatosrcltem1/swi-linux-src/build_bin/tmp/work/x86_64-linux/legato-tools/git-r0/temp/log.do_unpack.16148

Do not need Legato build as the legato source is seperately build can you let me know how to avoid the legato build? the source is downloaded from the gerrit repo.

here says you need to download legato source to build:

Have already downloaded the source for legato as well but in a different directory. It is not clear whether the source is to be copied to the yocto directory meta-swi/common/recipes-legato directory? below is my workspace hierarchy:
image

The legato-src is the directory where legato source code is built and swi-linux-src is where the linux src is built.

For the linux src build do we need to set any variable to tell where is the legato source?

not sure, but what is the problem right now?

There are 2 problems:

  1. The legato source code build cannot be used inside the VS Code.
  2. The linux source code does not build complaining about Legato source not available.

For the 2nd problem can you let me know what is the path for LEGATO_WORKDIR in the linux source?

you can open the Makefile and see this path:

# This assumes you have a legato dir at the root level of
# other Yocto sources
LEGATO_WORKDIR ?= $(shell pwd)/legato/