Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 100167 - hdaps-0.02.ebuild (New Package)
Summary: hdaps-0.02.ebuild (New Package)
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Default Assignee for New Packages
URL: http://hdaps.sourceforge.net
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2005-07-24 17:36 UTC by Joshua Megerman
Modified: 2006-06-20 00:42 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
HDAPS Alpha driver ebuild (hdaps-0.02.ebuild,694 bytes, text/plain)
2005-07-24 17:38 UTC, Joshua Megerman
Details
latest version (20050914-02) of hdaps (hdaps-20050914.ebuild,711 bytes, text/plain)
2005-10-06 15:36 UTC, Ruben Jenster
Details
ebuild for hdapsd - the daemon for the hdaps driver (hdapsd.tar.bz2,1.78 KB, application/x-tbz)
2005-10-06 17:46 UTC, Ruben Jenster
Details
hdapsd-0.1.tar.bz2 (hdapsd-01.tar.bz2,1.59 KB, application/x-tbz)
2005-11-14 07:26 UTC, Ruben Jenster
Details
hdapsd-0.1-ebuild.tar.bz2 (hdapsd-0.1-ebuild.tar.bz2,1.78 KB, application/x-tbz)
2005-11-14 07:30 UTC, Ruben Jenster
Details
hdapsd-20060117.tar.bz2 (hdapsd-20060117.tar.bz2,3.76 KB, application/x-tbz)
2006-01-18 15:38 UTC, Ruben Jenster
Details
hdapsd-20060207.tar.bz2 (hdapsd-20060207.tar.bz2,5.22 KB, application/x-tbz)
2006-02-07 05:25 UTC, Ruben Jenster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Megerman 2005-07-24 17:36:20 UTC
Hi,

I'm attaching an ebuild for the IBM HDAPS driver currently in development at
http://hdaps.sourceforge.net, which is used to enable monitoring of the "IBM
Hard Drive Active Protection System" sensor, conmmonly refered to as a "Hard
Drive Airbag".  The driver is still very young, but it's proving useful for
those of us with newer IBM Thinkpads and a yen for the bleeding edge.

I suggest putting it into app-laptop where the other Thinkpad-specific drivers
reside.  My thanks to Henrik Brix Andersen, who took my first attempt and
writing an ebuild from scratch and turned it into something useful.

Thanks,

Josh
Comment 1 Joshua Megerman 2005-07-24 17:38:13 UTC
Created attachment 64222 [details]
HDAPS Alpha driver ebuild

hdaps-0.02.ebuild
Comment 2 Ruben Jenster 2005-10-06 15:36:44 UTC
Created attachment 70018 [details]
latest version (20050914-02) of hdaps

This is the latest version of hdaps that works fine on my T41p with 2.6.13.
Comment 3 Ruben Jenster 2005-10-06 17:46:21 UTC
Created attachment 70029 [details]
ebuild for hdapsd - the daemon for the hdaps driver

The hdaps daemon together with the disk-freeze patch that can be found at
the hdaps-devel mailinglist actually makes use out of the hdaps driver.
The hdaps daemon can park the hard disk in case the laptop is shaken.

I additionally wrote an initscript for hdapsd. In the configuration file for
the initscript you can set a threshold for hdapsd. The lower the threshold is
the earlier the heads of the disk get parkek.


Steps:

1. Patch your kernel with the disk-freeze patch.
2. Install the hdaps kernel driver
3. Extract hdapsd.tar.bz2 into the category "app-laptop" to your overlay unmask
hdapsd and emerge it.


description of the disk-freeze patch (taken from the hdaps-devel mailinglist):

I would like to submit the latest disk protection (a.k.a. parking and 
freezing) code from the hdaps-devel side for comment, along with a brief 
overview of what's in the patch -

During initialisation, disk drivers with 'protect' helper functions 
(currently ide and libata) fill in two new function pointers in the 
queue structure. A sysfs 'protect' queue attribute is then created in 
the block layer for devices who's lower level drivers have registered 
these helpers.

When a value (in seconds) is written to the protect attribute, the block 
layer code calls the driver 'protect' helper function. This helper 
parks/suspends the disk, and then stops the queue. Control then returns 
to the block layer which re-uses the plugging timer to set an automatic 
timeout to restart the queue. When 0 is written to the protect 
attribute, or the timer expires, the queue is restarted using the 
'unprotect' helper function, and the plugging timer is restored.

This interface is intended to be used by a daemon process, that monitors 
the hdaps driver output for excessive changes in acceleration, and keeps 
the device parked and the queue stopped until the values become normal.

Patch applies to 2.6.14-rc3 (also 2.6.13.x), and requires libata_passthru..

Regards,
Jon.
Comment 4 Ruben Jenster 2005-11-14 07:26:57 UTC
Created attachment 72872 [details]
hdapsd-0.1.tar.bz2
Comment 5 Ruben Jenster 2005-11-14 07:30:53 UTC
Created attachment 72873 [details]
hdapsd-0.1-ebuild.tar.bz2

Updated digest file of ebuild. Extract package to the category app-laptop of
your portage overlay.
Comment 6 Ruben Jenster 2005-11-14 07:31:26 UTC
Comment on attachment 72872 [details]
hdapsd-0.1.tar.bz2

hdapsd source
Comment 7 Ruben Jenster 2006-01-11 20:08:52 UTC
Get the disk-freeze patches from:

http://thinkwiki.org/wiki/HDAPS#Security_.26_Safety
Comment 8 Joshua Megerman 2006-01-12 06:12:04 UTC
hdaps is now part of the mainstream kernel as of 2.6.14 - this ebuild is no longer necessary.
Comment 9 Ruben Jenster 2006-01-18 15:38:50 UTC
Created attachment 77468 [details]
hdapsd-20060117.tar.bz2

Updated daemon from http://www.dresco.co.uk/hdaps and adjusted initscript.
Just extract the package to your ${PORTDIR_OVERLAY}/app-laptop and emerge
hdapsd.
Comment 10 Ruben Jenster 2006-02-07 05:25:30 UTC
Created attachment 79112 [details]
hdapsd-20060207.tar.bz2

improved version of hdapsd

* Better handling of diagonal movement: use Pythagoras's theorem
Comment 11 Ruben Jenster 2006-02-07 05:25:30 UTC
Created attachment 79112 [details]
hdapsd-20060207.tar.bz2

improved version of hdapsd

* Better handling of diagonal movement: use Pythagoras's theorem
  when comparing to threshold.
* The kernel patch already handles unfreeze timeout, so rely on it
  instead of duplicating that functionality (simplifies the code).
* Constify some numbers, and increase sampling frequency from 10Hz to
  50Hz (IBM says typical laptop falling time is just 200ms, and there's a
  unloading latency)
* Rename sanity_check() to read_protect(), add error checking.
Comment 12 Tobias Sager 2006-02-07 08:44:52 UTC
This bug should be reopened (and renamed).
This is about hdapsd, a daemon reacting to the disk behaviour, not hdaps reading support (which is in the kernel).

Ruben, do you know which patch exactly should be used on the a 2.6.15? Is there still a neccessity for patching it? Maybe we should get that patch in gentoo-sources then.
Comment 13 Henrik Brix Andersen 2006-02-07 09:02:35 UTC
Please open a seperate enhancement request for the user space hdapsd daemon.
Comment 14 Tobias Sager 2006-02-07 09:23:49 UTC
That's bug 119845 then.
Comment 15 Jakub Moc (RETIRED) gentoo-dev 2006-06-20 00:42:39 UTC
*** Bug 137338 has been marked as a duplicate of this bug. ***