''Condenado a Prism'' by Allen Dean Foster would be my bet. Evan Orgell is a troubleshooter sent to a work which has developed silicon-based life. It's also incredibly deadly with creatures that have developed primitive biological lasers and "grass" that's incredibly sharp pieces of glass with fractal edges that remain sharp all the way down. He starts out with a technological powersuit, but it's quickly disabled by the hostile environment. Partway through the book, he has a large chunk of his torso removed by an alien creature while he's trying to cross a stream and some of the creatures he's befriended rebuild a set of organs for him, including a battery based on what they found in his gear, which they demonstrate they've similarly adapted to their own body.
The scenes with the walling away happens when he meets the first friendly alien. It was a little thing, about dog-shaped, and had saved him from another creature which had tied him down to the front of a tree. He wound up with the creature in a cave where it set up the wall for protection. He speculates that it saved him to provide a source of warmth. Later in the night, it puts tendrils into his ears and somehow manages to forge an avenue of communication, whereupon they both realize that the other is intelligent.
By the end of the book, Evan has realized that his company would not care that the life on the planet was sentient, and he's had enough of himself reconstructed that he no longer feels human, so he bands with the silicon aliens to save them from the cleanup squad the humans send.