Hello Zhang Ying,
Which rootfs did you bake?
You could start from the bigger image and remove packages, or you could start from the core-image-minimal and add packages as needed.
If you need a graphical interface I would suggest the first approach, starting with the larger image with all required libraries and dependencies and removing the unwanted packages.
You can list all packages of an image with the command:
bitbake -g <image> && cat pn-buildlist | grep -ve "native" | sort | uniq
And then work from there removing unnecessary packages by adding the following line on the conf/local.conf file inside the build directory like so:
IMAGE_INSTALL_remove += “ package package1 package2”
I hope this helps!
Regards,