To build base from source code you have to use instructions described in "Linux From Scratch" (LFS) book.
After following instructions from LFS book you should have bootable GNU/Linux partition.
After performing ULFS customiztion you have to get environment which can used to install packages via ULFS Packases service.