Yocto Kernel building


Rohithraj.Bhaskara@...
 

Hello,

I was trying to build a kernel for layerscape ls1046ardb setup.
I referred the meta-freescale/recipes-kernel/linux/linux-qoriq_5.4.bb file from dunfell branch.

Build configuration:
Yocto branch: dunfell
Required kernel sourcehttps://source.codeaurora.org/quic/femto5G/fsm/external/qoriq-components/linux_4.19-rt/commit/?h=APSS.FSM.6.6-00194-FSM10056.0&id=74700acb31e369495da22b4bbfd9e3f4315fc74a
SRC_rev : 74700acb31e369495da22b4bbfd9e3f4315fc74a
SRC branch: APSS.FSM.6.6

Here I have created separate layer and added my files under <my_layer_name>/recipe-kernel/linux/linux-qoriq-rt_4.19.bb path 

 
inherit kernel qoriq_build_64bit_kernel siteinfo
inherit fsl-kernel-localversion
 
SUMMARY = "Linux Kernel for NXP QorIQ platforms"
SECTION = "kernel"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
 
SRC_URI = "https://source.codeaurora.org/quic/femto5G/fsm/external/qoriq-components/linux_4.19-rt;branch=APSS.FSM.6.6 \
"
SRCREV = "74700acb31e369495da22b4bbfd9e3f4315fc74a"
 
SRC_URI[sha256sum] = "ddb8e5defcdaec9ce8cbe39d157f58a369decf7c1028cddaa6186343b7f09c2b"
 
S = "${WORKDIR}/git"
 
DEPENDS_append = " libgcc"
# not put Images into /boot of rootfs, install kernel-image if needed
RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""
 
KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}"
KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}"
KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
 
ZIMAGE_BASE_NAME = "zImage-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
ZIMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
 
SCMVERSION ?= "y"
LOCALVERSION = ""
 
FILES_${KERNEL_PACKAGE_NAME}-image += "/boot/zImage*"
COMPATIBLE_MACHINE = "(qoriq)"


When I try to build the kernel I am encountered with below errors,
ERROR: linux-qoriq-rt-4.19-r0 do_populate_lic: QA Issue: linux-qoriq-rt: LIC_FILES_CHKSUM points to an invalid file: /home/rancore/rohit/git_pull/rgbbbuildscripts/build/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/tmp/work/odsc3_ibtb_sku2_board-poky-linux/linux-qoriq-rt/4.19-r0/git/COPYING [license-checksum]
ERROR: linux-qoriq-rt-4.19-r0 do_populate_lic: Fatal QA errors found, failing task.
ERROR: Logfile of failure stored in: /home/rancore/rohit/git_pull/rgbbbuildscripts/build/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/tmp/work/odsc3_ibtb_sku2_board-poky-linux/linux-qoriq-rt/4.19-r0/temp/log.do_populate_lic.44895
ERROR: Task (/home/rancore/rohit/git_pull/rgbbbuildscripts/build/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/../meta-rjio_bsp/recipes-kernel/linux/linux-qoriq-rt_4.19.bb:do_populate_lic) failed with exit code '1'
ERROR: linux-qoriq-rt-4.19-r0 do_preconfigure: Execution of '/home/rancore/rohit/git_pull/rgbbbuildscripts/build/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/tmp/work/odsc3_ibtb_sku2_board-poky-linux/linux-qoriq-rt/4.19-r0/temp/run.do_preconfigure.44894' failed with exit code 1:
/home/rancore/rohit/git_pull/rgbbbuildscripts/build/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/tmp/work/odsc3_ibtb_sku2_board-poky-linux/linux-qoriq-rt/4.19-r0/temp/run.do_preconfigure.44894: line 120: /home/rancore/rohit/git_pull/rgbbbuildscripts/build/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/tmp/work/odsc3_ibtb_sku2_board-poky-linux/linux-qoriq-rt/4.19-r0/defconfig: No such file or directory
WARNING: /home/rancore/rohit/git_pull/rgbbbuildscripts/build/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/tmp/work/odsc3_ibtb_sku2_board-poky-linux/linux-qoriq-rt/4.19-r0/temp/run.do_preconfigure.44894:1 exit 1 from 'sed -e "${CONF_SED_SCRIPT}" < '/home/rancore/rohit/git_pull/rgbbbuildscripts/build/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/tmp/work/odsc3_ibtb_sku2_board-poky-linux/linux-qoriq-rt/4.19-r0/defconfig' >> '/home/rancore/rohit/git_pull/rgbbbuildscripts/build/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/tmp/work/odsc3_ibtb_sku2_board-poky-linux/linux-qoriq-rt/4.19-r0/build/.config''
Can anyone please guide me to build the kernel successfully?

Thank you


tomzy
 

Hello,I was trying to build a kernel for layerscape ls1046ardb setup.I referred the meta-freescale/recipes-kernel/linux/linux-qoriq_5.4.bb file from dunfell branch.Build configuration:
Yocto branch: dunfell
Required kernel sourcehttps://source.codeaurora.org/quic/femto5G/fsm/external/qoriq-components/linux_4.19-rt/commit/?h=APSS.FSM.6.6-00194-FSM10056.0&id=74700acb31e369495da22b4bbfd9e3f4315fc74a
SRC_rev : 74700acb31e369495da22b4bbfd9e3f4315fc74a
SRC branch: APSS.FSM.6.6

Here I have created separate layer and added my files under <my_layer_name>/recipe-kernel/linux/linux-qoriq-rt_4.19.bb path 

It is better to use [include file](https://github.com/Freescale/meta-freescale/blob/dunfell/recipes-kernel/linux/linux-qoriq.inc)
in similar way the
[linux-qoriq_5.4.bb](https://github.com/Freescale/meta-freescale/blob/dunfell/recipes-kernel/linux/linux-qoriq_5.4.bb ) does it.

So the `linux-qoriq-rt_4.19.bb` should be

```

LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"

LINUX_VERSION = "4.19.90"

SRC_URI = "https://source.codeaurora.org/quic/femto5G/fsm/external/qoriq-components/linux_4.19-rt;branch=APSS.FSM.6.6 \
"
SRCREV = "74700acb31e369495da22b4bbfd9e3f4315fc74a"

require recipes-kernel/linux/linux-qoriq.inc

```
LINUX_VERSION can be get from linux_4.19-rt repo. Please let us know it this helps.



 
inherit kernel qoriq_build_64bit_kernel siteinfo
inherit fsl-kernel-localversion
 
SUMMARY = "Linux Kernel for NXP QorIQ platforms"
SECTION = "kernel"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
 
SRC_URI = "https://source.codeaurora.org/quic/femto5G/fsm/external/qoriq-components/linux_4.19-rt;branch=APSS.FSM.6.6 \
"
SRCREV = "74700acb31e369495da22b4bbfd9e3f4315fc74a"
 
SRC_URI[sha256sum] = "ddb8e5defcdaec9ce8cbe39d157f58a369decf7c1028cddaa6186343b7f09c2b"
 
S = "${WORKDIR}/git"
 
DEPENDS_append = " libgcc"
# not put Images into /boot of rootfs, install kernel-image if needed
RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""
 
KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}"
KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}"
KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
 
ZIMAGE_BASE_NAME = "zImage-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
ZIMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
 
SCMVERSION ?= "y"
LOCALVERSION = ""
 
FILES_${KERNEL_PACKAGE_NAME}-image += "/boot/zImage*"
COMPATIBLE_MACHINE = "(qoriq)"


When I try to build the kernel I am encountered with below errors,
ERROR: linux-qoriq-rt-4.19-r0 do_populate_lic: QA Issue: linux-qoriq-rt: LIC_FILES_CHKSUM points to an invalid file: /home/rancore/rohit/git_pull/rgbbbuildscripts/build
Looks like there is a problem with finding lic file, it may be that S points to incorrect path.
/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/tmp/work/odsc3_ibtb_sku2_board-poky-linux/linux-qoriq-rt/4.19-r0/git/COPYING [license-checksum]
ERROR: linux-qoriq-rt-4.19-r0 do_populate_lic: Fatal QA errors found, failing task.
ERROR: Logfile of failure stored in: /home/rancore/rohit/git_pull/rgbbbuildscripts/build/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/tmp/work/odsc3_ibtb_sku2_board-poky-linux/linux-qoriq-rt/4.19-r0/temp/log.do_populate_lic.44895
ERROR: Task (/home/rancore/rohit/git_pull/rgbbbuildscripts/build/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/../meta-rjio_bsp/recipes-kernel/linux/linux-qoriq-rt_4.19.bb:do_populate_lic) failed with exit code '1'
ERROR: linux-qoriq-rt-4.19-r0 do_preconfigure: Execution of '/home/rancore/rohit/git_pull/rgbbbuildscripts/build/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/tmp/work/odsc3_ibtb_sku2_board-poky-linux/linux-qoriq-rt/4.19-r0/temp/run.do_preconfigure.44894' failed with exit code 1:
/home/rancore/rohit/git_pull/rgbbbuildscripts/build/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/tmp/work/odsc3_ibtb_sku2_board-poky-linux/linux-qoriq-rt/4.19-r0/temp/run.do_preconfigure.44894: line 120: /home/rancore/rohit/git_pull/rgbbbuildscripts/build/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/tmp/work/odsc3_ibtb_sku2_board-poky-linux/linux-qoriq-rt/4.19-r0/defconfig: No such file or directory
WARNING: /home/rancore/rohit/git_pull/rgbbbuildscripts/build/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/tmp/work/odsc3_ibtb_sku2_board-poky-linux/linux-qoriq-rt/4.19-r0/temp/run.do_preconfigure.44894:1 exit 1 from 'sed -e "${CONF_SED_SCRIPT}" < '/home/rancore/rohit/git_pull/rgbbbuildscripts/build/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/tmp/work/odsc3_ibtb_sku2_board-poky-linux/linux-qoriq-rt/4.19-r0/defconfig' >> '/home/rancore/rohit/git_pull/rgbbbuildscripts/build/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/tmp/work/odsc3_ibtb_sku2_board-poky-linux/linux-qoriq-rt/4.19-r0/build/.config''
Can anyone please guide me to build the kernel successfully?

Thank you
Regards,
Tomasz Żyjewski
Embedded Systems Engineer
GPG: 5C495EA3EBEECA59
https://3mdeb.com | @3mdeb_com


Rohithraj.Bhaskara@...
 

I have added the include file and compiled it. But same errors observed with few more errors.
These errors are observed in the stage of bitbake linux-qoriq-rt -c configure.

Also, found following notes while doing fetch, unpack and patch,
NOTE: preferred version 4.19 of linux-qoriq-rt not available (for item linux-qoriq-rt)
NOTE: versions of linux-qoriq-rt available: ${LINUX_VERSION}+git${SRCPV}
NOTE: Resolving any missing task queue dependencies
NOTE: preferred version 4.19 of linux-qoriq-rt not available (for item kernel-image-image)
NOTE: versions of linux-qoriq-rt available: ${LINUX_VERSION}+git${SRCPV}
NOTE: preferred version 4.19 of linux-qoriq-rt not available (for item kernel-base)
NOTE: versions of linux-qoriq-rt available: ${LINUX_VERSION}+git${SRCPV}
NOTE: preferred version 4.19 of linux-qoriq-rt not available (for item kernel-image-vmlinux)
NOTE: versions of linux-qoriq-rt available: ${LINUX_VERSION}+git${SRCPV}
NOTE: preferred version 4.19 of linux-qoriq-rt not available (for item kernel-image-uimage)
NOTE: versions of linux-qoriq-rt available: ${LINUX_VERSION}+git${SRCPV}
NOTE: preferred version 4.19 of linux-qoriq-rt not available (for item virtual/kernel)
NOTE: versions of linux-qoriq-rt available: ${LINUX_VERSION}+git${SRCPV}

Attached log file for your reference.

Thank you 

From: yocto@... <yocto@...> on behalf of tomzy <tomasz.zyjewski@...>
Sent: Wednesday, April 13, 2022 4:06 PM
To: yocto@... <yocto@...>
Subject: [External]Re: [yocto] Yocto Kernel building
 

Caution: The e-mail below is from an external source. Please do not open attachments or click links unless this email comes from a known sender and you know the content is safe.


 
Hello,I was trying to build a kernel for layerscape ls1046ardb setup.I referred the meta-freescale/recipes-kernel/linux/linux-qoriq_5.4.bb file from dunfell branch.Build configuration:
Yocto branch: dunfell
Required kernel sourcehttps://source.codeaurora.org/quic/femto5G/fsm/external/qoriq-components/linux_4.19-rt/commit/?h=APSS.FSM.6.6-00194-FSM10056.0&id=74700acb31e369495da22b4bbfd9e3f4315fc74a
SRC_rev : 74700acb31e369495da22b4bbfd9e3f4315fc74a
SRC branch: APSS.FSM.6.6

Here I have created separate layer and added my files under <my_layer_name>/recipe-kernel/linux/linux-qoriq-rt_4.19.bb path 

It is better to use [include file](https://github.com/Freescale/meta-freescale/blob/dunfell/recipes-kernel/linux/linux-qoriq.inc)
in similar way the
[linux-qoriq_5.4.bb](https://github.com/Freescale/meta-freescale/blob/dunfell/recipes-kernel/linux/linux-qoriq_5.4.bb ) does it.

So the `linux-qoriq-rt_4.19.bb` should be

```

LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"

LINUX_VERSION = "4.19.90"

SRC_URI = "https://source.codeaurora.org/quic/femto5G/fsm/external/qoriq-components/linux_4.19-rt;branch=APSS.FSM.6.6 \
"
SRCREV = "74700acb31e369495da22b4bbfd9e3f4315fc74a"

require recipes-kernel/linux/linux-qoriq.inc

```
LINUX_VERSION can be get from linux_4.19-rt repo. Please let us know it this helps.



 
inherit kernel qoriq_build_64bit_kernel siteinfo
inherit fsl-kernel-localversion
 
SUMMARY = "Linux Kernel for NXP QorIQ platforms"
SECTION = "kernel"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
 
"
SRCREV = "74700acb31e369495da22b4bbfd9e3f4315fc74a"
 
SRC_URI[sha256sum] = "ddb8e5defcdaec9ce8cbe39d157f58a369decf7c1028cddaa6186343b7f09c2b"
 
S = "${WORKDIR}/git"
 
DEPENDS_append = " libgcc"
# not put Images into /boot of rootfs, install kernel-image if needed
RDEPENDS_${KERNEL_PACKAGE_NAME}-base = ""
 
KERNEL_CC_append = " ${TOOLCHAIN_OPTIONS}"
KERNEL_LD_append = " ${TOOLCHAIN_OPTIONS}"
KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"
 
ZIMAGE_BASE_NAME = "zImage-${PKGE}-${PKGV}-${PKGR}-${MACHINE}-${DATETIME}"
ZIMAGE_BASE_NAME[vardepsexclude] = "DATETIME"
 
SCMVERSION ?= "y"
LOCALVERSION = ""
 
FILES_${KERNEL_PACKAGE_NAME}-image += "/boot/zImage*"
COMPATIBLE_MACHINE = "(qoriq)"


When I try to build the kernel I am encountered with below errors,
ERROR: linux-qoriq-rt-4.19-r0 do_populate_lic: QA Issue: linux-qoriq-rt: LIC_FILES_CHKSUM points to an invalid file: /home/rancore/rohit/git_pull/rgbbbuildscripts/build
Looks like there is a problem with finding lic file, it may be that S points to incorrect path.
/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/tmp/work/odsc3_ibtb_sku2_board-poky-linux/linux-qoriq-rt/4.19-r0/git/COPYING [license-checksum]
ERROR: linux-qoriq-rt-4.19-r0 do_populate_lic: Fatal QA errors found, failing task.
ERROR: Logfile of failure stored in: /home/rancore/rohit/git_pull/rgbbbuildscripts/build/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/tmp/work/odsc3_ibtb_sku2_board-poky-linux/linux-qoriq-rt/4.19-r0/temp/log.do_populate_lic.44895
ERROR: Task (/home/rancore/rohit/git_pull/rgbbbuildscripts/build/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/../meta-rjio_bsp/recipes-kernel/linux/linux-qoriq-rt_4.19.bb:do_populate_lic) failed with exit code '1'
ERROR: linux-qoriq-rt-4.19-r0 do_preconfigure: Execution of '/home/rancore/rohit/git_pull/rgbbbuildscripts/build/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/tmp/work/odsc3_ibtb_sku2_board-poky-linux/linux-qoriq-rt/4.19-r0/temp/run.do_preconfigure.44894' failed with exit code 1:
/home/rancore/rohit/git_pull/rgbbbuildscripts/build/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/tmp/work/odsc3_ibtb_sku2_board-poky-linux/linux-qoriq-rt/4.19-r0/temp/run.do_preconfigure.44894: line 120: /home/rancore/rohit/git_pull/rgbbbuildscripts/build/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/tmp/work/odsc3_ibtb_sku2_board-poky-linux/linux-qoriq-rt/4.19-r0/defconfig: No such file or directory
WARNING: /home/rancore/rohit/git_pull/rgbbbuildscripts/build/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/tmp/work/odsc3_ibtb_sku2_board-poky-linux/linux-qoriq-rt/4.19-r0/temp/run.do_preconfigure.44894:1 exit 1 from 'sed -e "${CONF_SED_SCRIPT}" < '/home/rancore/rohit/git_pull/rgbbbuildscripts/build/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/tmp/work/odsc3_ibtb_sku2_board-poky-linux/linux-qoriq-rt/4.19-r0/defconfig' >> '/home/rancore/rohit/git_pull/rgbbbuildscripts/build/rjio/fw_main_dev_odsc3_ibtb_sku2_board/build/poky/build/tmp/work/odsc3_ibtb_sku2_board-poky-linux/linux-qoriq-rt/4.19-r0/build/.config''
Can anyone please guide me to build the kernel successfully?

Thank you
Regards,
Tomasz Żyjewski
Embedded Systems Engineer
GPG: 5C495EA3EBEECA59
https://3mdeb.com | @3mdeb_com


"Confidentiality Warning: This message and any attachments are intended only for the use of the intended recipient(s), are confidential and may be privileged. If you are not the intended recipient, you are hereby notified that any review, re-transmission, conversion to hard copy, copying, circulation or other use of this message and any attachments is strictly prohibited. If you are not the intended recipient, please notify the sender immediately by return email and delete this message and any attachments from your system.

Virus Warning: Although the company has taken reasonable precautions to ensure no viruses are present in this email. The company cannot accept responsibility for any loss or damage arising from the use of this email or attachment."


tomzy
 

I have added the include file and compiled it. But same errors observed with few more errors.
These errors are observed in the stage of bitbake linux-qoriq-rt -c configure.
From the log I can tell that there is some problem with paths, like bitbake could not find needed files.
 
 
Also, found following notes while doing fetch, unpack and patch,
NOTE: preferred version 4.19 of linux-qoriq-rt not available (for item linux-qoriq-rt)
NOTE: versions of linux-qoriq-rt available: ${LINUX_VERSION}+git${SRCPV}
NOTE: Resolving any missing task queue dependencies
NOTE: preferred version 4.19 of linux-qoriq-rt not available (for item kernel-image-image)
NOTE: versions of linux-qoriq-rt available: ${LINUX_VERSION}+git${SRCPV}
NOTE: preferred version 4.19 of linux-qoriq-rt not available (for item kernel-base)
NOTE: versions of linux-qoriq-rt available: ${LINUX_VERSION}+git${SRCPV}
NOTE: preferred version 4.19 of linux-qoriq-rt not available (for item kernel-image-vmlinux)
NOTE: versions of linux-qoriq-rt available: ${LINUX_VERSION}+git${SRCPV}
NOTE: preferred version 4.19 of linux-qoriq-rt not available (for item kernel-image-uimage)
NOTE: versions of linux-qoriq-rt available: ${LINUX_VERSION}+git${SRCPV}
NOTE: preferred version 4.19 of linux-qoriq-rt not available (for item virtual/kernel)
NOTE: versions of linux-qoriq-rt available: ${LINUX_VERSION}+git${SRCPV}
 

Yes, maybe it would be better to try linux-qoriq_4.19.bb and then set PREFERRED_VERSION. Unfortunately,
I've been a bit busy lately, but if that's still a problem, I can try to reproduce it over the weekend on some basic
configuration with meta-freescale.



Attached log file for your reference.
 
Thank you

Regarding,

Tomasz Żyjewski
Embedded Systems Engineer
GPG: 5C495EA3EBEECA59
https://3mdeb.com | @3mdeb_com


Rohithraj.Bhaskara@...
 

Thank you, Tomasz,

I tried to build the default kernel v4.19 using linux-qoriq_4.19.bb by setting PREFERRED_VERSION_linux-qoriq = "4.19%". It was built successfully and later I replaced the source URL and revision of my kernel URL and revision. But I observed the same QA issue.

I appreciate your valuable time towards my issues. I look forward to getting more input from you.

Best regards,
Rohithraj