Preparation of negative electrode materials for rechargeable batteries