OLinuXino used as a standalone server ?

Started by g4r, March 18, 2014, 08:13:49 AM

Previous topic - Next topic

g4r

Hello.

I'm considering the purchase of an A20-OLinuXino-MICRO to be used as a small media server. However the area where I'll deploy is known to have failing AC power.
So I'd like to know if the A20-Micro will boot regardless of a clean or unclean shutdown, and if it'll power on every time the AC power is restored - with no need of human intervention to push the power or reset button.

Does anyone have knowledge on such point ?

Thanks!

dave-at-axon

I've set this up with Android so it should be possible with Linux too if the drivers are correct.

In the configuration fex file there is a power_start option. Setting this to 1 ensure that the system will boot when external DC power is applied, even if it has a battery.

I've tried it with power off from pressing the button to allowing the battery to run down and it powers up as long as the power_start=1. If this is set to 0 it powers up, sets the charger and goes back to sleep.

If you have a ready made image and the fex is set for 0, you might be able to change this in Linux but a number of us failed to do this in Android and have had to resort to building a custom Android installation.

g4r

Thank you for the reply.

I think this is what I was looking for; I just wonder when/how/what uses the values in script.bin (like power_start like you mention) to set up the hardware. Is it the linux kernel ? I just want to be sure and possibly have a look at the sources.

Also, I'm wondering if after an unclean shutdown, once the power is re-applied, UBoot will keep working as normal and boot up as usual.
This should be no problem but I'd like to be sure before forking the money. ;)

dave-at-axon

I'm not able to give much assistance on using Debian and how it will react. I use purely Android.

codifies

I'm using an a20 with Debian in kind of a "desktop" mode, I'd recommend implementing a script to check LiPo level and actually shutting down well before the battery goes low, if you have high current loads. I have the board configured to switch on when AC is applied.  Attaching a LiPo also preserves the real time clock.

You may find you have to "play" with the configuration to get it to work just how you want but in its role as a stand alone server it should fill that niche rather well...

g4r

Quote from: codifies on March 18, 2014, 04:27:41 PM
I'm using an a20 with Debian in kind of a "desktop" mode, I'd recommend implementing a script to check LiPo level and actually shutting down well before the battery goes low, if you have high current loads. I have the board configured to switch on when AC is applied.  Attaching a LiPo also preserves the real time clock.

Thanks for the reply! What's the setup necessary to attach a LiPo ? I have no soldering tools around here and difficult to get by, so I'd rather mail order something already made. Any pointers for that ?

Quote
You may find you have to "play" with the configuration to get it to work just how you want but in its role as a stand alone server it should fill that niche rather well...

How do you play with the configuration ? Do you mean script.bin and the infamous "power_start" entry ?

Thanks again.

codifies

olimex sells several lipo's with connectors that just plug in the 6600mah is okay but don't expect to be running LCD + SATA HD + multiple USB gadgets on it...

it was the power_start, there are bin2fex and fex2bin tools, just turn boot.bin into boot.bin.fex then edit it (its little more than an old school windows ini file) then turn it back into a bin, no drama - all the settings for boot.bin are noted on the sunxi wiki...

If you are using it as a media server I'd recommend compiling your own kernel with built in (not module) sata support and put rootfs on a SSD...


laskov

Quote from: g4r on March 18, 2014, 08:13:49 AM
So I'd like to know if the A20-Micro will boot regardless of a clean or unclean shutdown, and if it'll power on every time the AC power is restored - with no need of human intervention to push the power or reset button.

Does anyone have knowledge on such point ?

I used A20 (Debian) with an AC adaptor only and yes, it starts without human intervention and without any troubles after unclean shutdown. But timer stops at no power exists. If you have network and ntp server (ntpd starts on A20 with debian's ntp servers configured), or real time is not needed, this will be no problem.
Another issue are log files - the will grow and logrotate will never clean them if no power at configured time. So, syslog must be configured to not store them on SD card or logrotate to clean them on startup.

I consider to use A20 for the same purpose and now I think to put 12V accumulator (for power backup) and relay to switch TV on and off by a schedule (by cron).