[OE-core] [PATCH 2/2] wic: Allow to use a custom config for bootloaders

Ed Bartosh ed.bartosh at linux.intel.com
Fri Nov 27 12:47:18 UTC 2015


On Thu, Nov 26, 2015 at 01:23:50PM -0600, Mariano Lopez wrote:
> 
> 
> On 11/26/2015 08:48 AM, Mariano Lopez wrote:
> >
> >
> >On 11/24/2015 09:43 AM, Ed Bartosh wrote:
> >>On Mon, Nov 23, 2015 at 04:13:15PM -0600, Mariano Lopez wrote:
> >>>
> >>>On 11/23/2015 11:37 AM, Ed Bartosh wrote:
> >>>>Hi Mariano,
> >>>>
> >>>>Thank you for the patchset!
> >>>>
> >>>>Would it be better to put content of configuration file into .wks
> >>>>instead of just referring to it?
> >>>If the configuration is simple I agree with you; however if the
> >>>configuration have scripts I think it's better to have separated
> >>>file. The file can growth and would be a real mess inside a wks
> >>>file.
> >>>
> >>What bothers me here is that reference to the external entity
> >>(config file in this case) which
> >>may or may not exist. This makes wic more fragile than it is now.
> >>
> >>Can we put bootloader configs to some predefined place, e.g. to the same
> >>directory where .wks is?
> >
> >I see your point now. I'll change the code to have the
> >configuration in the wks file.
> 
> I was checking in the kickstart code and the parser is a state
> machine that reads line by line, so a multi line bootloader config
> file is not currently and option. I was about to modify the code
> when I saw the comment for this class:
> 
> "Methods that don't need to do anything may just pass.  However,
> _stateMachine should never be overridden."
> 
> So, in order to have the config file inside the wks file we would
> need to hack in kickstart code; I would like to avoid that. What do
> you think?
> 

I agree with you. Let's not touch kickstart code.

Let's put bootloader config at the same location where .wks is then.
It's also not the best solution though as it can be inconvenient for the
user, but it's better than pointing to the file which might not exist.

--
Regards,
Ed



More information about the Openembedded-core mailing list