Here is the recipe I use, if you care to try...
2 cups soap, finely grated
1 cup borax (sodium borate)
1 cup washing soda (sodium carbonate)
or baking soda (sodium bicarbonate)
Preparation and Use
Mix all ingredients together until well combined.
Use 1-‐2 Tbsp. per load.
High Efficiency (HE) washing machine safe.
The borax and washing soda can be found in the laundry soap aisle at any store. They also have bar soaps in that section you can purchase. But I have known of people using Ivory or any soap in there.