In my homegym I have an AbMat foam pad which I also use as a knee pad. And while I think the thick foam would work outdoors on tougher terrain, it would not meet your criteria to fit in a backpack.
My other suggestion would be a scrap piece of horse stall mat, which are nearly solid rubber sheets commonly employed for homegym floors. This is what I use when working in my yard, for tasks requiring a lot of kneeling. Such a piece – while heavy – could be cut to whatever size you need, using a sharp knife or a jigsaw.
For anyone looking at Keygen Church, also see their adjacent project, Master Boot Record for computer metal.