It seems most people are using wood to attach rough frames (“bucks”) for windows and doors to earthbags. We have termites in our area and so we’re using galvanized sheet metal for this purpose. I’ve used both kinds and discovered sheet metal anchors are much faster to make.
The first step is to cut sheet metal into 7”x12” rectangles with tin snips. (We paid a little extra to have them pre-cut.) Then score a line 2” from one end with a large nail and straight edge. (We used a 16d nail and a piece of sheet metal.) Score the metal about three times and then bend it along the line into a right angle with your hand. Pound in some nails from the bottom side, place the anchor in position and then add nails into the earthbags (galvanized roofing nails work best), and deck screws into the wood. Place anchors on both sides of frames about every four courses of bags.