We know (Bereishit 4) that Hevel kept flocks (not for eating yet, but perhaps for wool and/or milk?), and on that fateful day he offered one to God which Rashi says God consumed in fire. Where did he get the idea to offer an animal in the first place? Or if Adam and Chava offered animals and he learned from them, where did they get the idea?
Nowhere in the text does God call for such offerings and it doesn't seem like an obvious idea. Did they reason somehow that this would be desired by God? Is there midrash in which God does call for korbanot?
(This related question asks how killing an animal was ok before people could eat meat.)