[meta-intel] [PATCHv3 6/6] rmc: document and examples for RMC feature

Jianxun Zhang jianxun.zhang at linux.intel.com
Thu Jul 21 22:22:58 PDT 2016


> On Jul 21, 2016, at 4:39 PM, Tom Zanussi <tom.zanussi at linux.intel.com> wrote:
> 
> On 07/21/2016 06:33 PM, Jianxun Zhang wrote:
>> 
>>> On Jul 21, 2016, at 4:14 PM, Tom Zanussi <tom.zanussi at linux.intel.com> wrote:
>>> 
>>> On 07/21/2016 06:02 PM, Jianxun Zhang wrote:
>>>> 
>>>>> On Jul 21, 2016, at 3:41 PM, Tom Zanussi <tom.zanussi at linux.intel.com> wrote:
>>>>> 
>>>>> On 07/21/2016 03:37 AM, Jianxun Zhang wrote:
>>>>>> Provide a README for RMC feature. Also check in fingerprints and
>>>>>> configuration data for several boards as examples for users.
>>>>>> They can be used for validation too.
>>>>>> 
>>>>>> Signed-off-by: Jianxun Zhang <jianxun.zhang at linux.intel.com>
>>>>> 
>>>>> [...]
>>>>> 
>>>>>> +
>>>>>> +Note 3:
>>>>>> +At runtime, RMC installer tries to fetch INSTALLER.CONFIG file specific to the
>>>>>> +board, then tries to fetch each file specified in this config file, and then
>>>>>> +deploy the file onto target with its permissions, UID, GID and other attributes
>>>>>> +also specified in this config file if file for the board can be retrieved from
>>>>>> +RMC database. The format of this file is (# is for comment line)
>>>>>> +
>>>>>> +# name:uid:gid:mode:path_on_target
>>>>>> +# to create a directory, add a “/” at the end of path_on_target:
>>>>>> +audio_policy:0:0:600:/etc/audio/
>>>>>> +audio_def_policy:0:0:600:/etc/audio/audio_policy
>>>>>> +
>>>>>> +The first line tells RMC installer to create a directory “audio” in /etc. If any
>>>>>> +parent directory doesn’t exist, installer will create it. The above example
>>>>>> +creates /etc/audio directory first, then fetch a file named “audio_def_policy”
>>>>>> +from RMC database for the board, then copy it to /etc/audio/ with a new name
>>>>>> +“audio_policy”.
>>>>>> +
>>>>> 
>>>>> This example explicitly creates the /etc/audio directory first, then the
>>>>> audio_policy file inside.  It seems you're doing this here just as an
>>>>> example, but when I tried without creating the /etc/audio directory
>>>>> first, it failed…
>>>> Great catch! The correct information is in commit msg of installer patch, but not updated in README. :-(
>>>> Will fix this.
>>>> 
>>> 
>>> So, the fix is to make the code match "If any parent directory doesn’t
>>> exist, installer will create it".  Seems like that's the right fix..
>> Nope. Developer must explicitly direct installer to create dir for new file first. This is because only developer knows FS attributes for dir to be created. Code is right but readme is wrong.
>> 
> 
> Seems like they should be created with default attributes, which they
> can of course override by doing it directly - it's very tedious for the
> user to manually create each directory otherwise.
> 

Unfortunately, that’s developers destiny. I don’t think there is a default setting fit all situations. Such info can only be from developers. You won’t be able to fix it when rootfs is installed as read-only on target.

Developers are paid to get everything right in delivery...

BTW, I do have “mkdir -p” ! :-)


> Tom
> 
> 
>> 
>>> new directory first if destination of a file is in that directory
>>> by adding a '/' at the end of a line.
>> 
>> 
>>> If a rule in config file is to create a directory, installer
>>> creates it accordingly. Developer must direct installer to create
>>> new directory first if destination of a file is in that directory
>>> by adding a '/' at the end of a line.
>> 
>> 
>> 
>>> 
>>> Tom
>>> 
>>>>> 
>>>>> Tom
>>>>> 
>>>>>> +If this config file is not provided, only default entries “boot” and “install”
>>>>>> +from OE are in boot menu. The name of this config file is what installer looks
>>>>>> +up first, so it must be “INSTALLER.CONFIG”.
>>>>>> +
>>>>>> +



More information about the meta-intel mailing list