For review before putting it on Gerrit. I would like to document how the per device policy support works since I have been getting A LOT of questions on it.
On Fri, Oct 26, 2012 at 5:29 PM, William Roberts <bill.c.robe...@gmail.com>wrote: > From 7ede6b7e40bea7d3876ab70b96e5521ef98704e6 Mon Sep 17 00:00:00 2001 > From: William Roberts <w.robe...@sta.samsung.com> > Date: Fri, 26 Oct 2012 16:59:43 +0900 > Subject: [PATCH] Added README > > Currently captures how to configure a per device policy. > --- > README | 46 ++++++++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 46 insertions(+), 0 deletions(-) > create mode 100644 README > > diff --git a/README b/README > new file mode 100644 > index 0000000..d79635b > --- /dev/null > +++ b/README > @@ -0,0 +1,46 @@ > +Policy Generation: > + > +Additional, per device, policy files can be added into the > +policy build. > + > +The can be configured through the use of three variables, > +they are: > +1. BOARD_SEPOLICY_REPLACE > +2. BOARD_SEPOLICY_UNION > +3. BOARD_SEPOLICY_DIRS > + > +The variables should be set in the BoardConfig.mk file in > +the device or vendor directories. > + > +BOARD_SEPOLICY_UNION is a list of of files that will be > +"unioned", IE concatenated, at the END of their respective > +file in external/sepolicy. Note, to add a unique file you > +would use this variable. > + > +BOARD_SEPOLICY_REPLACE is a list of files that will be > +used instead of the corresponding file in external/sepolicy. > + > +BOARD_SEPOLICY_DIRS contains a list of directories to search > +for BOARD_SEPOLICY_UNION and BOARD_SEPOLICY_REPLACE files. > + > +It is an error to specify a BOARD_POLICY_REPLACE file that does > +not exist in external/sepolicy. > + > +It is an error to specify a BOARD_POLICY_REPLACE file multiple > +times. > + > +It is an error to specify the same file name in both > +BOARD_POLICY_REPLACE and BOARD_POLICY_UNION. > + > +It is an error to specify a BOARD_SEPOLICY_DIRS that has no entries. > + > +Example Usage: > +From the Tuna device BoardConfig.mk, device/samsung/tuna/BoardConfig.mk > + > +BOARD_SEPOLICY_DIRS := \ > + device/samsung/tuna/sepolicy > + > +BOARD_SEPOLICY_UNION := \ > + genfs_contexts \ > + file_contexts \ > + sepolicy.te > -- > 1.7.0.4 > > -- Respectfully, William C Roberts