The automakers signed agreements to help build supply of minerals including lithium, cobalt and nickel in North America.