Visualizing the Rootfs

An important aspect in working on an embedded OS is keeping the size of our updates down which usually entails keeping the size of the OS image down. If left unchecked, the OS image will increase steadily. In order to help developers track down where space is going we created a tool cros_tree_map that helps developers figure out where our precious space is going.

In order to use, you need to have:

an OS image (the .bin file).

at least a mini-layout checkout of the code.

To use:

mount the image onto a directory -- you can do this easily with mount_gpt_image.sh (in ~/src/scripts). You should use the --safe option to ensure you do not make accidental changes to the Root FS. By default it will mount the rootfs onto /tmp/m. You can use the --from=<path to .bin file>

At this point you will have a json file with all the directory information. To visualize this info, you can use webtree map here: https://github.com/martine/webtreemap. You can then view the html file from your trusty web browser.

Here's an example snapshot of a Chrome OS image (note: yours will be interactive so you can dig in to different areas).