Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux-fslc: add CONFIG_KPROBES=y to defconfig on linux-fslc #668

Merged
merged 1 commit into from
Mar 9, 2021

Conversation

Jiteshprm
Copy link
Contributor

Fix compile error when building lttng with bitbake, adding CONFIG_KPROBES=y to defconfig on linux-fslc

log.do_compile.2261270.txt

Error:

riotboard/fsl-community-bsp/build/tmp/work/imx6dl_riotboard-fslc-linux-gnueabi/lttng-modules/2.12.4-r0/lttng-modules-2.12.4/wrapper/kallsyms.c:20:3: error: #error "LTTng-modules requires CONFIG_KPROBES on kernels >= 5.7.0"
20 | # error "LTTng-modules requires CONFIG_KPROBES on kernels >= 5.7.0"
| ^~~~~
make[3]: *** [riotboard/fsl-community-bsp/build/tmp/work-shared/imx6dl-riotboard/kernel-source/scripts/Makefile.build:279: riotboard/fsl-community-bsp/build/tmp/work/imx6dl_riotboard-fslc-linux-gnueabi/lttng-modules/2.12.4-r0/lttng-modules-2.12.4/wrapper/kallsyms.o] Error 1

Compile flags:

cd ~/riotboard/fsl-community-bsp
MACHINE=imx6dl-riotboard
DISTRO=fslc-framebuffer
source setup-environment build
bitbake fsl-image-machine-test

recipes-kernel/linux/linux-fslc/defconfig Outdated Show resolved Hide resolved
Copy link
Contributor

@zandrey zandrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jiteshprm

First of, this commit is missing Signed-off-by: tag, please add it.

Also, I do not see this failure in the build... Do you have any additional fragments or recipe appends that enables the LTT-ng?

I do not see this config parameter also to be enabled upstream... As we try to keep the defconfig here as close to upstream as possible - it would be better if you can use this config variable in your own layer and apply it as a fragment.

-- andrey

@Jiteshprm
Copy link
Contributor Author

Jiteshprm commented Feb 28, 2021

Hi zandrey,

To retest the fix, today I tried to rebuild with a brand new workspace from master but unfortunately and I got the error below.
Attached is the full log if you are interested.
riotboard-master-build-28Feb.txt
I compared the git commit versions from the new workspace against the old one and I concluded that the packages poky and meta-freescale-3rdparty have newer version from the ones I checked out on my old workspace some days ago. The commit ids from this old workspace are below too.

Probably I got lucky and could fix the issue with this simple fix when I checked out master the other day and the issues were only related with LTTng at that point in time? :)
The full build then went fine after I added that flag to depmods on this old workspace.

Error new workspace from 28 Feb:

NOTE: Resolving any missing task queue dependencies
ERROR: Nothing RPROVIDES 'gstreamer1.0-plugins-imx-meta' (but /home/birdofprey-nvidia/riotboard-28Feb/fsl-community-bsp/sources/meta-freescale-distro/recipes-fsl/packagegroups/packagegroup-fsl-gstreamer1.0.bb RDEPENDS on or otherwise requires it)
gstreamer1.0-plugins-imx RPROVIDES gstreamer1.0-plugins-imx-meta but was skipped: incompatible with host arm-fslc-linux-gnueabi (not in COMPATIBLE_HOST)
NOTE: Runtime target 'gstreamer1.0-plugins-imx-meta' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['gstreamer1.0-plugins-imx-meta']
NOTE: Runtime target 'packagegroup-fsl-gstreamer1.0' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['packagegroup-fsl-gstreamer1.0', 'gstreamer1.0-plugins-imx-meta']
ERROR: Required build target 'fsl-image-machine-test' has no buildable providers.
Missing or unbuildable dependency chain was: ['fsl-image-machine-test', 'packagegroup-fsl-gstreamer1.0', 'gstreamer1.0-plugins-imx-meta']
Summary: There were 1669 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

Repo info from old workspace build:

Manifest branch: master
Manifest merge branch: refs/heads/master
Manifest groups: all,-notdefault
----------------------------
Project: Documentation
Mount path: /home/birdofprey-nvidia/riotboard-28Feb/fsl-community-bsp/sources/Documentation
Current revision: 7c9ad5c4d9e76e261ddf63fb7bc87fc244f55a38
Manifest revision: master
Local Branches: 0
----------------------------
Project: fsl-community-bsp-base
Mount path: /home/birdofprey-nvidia/riotboard-28Feb/fsl-community-bsp/sources/base
Current revision: 5a551f453260bd19895e4d847877874eaa51fde3
Manifest revision: master
Local Branches: 0
----------------------------
Project: meta-freescale
Mount path: /home/birdofprey-nvidia/riotboard-28Feb/fsl-community-bsp/sources/meta-freescale
Current revision: 6adee1c65669fab5a4d8804750b4885bb63fcd1a
Manifest revision: master
Local Branches: 0
----------------------------
Project: meta-freescale-3rdparty
Mount path: /home/birdofprey-nvidia/riotboard-28Feb/fsl-community-bsp/sources/meta-freescale-3rdparty
Current revision: ff7201c234a54e5ba221bb9dba2f68eda5b6c7fb
Manifest revision: master
Local Branches: 0
----------------------------
Project: meta-freescale-distro
Mount path: /home/birdofprey-nvidia/riotboard-28Feb/fsl-community-bsp/sources/meta-freescale-distro
Current revision: a6208d216ef2db66357d08ec780fa22223511ec0
Manifest revision: master
Local Branches: 0
----------------------------
Project: meta-openembedded
Mount path: /home/birdofprey-nvidia/riotboard-28Feb/fsl-community-bsp/sources/meta-openembedded
Current revision: 5ea2c6330e14ffc77c4473ac898cbcc9e49f57bf
Manifest revision: master
Local Branches: 0
----------------------------
Project: poky
Mount path: /home/birdofprey-nvidia/riotboard-28Feb/fsl-community-bsp/sources/poky
Current revision: 8ab7d766a185919dcb063226daf1980f575d0b93
Manifest revision: master
Local Branches: 0
----------------------------

Repo info from new workspace build:

Manifest branch: master
Manifest merge branch: refs/heads/master
Manifest groups: all,-notdefault
----------------------------
Project: Documentation
Mount path: /home/birdofprey-nvidia/riotboard/fsl-community-bsp/sources/Documentation
Current revision: 7c9ad5c4d9e76e261ddf63fb7bc87fc244f55a38
Manifest revision: master
Local Branches: 0
----------------------------
Project: fsl-community-bsp-base
Mount path: /home/birdofprey-nvidia/riotboard/fsl-community-bsp/sources/base
Current revision: 5a551f453260bd19895e4d847877874eaa51fde3
Manifest revision: master
Local Branches: 0
----------------------------
Project: meta-freescale
Mount path: /home/birdofprey-nvidia/riotboard/fsl-community-bsp/sources/meta-freescale
Current revision: 6adee1c65669fab5a4d8804750b4885bb63fcd1a
Manifest revision: master
Local Branches: 0
----------------------------
Project: meta-freescale-3rdparty
Mount path: /home/birdofprey-nvidia/riotboard/fsl-community-bsp/sources/meta-freescale-3rdparty
Current revision: 323dda3cc72259038467f4ec882a0368a7acce81
Manifest revision: master
Local Branches: 0
----------------------------
Project: meta-freescale-distro
Mount path: /home/birdofprey-nvidia/riotboard/fsl-community-bsp/sources/meta-freescale-distro
Current revision: a6208d216ef2db66357d08ec780fa22223511ec0
Manifest revision: master
Local Branches: 0
----------------------------
Project: meta-openembedded
Mount path: /home/birdofprey-nvidia/riotboard/fsl-community-bsp/sources/meta-openembedded
Current revision: 5ea2c6330e14ffc77c4473ac898cbcc9e49f57bf
Manifest revision: master
Local Branches: 0
----------------------------
Project: poky
Mount path: /home/birdofprey-nvidia/riotboard/fsl-community-bsp/sources/poky
Current revision: 1fe4a25f2244fdf67d96109dcb4f49ed75c18b32
Manifest revision: master
Local Branches: 0
----------------------------

@zandrey
Copy link
Contributor

zandrey commented Feb 28, 2021

Hello @Jiteshprm

Hi zandrey,

To retest the fix, today I tried to rebuild with a brand new workspace from master but unfortunately and I got the error below.
Attached is the full log if you are interested.
riotboard-master-build-28Feb.txt

This shows a lot of warnings about almost all PREFERRED_PROVIDER_virtual providers... Are you sure that your build environment is sane?

I compared the git commit versions from the new workspace against the old one and I concluded that the packages poky and meta-freescale-3rdparty have newer version from the ones I checked out on my old workspace some days ago. The commit ids from this old workspace are below too.

Probably I got lucky and could fix the issue with this simple fix when I checked out master the other day and the issues were only related with LTTng at that point in time? :)

So this means: this PR is not required anymore?

The full build then went fine after I added that flag to depmods on this old workspace.

Error new workspace from 28 Feb:

NOTE: Resolving any missing task queue dependencies
ERROR: Nothing RPROVIDES 'gstreamer1.0-plugins-imx-meta' (but /home/birdofprey-nvidia/riotboard-28Feb/fsl-community-bsp/sources/meta-freescale-distro/recipes-fsl/packagegroups/packagegroup-fsl-gstreamer1.0.bb RDEPENDS on or otherwise requires it)
gstreamer1.0-plugins-imx RPROVIDES gstreamer1.0-plugins-imx-meta but was skipped: incompatible with host arm-fslc-linux-gnueabi (not in COMPATIBLE_HOST)
NOTE: Runtime target 'gstreamer1.0-plugins-imx-meta' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['gstreamer1.0-plugins-imx-meta']
NOTE: Runtime target 'packagegroup-fsl-gstreamer1.0' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['packagegroup-fsl-gstreamer1.0', 'gstreamer1.0-plugins-imx-meta']
ERROR: Required build target 'fsl-image-machine-test' has no buildable providers.
Missing or unbuildable dependency chain was: ['fsl-image-machine-test', 'packagegroup-fsl-gstreamer1.0', 'gstreamer1.0-plugins-imx-meta']
Summary: There were 1669 WARNING messages shown.
Summary: There were 2 ERROR messages shown, returning a non-zero exit code.

This has been already discussed on the meta-freescale ML: https://lists.yoctoproject.org/g/meta-freescale/message/24559

-- andrey

@Jiteshprm
Copy link
Contributor Author

Jiteshprm commented Feb 28, 2021

Hi andrey,

This shows a lot of warnings about almost all PREFERRED_PROVIDER_virtual providers... Are you sure that your build environment is sane?

This only started to happen in this new workspace, only upon the first checkout and when doing the "Parsing recipes" steps. I assure you that with the old workspace it did not happen.
On the old workspace the full image was built correctly until the end without any issues or warnings.
Something definitely happened between these builds.

So this means: this PR is not required anymore?

It seems that it won't be needed as there are new issues happening now

This has been already discussed on the meta-freescale ML: https://lists.yoctoproject.org/g/meta-freescale/message/24559

As suggested in the post I have added the entry
IMX_DEFAULT_BSP = "nxp"
to
.../fsl-community-bsp/build/conf/local.conf
And the build started.

However a new issue when building the kernel appeared, which I show below.
Will it be related with the IMX_DEFAULT_BSP setting in any way?
I want to build the image with the coda hardware video decoding as I usually did, maybe there some step missing for this new build?

:~/riotboard-28Feb/fsl-community-bsp$ cd build/
:~/riotboard-28Feb/fsl-community-bsp/build$ bitbake fsl-image-machine-test
Loading cache: 100% |                                                                                                                                                | ETA:  --:--:--
Loaded 0 entries from dependency cache.
Parsing recipes: 100% |###############################################################################################################################################| Time: 0:01:45
Parsing of 2338 .bb files complete (0 cached, 2338 parsed). 3596 targets, 425 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "1.49.2"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-20.04"
TARGET_SYS           = "arm-fslc-linux-gnueabi"
MACHINE              = "imx6dl-riotboard"
DISTRO               = "fslc-wayland"
DISTRO_VERSION       = "3.3-snapshot-20210228"
TUNE_FEATURES        = "arm vfp cortexa9 neon thumb callconvention-hard"
TARGET_FPU           = "hard"
meta
meta-poky            = "HEAD:8ab7d766a185919dcb063226daf1980f575d0b93"
meta-oe
meta-multimedia
meta-python          = "HEAD:e80d14dc55f909a60d4bee810c0b9b0377bbf59e"
meta-freescale       = "HEAD:6adee1c65669fab5a4d8804750b4885bb63fcd1a"
meta-freescale-3rdparty = "HEAD:ff7201c234a54e5ba221bb9dba2f68eda5b6c7fb"
meta-freescale-distro = "HEAD:a6208d216ef2db66357d08ec780fa22223511ec0"

NOTE: Fetching uninative binary shim http://downloads.yoctoproject.org/releases/uninative/3.0/x86_64-nativesdk-libc.tar.xz;sha256sum=5ec5a9276046e7eceeac749a18b175667384e1f445cd4526
300a41404d985a5b (will check PREMIRRORS first)
Initialising tasks: 100% |############################################################################################################################################| Time: 0:00:07
Sstate summary: Wanted 2474 Local 0 Network 0 Missed 2474 Current 0 (0% match, 0% complete)  
NOTE: Executing Tasks
WARNING: cracklib-native-2.9.5-r0 do_fetch: Failed to fetch URL https://downloads.sourceforge.net/cracklib/cracklib-2.9.5.tar.gz, attempting MIRRORS if available
ERROR: linux-fslc-5.10.18+gitAUTOINC+e96f454f9d-r0 do_kernel_configcheck: config analysis failed: 
ERROR: Logfile of failure stored in: /home/birdofprey-nvidia/riotboard-28Feb/fsl-community-bsp/build/tmp/work/imx6dl_riotboard-fslc-linux-gnueabi/linux-fslc/5.10.18+gitAUTOINC+e96f4
54f9d-r0/temp/log.do_kernel_configcheck.1642162
ERROR: Task (/home/birdofprey-nvidia/riotboard-28Feb/fsl-community-bsp/sources/meta-freescale/recipes-kernel/linux/linux-fslc_5.10.bb:do_kernel_configcheck) failed with exit code '1
'
NOTE: Tasks Summary: Attempted 1855 tasks of which 0 didn't need to be rerun and 1 failed.   
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 5 seconds

Summary: 1 task failed:
  /home/birdofprey-nvidia/riotboard-28Feb/fsl-community-bsp/sources/meta-freescale/recipes-kernel/linux/linux-fslc_5.10.bb:do_kernel_configcheck
Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

:~/riotboard-28Feb/fsl-community-bsp/build$ cat /home/birdofprey-nvidia/riotboard-28Feb/fsl-community-bsp/build/tmp/work/imx6dl_rio
tboard-fslc-linux-gnueabi/linux-fslc/5.10.18+gitAUTOINC+e96f454f9d-r0/temp/log.do_kernel_configcheck.1642162
DEBUG: Executing python function do_kernel_configcheck
ERROR: config analysis failed:
DEBUG: Python function do_kernel_configcheck finished

@zandrey
Copy link
Contributor

zandrey commented Mar 1, 2021

Hello @Jiteshprm

Hi andrey,

This shows a lot of warnings about almost all PREFERRED_PROVIDER_virtual providers... Are you sure that your build environment is sane?

This only started to happen in this new workspace, only upon the first checkout and when doing the "Parsing recipes" steps. I assure you that with the old workspace it did not happen.
On the old workspace the full image was built correctly until the end without any issues or warnings.
Something definitely happened between these builds.

Can you try to do a clean repo clone in this case? Please do not re-use any of your previous working folder.

So this means: this PR is not required anymore?

It seems that it won't be needed as there are new issues happening now

Can you close it then? I believe what is discussed here is not related to the PR itself.

This has been already discussed on the meta-freescale ML: https://lists.yoctoproject.org/g/meta-freescale/message/24559

As suggested in the post I have added the entry
IMX_DEFAULT_BSP = "nxp"
to
.../fsl-community-bsp/build/conf/local.conf
And the build started.

However a new issue when building the kernel appeared, which I show below.
Will it be related with the IMX_DEFAULT_BSP setting in any way?
I want to build the image with the coda hardware video decoding as I usually did, maybe there some step missing for this new build?

I believe there was a suggestion in the entire topic on the ML about how can CODA VPU can be used with mainline BSP on i.MX6 derivative.

What you've currently tried out is not considered as a valid combination of Community and NXP BSP flavors, it was also discussed on the ML in the same topic.

:~/riotboard-28Feb/fsl-community-bsp$ cd build/
:~/riotboard-28Feb/fsl-community-bsp/build$ bitbake fsl-image-machine-test
Loading cache: 100% |                                                                                                                                                | ETA:  --:--:--
Loaded 0 entries from dependency cache.
Parsing recipes: 100% |###############################################################################################################################################| Time: 0:01:45
Parsing of 2338 .bb files complete (0 cached, 2338 parsed). 3596 targets, 425 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "1.49.2"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-20.04"
TARGET_SYS           = "arm-fslc-linux-gnueabi"
MACHINE              = "imx6dl-riotboard"
DISTRO               = "fslc-wayland"
DISTRO_VERSION       = "3.3-snapshot-20210228"
TUNE_FEATURES        = "arm vfp cortexa9 neon thumb callconvention-hard"
TARGET_FPU           = "hard"
meta
meta-poky            = "HEAD:8ab7d766a185919dcb063226daf1980f575d0b93"
meta-oe
meta-multimedia
meta-python          = "HEAD:e80d14dc55f909a60d4bee810c0b9b0377bbf59e"
meta-freescale       = "HEAD:6adee1c65669fab5a4d8804750b4885bb63fcd1a"
meta-freescale-3rdparty = "HEAD:ff7201c234a54e5ba221bb9dba2f68eda5b6c7fb"
meta-freescale-distro = "HEAD:a6208d216ef2db66357d08ec780fa22223511ec0"

NOTE: Fetching uninative binary shim http://downloads.yoctoproject.org/releases/uninative/3.0/x86_64-nativesdk-libc.tar.xz;sha256sum=5ec5a9276046e7eceeac749a18b175667384e1f445cd4526
300a41404d985a5b (will check PREMIRRORS first)
Initialising tasks: 100% |############################################################################################################################################| Time: 0:00:07
Sstate summary: Wanted 2474 Local 0 Network 0 Missed 2474 Current 0 (0% match, 0% complete)  
NOTE: Executing Tasks
WARNING: cracklib-native-2.9.5-r0 do_fetch: Failed to fetch URL https://downloads.sourceforge.net/cracklib/cracklib-2.9.5.tar.gz, attempting MIRRORS if available
ERROR: linux-fslc-5.10.18+gitAUTOINC+e96f454f9d-r0 do_kernel_configcheck: config analysis failed: 
ERROR: Logfile of failure stored in: /home/birdofprey-nvidia/riotboard-28Feb/fsl-community-bsp/build/tmp/work/imx6dl_riotboard-fslc-linux-gnueabi/linux-fslc/5.10.18+gitAUTOINC+e96f4
54f9d-r0/temp/log.do_kernel_configcheck.1642162
ERROR: Task (/home/birdofprey-nvidia/riotboard-28Feb/fsl-community-bsp/sources/meta-freescale/recipes-kernel/linux/linux-fslc_5.10.bb:do_kernel_configcheck) failed with exit code '1
'
NOTE: Tasks Summary: Attempted 1855 tasks of which 0 didn't need to be rerun and 1 failed.   
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 5 seconds

Summary: 1 task failed:
  /home/birdofprey-nvidia/riotboard-28Feb/fsl-community-bsp/sources/meta-freescale/recipes-kernel/linux/linux-fslc_5.10.bb:do_kernel_configcheck
Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

:~/riotboard-28Feb/fsl-community-bsp/build$ cat /home/birdofprey-nvidia/riotboard-28Feb/fsl-community-bsp/build/tmp/work/imx6dl_rio
tboard-fslc-linux-gnueabi/linux-fslc/5.10.18+gitAUTOINC+e96f454f9d-r0/temp/log.do_kernel_configcheck.1642162
DEBUG: Executing python function do_kernel_configcheck
ERROR: config analysis failed:
DEBUG: Python function do_kernel_configcheck finished

-- andrey

@otavio
Copy link
Member

otavio commented Mar 1, 2021

We seem to reproduce it in other machine using mainline Linux kernel. You can see the error:

fsl-image-machine-test@imx53qsb ERROR: lttng-modules-2.12.4-r0 do_compile: oe_runmake failed
fsl-image-machine-test@imx53qsb ERROR: lttng-modules-2.12.4-r0 do_compile: Execution of '/srv/ci/nvme/work/imx53qsb-fslc-linux-gnueabi/lttng-modules/2.12.4-r0/temp/run.do_compile.29892' failed with exit code 1:
fsl-image-machine-test@imx53qsb make -C /srv/ci/nvme/work-shared/imx53qsb/kernel-source M=/srv/ci/nvme/work/imx53qsb-fslc-linux-gnueabi/lttng-modules/2.12.4-r0/lttng-modules-2.12.4 CONFIG_LTTNG=m CONFIG_LTTNG_CLOCK_PLUGIN_TEST=m modules
fsl-image-machine-test@imx53qsb make[1]: Entering directory '/srv/ci/nvme/work-shared/imx53qsb/kernel-source'
fsl-image-machine-test@imx53qsb make[2]: Entering directory '/srv/ci/nvme/work-shared/imx53qsb/kernel-build-artifacts'

Full log at: https://ci.ossystems.com.br/job/fsl-community-bsp-master_framebuffer/1030/console

@Jiteshprm
Copy link
Contributor Author

Hi @zandrey @otavio

Can you try to do a clean repo clone in this case? Please do not re-use any of your previous working folder.

Yesterday I started a new clean folder checking out the available master branch versions.
I noticed that the warnings only appear on the first time I run bitbake after checking out the repo, and while doing "Parsing recipes step".

I believe there was a suggestion in the entire topic on the ML about how can CODA VPU can be used with mainline BSP on i.MX6 derivative.

What you've currently tried out is not considered as a valid combination of Community and NXP BSP flavors, it was also discussed on the ML in the same topic.

Also I have read thoroughly and I understood that what I was doing was not correct. This time I did something which I don't know if it's very correct either (I'm not an expert on bitbake) and I changed the file:
sources/meta-freescale/conf/machine/include/imx-base.inc
Changing the line

MACHINE_GSTREAMER_1_0_PLUGIN_mx6dl ?= "gstreamer1.0-plugins-imx-meta"

to

MACHINE_GSTREAMER_1_0_PLUGIN_mx6dl ?= ""

Afterwards the build started correctly.

Can you close it then? I believe what is discussed here is not related to the PR itself.

After leaving the build overnight running, the same build error appeared again, as Oscar has reported too.
Maybe this change is needed after all?

Full log from yesterday's build is attached.

riotboard-master-build-new-build.txt

| /home/birdofprey-nvidia/a/riotboard-1March/build/tmp/work/imx6dl_riotboard-fslc-linux-gnueabi/lttng-modules/2.12.4-r0/lttng-modules-2.12.4/wrapper/kallsyms.c:20:3: error: #error "LTTng-modules requires CONFIG_KPROBES on kernels >= 5.7.0"
| 20 | # error "LTTng-modules requires CONFIG_KPROBES on kernels >= 5.7.0"
| | ^~~~~
| make[3]: *** [/home/birdofprey-nvidia/a/riotboard-1March/build/tmp/work-shared/imx6dl-riotboard/kernel-source/scripts/Makefile.build:279: /home/birdofprey-nvidia/a/riotboard-1March/build/tmp/work/imx6dl_riotboard-fslc-linux-gnueabi/lttng-modules/2.12.4-r0/lttng-modules-2.12.4/wrapper/kallsyms.o] Error 1
| make[3]: *** Waiting for unfinished jobs....
| make[2]: *** [/home/birdofprey-nvidia/a/riotboard-1March/build/tmp/work-shared/imx6dl-riotboard/kernel-source/Makefile:1801: /home/birdofprey-nvidia/a/riotboard-1March/build/tmp/work/imx6dl_riotboard-fslc-linux-gnueabi/lttng-modules/2.12.4-r0/lttng-modules-2.12.4] Error 2
| make[2]: Leaving directory '/home/birdofprey-nvidia/a/riotboard-1March/build/tmp/work-shared/imx6dl-riotboard/kernel-build-artifacts'
| make[1]: *** [Makefile:185: __sub-make] Error 2
| make[1]: Leaving directory '/home/birdofprey-nvidia/a/riotboard-1March/build/tmp/work-shared/imx6dl-riotboard/kernel-source'
| make: *** [Makefile:154: modules] Error 2
| WARNING: exit code 1 from a shell command.

@otavio
Copy link
Member

otavio commented Mar 2, 2021

Those are two different issues. One is the lttng-modules and the other is the providers. Please open a issue for the providers one.

@zandrey
Copy link
Contributor

zandrey commented Mar 2, 2021

@Jiteshprm @otavio

I've just reproduced the issue with missing CONFIG_KPROBES for arm32 build. Currently checking if the aarch64 builds are also affected here (which I believe is also the case).

I guess the whole issue was discovered when fsl-image-machine-test image is built, as it pulls lttng-modules as dependency. That is the reason I've never seen this before, since core images do not have lttng-modules required.

The question is: should CONFIG_KPROBES be added to defconfig or rather a kernel fragment used here instead?

Adding CONFIG_KPROBES to defconfig would deviate the config from upstream, and I'm not sure if this can be reported upstream. If this deviation is desired - then it can be done. Otherwise, I propose to use a kernel fragment here.

In addition, I guess it would be better to perform either savedefconf of diffconfig while adding CONFIG_KPROBES to avoid kernel_configcheck errors.

-- andrey

@otavio
Copy link
Member

otavio commented Mar 2, 2021

We ought to enable it and apply this to our Linux kernel for the defconfig files we use as base. So we can later send it upstream.

@zandrey
Copy link
Contributor

zandrey commented Mar 3, 2021

We ought to enable it and apply this to our Linux kernel for the defconfig files we use as base. So we can later send it upstream.

OK, understood.

I've tested the aarch64 kernel build, and it seems it is not affected by this.

@Jiteshprm Can you work on this PR further?

  1. Please run the menuconfig task, followed by diffconfig to isolate what config options would come extra to the enabled CONFIG_KPROBES one. You can then append the defconfig with those.
  2. Make sure you do not have any warnings from do_kernel_configcheck task. You might also want to inspect the content of build/tmp/work-shared/imx6dl-riotboard/kernel-source/.kernel-meta folder for config validation logs and errors.
  3. When submitting the commit here, please have a Signed-off-by: tag present.

-- andrey

@Jiteshprm Jiteshprm force-pushed the master branch 2 times, most recently from 775f6cd to b8702a2 Compare March 4, 2021 01:06
@Jiteshprm
Copy link
Contributor Author

@zandrey

I have followed all the steps you have indicated on a new workspace that I have cloned today.
No warnings from building the kernel have come up.
Please check the steps I have taken in the log attached, to confirm that all is correct.

riotboard-master-build-3March.txt

Thanks,
Kind Regards

@zandrey
Copy link
Contributor

zandrey commented Mar 4, 2021

@Jiteshprm

There are still some style problems with your patch - your Signed-off-by: tag misses the information.

When you commit your changes - please use git commit --signoff so that the tag is automatically created and populated with the author information. Normally, you should not write this tag manually, and rather use GIT mechanisms for that purpose.

You can find more details on it in kernel documentation section Submitting patches: the essential guide to getting your code into the kernel. I encourage you to follow it, since this patch is aimed at kernel source base, and perhaps would be reported as-is upstream, where those guidelines applies.

Also, can you provide a content of your build/tmp/work-shared/imx6dl-riotboard/kernel-source/.kernel-meta/cfg/invalid.txt and build/tmp/work-shared/imx6dl-riotboard/kernel-source/.kernel-meta/cfg/merge_config_build.log files? You can just attach them here, as they hold the information regarding conflicting kernel config options.

-- andrey

@Jiteshprm
Copy link
Contributor Author

Jiteshprm commented Mar 4, 2021

Hi @zandrey

Thank you very much for all the guidance and tips, they are very helpful, as it's my first time doing something like this.
As requested I did the git commit --signoff, squashed and pushed the changes. My misunderstanding on this was because I thought the signoff was provided by one of you in order to finally merge the pull request.
I believe that the rest of the commit message is according to the guidelines but do tell me if you need to add or remove anything to it.

Also, I send attached the files you requested. I took a look and they seem unrelated with the kprobes activation.
merge_config_build.log
invalid.txt

Anything else, please do let me know.

Kind Regards

Copy link
Contributor

@zandrey zandrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Jiteshprm

Thanks for updates and log files. From what I see there is no regression in the config items with your addition here. Those invalid items reported as the same as currently reported in upstream.

As for the commit message styling, I do not want to be too pedantic, but would give you a hint: if this commit would be reported as-is upstream to mainline kernel - it would get rejected, because it was not run through scripts/checkpatch.pl in the kernel. It does have long lines, which would be rejected by the script and hence - to accepted in the upstream.

I would leave it up to you and @otavio to decide whether commit message would require more fixing or can be merged as it is.

From my side here for the content: OK.

-- andrey

Copy link
Member

@otavio otavio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to do those changes to all defconfig files or they will become unsync.

@Jiteshprm
Copy link
Contributor Author

Jiteshprm commented Mar 4, 2021

Hi,

@zandrey - Thanks for the hint, I have googled it and I will run the patch through checkpatch.pl to make the commit message compatible with it.

@otavio - Happy to do the change but I have one doubt. These are the the defconfig files I found within the sources folder:

:~/a/riotboard-3March/fsl-community-bsp/sources$ find . -name defconfig
./meta-freescale-3rdparty/recipes-kernel/linux/linux-advantech-4.9/defconfig
./meta-freescale-3rdparty/recipes-kernel/linux/linux-congatec-4.9.11/defconfig
./meta-freescale-3rdparty/recipes-kernel/linux/linux-variscite/defconfig
./meta-freescale-3rdparty/recipes-kernel/linux/linux-gateworks-imx-3.14/defconfig
./meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex-4.4/defconfig
./meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex-4.14-2.0.x/mx7/defconfig
./meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex-4.14-2.0.x/colibri-imx6/defconfig
./meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex-4.14-2.0.x/colibri-imx6ull/defconfig
./meta-freescale-3rdparty/recipes-kernel/linux/linux-toradex-4.14-2.0.x/apalis-imx6/defconfig
./meta-freescale-3rdparty/recipes-kernel/linux/linux-kontron/defconfig
./meta-openembedded/meta-oe/recipes-connectivity/hostapd/hostapd/defconfig
./meta-freescale/recipes-kernel/linux/linux-fslc-imx/mx8/defconfig
./meta-freescale/recipes-kernel/linux/linux-fslc-imx/imx/defconfig
./meta-freescale/recipes-kernel/linux/linux-fslc/armv8a/defconfig
./meta-freescale/recipes-kernel/linux/linux-fslc/mxs/defconfig
./meta-freescale/recipes-kernel/linux/linux-fslc/mx25/defconfig
./meta-freescale/recipes-kernel/linux/linux-fslc/defconfig
./meta-freescale/recipes-kernel/linux/linux-imx/mx8/defconfig
./meta-freescale/recipes-kernel/linux/linux-imx/imx/defconfig
./meta-freescale/recipes-kernel/linux/linux-fslc-lts-4.19/mxs/defconfig
./meta-freescale/recipes-kernel/linux/linux-fslc-lts-4.19/mx25/defconfig
./meta-freescale/recipes-kernel/linux/linux-fslc-lts-4.19/defconfig
./poky/meta/recipes-core/busybox/busybox/defconfig
./poky/meta/recipes-connectivity/wpa-supplicant/wpa-supplicant/defconfig
./poky/meta-poky/recipes-core/busybox/busybox/poky-tiny/defconfig

I believe that the ones that need updating are these below only.
The ones in linux-fslc-lts-4.19 will be for an unaffected kernel and should not be modified, am I correct?

./meta-freescale/recipes-kernel/linux/linux-fslc-imx/mx8/defconfig
./meta-freescale/recipes-kernel/linux/linux-fslc-imx/imx/defconfig
./meta-freescale/recipes-kernel/linux/linux-fslc/armv8a/defconfig
./meta-freescale/recipes-kernel/linux/linux-fslc/mxs/defconfig
./meta-freescale/recipes-kernel/linux/linux-fslc/mx25/defconfig
./meta-freescale/recipes-kernel/linux/linux-fslc/defconfig
./meta-freescale/recipes-kernel/linux/linux-imx/mx8/defconfig
./meta-freescale/recipes-kernel/linux/linux-imx/imx/defconfig

Kind Regards

@otavio
Copy link
Member

otavio commented Mar 4, 2021

In fact, the linux-fslc ones. This is the only one that is newer than 5.7 ;)

@Jiteshprm
Copy link
Contributor Author

Hi @otavio,

Understood :)
I have changed the 4 defconfig files from linux-fslc, can you please review?
Also I have changed the commit message so that it does not generate any warnings or errors with checkpatch.pl as @zandrey has suggested.

Kind Regards

Copy link
Contributor

@zandrey zandrey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you test-built all configurations?

I guess config options for armv8 are not required, at least I built lttng-modules with those options enabled.

recipes-kernel/linux/linux-fslc/armv8a/defconfig Outdated Show resolved Hide resolved
@Jiteshprm
Copy link
Contributor Author

Hi @otavio , @zandrey,

First, thank you both I've been learning a lot about these frameworks :)

Then, as Andrey requested, I've build tested the configurations.
For the default one I used my usual config MACHINE=imx6dl-riotboard and it built successfully as you can see from the log:
default-defconfig.txt

For mxs I used the machine MACHINE=imx28evk and it also built successfully as you can see from the log:
mxs.txt

For mx25 I used the machine MACHINE=imx25pdk and it also built successfully as you can see from the log:
mx25.txt

But for armv8a, I'm struggling to find a compatible machine. I think it needs to be for iMX8 but it seems that these devices, at least for imx8mq-evk it seems to use the linux-imx and not linux-fslc kernel.
Can you tell me which machine should I build against to test this configuration?
armv8a.txt

Kind Regards

@zandrey
Copy link
Contributor

zandrey commented Mar 7, 2021

But for armv8a, I'm struggling to find a compatible machine. I think it needs to be for iMX8 but it seems that these devices, at least for imx8mq-evk it seems to use the linux-imx and not linux-fslc kernel.
Can you tell me which machine should I build against to test this configuration?

Community BSP (containing linux-fslc as kernel provider) is not yet available for mx8m machines, there is an ongoing PR #680 that is aimed to address it.

You can pick it up locally and have a test build of the modified kernel containing your option additions.

-- andrey

@Jiteshprm
Copy link
Contributor Author

Jiteshprm commented Mar 7, 2021

Hi @zandrey

As you said, I checked out your branch, added my changes manually and the build was good for armv8a with the kprobes on.
I used MACHINE=imx8mn-ddr4-evk.
The log is attached.
armv8a-2.txt

Kind Regards

@zandrey
Copy link
Contributor

zandrey commented Mar 8, 2021

Hello @Jiteshprm

Hi @zandrey

As you said, I checked out your branch, added my changes manually and the build was good for armv8a with the kprobes on.
I used MACHINE=imx8mn-ddr4-evk.

Thanks for testing it out!

The log is attached.
armv8a-2.txt

From the attached log, I see that CONFIG_OPTPROBES is not set in the final .config file. This is exactly the information I was referring you to, and this is exactly the reason I asked you to publish the log file from kernel configuration verification.

It looks like that the config option you've introduced in the commit is actually not being set, and this needs to be investigated further on why it is not taken. I guess there is a dependency of this config option is not met, therefore it is not set proper.

We should try to avoid such situations, therefore I need to ask you to have a look at it further.

Kind Regards

-- andrey

Fix compile error when building lttng using bitbake by:

Enable kprobes configuration enabled from menuconfig
Run diffconfig
Copy the resulting diff contents into all the linux-fslc defconfig files
Add end of line in defconfig
Built the kernel with no warnings from do_kernel_configcheck task
Add correct defconfig configuration for armv8a
Tested on master branch from 3rd March 2021

Error:
riotboard/fsl-community-bsp/build/tmp/work/
imx6dl_riotboard-fslc-linux-gnueabi/lttng-modules/2.12.4-r0/
lttng-modules-2.12.4/wrapper/kallsyms.c:20:3: error:
20 | # error "LTTng-modules requires CONFIG_KPROBES on kernels >= 5.7.0"
   |   ^~~~~
make[3]: *** [riotboard/fsl-community-bsp/build/tmp/work-shared/
imx6dl-riotboard/kernel-source/scripts/Makefile.build:279:
riotboard/fsl-community-bsp/build/tmp/work/
imx6dl_riotboard-fslc-linux-gnueabi/lttng-modules/2.12.4-r0/
lttng-modules-2.12.4/wrapper/kallsyms.o] Error 1

Compile flags:
cd ~/riotboard/fsl-community-bsp
MACHINE=imx6dl-riotboard
DISTRO=fslc-framebuffer
source setup-environment build
bitbake fsl-image-machine-test

Signed-off-by: Jitesh Pramodray <jiteshprm@gmail.com>
@Jiteshprm
Copy link
Contributor Author

Hi @zandrey,

I believe I found the issue.
The defconfig config to enable the kprobes for armv8a enables a different set of options than the others.
I found it by running menuconfig and enabling the option for this aarch64 kernel.
Now when I build it, there no merge conflicts, as you can see in the log attached.
armv8a-3.txt

Kind Regards

@zandrey
Copy link
Contributor

zandrey commented Mar 9, 2021

Hello @Jiteshprm

Yeap, now it looks good!

-- andrey

@otavio otavio merged commit 97d2ea4 into Freescale:master Mar 9, 2021
MrCry0 added a commit to MrCry0/meta-freescale that referenced this pull request May 29, 2024
Relevant changes:
- 9203cfabdfb6 Merge pull request Freescale#668 from DiogoSilva014/6.6-1.0.x-imx-fix-lpcg
- d6110c170fb9 Revert lpcg indice changes
- 2df26cdfbbbe Merge pull request Freescale#667 from MrCry0/6.6-1.0.x-imx-fix-imx8-usdhc
- a744d880dbb4 arch: arm64: freescale: imx8: fix sdhci clocks

Signed-off-by: Oleksandr Suvorov <cryosay@gmail.com>
MrCry0 added a commit to MrCry0/meta-freescale that referenced this pull request May 29, 2024
Relevant changes:
- a1f3157034fe4 Merge pull request Freescale#670 from DiogoSilva014/6.6-1.0.x-imx-lpcg
- 55720fcb81c3e arch: arm64: freescale: imx8qm: fix flexcan clocks
- 9203cfabdfb68 Merge pull request Freescale#668 from DiogoSilva014/6.6-1.0.x-imx-fix-lpcg
- d6110c170fb98 Revert lpcg indice changes
- 2df26cdfbbbe0 Merge pull request Freescale#667 from MrCry0/6.6-1.0.x-imx-fix-imx8-usdhc
- a744d880dbb46 arch: arm64: freescale: imx8: fix sdhci clocks

Signed-off-by: Oleksandr Suvorov <cryosay@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants