[Angstrom-distro-users] installation on sl-c3100

Da_Blitz angstrom at pocketnix.org
Sat May 5 10:30:38 CEST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Thanks for that, sh scripts have always been lots of fun for me, i will
try and update the wiki if i get a chance. i  did offer to do some OZ to
angstrom wiki stuff if i get the chance and there are a couple of
articles i would like to write for the oesf community (basic networking
and stuff, it comes up all the time)

is there any other scripts you might need, probely best to tell me now
so i can write them and put it on the wiki. one of the ones i have
sitting here is a script that stops mpd on suspend so that when you
start the thing again the music dosn't start blaring out which could be
a bad thing in a meeting or if you pulled the headphones out and then
turn it on (use to happen all the time)

i have one for acpid for use on laptops as well (kohjinsha)

Ger Apeldoorn wrote:
> hi!
> 
> Thanks, this is very good stuff... This would be very good for the
> Wiki.... :)
> 
> Thanks again,
> Ger.
> 
> Da_Blitz schreef:
> actually they are called when the device suspends, hence why they are in
> the suspend folder or resume, scripts that are run on startup and
> shutdown are handled by init not apmd
> 
> i guess this means you will want a propper script well here it is, chuck
> it in /etc/apm/scripts.d and if you want to have it called on suspend or
> resume just link to it with ln -s
> 
> there is a file called apmd_proxy that has an explanation for scripters
> 
> #!/bin/sh
> # Author: Da_Blitz at pocketnix.org
> 
> STATE=$1
> BL_CONF=/etc/backlight.conf
> SYS_BL=/sys/class/backlight/corgi-bl/brightness
> 
> if [ "$STATE" == "resume" ]; then
>     # Do Backlight restore
>     if [ -t "$BL_CONF" ]; then
>         cat $BL_CONF" > $SYS_BL
>     else
>         # Deafults to on, good for recovery
>         echo 1 > $SYS_BL
>     fi
> elif [ "$STATE" == "suspend" ]; then
>     # Store Backlight
>     cat $SYS_BL > $BL_CONF
> fi
> 
> now thats all nice and fun but we can get more advanced than that, i
> assume you want to close the screen to save power when playing music,
> well thats not apms job as it dosent manage the hinge buttons, to do
> this you have to edit the zaurusd files which handel things such as that
> and headphone insertion and removal
> 
> this next script may be handy for those who want the device to never
> suspend on AC power but to suspend if the screen is closed and power is
> removed, this is a useful situation for some people not using it as an
> mp3 player and i wish zaurusd, apmd, cpu overclocikng and backlight
> handling could be put together as one app to make a power domain
> management daemon. cpufreqd supports changing policy on different apps
> running, that means when i am listening to music i can stop the device
> suspending automatically, might look into this latter as its worth my
> time to write
> 
> anyway here is some fun with sh, this one goes in /etc/zaurusd/scripts
> and has files symlinked in hinge-[portrait,landscape,close]
> 
> #!/bin/sh
> #Author: dablitz at pocketnix.org
> 
> STATE=$1
> 
> if [ $STATE = "3" ]; then
>   #echo "closed"
> 
>   echo 1  > /sys/class/backlight/corgi-bl/power
> 
>   exit 0
> fi
> 
> if [ $STATE = "0" ]; then
>   #echo "landscape"
> 
>   echo 0  > /sys/class/backlight/corgi-bl/power
> 
>   exit 0
> fi
> 
> if [ $STATE = "2" ]; then
>   #echo "portrait"
> 
>   echo 0  > /sys/class/backlight/corgi-bl/power
> 
>   exit 0
> fi
> 
> seems i was smart enough to keep a backup of my old Z's conf files ;), i
> dont garentee they will work as some is from mem, some from backups for
> OZ and coping and pasting destroying things
> 
> good luck, please post patches and foward all replies to the
> angstorm-users mailing list instead of directlly to me, this is useful
> stuff
> 
> Ger Apeldoorn wrote:
>>>> Hi,
>>>>
>>>> I've checked this out meticulously, but arent these suspend scripts
>>>> called when you turn off the zaurus?
>>>>
>>>> Is it possible to shut down the backlight when I close the clamshell?
>>>> If yes, to what event can I link the script?
>>>>
>>>> Many thanks,
>>>> Ger.
>>>>
>>>> Da_Blitz wrote:
>>>> Ger Apeldoorn wrote:
>>>>>>> Hi!
>>>>>>>
>>>>>>> I'm experiencing the backlight-bug, can anyone shed some light?
>>>>>>>
>>>>>>> Da_Blitz said there is a fix with apm and echo, can anyone point
>>>>>>> me to
>>>>>>> that please?
>>>>>>>
>>>>>>> Many thanks,
>>>>>>> Ger.
>>>> sorry, seems my post got eaten
>>>>
>>>> funnily enough i got accused of being a hardcore cmd line junky and i
>>>> agree, in this case it pays off :)
>>>>
>>>> the work around is to create a file in /etc/apm/resume.d called
>>>> S50backlight, in it put the 2 lines:
>>>>
>>>> #!/bin/sh
>>>> echo 1 > /sys/class/backlight/corgi-bl/brightness
>>>>
>>>> this will turn the backlight on at its lowest setting, you could add
>>>> suspend and restore scripts to restore the brightness using
>>>>
>>>> #!/bin/sh
>>>> cat /sys/class/backlight/corgi-bl/brightness > /etc/backlight.conf
>>>>
>>>> in /etc/apm/suspend.d/S50backlight and change the restore script to
>>>>
>>>> #!/bin/sh
>>>> if [ -f /etc/backlight.conf ]; then
>>>>     cat /etc/baclight.conf > /sys/class/backlight/corgi-bl/brightness
>>>> else
>>>>     echo 1 > /sys/class/backlight/corgi-bl/brightness
>>>> fi
>>>>
>>>> or if for example i was going to submit this as a patch to the mainline
>>>> i would add the 2 together like an init script and chuck it in
>>>> /etc/apm/scripts.d
>>>>
>>>> but thats perhaps to much info for the users list, perhaps i should just
>>>> submit a patch or CC the dev list
>>>>
>>>> on a side note you may want to move the screen lock app from the resume
>>>> folder to the suspend if you worry about infomation leakage on startup
>>>> as there is a good 1 second delay before the password prompt show,
>>>> otherwise add a S1backlight script that turns the screen off then move
>>>> the s50 resume script to S99 so that the screen turns back on after the
>>>> password app has launched
>>>>
>>>>>>> Da_Blitz schreef:
>>>>>>>> Ger Apeldoorn wrote:
>>>>>>>>> Junqian Gordon Xu schreef:
>>>>>>>>>> Ger Apeldoorn wrote:
>>>>>>>>>>> Hi!
>>>>>>>>>>>
>>>>>>>>>>> I want to install angstrom to my 3100, is that possible and how?
>>>>>>>>>>>
>>>>>>>>>>> It is not mentioned in the installation howto on the wiki.
>>>>>>>>>>>
>>>>>>>>>>> Many thanks,
>>>>>>>>>>>
>>>>>>>>>>> Ger Apeldoorn
>>>>>>>>>> Please see this post for now.
>>>>>>>>>> http://www.oesf.org/forums/index.php?showtopic=23403&st=56
>>>>>>>>>>
>>>>>>>>>> Angstrom wiki will be updated soon.
>>>>>>>>>>
>>>>>>>>>> Gordon
>>>>>>>>> Hi Gordon,
>>>>>>>>>
>>>>>>>>> Thanks for the reference to the OE forum. A few questions arise:
>>>>>>>>> - For OpenZaurus, I had to repartition my HDD; does that affect
>>>>>>>>> installing Angstrom?
>>>>>>>> I found that angstorm wouldn't install with the factory settings,
>>>>>>>> pulling the thing apart, popping the microdrive in the PC and making
>>>>>>>> one
>>>>>>>> large partion worked fine for me, i don't consider it "optimal"
>>>>>>>> however
>>>>>>>> but i would say if OZ install then so should angstrom
>>>>>>>>
>>>>>>>>> - Can I install/upgrade from OpenZaurus without losing my data?
>>>>>>>> Depends, i would back up /etc and home or if you have home on
>>>>>>>> another
>>>>>>>> partion (other than the first one) you shouldn't lose anything. but
>>>>>>>> backups are nice
>>>>>>>>
>>>>>>>>> - I should use the spitz X11 images right?
>>>>>>>> yes
>>>>>>>>
>>>>>>>>> - Is Angstrom considered stable yet? I see very recent images here:
>>>>>>>>> http://www.angstrom-distribution.org/unstable/images/spitz/20070422/
>>>>>>>>>
>>>>>>>> Definatly not, theres a touch screen issue (easy to fix, just
>>>>>>>> have to
>>>>>>>> edita file) and a backlight problem (fix for this one is to
>>>>>>>> disable the
>>>>>>>> backlight off feature and just let the device power off). basically
>>>>>>>> sometimes the backlight dosent come back on after resume
>>>>>>>>
>>>>>>>> a longer hack can be done with apm and echo, if you want it i will
>>>>>>>> post it
>>>>>>>>
>>>>>>>>> - Is it easy to upgrade Angstrom without losing settings/data?
>>>>>>>> if you keep /home on another partion then yes, copy /etc to the
>>>>>>>> partion.
>>>>>>>> reflash. then restore /etc files as needed (basically only things
>>>>>>>> that
>>>>>>>> you massively edited by hand)
>>>>>>>>
>>>>>>>>> Ehhh.. That's it for now ;)
>>>>>>>>>
>>>>>>>>> Thanks,
>>>>>>>>> Ger.
>>>>>>>> Hope that helped
> _______________________________________________
> Angstrom-distro-users mailing list
> Angstrom-distro-users at linuxtogo.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-users
> 
>>

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFGPECuWXWdE2sO05wRCpOtAJ9IYP+1KP+mRyJWiTSoWEKg2VENwQCfRydg
zy1HSWonyjUfjN/jD0Kd2Y8=
=sze0
-----END PGP SIGNATURE-----



More information about the Angstrom-distro-users mailing list