Re: [yocto] Cross compilation sysroot doesn't include libusb
On Fri, Jul 12, 2019 at 1:02 PM Srinivasan, Usha wrote: > > I will start with the caveat: this is my first time trying to cross compile > for a target running a yocto bitbaked image. So I am surely not doing the > right thing. > > > > I have generated both a core-image-sato & core-image-sato-dev. I am > developing an application to run on my target machine. My application uses > libraries that in turn need libusb.so which doesn’t exist in under the > sysroot setup for cross compilation. I have these in my local.conf and I do > see > > > > EXTRA_IMAGE_FEATURES ?= "debug-tweaks tools-testapps tools-sdk dev-pkgs" > > CORE_IMAGE_EXTRA_INSTALL += "openssh glib-2.0 glibc glib-networking > libusb-compat" > > > > I do see that libusb-compat was generated: > > ./corei7-64-poky-linux/libusb-compat/1_0.1.5-r0/deploy-rpms/corei7_64/libusb-0.1-4-0.1.5-r0.corei7_64.rpm > > ./corei7-64-poky-linux/libusb-compat/1_0.1.5-r0/deploy-rpms/corei7_64/libusb-0.1-src-0.1.5-r0.corei7_64.rpm > > ./corei7-64-poky-linux/libusb-compat/1_0.1.5-r0/deploy-rpms/corei7_64/libusb-0.1-dev-0.1.5-r0.corei7_64.rpm > > ./corei7-64-poky-linux/libusb-compat/1_0.1.5-r0/deploy-rpms/corei7_64/libusb-0.1-dbg-0.1.5-r0.corei7_64.rpm > > > > I tried bitbake meta-ide-support and used > tmp/environment-setup-corei7-64-poky-linux to setup my build environment, but > there is no libusb.so in the sysroot lib directory. > > > > I tried bitbake meta-toolchain and installed the tool chain and used its > /opt/poky/2.7/environment-setup-corei7-64-poky-linux, but again the > opt/poky/2.7 sysroot directory also does not include libusb.so. you should generate image specific SDK with bitbake -cpopulate_sdk core-image-sato and also add libusb to CORE_IMAGE_EXTRA_INSTALL if its not being pulled in autromatically as a dependency by some package in sato image. > > > > What step am I missing? > > > > Thanks in advance, > > Usha > > > > > Intel Corporation > > 1110 American Parkway NE > > Suite F-100, AMP1 10C-166b > Allentown, PA 18109-9151 > > 484-245-9498 > > > > -- > ___ > yocto mailing list > yocto@yoctoproject.org > https://lists.yoctoproject.org/listinfo/yocto -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] Cross compilation sysroot doesn't include libusb
I will start with the caveat: this is my first time trying to cross compile for a target running a yocto bitbaked image. So I am surely not doing the right thing. I have generated both a core-image-sato & core-image-sato-dev. I am developing an application to run on my target machine. My application uses libraries that in turn need libusb.so which doesn't exist in under the sysroot setup for cross compilation. I have these in my local.conf and I do see EXTRA_IMAGE_FEATURES ?= "debug-tweaks tools-testapps tools-sdk dev-pkgs" CORE_IMAGE_EXTRA_INSTALL += "openssh glib-2.0 glibc glib-networking libusb-compat" I do see that libusb-compat was generated: ./corei7-64-poky-linux/libusb-compat/1_0.1.5-r0/deploy-rpms/corei7_64/libusb-0.1-4-0.1.5-r0.corei7_64.rpm ./corei7-64-poky-linux/libusb-compat/1_0.1.5-r0/deploy-rpms/corei7_64/libusb-0.1-src-0.1.5-r0.corei7_64.rpm ./corei7-64-poky-linux/libusb-compat/1_0.1.5-r0/deploy-rpms/corei7_64/libusb-0.1-dev-0.1.5-r0.corei7_64.rpm ./corei7-64-poky-linux/libusb-compat/1_0.1.5-r0/deploy-rpms/corei7_64/libusb-0.1-dbg-0.1.5-r0.corei7_64.rpm I tried bitbake meta-ide-support and used tmp/environment-setup-corei7-64-poky-linux to setup my build environment, but there is no libusb.so in the sysroot lib directory. I tried bitbake meta-toolchain and installed the tool chain and used its /opt/poky/2.7/environment-setup-corei7-64-poky-linux, but again the opt/poky/2.7 sysroot directory also does not include libusb.so. What step am I missing? Thanks in advance, Usha Intel Corporation 1110 American Parkway NE Suite F-100, AMP1 10C-166b Allentown, PA 18109-9151 484-245-9498 -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] Error executing a python function in exec_python_func()
Hello All, by building the image I encountered this issue during populating SDK Any idea where and how to fix it? Thanks. ERROR: Error executing a python function in exec_python_func() autogenerated: The stack trace of python calls that resulted in this exception/failure was: File: 'exec_python_func() autogenerated', lineno: 2, function: 0001: *** 0002:extend_recipe_sysroot(d) 0003: File: '/yocto/warrior/sources/poky/meta/classes/staging.bbclass', lineno: 557, function: extend_recipe_sysroot 0553:dest = newmanifest[l] 0554:if l.endswith("/"): 0555:staging_copydir(l, targetdir, dest, seendirs) 0556:continue *** 0557:staging_copyfile(l, targetdir, dest, postinsts, seendirs) 0558: 0559:bb.note("Installed into sysroot: %s" % str(msg_adding)) 0560:bb.note("Skipping as already exists in sysroot: %s" % str(msg_exists)) 0561: File: '/yocto/warrior/sources/poky/meta/classes/staging.bbclass', lineno: 151, function: staging_copyfile 0147:os.symlink(linkto, dest) 0148:#bb.warn(c) 0149:else: 0150:try: *** 0151:os.link(c, dest) 0152:except OSError as err: 0153:if err.errno == errno.EXDEV: 0154:bb.utils.copyfile(c, dest) 0155:else: Exception: FileExistsError: [Errno 17] File exists: '/yocto/warrior/build-xwayland/tmp/sysroots-components/aarch64/tensorflow/usr/include/tensorflow/contrib/lite/string_util.h' -> '/yocto/warrior/build-xwayland/tmp/work/imx8qmmek-poky-linux/fsl-image-qt5/1.0-r0/recipe-sysroot/usr/include/tensorflow/contrib/lite/string_util.h' ERROR: [Errno 17] File exists: '/yocto/warrior/build-xwayland/tmp/sysroots-components/aarch64/tensorflow/usr/include/tensorflow/contrib/lite/string_util.h' -> '/media/nxa18908/work/yocto/warrior/build-xwayland/tmp/work/imx8qmmek-poky-linux/fsl-image-qt5/1.0-r0/recipe-sysroot/usr/include/tensorflow/contrib/lite/string_util.h' DEBUG: Python function extend_recipe_sysroot finished ERROR: Function failed: extend_recipe_sysroot -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] [Meta-Qt5] "Unknown Module: declarative" Error While Creating Toolchain
Hello Max, Remember me? Zoran Stojsavljevic, from very far in Past... From Y2017! Could you, please, help Onur with this problem? I know that U R Subject Matter Expert with iMX6 and Qt5, and probably U already met this problem not too far in The Past... Please, could you read carefully the underlying thread, and U'll understand the problem 100% in 5 minutes for U (my best guess)! Thank you in advance, Zoran Stojsavljevic ___ -- Forwarded message - From: Zoran Stojsavljevic Date: Tue, Jul 9, 2019 at 11:02 AM Subject: Re: [yocto] [Meta-Qt5] "Unknown Module: declarative" Error While Creating Toolchain To: Onur Eser Cc: Yocto Project Onur, I am not subject matter expert in Qt layers... Here is what I found while searching for an answer to the problem... Here is the .bb causing to you problems: https://github.com/meta-qt5/meta-qt5/blob/sumo/recipes-qt/qt5/qtquick1_git.bb It is sumo branch. I noted that thud branch does NOT have this .bb (it is rearranged, and this .bb removed). meta-qt5 has there for thud: qtquickcontrols_git.bb and qtquickcontrols2_git.bb (for 5.11.3 version). Kludge: maybe you can try to build the whole thing using thud branch?! Hope this hepls, Zoran ___ On Tue, Jul 9, 2019 at 10:38 AM Onur Eser wrote: > > Hello Zoran! > Thank you for your answer, but that page is about the missing packages in your configuration. There is no a missing dependency in my configuration. The recipe "qtdeclarative" is already added. > > Note: Sending again because sent as PM accidentally. > Thanks anyway! > Onur > > Zoran Stojsavljevic , 9 Tem 2019 Sal, 10:59 tarihinde şunu yazdı: >> >> Maybe this: >> https://www.technexion.com/support/knowledgebase/resolving-dependencies-issues-in-yocto/ >> >> Zoran >> ___ >> >> On Tue, Jul 9, 2019 at 7:59 AM Onur Eser wrote: >> > >> > Hello All, >> > >> > I have talked to my BSP provider and they have solved the conflict files issue with an update. Now I am able to create and boot a Yocto Image with Meta-Qt5 recipes and 'dev_pkgs' in it. But still cannot create a toolchain. Nor with I guess it is trying to compile something before qtdeclarative, but these 'something' depends on qtdeclarative. >> > >> > My image is core image is Weston. I added the line 'inherit populate_sdk_qt5' to my core-image-weston.bb file. And tried both commands 'bitbake meta-toolchain-qt5' and 'bitbake -c populate_sdk core-image-weston'. The result is the same. >> > >> > I cut just the error part of my output: >> > >> > | cd qdeclarativefolderlistmodel/ && ( test -e Makefile || /home/closx/poky/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/qtquick1/5.10.1+gitAUTOINC+b2476dcd53-r0/recipe-sysroot-native/usr/bin/qt5/qmake -o Makefile /home/closx/poky/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/qtquick1/5.10.1+gitAUTOINC+b2476dcd53-r0/git/tests/auto/declarative/qdeclarativefolderlistmodel/ qdeclarativefolderlistmodel.pro ) && make -f Makefile >> > | Project ERROR: Unknown module(s) in QT: declarative widgets >> > | Makefile:88: recipe for target 'sub-qdeclarativecomponent-make_first' failed >> > | make[2]: *** [sub-qdeclarativecomponent-make_first] Error 3 >> > | make[2]: *** Waiting for unfinished jobs >> > | Project ERROR: Unknown module(s) in QT: declarative >> > | Project ERROR: Unknown module(s) in QT: declarative >> > | Makefile:113: recipe for target 'sub-qdeclarativecontext-make_first' failed >> > | make[2]: *** [sub-qdeclarativecontext-make_first] Error 3 >> > | Project ERROR: Unknown module(s) in QT: declarative >> > | Makefile:138: recipe for target 'sub-qdeclarativeengine-make_first' failed >> > | make[2]: *** [sub-qdeclarativeengine-make_first] Error 3 >> > | Makefile:63: recipe for target 'sub-parserstress-make_first' failed >> > | make[2]: *** [sub-parserstress-make_first] Error 3 >> > | make[2]: Entering directory '/home/closx/poky/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/qtquick1/5.10.1+gitAUTOINC+b2476dcd53-r0/build/tests/manual/declarative' >> > | make[2]: Nothing to be done for 'first'. >> > | make[2]: Leaving directory '/home/closx/poky/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/qtquick1/5.10.1+gitAUTOINC+b2476dcd53-r0/build/tests/manual/declarative' >> > | make[1]: Leaving directory '/home/closx/poky/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/qtquick1/5.10.1+gitAUTOINC+b2476dcd53-r0/build/tests/manual' >> > | Project ERROR: Unknown module(s) in QT: declarative >> > | Makefile:163: recipe for target 'sub-qdeclarativeerror-make_first' failed >> > | make[2]: *** [sub-qdeclarativeerror-make_first] Error 3 >> > | Project ERROR: Unknown module(s) in QT: declarative >> > | Makefile:188: recipe for target 'sub-qdeclarativefolderlistmodel-make_first' failed >> > | make[2]: *** [sub-qdeclarativefolderlistmodel-make_first] Error 3 >> > | make[2]: Leaving directory '/home/closx/poky/build/tmp/work/cortexa9hf-neon-poky-linux-gnueabi/qtquick1/5.10.1+gitAUTOINC+b2476dcd53-r0/build/tests/auto/declarative' >> > | Makefile:
[yocto] [PATCH] meta-selinux: fix parsing error while selinux not configured
Following parsing error will occure while "selinux" not configured in DISTRO_FEATURES: ERROR: ParseError in /workspace/zhanglin/CGEL/CGEL6X.new2/CGEL/cge- l6x_yocto/sources/meta-selinux/recipes-devtools/python/: not a Bit- Bake file to fix this, including a empty file: python_default.inc in python_- %bbappend will work. Signed-off-by: zhanglin --- recipes-devtools/python/python_%.bbappend | 2 +- recipes-devtools/python/python_default.inc | 0 2 files changed, 1 insertion(+), 1 deletion(-) create mode 100644 recipes-devtools/python/python_default.inc diff --git a/recipes-devtools/python/python_%.bbappend b/recipes-devtools/python/python_%.bbappend index 7719d3b..4e69c49 100644 --- a/recipes-devtools/python/python_%.bbappend +++ b/recipes-devtools/python/python_%.bbappend @@ -1 +1 @@ -require ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', '${BPN}_selinux.inc', '', d)} +require ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', '${BPN}_selinux.inc', '${BPN}_default.inc', d)} diff --git a/recipes-devtools/python/python_default.inc b/recipes-devtools/python/python_default.inc new file mode 100644 index 000..e69de29 -- 2.15.2 -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Can't boot to initramfs
On Fri, 12 Jul 2019 at 15:38, Moritz Porst wrote: > If I use the .wic image, APPEND is ignored. You need to write your own > kickstart file for this and include --append option. This usually means > copy what you need from existing files (check license compliance) and > add what you need. See the yocto manual on kickstart files: > https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#ref-kickstart This is a bug in the wic files, and if they're still broken in master then please send a patch. Notably this was the fix I did for the wic files in meta-intel: --- a/wic/systemd-bootdisk-microcode.wks +++ b/wic/systemd-bootdisk-microcode.wks.in @@ -10,4 +10,4 @@ part / --source rootfs --ondisk sda --fstype=ext4 --label platform --align 1024 -bootloader --ptable gpt --timeout=5 --append="rootwait rootfstype=ext4 console=ttyS0,115200 console=tty0" +bootloader --ptable gpt --timeout=5 --append="rootfstype=ext4 ${APPEND}" Easy! :) Ross -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Can't boot to initramfs
Hey Jupiter, you seem to confuse a few concepts, at least as far as I understand Am 12.07.2019 um 14:53 schrieb JH: Hi Moritz, On 7/12/19, Moritz Porst wrote: Hey On 12.07.19 10:05, JH wrote: BOOT_IMAGE=/bzImage root=PARTUUID=71d1d94a-83e8-4895-98eb-35309f58119f break=premount quiet rootwait rootwait rootfstype=ext4 console=ttyS0,115200 console=tty0 Which file did you add kernel boot command for bootargs, bootcmd, etc? I use meta-freescale, but I could not find BOOT_IMAGE is defined. Ways I know to add boot arguments: If you use .wic image via --append in the .wks file Right, I use .wic image. Otherwise in your machine config via the variable "APPEND", e.g. APPEND += "quiet shell" OK, I added APPEND += "quiet shell" to my machine config file solar.conf. First of all this was only an example. If you don't need these arguments don't add them. However you can check on boot if the arguments "quiet shell" were actually appended to your kernel arguments. If I use the .wic image, APPEND is ignored. You need to write your own kickstart file for this and include --append option. This usually means copy what you need from existing files (check license compliance) and add what you need. See the yocto manual on kickstart files: https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#ref-kickstart the "BOOT_IMAGE" is not a yocto variable, it is the bootloader syntax. Thus this depends on which bootloader you use, but yocto abstracts this. However for all bootloaders I know before boot you can hit "e" to edit the boot line manually. I use u-boot, I am currently running zImage-initramfs built from OpenWrt defined kernel boot arguement bootargs, bootcmd, console, etc. Although I can edit the u-boot kernel arguments during bootload running on imx6 ram, I really want to configure those arguments in Yocto to build a Yoctor zImage-initramfs. Wait, this makes no sense to me. I take my core-image-minimal-.wic and deploy it on my machine. On boot, having the correct (bundled) kernel in /boot directory, I then boot through initramfs into rootfs or - using "shell" or "shell-debug" kernel parameter - boot into initramfs. However these are the parameters to the kernel ON BOOT, not to build. The way you talk it seems that you expect these arguments to build you an initramfs inside yocto. This is not the case. I guess there must be some ways to configure it for zImage-initramfs, but the meta-freescale/wic/imx-uboot-bootpart.wks and other wks files are all used for creating SD card image which I guess that cannot be used to build an initramfs image for running on RAM, but correct me I could be wrong. The .wks file defines how the .wic image is partitioned on the disk. Your initramfs is your "initial ram filesystem", it is not partitioned since it gets loaded entirely into ram. Here are kernel arguments when I run zImage-initramfs on imx6 ram: printenv baudrate=115200 board_name=ULZ-EVK board_rev=14X14 bootargs=console=ttymxc0,115200 earlycon init=/init .. But I still have troubles to add INITRAMFS_IMAGE = "core-image-minimal-initramfs" or to run core-image-minimal-initramfs, both had errors: $ MACHINE="solar" DISTRO="solar" bitbake core-image-minimal-initramfs ERROR: Nothing PROVIDES 'core-image-minimal-initramfs' core-image-minimal-initramfs was skipped: incompatible with host arm-oe-linux-gnueabi (not in COMPATIBLE_HOST) in meta/recipes-core/images/core-image-minimal-initramfs.bb there is the following line: COMPATIBLE_HOST = "(i.86|x86_64).*-linux" You could try to overwrite it in your .bbappend to the value "*-linux" but I guess there is a reason for this line. Is the following core-image-minimal-initramfs.bbappend correct? I still got errors to build core-image-minimal-initramfs, I must misplace things here: $ cat core-image-minimal-initramfs.bbappend PACKAGE_INSTALL += "\ busybox \ base-files \ base-passwd \ bash \ util-linux-lsblk \ vim \ " Note: bash, util-linux-lsblk and vim are just my preferences, you can remove them. COMPATIBLE_HOST = "(arm|arm-oe-linux-gnueabi).*-linux" $ MACHINE="solar" DISTRO="solar" bitbake core-image-minimal-initramfs ERROR: Nothing RPROVIDES 'initramfs-module-install' initramfs-module-install was skipped: incompatible with host arm-oe-linux-gnueabi (not in COMPATIBLE_HOST) This is what I was saying. There seems to be a reason that arm architectures were not chosen as compatible with initramfs. You can pursue this problem further however (check what's initramfs-module-install) You may also look into Raspberry Pi yocto project. The community is larger and I doubt they have no functioning initramfs. However at this point I can't give you any better advice. Best regards and good luck Moritz Thank you very much. - jupiter $ MACHINE="solar" DISTRO="solar" bitbake solar-image ERROR: Nothing PROVIDES 'core-image-minimal-initramfs' core-image-minimal-initramfs was skipped: incompatible with host arm-oe-linux-gnueabi (not in COMPATIBLE_HOST)
Re: [yocto] Can't boot to initramfs
Hi Moritz, On 7/12/19, Moritz Porst wrote: > Hey > > On 12.07.19 10:05, JH wrote: >>> BOOT_IMAGE=/bzImage root=PARTUUID=71d1d94a-83e8-4895-98eb-35309f58119f >> break=premount quiet rootwait rootwait rootfstype=ext4 >> console=ttyS0,115200 console=tty0 >> >> Which file did you add kernel boot command for bootargs, bootcmd, etc? >> >> I use meta-freescale, but I could not find BOOT_IMAGE is defined. > Ways I know to add boot arguments: > If you use .wic image via --append in the .wks file Right, I use .wic image. > Otherwise in your machine config via the variable "APPEND", e.g. APPEND > += "quiet shell" OK, I added APPEND += "quiet shell" to my machine config file solar.conf. > the "BOOT_IMAGE" is not a yocto variable, it is the bootloader syntax. > Thus this depends on which bootloader you use, but yocto abstracts this. > However for all bootloaders I know before boot you can hit "e" to edit > the boot line manually. I use u-boot, I am currently running zImage-initramfs built from OpenWrt defined kernel boot arguement bootargs, bootcmd, console, etc. Although I can edit the u-boot kernel arguments during bootload running on imx6 ram, I really want to configure those arguments in Yocto to build a Yoctor zImage-initramfs. I guess there must be some ways to configure it for zImage-initramfs, but the meta-freescale/wic/imx-uboot-bootpart.wks and other wks files are all used for creating SD card image which I guess that cannot be used to build an initramfs image for running on RAM, but correct me I could be wrong. Here are kernel arguments when I run zImage-initramfs on imx6 ram: printenv baudrate=115200 board_name=ULZ-EVK board_rev=14X14 bootargs=console=ttymxc0,115200 earlycon init=/init .. >>> But I still have troubles to add INITRAMFS_IMAGE = >>> "core-image-minimal-initramfs" or to run core-image-minimal-initramfs, >>> both had errors: >>> >>> $ MACHINE="solar" DISTRO="solar" bitbake core-image-minimal-initramfs >>> >>> ERROR: Nothing PROVIDES 'core-image-minimal-initramfs' >>> core-image-minimal-initramfs was skipped: incompatible with host >>> arm-oe-linux-gnueabi (not in COMPATIBLE_HOST) > in meta/recipes-core/images/core-image-minimal-initramfs.bb there is the > following line: > COMPATIBLE_HOST = "(i.86|x86_64).*-linux" > You could try to overwrite it in your .bbappend to the value "*-linux" > but I guess there is a reason for this line. Is the following core-image-minimal-initramfs.bbappend correct? I still got errors to build core-image-minimal-initramfs, I must misplace things here: $ cat core-image-minimal-initramfs.bbappend PACKAGE_INSTALL += "\ busybox \ base-files \ base-passwd \ bash \ util-linux-lsblk \ vim \ " COMPATIBLE_HOST = "(arm|arm-oe-linux-gnueabi).*-linux" $ MACHINE="solar" DISTRO="solar" bitbake core-image-minimal-initramfs ERROR: Nothing RPROVIDES 'initramfs-module-install' initramfs-module-install was skipped: incompatible with host arm-oe-linux-gnueabi (not in COMPATIBLE_HOST) Thank you very much. - jupiter >>> >>> $ MACHINE="solar" DISTRO="solar" bitbake solar-image >>> >>> ERROR: Nothing PROVIDES 'core-image-minimal-initramfs' >>> core-image-minimal-initramfs was skipped: incompatible with host >>> arm-oe-linux-gnueabi (not in COMPATIBLE_HOST) >>> ERROR: Required build target 'solar-image' has no buildable providers. >>> Missing or unbuildable dependency chain was: ['solar-image', >>> 'virtual/kernel', 'core-image-minimal-initramfs'] >>> >>> Sorry, still learning Yocto, what I could be missing? >>> BOOT_IMAGE=/bzImage root=PARTUUID=71d1d94a-83e8-4895-98eb-35309f58119f >>> break=premount quiet rootwait rootwait rootfstype=ext4 >>> console=ttyS0,115200 console=tty0 >>> >>> Which did you add kernel boot command for bootargs, bootcmd, etc as >>> above? I could not find BOOT_IMAGE (I use meta-freescale) >>> >>> Thank you very much. >>> >>> - jupiter >>> >>> On 7/12/19, Moritz Porst wrote: Forgot to CC Jupiter and the most important thing: PACKAGE_INSTALL += "initramfs-module-debug" (To my understanding this enables the rescue shell) On 12.07.19 08:22, Moritz Porst wrote: > Hey, > > The only thing I can add to what I already said is my > "core-image-minimal-initramfs.bbappend": > PACKAGE_INSTALL += "\ > busybox \ printenv baudrate=115200 board_name=ULZ-EVK board_rev=14X14> base-files \ > base-passwd \ > bash \ > util-linux-lsblk \ > vim \ > " > Jupiter, are you able to produce your zImage-initramfs now ? If not > further do the following: > > bitbake -e > tempfile > [wait until done, then search] > grep tempfile > > where may be e.g.: zImage, zImage-initramfs, > INITRAMFS_IMAGE, INITRAMFS_IMAGE_BUNDLE > Especially check that all variables you set are not overw
Re: [yocto] Can't boot to initramfs
Hello Scott (Rifenbark), Could you, please, document somewhere (YOCTO-Mega-Manual for example) this topic (booting to YOCTO initramfs rescue shell), as we are discussing it? It would be very beneficial to YOCTO WWW audience, don't you agree? Thank you, Zoran ___ On Fri, Jul 12, 2019 at 10:17 AM Moritz Porst wrote: > > Hey > > On 12.07.19 10:05, JH wrote: > >> BOOT_IMAGE=/bzImage root=PARTUUID=71d1d94a-83e8-4895-98eb-35309f58119f > > break=premount quiet rootwait rootwait rootfstype=ext4 > > console=ttyS0,115200 console=tty0 > > > > Which file did you add kernel boot command for bootargs, bootcmd, etc? > > > > I use meta-freescale, but I could not find BOOT_IMAGE is defined. > Ways I know to add boot arguments: > If you use .wic image via --append in the .wks file > Otherwise in your machine config via the variable "APPEND", e.g. APPEND > += "quiet shell" > the "BOOT_IMAGE" is not a yocto variable, it is the bootloader syntax. > Thus this depends on which bootloader you use, but yocto abstracts this. > However for all bootloaders I know before boot you can hit "e" to edit > the boot line manually. > > > > Thank you > > > > On 7/12/19, JH wrote: > >> Hi Moritz, > >> > >> I could not find zImage-initramfs: > >> > >> $ grep zImage tempfile > >> > >> ARCH_DEFAULT_KERNELIMAGETYPE="bzImage" > >> KERNEL_IMAGETYPE="bzImage" > >> KERNEL_IMAGETYPES="bzImage" > >> QB_DEFAULT_KERNEL="bzImage" > >> > >> $ grep zImage-initramfs tempfile > >> > >> $ grep INITRAMFS_IMAGE_BUNDLE tempfile > >> > >> # $INITRAMFS_IMAGE_BUNDLE > >> INITRAMFS_IMAGE_BUNDLE="1" > >> > >> $ grep INITRAMFS_FSTYPES tempfile > >> INITRAMFS_FSTYPES="cpio.gz" > >> > >> I added PACKAGE_INSTALL += "initramfs-module-debug" and I added > >> "core-image-minimal-initramfs.bbappend" coppied from yours: > >> > >> $ cat core-image-minimal-initramfs.bbappend > >> > >> PACKAGE_INSTALL += "\ > >> busybox \ > >> base-files \ > >> base-passwd \ > >> bash \ > >> util-linux-lsblk \ > >> vim \ > >> " > >> > >> But I still have troubles to add INITRAMFS_IMAGE = > >> "core-image-minimal-initramfs" or to run core-image-minimal-initramfs, > >> both had errors: > >> > >> $ MACHINE="solar" DISTRO="solar" bitbake core-image-minimal-initramfs > >> > >> ERROR: Nothing PROVIDES 'core-image-minimal-initramfs' > >> core-image-minimal-initramfs was skipped: incompatible with host > >> arm-oe-linux-gnueabi (not in COMPATIBLE_HOST) > in meta/recipes-core/images/core-image-minimal-initramfs.bb there is the > following line: > COMPATIBLE_HOST = "(i.86|x86_64).*-linux" > You could try to overwrite it in your .bbappend to the value "*-linux" > but I guess there is a reason for this line. > >> > >> $ MACHINE="solar" DISTRO="solar" bitbake solar-image > >> > >> ERROR: Nothing PROVIDES 'core-image-minimal-initramfs' > >> core-image-minimal-initramfs was skipped: incompatible with host > >> arm-oe-linux-gnueabi (not in COMPATIBLE_HOST) > >> ERROR: Required build target 'solar-image' has no buildable providers. > >> Missing or unbuildable dependency chain was: ['solar-image', > >> 'virtual/kernel', 'core-image-minimal-initramfs'] > >> > >> Sorry, still learning Yocto, what I could be missing? > >> > >>> BOOT_IMAGE=/bzImage root=PARTUUID=71d1d94a-83e8-4895-98eb-35309f58119f > >> break=premount quiet rootwait rootwait rootfstype=ext4 > >> console=ttyS0,115200 console=tty0 > >> > >> Which did you add kernel boot command for bootargs, bootcmd, etc as > >> above? I could not find BOOT_IMAGE (I use meta-freescale) > >> > >> Thank you very much. > >> > >> - jupiter > >> > >> On 7/12/19, Moritz Porst wrote: > >>> Forgot to CC Jupiter and the most important thing: > >>> > >>> PACKAGE_INSTALL += "initramfs-module-debug" (To my understanding this > >>> enables the rescue shell) > >>> > >>> On 12.07.19 08:22, Moritz Porst wrote: > Hey, > > The only thing I can add to what I already said is my > "core-image-minimal-initramfs.bbappend": > PACKAGE_INSTALL += "\ > busybox \ > base-files \ > base-passwd \ > bash \ > util-linux-lsblk \ > vim \ > " > Jupiter, are you able to produce your zImage-initramfs now ? If not > further do the following: > > bitbake -e > tempfile > [wait until done, then search] > grep tempfile > > where may be e.g.: zImage, zImage-initramfs, > INITRAMFS_IMAGE, INITRAMFS_IMAGE_BUNDLE > Especially check that all variables you set are not overwritten > somewhere else > > Best regards > Moritz > > On 12.07.19 06:36, Zoran Stojsavljevic wrote: > > Moritz, > > > > Thank you very much f
Re: [yocto] Can't boot to initramfs
Hey On 12.07.19 10:05, JH wrote: BOOT_IMAGE=/bzImage root=PARTUUID=71d1d94a-83e8-4895-98eb-35309f58119f break=premount quiet rootwait rootwait rootfstype=ext4 console=ttyS0,115200 console=tty0 Which file did you add kernel boot command for bootargs, bootcmd, etc? I use meta-freescale, but I could not find BOOT_IMAGE is defined. Ways I know to add boot arguments: If you use .wic image via --append in the .wks file Otherwise in your machine config via the variable "APPEND", e.g. APPEND += "quiet shell" the "BOOT_IMAGE" is not a yocto variable, it is the bootloader syntax. Thus this depends on which bootloader you use, but yocto abstracts this. However for all bootloaders I know before boot you can hit "e" to edit the boot line manually. Thank you On 7/12/19, JH wrote: Hi Moritz, I could not find zImage-initramfs: $ grep zImage tempfile ARCH_DEFAULT_KERNELIMAGETYPE="bzImage" KERNEL_IMAGETYPE="bzImage" KERNEL_IMAGETYPES="bzImage" QB_DEFAULT_KERNEL="bzImage" $ grep zImage-initramfs tempfile $ grep INITRAMFS_IMAGE_BUNDLE tempfile # $INITRAMFS_IMAGE_BUNDLE INITRAMFS_IMAGE_BUNDLE="1" $ grep INITRAMFS_FSTYPES tempfile INITRAMFS_FSTYPES="cpio.gz" I added PACKAGE_INSTALL += "initramfs-module-debug" and I added "core-image-minimal-initramfs.bbappend" coppied from yours: $ cat core-image-minimal-initramfs.bbappend PACKAGE_INSTALL += "\ busybox \ base-files \ base-passwd \ bash \ util-linux-lsblk \ vim \ " But I still have troubles to add INITRAMFS_IMAGE = "core-image-minimal-initramfs" or to run core-image-minimal-initramfs, both had errors: $ MACHINE="solar" DISTRO="solar" bitbake core-image-minimal-initramfs ERROR: Nothing PROVIDES 'core-image-minimal-initramfs' core-image-minimal-initramfs was skipped: incompatible with host arm-oe-linux-gnueabi (not in COMPATIBLE_HOST) in meta/recipes-core/images/core-image-minimal-initramfs.bb there is the following line: COMPATIBLE_HOST = "(i.86|x86_64).*-linux" You could try to overwrite it in your .bbappend to the value "*-linux" but I guess there is a reason for this line. $ MACHINE="solar" DISTRO="solar" bitbake solar-image ERROR: Nothing PROVIDES 'core-image-minimal-initramfs' core-image-minimal-initramfs was skipped: incompatible with host arm-oe-linux-gnueabi (not in COMPATIBLE_HOST) ERROR: Required build target 'solar-image' has no buildable providers. Missing or unbuildable dependency chain was: ['solar-image', 'virtual/kernel', 'core-image-minimal-initramfs'] Sorry, still learning Yocto, what I could be missing? BOOT_IMAGE=/bzImage root=PARTUUID=71d1d94a-83e8-4895-98eb-35309f58119f break=premount quiet rootwait rootwait rootfstype=ext4 console=ttyS0,115200 console=tty0 Which did you add kernel boot command for bootargs, bootcmd, etc as above? I could not find BOOT_IMAGE (I use meta-freescale) Thank you very much. - jupiter On 7/12/19, Moritz Porst wrote: Forgot to CC Jupiter and the most important thing: PACKAGE_INSTALL += "initramfs-module-debug" (To my understanding this enables the rescue shell) On 12.07.19 08:22, Moritz Porst wrote: Hey, The only thing I can add to what I already said is my "core-image-minimal-initramfs.bbappend": PACKAGE_INSTALL += "\ busybox \ base-files \ base-passwd \ bash \ util-linux-lsblk \ vim \ " Jupiter, are you able to produce your zImage-initramfs now ? If not further do the following: bitbake -e > tempfile [wait until done, then search] grep tempfile where may be e.g.: zImage, zImage-initramfs, INITRAMFS_IMAGE, INITRAMFS_IMAGE_BUNDLE Especially check that all variables you set are not overwritten somewhere else Best regards Moritz On 12.07.19 06:36, Zoran Stojsavljevic wrote: Moritz, Thank you very much for this reply. It makes it very clear... What is the current State of Affairs for the topic. Let us see if there will be the improvement to this topic. I'll document this on one of my private GitHubs. And archive this email. Zoran ___ On Thu, Jul 11, 2019 at 12:39 PM Moritz Porst wrote: Hello Zoran, Jupiter and list The configuration you sent seems to be correct. As I already said initramfs seems overly complicated in yocto. the most important thing to note is that 2 kernel images are created, one is called bzImage (in my case) an the other bzImage-initramfs. However only the bzImage is written into the rootfs so you have to exchange them manually. (in /boot/bzImage). I did not find a way of including the bundled kernel right away. What you can do is to build core-image-minimal-initramfs and delete the symbolic link "bzImage", then recreate it and let it point to bzImage-initramfs. However this is rather a hack than a solution.
Re: [yocto] Can't boot to initramfs
> BOOT_IMAGE=/bzImage root=PARTUUID=71d1d94a-83e8-4895-98eb-35309f58119f break=premount quiet rootwait rootwait rootfstype=ext4 console=ttyS0,115200 console=tty0 Which file did you add kernel boot command for bootargs, bootcmd, etc? I use meta-freescale, but I could not find BOOT_IMAGE is defined. Thank you On 7/12/19, JH wrote: > Hi Moritz, > > I could not find zImage-initramfs: > > $ grep zImage tempfile > > ARCH_DEFAULT_KERNELIMAGETYPE="bzImage" > KERNEL_IMAGETYPE="bzImage" > KERNEL_IMAGETYPES="bzImage" > QB_DEFAULT_KERNEL="bzImage" > > $ grep zImage-initramfs tempfile > > $ grep INITRAMFS_IMAGE_BUNDLE tempfile > > # $INITRAMFS_IMAGE_BUNDLE > INITRAMFS_IMAGE_BUNDLE="1" > > $ grep INITRAMFS_FSTYPES tempfile > INITRAMFS_FSTYPES="cpio.gz" > > I added PACKAGE_INSTALL += "initramfs-module-debug" and I added > "core-image-minimal-initramfs.bbappend" coppied from yours: > > $ cat core-image-minimal-initramfs.bbappend > > PACKAGE_INSTALL += "\ > busybox \ > base-files \ > base-passwd \ > bash \ > util-linux-lsblk \ > vim \ > " > > But I still have troubles to add INITRAMFS_IMAGE = > "core-image-minimal-initramfs" or to run core-image-minimal-initramfs, > both had errors: > > $ MACHINE="solar" DISTRO="solar" bitbake core-image-minimal-initramfs > > ERROR: Nothing PROVIDES 'core-image-minimal-initramfs' > core-image-minimal-initramfs was skipped: incompatible with host > arm-oe-linux-gnueabi (not in COMPATIBLE_HOST) > > $ MACHINE="solar" DISTRO="solar" bitbake solar-image > > ERROR: Nothing PROVIDES 'core-image-minimal-initramfs' > core-image-minimal-initramfs was skipped: incompatible with host > arm-oe-linux-gnueabi (not in COMPATIBLE_HOST) > ERROR: Required build target 'solar-image' has no buildable providers. > Missing or unbuildable dependency chain was: ['solar-image', > 'virtual/kernel', 'core-image-minimal-initramfs'] > > Sorry, still learning Yocto, what I could be missing? > >> BOOT_IMAGE=/bzImage root=PARTUUID=71d1d94a-83e8-4895-98eb-35309f58119f > break=premount quiet rootwait rootwait rootfstype=ext4 > console=ttyS0,115200 console=tty0 > > Which did you add kernel boot command for bootargs, bootcmd, etc as > above? I could not find BOOT_IMAGE (I use meta-freescale) > > Thank you very much. > > - jupiter > > On 7/12/19, Moritz Porst wrote: >> Forgot to CC Jupiter and the most important thing: >> >> PACKAGE_INSTALL += "initramfs-module-debug" (To my understanding this >> enables the rescue shell) >> >> On 12.07.19 08:22, Moritz Porst wrote: >>> Hey, >>> >>> The only thing I can add to what I already said is my >>> "core-image-minimal-initramfs.bbappend": >>> PACKAGE_INSTALL += "\ >>> busybox \ >>> base-files \ >>> base-passwd \ >>> bash \ >>> util-linux-lsblk \ >>> vim \ >>> " >>> Jupiter, are you able to produce your zImage-initramfs now ? If not >>> further do the following: >>> >>> bitbake -e > tempfile >>> [wait until done, then search] >>> grep tempfile >>> >>> where may be e.g.: zImage, zImage-initramfs, >>> INITRAMFS_IMAGE, INITRAMFS_IMAGE_BUNDLE >>> Especially check that all variables you set are not overwritten >>> somewhere else >>> >>> Best regards >>> Moritz >>> >>> On 12.07.19 06:36, Zoran Stojsavljevic wrote: Moritz, Thank you very much for this reply. It makes it very clear... What is the current State of Affairs for the topic. Let us see if there will be the improvement to this topic. I'll document this on one of my private GitHubs. And archive this email. Zoran ___ On Thu, Jul 11, 2019 at 12:39 PM Moritz Porst wrote: > Hello Zoran, Jupiter and list > > The configuration you sent seems to be correct. > > As I already said initramfs seems overly complicated in yocto. the > most > important thing to note is that 2 kernel images are created, one is > called bzImage (in my case) an the other bzImage-initramfs. However > only > the bzImage is written into the rootfs so you have to exchange them > manually. (in /boot/bzImage). I did not find a way of including the > bundled kernel right away. > > What you can do is to build core-image-minimal-initramfs and delete > the > symbolic link "bzImage", then recreate it and let it point to > bzImage-initramfs. However this is rather a hack than a solution. > > An other mistake I made was to use IMAGE_INSTALL_append which is > ignored. Use PACKAGE_INSTALL_append. > > Also I found that "break" does not work as a kernel parameter. Use > "shell" oder "debug-shell" instead. If you want to try to boot into > initramfs you can remove all parameters to t
Re: [yocto] Can't boot to initramfs
Hi Moritz, I could not find zImage-initramfs: $ grep zImage tempfile ARCH_DEFAULT_KERNELIMAGETYPE="bzImage" KERNEL_IMAGETYPE="bzImage" KERNEL_IMAGETYPES="bzImage" QB_DEFAULT_KERNEL="bzImage" $ grep zImage-initramfs tempfile $ grep INITRAMFS_IMAGE_BUNDLE tempfile # $INITRAMFS_IMAGE_BUNDLE INITRAMFS_IMAGE_BUNDLE="1" $ grep INITRAMFS_FSTYPES tempfile INITRAMFS_FSTYPES="cpio.gz" I added PACKAGE_INSTALL += "initramfs-module-debug" and I added "core-image-minimal-initramfs.bbappend" coppied from yours: $ cat core-image-minimal-initramfs.bbappend PACKAGE_INSTALL += "\ busybox \ base-files \ base-passwd \ bash \ util-linux-lsblk \ vim \ " But I still have troubles to add INITRAMFS_IMAGE = "core-image-minimal-initramfs" or to run core-image-minimal-initramfs, both had errors: $ MACHINE="solar" DISTRO="solar" bitbake core-image-minimal-initramfs ERROR: Nothing PROVIDES 'core-image-minimal-initramfs' core-image-minimal-initramfs was skipped: incompatible with host arm-oe-linux-gnueabi (not in COMPATIBLE_HOST) $ MACHINE="solar" DISTRO="solar" bitbake solar-image ERROR: Nothing PROVIDES 'core-image-minimal-initramfs' core-image-minimal-initramfs was skipped: incompatible with host arm-oe-linux-gnueabi (not in COMPATIBLE_HOST) ERROR: Required build target 'solar-image' has no buildable providers. Missing or unbuildable dependency chain was: ['solar-image', 'virtual/kernel', 'core-image-minimal-initramfs'] Sorry, still learning Yocto, what I could be missing? > BOOT_IMAGE=/bzImage root=PARTUUID=71d1d94a-83e8-4895-98eb-35309f58119f break=premount quiet rootwait rootwait rootfstype=ext4 console=ttyS0,115200 console=tty0 Which did you add kernel boot command for bootargs, bootcmd, etc as above? I could not find BOOT_IMAGE (I use meta-freescale) Thank you very much. - jupiter On 7/12/19, Moritz Porst wrote: > Forgot to CC Jupiter and the most important thing: > > PACKAGE_INSTALL += "initramfs-module-debug" (To my understanding this > enables the rescue shell) > > On 12.07.19 08:22, Moritz Porst wrote: >> Hey, >> >> The only thing I can add to what I already said is my >> "core-image-minimal-initramfs.bbappend": >> PACKAGE_INSTALL += "\ >> busybox \ >> base-files \ >> base-passwd \ >> bash \ >> util-linux-lsblk \ >> vim \ >> " >> Jupiter, are you able to produce your zImage-initramfs now ? If not >> further do the following: >> >> bitbake -e > tempfile >> [wait until done, then search] >> grep tempfile >> >> where may be e.g.: zImage, zImage-initramfs, >> INITRAMFS_IMAGE, INITRAMFS_IMAGE_BUNDLE >> Especially check that all variables you set are not overwritten >> somewhere else >> >> Best regards >> Moritz >> >> On 12.07.19 06:36, Zoran Stojsavljevic wrote: >>> Moritz, >>> >>> Thank you very much for this reply. It makes it very clear... What is >>> the current State of Affairs for the topic. >>> >>> Let us see if there will be the improvement to this topic. I'll >>> document this on one of my private GitHubs. And archive this email. >>> >>> Zoran >>> ___ >>> >>> On Thu, Jul 11, 2019 at 12:39 PM Moritz Porst >>> wrote: Hello Zoran, Jupiter and list The configuration you sent seems to be correct. As I already said initramfs seems overly complicated in yocto. the most important thing to note is that 2 kernel images are created, one is called bzImage (in my case) an the other bzImage-initramfs. However only the bzImage is written into the rootfs so you have to exchange them manually. (in /boot/bzImage). I did not find a way of including the bundled kernel right away. What you can do is to build core-image-minimal-initramfs and delete the symbolic link "bzImage", then recreate it and let it point to bzImage-initramfs. However this is rather a hack than a solution. An other mistake I made was to use IMAGE_INSTALL_append which is ignored. Use PACKAGE_INSTALL_append. Also I found that "break" does not work as a kernel parameter. Use "shell" oder "debug-shell" instead. If you want to try to boot into initramfs you can remove all parameters to the booting line so you either end up in a kernel panic (initramfs doesn't work) or in the rescue shell (initramfs works). In the end I actually managed to get a working shell, but I often ended up in initramfs telling me "dropping to shell..." but then freezing. I don't have access to my files right now but I can tell you more on my setup tomorrow. In case the solution is not included above. Best regards Moritz On 11/07/2019 09:24, Zoran Stojsavljevic wrote: >>>