I have created a new recipe is helloworld example in manual. I'm using imx6sx processor, so created it in meta-freescale-3rdparty folder as recipes-helloword and checked this layer whether has been added to bblayer.conf. It can be compiled with bitbake helloworld there was no error and it exists in rpm folder. After that, the image compiled again with bitbake fsl-image-qt5-validation-imx and generated a new rootfs and sdcard file.
However, I can't find the application in rootfs. Where is the application in rootfs? (the recipe has been inserted in local.conf : IMAGE_INSTALL_append = " helloworld")
Also, the helloworld package has been installed correctly because it exists package.manifest file.
./recipes-helloworld/
└── helloworld
├── helloworld
│ ├── COPYING
│ └── helloworld.c
└── helloworld_0.0.bb
2 directories, 3 files
helloworld_0.0.bb
SUMMARY = "Hello World Cpp App Sources"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
PV = "1.5"
TARGET_CC_ARCH += "${LDFLAGS}"
SRC_URI = "file://helloworld.c"
S= "${WORKDIR}"
do_compile() {
${CC} helloworld.c -o helloworld
}
do_install() {
install -d ${D}${bindir}
install -m 0755 helloworld ${D}${bindir}
}
Hi Gokhan,
I don't have a clear answer to your question, but some small tricks that can help.
The recipe you wrote is correct as far as i can tell, looking on the Yocto Project Mega-Manual .
My guess is there might be something wrong with that "D" variable expansion.
How to check this?
The bitbake -e <recipe_name> | egrep "^D=" comes in very handy. In fact this is the way to check if any variable is set as expected (e.g.: bindir).
If there is something wrong, try replacing "D" with some hard-coded path. Watch out for the "/" in te paths you create. These can be very tricky.
As for where all apps go and where rootfs is being assembled, this is found by checking "IMAGE_ROOTFS" variable. Check if there is /usr/bin there and if yes, replace "D" with "IMAGE_ROOTFS". Sure this is hacking, but might get you close to a result.
Happy bitbaking :smileyhappy:,
Costin
Hello Gokhan Sahin,
Your Hello World application would be installed in {bindir}, which should be /usr/bin unless this variable was changed on your BSP.
I hope this helps!
Regards,
Unfortunately, there isn't it in usr/bin folder.
root@imx6sxsabresd:/usr/bin# helloworld
-sh: helloworld: command not found
root@imx6sxsabresd:/usr/bin# cd helloworld
-sh: cd: helloworld: No such file or directory
However, I have installed the same recipe to yocto poky images for trying on runqemu.
It was run, after logged (in "# path).
Also, there is it in usr/bin in ubuntu after mounted fsl-image-qt5-validation-imx-imx6sxsabresd.ext4 file.
After uploaded to sdcard with sudo dd if=fsl-image-qt5-validation-imx-imx6sxsabresd.sdcard of=/dev/sdb bs=1M && sync command,
ther is no in usr/bin. I'm confused.