I have problem with running custom image through out QEMU. I created image test-img for machine qemuarm. It is derived from core-image-minimal. The compilation and the bitbake process for creating was without errors, I got the image files. Problem is that I can not run the img with runqemu command.
I tried: runqemu qemuarm test-img
runqemu - ERROR - Can't handle two unknown args: qemuarm test-img
Try 'runqemu help' on how to use it
runqemu - INFO - Cleaning up
runqemu test-img
runqemu - INFO - Running MACHINE=test-img bitbake -e ...
runqemu - ERROR - /home/traskos/yocto_live/build/tmp/deploy/images/test-img not a directory valid DEPLOY_DIR_IMAGE
ls: cannot access '/home/traskos/yocto_live/build/tmp/deploy/images/test-img/*.qemuboot.conf': No such file or directory
runqemu - ERROR - Command 'ls -t /home/traskos/yocto_live/build/tmp/deploy/images/test-img/*.qemuboot.conf' returned non-zero exit status 2
runqemu - INFO - Cleaning up
What I do not understand, is why this commands are not working. When I run command: runqemu qemuarm core-image-minimal or: runqemu core-image-minimal it will run succesfully.
This is the test-img.bb file:
DESCRIPTION = "Recipe created by bitbake-layers"
LICENSE = "Traskos"
require recipes-core/images/core-image-minimal.bb
IMAGE_INSTALL = "custom-recipe"
IMAGE_FEATURES = "dev-pkgs"
inside /home/traskos/yocto_live/build/tmp/deploy/images/qemuarm
total 175380
-rw-r--r-- 2 traskos traskos 5843624 čec 27 12:15 zImage--5.4.205 gitAUTOINC aaaf9f090d_943e7e1f32-r0-qemuarm-20220727082925.bin
lrwxrwxrwx 2 traskos traskos 78 čec 27 12:15 zImage-qemuarm.bin -> zImage--5.4.205 gitAUTOINC aaaf9f090d_943e7e1f32-r0-qemuarm-20220727082925.bin
lrwxrwxrwx 2 traskos traskos 78 čec 27 12:15 zImage -> zImage--5.4.205 gitAUTOINC aaaf9f090d_943e7e1f32-r0-qemuarm-20220727082925.bin
lrwxrwxrwx 2 traskos traskos 79 čec 27 12:15 modules-qemuarm.tgz -> modules--5.4.205 gitAUTOINC aaaf9f090d_943e7e1f32-r0-qemuarm-20220727082925.tgz
-rw-rw-r-- 2 traskos traskos 1823111 čec 27 12:15 modules--5.4.205 gitAUTOINC aaaf9f090d_943e7e1f32-r0-qemuarm-20220727082925.tgz
-rw-r--r-- 2 traskos traskos 242894 srp 3 12:23 core-image-minimal-qemuarm-20220803102311.testdata.json
lrwxrwxrwx 2 traskos traskos 55 srp 3 12:23 core-image-minimal-qemuarm.testdata.json -> core-image-minimal-qemuarm-20220803102311.testdata.json
lrwxrwxrwx 2 traskos traskos 57 srp 3 12:23 core-image-minimal-qemuarm.manifest -> core-image-minimal-qemuarm-20220803102311.rootfs.manifest
-rw-r--r-- 2 traskos traskos 948 srp 3 12:23 core-image-minimal-qemuarm-20220803102311.rootfs.manifest
lrwxrwxrwx 2 traskos traskos 55 srp 3 12:23 core-image-minimal-qemuarm.qemuboot.conf -> core-image-minimal-qemuarm-20220803102311.qemuboot.conf
-rw-rw-r-- 2 traskos traskos 1615 srp 3 12:23 core-image-minimal-qemuarm-20220803102311.qemuboot.conf
-rw-rw-r-- 2 traskos traskos 2265377 srp 3 12:23 core-image-minimal-qemuarm-20220803102311.rootfs.tar.bz2
lrwxrwxrwx 2 traskos traskos 56 srp 3 12:23 core-image-minimal-qemuarm.tar.bz2 -> core-image-minimal-qemuarm-20220803102311.rootfs.tar.bz2
lrwxrwxrwx 2 traskos traskos 53 srp 3 12:23 core-image-minimal-qemuarm.ext4 -> core-image-minimal-qemuarm-20220803102311.rootfs.ext4
-rw-r--r-- 2 traskos traskos 8388608 srp 3 12:26 core-image-minimal-qemuarm-20220803102311.rootfs.ext4
lrwxrwxrwx 2 traskos traskos 45 srp 3 14:05 test-img-qemuarm.testdata.json -> test-img-qemuarm-20220803120507.testdata.json
-rw-r--r-- 2 traskos traskos 238625 srp 3 14:05 test-img-qemuarm-20220803120507.testdata.json
lrwxrwxrwx 2 traskos traskos 47 srp 3 14:05 test-img-qemuarm.manifest -> test-img-qemuarm-20220803120507.rootfs.manifest
-rw-r--r-- 2 traskos traskos 19988 srp 3 14:05 test-img-qemuarm-20220803120507.rootfs.manifest
lrwxrwxrwx 2 traskos traskos 45 srp 3 14:05 test-img-qemuarm.qemuboot.conf -> test-img-qemuarm-20220803120507.qemuboot.conf
-rw-rw-r-- 2 traskos traskos 1575 srp 3 14:05 test-img-qemuarm-20220803120507.qemuboot.conf
-rw-rw-r-- 2 traskos traskos 31789813 srp 3 14:05 test-img-qemuarm-20220803120507.rootfs.tar.bz2
-rw-r--r-- 2 traskos traskos 179536896 srp 3 14:06 test-img-qemuarm-20220803120507.rootfs.ext4
lrwxrwxrwx 2 traskos traskos 43 srp 3 14:06 test-img-qemuarm.ext4 -> test-img-qemuarm-20220803120507.rootfs.ext4
lrwxrwxrwx 2 traskos traskos 46 srp 3 14:06 test-img-qemuarm.tar.bz2 -> test-img-qemuarm-20220803120507.rootfs.tar.bz2
CodePudding user response:
According to your error it seems that your recipe is not correct. When you bake an image it should appear at build/tmp/deploy/images/
Here you have
runqemu - ERROR - /home/traskos/yocto_live/build/tmp/deploy/images/test-img not a directory valid DEPLOY_DIR_IMAGE
It would be easier to help if you provide your test-img.bb Also, when you say "It is derived from core-image-minimal" did you mean you add in your test-img the following ?
inherit core-image
If not, you should try
CodePudding user response:
I found out, that when I deleted the tmp folder and created new clean build for the test-img, I could launch the image. I could launch runqemu qemuarm. This was caused because test-img was only one which could be launched.
The problem was caused by previous build of core-image-minimal inside deploy/images/qemuarm folder.