Hi all,
I'm quite new using Yocto. I'm working with I.mx6sx on a SABRE SDB board.
So far I define my new layer and a new machine type.
I started my image form fsl-image-qt5 and I' trying to reduce the output of this image to fit my requirements.
I already trimmed that image to 256 MB and now I'm trying to disable some package that are not important for me, eg: alsa, ca-certificates, gstreamer...
Taking, for instance, the ca-certificates, what I have to do to disable the install of ca-certificates into my filesystem?
I tryed:
- create a bbappend file of glib-networking and define: PACKAGECONFIG = " gnutls", PACKAGECONFIG_append = " --without-ca-certificates"
- add PACKAGECONFIG_append = " --without-ca-certificates" to my new image .bb file.
No one of those solution works: ca-certificates still installed in /usr/share/ca-certificates
Same thing for Qt5 examples: how can remove all examples fro my rootFS?
I would like to share the one more option to remove the packages(ex:- openssh package/receipe) from rootFS.
PACKAGECONFIG_remove = " openssh" & needs to add this line into BUILDFOLDER/conf/local.conf
I'm glad to hear you are willing to have your own image. In fact, Yocto Project is designed exactly for providing users a tailored distribution.
It really worth spending some time tailoring your own image.
I would start copying fsl-image-qt5 to your own meta layer changing its name. This way you use git to control the changes you've made so far.
If you take meta-fsl-bsp-release.git - Freescale i.MX Yocto BSP Release Layer (for example) you can see that fsl-image-qt5 is not incredible huge because of fsl-image-qt5, but because of line 5, it includes fsl-image-gui. And this absolutely include several packages you don't need.
For the PACKAGECONFIG spefic case, take a look here: Yocto Project Mega-Manual I think you are not using PACKAGECONFIG right, take a loon on the usage shown in the link.
For GSTREAMER specific case, do you want to get rid of gstreamer or only choose the exact plugins you need?
For alsa case, do you want to get rid of alsa? Do you understand the DISTRO concept? By default "alsa" is a DISTRO_FEATURES Yocto Project Mega-Manual and in MACHINE_FEATURES see imx-base.inc file meta-fsl-arm - Layer containing Freescale ARM hardware support metadata
So, if you really want to get rid of alsa, you must define MACHINE_FEATURES on your machine .conf file in order to not include "alsa", or override it to remove only alsa (by MACHINE_FEATURES_remove = "alsa" on your machine.conf
second step is to create your distro to define it's not using alsa, if you base off poky.conf you can use DISTRO_FEATURES_remove = "alsa". And use a clean build dir.
last step is avoid include any alsa package explicitly, otherwise you will have a build error.
Please, let me know about GSTREAMER
Thanks daiane_angolini,
It helps me a lot.
I just tried to Remove the ALSA Packages from the Yocto Build.
I followed same procedure as you stated
1. MACHINE_FEATURES_remove = "alsa" on your machine.conf
2. if you base off poky.conf you can use DISTRO_FEATURES_remove = "alsa".
But it removed some of the alsa packages in rootfs looks good, these alsa-lib, alsa-conf still exists in the tmp/deploy/licenses/machine/licence.manifest file
Can any one suggest me the way to Remove that from Yocto Build.
1) So far I copied fsl-image-qt5 and I modified it as below
DESCRIPTION = "my image"
LICENSE = "MIT"
require claypaky-image-npe-gui.bb
inherit distro_features_check
export IMAGE_BASENAME = "myimage"
PACKAGECONFIG_append = "--disable-bluez"
DISTRO_FEATURES_remove = " 3g bluetooth irda x11 wayland bluez5"
QT5_IMAGE_INSTALL_append = "qtserialport"
QT5_IMAGE_INSTALL = ""
QT5_IMAGE_INSTALL_common = " \
packagegroup-qt5-core \
packagegroup-qt5-qtdeclarative \
packagegroup-qt5-qtdeclarative-qml \
"
QT5_IMAGE_INSTALL_mx6 = " \
${QT5_IMAGE_INSTALL_common} \
packagegroup-qt5-webkit \
"
IMAGE_INSTALL += " \
${QT5_IMAGE_INSTALL} \
"
2) I copied fsl-image-gui and I modified it as below.
DESCRIPTION = "My Image"
LICENSE = "MIT"
inherit core-image
# Add extra image features
EXTRA_IMAGE_FEATURES += " \
ssh-server-dropbear \
"
PACKAGE_ARCH = "${MACHINE_ARCH}"
# set mm image install specific to SOC
MM_IMAGE_INSTALL = ""
IMAGE_INSTALL += ""
export IMAGE_BASENAME = "myimage-gui"
3) I added MACHINE_FEATURES_remove = " alsa" to my machine .inc file
# Provides the i.MX6 my machine common settings
require conf/machine/include/imx-base.inc
require conf/machine/include/tune-cortexa9.inc
SERIAL_CONSOLE = "115200 ttymxc0"
MACHINE_FIRMWARE_append_mx6 = " linux-firmware-ath6k"
MACHINE_FEATURES_remove = " alsa"
4) Generating my .sdcard file the alsa dir under /usr/shar still installed..
1) the lines
PACKAGECONFIG_append = "--disable-bluez"
DISTRO_FEATURES_remove = " 3g bluetooth irda x11 wayland bluez5"
must NOT be on your image. What package are you disabling bluez? How can your image know that?
DISTRO_FEATURES is to be handled by your distro, not your image
2) to make it easy to you, try to keep one image file only. There are other ways to handle the reuse of code in images, like *.inc files or packagegroups
3/4) I think the _remove works for MACHINE_FEATURE, but can may be wrong. In order to make sure:
double check if you started a clean build using a clean build/tmp folder. It is really important
instead of using _remove copy over the complete MACHINE_FEATURES of any other image and manualy remove alsa
Thank you Daiane for your patience too.
I'm following your suggestion: I'll keep you updated.
Anyway, what I'm wondering is to understand the correct process to find the correct way to add or remove something from the output rootFS.
If I found out that ca-certificates are installed, are there a step by step procedure to follow to understand who is adding that feature and how to remove it?
In my point of view, the main problem of your process is that you are starting top-down, and I always start bottom-up.
After that, knowing the inner packages of one BSP helps a lot (this is the gstreamer case, for Freescale i.mx boards. The BSP is configured to add it ~by default~, or the alsa from the poky distro)
Take a look on BitBake manual BitBake User Manual to see all the possible commands on looking for versions and dependency.
-g shows the dependency tree between packages.
Yes, I agree with you.
It was the freescale's FAE that support us that suggested me the top-down approach, but now I'm restarting based on minimal image.
Anyway What I saw is that adding packagegroup-qt5-webkit enlarge my image up to 200 MB. If I understand well, starting form the webkit .bb file I can find the whole dependencies installed using the -g option.
Thank you Daiane.
I'm trying to do understand better how PACKAGECONFIG works and I'm modifying my recipe following your suggestions.
About gstreamer: I'm not intrested in using that plugin also because of my imx6sx version is without GPU. Then also gles2 and so on are not important for me.
again in file imx-base.inc - meta-fsl-arm - Layer containing Freescale ARM hardware support metadata
see line 83, this line says the default is to have included one package (which brings all gstreamer with it). If you want to get rid of gstreamer, make sure you don't include explicitly any plugin (fsl-image-gui does include, take a look) and use MACHINE_GSTREAMER = "" in your machine.conf file
if you need more help on PACKAGECONFIG let me know. One example on its usage from meta-fsl-arm is here meta-fsl-arm - Layer containing Freescale ARM hardware support metadata
Hi
LPS
you can use the core-image-minimal.
And you can use IMAGE_FEATURES += "package name" to add package is needed.
Thanks
Saurabh
Hi Saurabh,
I know it, but what I'm trying to do is to reduce the size of fsl-image-qt5, because of I need Qt5 support.
I haven't tried this but You can try with adding following to core-image-minimal contig.
IMAGE_INSTALL_append = " qtbase qtbase-tools qtbase-plugins"