8

I have been using buildroot till now and recently switched to Yocto. In buildroot, the root file system is present in the "target" folder. What is the location of the root file system in Yocto. I know it will be in "build/tmp" folder and it is not "sysroots" folder.

Correct me If I am wrong.

Thanks for your time

md.jamal
  • 4,067
  • 8
  • 45
  • 108

2 Answers2

21

You can find it with the following command:

bitbake -e <image> | grep ^IMAGE_ROOTFS=

schande
  • 576
  • 12
  • 27
Nayfe
  • 2,130
  • 13
  • 18
2

Since Honister (Yocto 3.4/BitBake 1.52), you can use bitbake-getvar instead of bitbake -e | grep .... Replace $target with your image name (e.g. core-image-minimal):

# Get variable name, value and history:
bitbake-getvar -r $target IMAGE_ROOTFS

# Get just the value:
bitbake-getvar -r $target --value IMAGE_ROOTFS

The last example is especially nice for scripting:

cd "$(bitbake-getvar -r $target --value IMAGE_ROOTFS)"
Max Truxa
  • 3,308
  • 25
  • 38