问题
I built a core-image-sato image with the following configuration:
MACHINE = "intel-core2-32"
The generated image size is nearly 1.2 GB.
After i add "x11vnc" package, the size is reduced to 380 MB. This image doesn't boot successfully on the hardware.
Why is the image size reduced instead of increasing
How can we debug what is going wrong?
回答1:
The core-image-sato image you use inherits core-image.bbclass, which sets a default value of IMAGE_INSTALL using the ?= operator.
This means that if you try to extend IMAGE_INSTALL by using the += operator from somewhere that is evaluated before the default value is set using the ?= operator, the default values will never be added. So instead of adding x11vnc which was the intention, it ended up as the only content of IMAGE_INSTALL which renders the image unbootable and incomplete.
Use IMAGE_INSTALL_append = " x11vnc " and it should work just fine.
You can read the details of the different operators in the bitbake manual.
来源:https://stackoverflow.com/questions/59785392/yocto-image-file-size-reduces-after-adding-a-particular-package