How to create new genesis block?

So not just change parameters, it seems insufficient.

How to create genesis block?

Here and there found some codes, I don’t know how to make it fit to newest litecoin source.