Buy PU (Polyurethane)foam in a hardware store. It is used to seal leaks and cracks. Place some plastic film on the bottom and sides of your case, to prevent the foam from adhereing to the box. Put a first layer of foam on the bottom, following the instructions. Let it dry overnight. On the next day, take the equipment you want to pack in the box and build simple cardboard shapes around them and the wrap them in plastic. With a sharp knife, level the foam to ca. 3 cm. Arrange the pieces on this first layer of hardened foam and then fill the box to the rim with foam.
On the next day, cut the foam flush with the rim and cut the outline of your equipment's shapes, in order to be able to remove your gear. Finish the edges of your compartments with an Xacto knife and try your foam molds for a snug fit of you gear.