Does Hikey 960 support hibernation?

Hello,

I am looking for a development board which can support hibernation because my application need to reduce the boot time as short as possible.

Does hikey960 can support hibernation with android?

If it is possible, dose it need special configuration or additional patches?

Or just rebuild kernel with CONFIG_HIBERNATION=y and add the swap partition path to bootargs in the bootloader can make it work?

Thanks and Regards.

Are you plan to run Android or a ‘regular’ Linux?

Android is my first choice because I already have some developed app on it.

I don’t think you would actually reduce startup time using hibernate on this board.
Hibernate essentially works like this;
Board starts up and loads linux kernel same as cold boot, kernel finds resume data on storage, and loads it.

So here is the thing; it takes about 20 seconds to roll all the way from power on through to starting up userspace. Then it takes about an additional 5 seconds to go from there to a usable desktop. So if you were to use hibernate, you would only be working with that final 5 seconds, I suspect that it would actually take longer than 5 seconds to resume from hibernate.

Is it possible for you to use suspend instead of hibernate? Suspend keeps everything in a state that is a lot closer to running than hibernate does. In fact, your cell phone goes in and out of suspend mode all the time. Its basically suspended for the most part whenever the screen is off.

I’m not sure, though, if all the kinks have been worked out of suspend mode. Check the bug tracker. I also recall there being a patch fed up to AOSP that had something to do with some GPIOs preventing it from suspending correctly.

According to my experience from wandboard(which is using i.mx6 cpu by NXP), hibernation can reduce the boot time to 8 sec and the boot time of normal boot is about 20~30 sec.

But since i.mx6’s gpu driver has a bug that will hang gpu itself after system restore, so I decide to give hikey960 a try.

And I think the restore procedure is start before system enter user space, but this is just my guess based on the serial output, please correct me if I am wrong.

Yes, suspend is more faster and stable than hibernation, but since I expect to use hikey960 on an automobile environment where is not guarantee the power supply( the only supply source after engine off is car battery ), so I think hibernation is more suitable in my application.

But anyway, I will use suspend as a alternative if hibernation is confirmed not working.

This is not wandboard/imx6.
The 25 second boot time on the hikey960 is predominantly just waiting for the bootloader to get out of the way. Once the bootloader is out of the way, you have 5 seconds of kernel, and another 5 seconds of userspace. You’re not going to eliminate the 5 seconds of kernel. You might shave off a few milliseconds, but that’s about it. Then you have a bunch of data to read out of the flash back into RAM (potentially 4 GB, not the 0.5-2 as on wandboard), and some reinitializations. You’re not going to drag it down to 8 seconds. That’s impossible.

I’m also VERY confused by your claim about “not guarantee the power supply”. On what planet is the car battery not a reliable guaranteed power supply?

Nobody is claiming that hibernation is “not working” at this point. Use hibernation if you like, but the point is that it won’t do you any good.

Hmm… I understand. Since hikey960’s bootloader consume most part of boot time which we can not reduce, the only way that can make system ready faster is suspend.

By the way, the reason I say the power supply is unstable is because all electronics device on the car which I am dealing with has no power supply after engine off(I know, it is really strange, but it is true).

Maybe I can try hibernation just for fun, hope after system restore, everything is OK.

If there is no power after engine off, then you are attaching to the wrong wire. You need to find the one that is always powered – worst case, run a wire directly to the battery or one of the fuse panels. There is usually a panel right beside the battery under the hood, as well as another in the car near the driver’s door. Check the wiring diagrams for that vehicle to find the nearest power source.

What are you trying to build?