Often in embedded systems, storage is a bit limited. Hence, you rather not bundle in all the man
pages onboard. Later on, I still want to access the manual pages for the specific package versions present on the board. I'm referring to all the pages you can usually access when you type man <program>
, when in a target device shell.
How to generate a local copy of the man
pages of all packages installed on the device?
I'm especially interested, if it can output to a pdf and if Yocto has a official method for this.
Quick search in the reference manual for "man page" "man " and "manual page" shows: there's probably no official way.
If you generate them for your target already, the man pages are located in:
build/tmp/work/MACHINE-DISTRO/IMAGE/VERSION/rootfs/usr/share/man
Make sure to replace MACHINE
etc. with your actual values, then cd
into there and run:
man ./*.gz | enscript -p - | ps2pdf - man-pages.pdf
man ./file
prints the man page. You could also run: man ./*.gz > man-pages.txt
enscript
and ps2pdf
to convert to pdf. -
to read from stdin and/or print to stdout (check their man
pages).To automate this, add a recipe that depends on rootfs creation (do_image
AFAIK) and performs those steps in the recipe.