Entropy function from the Einstein boundary term