I just opened up cydia and it promted me that my essential packages need to be updated. I went and did a complete upgrade. After it was just about done, my iphone rebooted itself. I then opened up cydia and then seconds later, it crashed. i tried to open it up in safe mode, crash. how do i fix this?

iphone 2g 3.1.2